diff --git src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index b0a0877c..046b11c8 100644
|
|
RegisterID* BytecodeGenerator::emitNextPropertyName(RegisterID* dst, RegisterID* |
1835 | 1835 | RegisterID* BytecodeGenerator::emitCatch(RegisterID* targetRegister, Label* start, Label* end) |
1836 | 1836 | { |
1837 | 1837 | #if ENABLE(JIT) |
1838 | | HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel() }; |
| 1838 | HandlerInfo info = { |
| 1839 | static_cast<uint32_t>(start->bind(0, 0)), |
| 1840 | static_cast<uint32_t>(end->bind(0, 0)), |
| 1841 | static_cast<uint32_t>(instructions().size()), |
| 1842 | static_cast<uint32_t>(m_dynamicScopeDepth + m_baseScopeDepth), |
| 1843 | CodeLocationLabel() |
| 1844 | }; |
1839 | 1845 | #else |
1840 | | HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth }; |
| 1846 | HandlerInfo info = { |
| 1847 | static_cast<uint32_t>(start->bind(0, 0)), |
| 1848 | static_cast<uint32_t>(end->bind(0, 0)), |
| 1849 | static_cast<uint32_t>(instructions().size()), |
| 1850 | static_cast<uint32_t>(m_dynamicScopeDepth + m_baseScopeDepth) |
| 1851 | }; |
1841 | 1852 | #endif |
1842 | 1853 | |
1843 | 1854 | m_codeBlock->addExceptionHandler(info); |
… |
… |
void BytecodeGenerator::emitPushNewScope(RegisterID* dst, const Identifier& prop |
1889 | 1900 | |
1890 | 1901 | void BytecodeGenerator::beginSwitch(RegisterID* scrutineeRegister, SwitchInfo::SwitchType type) |
1891 | 1902 | { |
1892 | | SwitchInfo info = { instructions().size(), type }; |
| 1903 | SwitchInfo info = { static_cast<uint32_t>(instructions().size()), type }; |
1893 | 1904 | switch (type) { |
1894 | 1905 | case SwitchInfo::SwitchImmediate: |
1895 | 1906 | emitOpcode(op_switch_imm); |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index 8b6a4251..af74e60c 100644
|
|
namespace JSC { |
176 | 176 | // Node::emitCode assumes that dst, if provided, is either a local or a referenced temporary. |
177 | 177 | ASSERT(!dst || dst == ignoredResult() || !dst->isTemporary() || dst->refCount()); |
178 | 178 | if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) { |
179 | | LineInfo info = { instructions().size(), n->lineNo() }; |
| 179 | LineInfo info = { static_cast<uint32_t>(instructions().size()), n->lineNo() }; |
180 | 180 | m_codeBlock->addLineInfo(info); |
181 | 181 | } |
182 | 182 | if (m_emitNodeDepth >= s_maxEmitNodeDepth) |
… |
… |
namespace JSC { |
195 | 195 | void emitNodeInConditionContext(ExpressionNode* n, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue) |
196 | 196 | { |
197 | 197 | if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) { |
198 | | LineInfo info = { instructions().size(), n->lineNo() }; |
| 198 | LineInfo info = { static_cast<uint32_t>(instructions().size()), n->lineNo() }; |
199 | 199 | m_codeBlock->addLineInfo(info); |
200 | 200 | } |
201 | 201 | if (m_emitNodeDepth >= s_maxEmitNodeDepth) |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp
index 747c4ac8..0702c423 100644
|
|
PassRefPtr<UString::Rep> Identifier::add(JSGlobalData* globalData, const UChar* |
195 | 195 | UString::Rep::empty().hash(); |
196 | 196 | return &UString::Rep::empty(); |
197 | 197 | } |
198 | | UCharBuffer buf = {s, length}; |
| 198 | UCharBuffer buf = {s, static_cast<unsigned>(length)}; |
199 | 199 | pair<HashSet<UString::Rep*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, UCharBufferTranslator>(buf); |
200 | 200 | |
201 | 201 | // If the string is newly-translated, then we need to adopt it. |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
index b089584e..daacbdbb 100644
|
|
void Stringifier::appendQuotedString(StringBuilder& builder, const UString& valu |
320 | 320 | default: |
321 | 321 | static const char hexDigits[] = "0123456789abcdef"; |
322 | 322 | UChar ch = data[i]; |
323 | | UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] }; |
| 323 | UChar hex[] = { '\\', 'u', |
| 324 | static_cast<UChar>(hexDigits[(ch >> 12) & 0xF]), |
| 325 | static_cast<UChar>(hexDigits[(ch >> 8) & 0xF]), |
| 326 | static_cast<UChar>(hexDigits[(ch >> 4) & 0xF]), |
| 327 | static_cast<UChar>(hexDigits[ch & 0xF]) }; |
324 | 328 | builder.append(hex, sizeof(hex) / sizeof(UChar)); |
325 | 329 | break; |
326 | 330 | } |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
index 499c53a7..ac4ab864 100644
|
|
Structure::Structure(JSValue prototype, const TypeInfo& typeInfo) |
156 | 156 | Structure::~Structure() |
157 | 157 | { |
158 | 158 | if (m_previous) { |
159 | | if (m_nameInPrevious) |
160 | | m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), m_attributesInPrevious), m_specificValueInPrevious); |
161 | | else |
| 159 | if (m_nameInPrevious) { |
| 160 | unsigned attrInPrev = m_attributesInPrevious; |
| 161 | m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), attrInPrev), m_specificValueInPrevious); |
| 162 | } else |
162 | 163 | m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious); |
163 | 164 | |
164 | 165 | } |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h
index 7571efc1..a8deb5ef 100644
|
|
namespace JSC { |
316 | 316 | Structure* existingTransition = singleTransition(); |
317 | 317 | TransitionTable* transitionTable = new TransitionTable; |
318 | 318 | setTransitionTable(transitionTable); |
319 | | if (existingTransition) |
320 | | add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); |
| 319 | if (existingTransition) { |
| 320 | const unsigned attrsInPrev = existingTransition->m_attributesInPrevious; |
| 321 | add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), attrsInPrev), existingTransition, existingTransition->m_specificValueInPrevious); |
| 322 | } |
321 | 323 | } |
322 | 324 | } // namespace JSC |
323 | 325 | |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/UTF8.cpp src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/UTF8.cpp
index 21d58563..cbfc528e 100644
|
|
static bool isLegalUTF8(const unsigned char* source, int length) |
229 | 229 | // This table contains as many values as there might be trailing bytes |
230 | 230 | // in a UTF-8 sequence. |
231 | 231 | static const UChar32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, |
232 | | 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; |
| 232 | 0x03C82080UL, static_cast<UChar32>(0xFA082080UL), static_cast<UChar32>(0x82082080UL) }; |
233 | 233 | |
234 | 234 | ConversionResult convertUTF8ToUTF16( |
235 | 235 | const char** sourceStart, const char* sourceEnd, |
diff --git src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp
index 9cd3d123..c37bf518 100644
|
|
const char* compileRegex(const UString& patternString, RegexPattern& pattern) |
719 | 719 | |
720 | 720 | constructor.setupOffsets(); |
721 | 721 | |
722 | | return false; |
| 722 | return NULL; |
723 | 723 | }; |
724 | 724 | |
725 | 725 | |
diff --git src/gui/kernel/qcocoaview_mac.mm src/gui/kernel/qcocoaview_mac.mm
index 34dc8156..81f67d5e 100644
|
|
Qt::DropAction QDragManager::drag(QDrag *o) |
1352 | 1352 | // Save supported actions: |
1353 | 1353 | [theView setSupportedActions: qt_mac_mapDropActions(dragPrivate()->possible_actions)]; |
1354 | 1354 | QPoint pointInView = [theView qt_qwidget]->mapFromGlobal(dndParams->globalPoint); |
1355 | | NSPoint imageLoc = {pointInView.x() - hotspot.x(), pointInView.y() + pix.height() - hotspot.y()}; |
| 1355 | NSPoint imageLoc = {static_cast<CGFloat>(pointInView.x() - hotspot.x()), static_cast<CGFloat>(pointInView.y() + pix.height() - hotspot.y())}; |
1356 | 1356 | NSSize mouseOffset = {0.0, 0.0}; |
1357 | 1357 | NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; |
1358 | 1358 | dragPrivate()->executed_action = Qt::ActionMask; |
diff --git src/gui/kernel/qcursor_mac.mm src/gui/kernel/qcursor_mac.mm
index 764bc382..91c2cedb 100644
|
|
void QCursorData::initCursorFromBitmap() |
369 | 369 | type = QCursorData::TYPE_ImageCursor; |
370 | 370 | curs.cp.my_cursor = true; |
371 | 371 | QPixmap bmCopy = QPixmap::fromImage(finalCursor); |
372 | | NSPoint hotSpot = { hx, hy }; |
| 372 | NSPoint hotSpot = { static_cast<CGFloat>(hx), static_cast<CGFloat>(hy) }; |
373 | 373 | nsimage = static_cast<NSImage*>(qt_mac_create_nsimage(bmCopy)); |
374 | 374 | curs.cp.nscursor = [[NSCursor alloc] initWithImage:nsimage hotSpot: hotSpot]; |
375 | 375 | [nsimage release]; |
… |
… |
void QCursorData::initCursorFromPixmap() |
379 | 379 | { |
380 | 380 | type = QCursorData::TYPE_ImageCursor; |
381 | 381 | curs.cp.my_cursor = true; |
382 | | NSPoint hotSpot = { hx, hy }; |
| 382 | NSPoint hotSpot = { static_cast<CGFloat>(hx), static_cast<CGFloat>(hy) }; |
383 | 383 | NSImage *nsimage; |
384 | 384 | nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(pixmap)); |
385 | 385 | curs.cp.nscursor = [[NSCursor alloc] initWithImage:nsimage hotSpot: hotSpot]; |
diff --git src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm
index 761c8da5..cabf4c8d 100644
|
|
void qt_dispatchTabletProximityEvent(void * /*NSEvent * */ tabletEvent) |
462 | 462 | { |
463 | 463 | NSEvent *proximityEvent = static_cast<NSEvent *>(tabletEvent); |
464 | 464 | // simply construct a Carbon proximity record and handle it all in one spot. |
465 | | TabletProximityRec carbonProximityRec = { [proximityEvent vendorID], |
466 | | [proximityEvent tabletID], |
467 | | [proximityEvent pointingDeviceID], |
468 | | [proximityEvent deviceID], |
469 | | [proximityEvent systemTabletID], |
470 | | [proximityEvent vendorPointingDeviceType], |
471 | | [proximityEvent pointingDeviceSerialNumber], |
| 465 | TabletProximityRec carbonProximityRec = { static_cast<UInt16>([proximityEvent vendorID]), |
| 466 | static_cast<UInt16>([proximityEvent tabletID]), |
| 467 | static_cast<UInt16>([proximityEvent pointingDeviceID]), |
| 468 | static_cast<UInt16>([proximityEvent deviceID]), |
| 469 | static_cast<UInt16>([proximityEvent systemTabletID]), |
| 470 | static_cast<UInt16>([proximityEvent vendorPointingDeviceType]), |
| 471 | static_cast<UInt32>([proximityEvent pointingDeviceSerialNumber]), |
472 | 472 | [proximityEvent uniqueID], |
473 | | [proximityEvent capabilityMask], |
474 | | [proximityEvent pointingDeviceType], |
475 | | [proximityEvent isEnteringProximity] }; |
| 473 | static_cast<UInt32>([proximityEvent capabilityMask]), |
| 474 | static_cast<UInt8>([proximityEvent pointingDeviceType]), |
| 475 | static_cast<UInt8>([proximityEvent isEnteringProximity]) }; |
476 | 476 | qt_dispatchTabletProximityEvent(carbonProximityRec); |
477 | 477 | } |
478 | 478 | #endif // QT_MAC_USE_COCOA |
diff --git src/gui/styles/qmacstyle_mac.mm src/gui/styles/qmacstyle_mac.mm
index 196d14bd..549a2d7e 100644
|
|
void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter |
3466 | 3466 | tti.version = qt_mac_hitheme_version; |
3467 | 3467 | tti.state = tds; |
3468 | 3468 | QColor textColor = btn->palette.buttonText().color(); |
3469 | | CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), |
3470 | | textColor.blueF(), textColor.alphaF() }; |
| 3469 | CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()), |
| 3470 | static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) }; |
3471 | 3471 | CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); |
3472 | 3472 | CGContextSetFillColor(cg, colorComp); |
3473 | 3473 | tti.fontID = themeId; |
… |
… |
void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter |
3708 | 3708 | tti.version = qt_mac_hitheme_version; |
3709 | 3709 | tti.state = tds; |
3710 | 3710 | QColor textColor = myTab.palette.windowText().color(); |
3711 | | CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), |
3712 | | textColor.blueF(), textColor.alphaF() }; |
| 3711 | CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()), |
| 3712 | static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) }; |
3713 | 3713 | CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); |
3714 | 3714 | CGContextSetFillColor(cg, colorComp); |
3715 | 3715 | switch (d->aquaSizeConstrain(opt, w)) { |
… |
… |
void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter |
3898 | 3898 | CGContextSetShouldAntialias(cg, true); |
3899 | 3899 | CGContextSetShouldSmoothFonts(cg, true); |
3900 | 3900 | QColor textColor = p->pen().color(); |
3901 | | CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), |
3902 | | textColor.blueF(), textColor.alphaF() }; |
| 3901 | CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()), |
| 3902 | static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) }; |
3903 | 3903 | CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); |
3904 | 3904 | CGContextSetFillColor(cg, colorComp); |
3905 | 3905 | HIThemeTextInfo tti; |
… |
… |
void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex |
5034 | 5034 | tti.version = qt_mac_hitheme_version; |
5035 | 5035 | tti.state = tds; |
5036 | 5036 | QColor textColor = groupBox->palette.windowText().color(); |
5037 | | CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), |
5038 | | textColor.blueF(), textColor.alphaF() }; |
| 5037 | CGFloat colorComp[] = { static_cast<CGFloat>(textColor.redF()), static_cast<CGFloat>(textColor.greenF()), |
| 5038 | static_cast<CGFloat>(textColor.blueF()), static_cast<CGFloat>(textColor.alphaF()) }; |
5039 | 5039 | CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); |
5040 | 5040 | CGContextSetFillColor(cg, colorComp); |
5041 | 5041 | tti.fontID = checkable ? kThemeSystemFont : kThemeSmallSystemFont; |