diff options
13 files changed, 62 insertions, 25 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UStringImpl.h b/src/3rdparty/webkit/JavaScriptCore/runtime/UStringImpl.h index 4dccb25..065443a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/UStringImpl.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UStringImpl.h @@ -58,7 +58,6 @@ protected: }; using Noncopyable::operator new; - void* operator new(size_t, void* inPlace) { return inPlace; } // For SmallStringStorage, which allocates an array and uses an in-place new. UStringOrRopeImpl() { } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h index 09094d1..4631055 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h @@ -88,9 +88,9 @@ namespace WTF { // must have the following function members: // static unsigned hash(const T&); // static bool equal(const ValueType&, const T&); - template<typename T, typename HashTranslator> iterator find(const T&); - template<typename T, typename HashTranslator> const_iterator find(const T&) const; - template<typename T, typename HashTranslator> bool contains(const T&) const; + template<typename TYPE, typename HashTranslator> iterator find(const TYPE&); + template<typename TYPE, typename HashTranslator> const_iterator find(const TYPE&) const; + template<typename TYPE, typename HashTranslator> bool contains(const TYPE&) const; // An alternate version of add() that finds the object by hashing and comparing // with some other type, to avoid the cost of type conversion if the object is already @@ -98,7 +98,7 @@ namespace WTF { // static unsigned hash(const T&); // static bool equal(const ValueType&, const T&); // static translate(ValueType&, const T&, unsigned hashCode); - template<typename T, typename HashTranslator> pair<iterator, bool> add(const T&, const MappedType&); + template<typename TYPE, typename HashTranslator> pair<iterator, bool> add(const TYPE&, const MappedType&); void checkConsistency() const; diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h index 8eb55c1..2ad437b 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h @@ -70,6 +70,9 @@ namespace WebCore { virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; + private: + static void destroyJSDOMGlobalObjectData(void*); + protected: struct JSDOMGlobalObjectData : public JSC::JSGlobalObject::JSGlobalObjectData { JSDOMGlobalObjectData(DOMWrapperWorld* world, Destructor destructor = destroyJSDOMGlobalObjectData) @@ -89,8 +92,6 @@ namespace WebCore { }; private: - static void destroyJSDOMGlobalObjectData(void*); - JSDOMGlobalObjectData* d() const { return static_cast<JSDOMGlobalObjectData*>(JSC::JSVariableObject::d); } }; diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h index 81cd149..9a62cba 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h +++ b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h @@ -249,7 +249,6 @@ public: private: using Noncopyable::operator new; - void* operator new(size_t, void* inPlace) { ASSERT(inPlace); return inPlace; } static PassRefPtr<StringImpl> createStrippingNullCharactersSlowCase(const UChar*, unsigned length); diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp b/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp index baaa8b9..ab73891 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp @@ -108,7 +108,7 @@ String TextStream::release() return String::adopt(m_text); } -#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC) +#if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC) TextStream& TextStream::operator<<(__int64 i) { char buffer[printBufferSize]; diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextStream.h b/src/3rdparty/webkit/WebCore/platform/text/TextStream.h index dfaa048..1225505 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextStream.h +++ b/src/3rdparty/webkit/WebCore/platform/text/TextStream.h @@ -45,7 +45,7 @@ public: TextStream& operator<<(const char*); TextStream& operator<<(void*); TextStream& operator<<(const String&); -#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC) +#if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC) TextStream& operator<<(unsigned __int64); TextStream& operator<<(__int64); #endif diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp index 01e425f..9d869ab 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp @@ -140,7 +140,7 @@ static BYTE* endPaint; typedef HDC (WINAPI *PtrBeginPaint)(HWND, PAINTSTRUCT*); typedef BOOL (WINAPI *PtrEndPaint)(HWND, const PAINTSTRUCT*); -#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC) +#if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC) extern "C" HDC __stdcall _HBeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint); extern "C" BOOL __stdcall _HEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint); #endif @@ -978,7 +978,7 @@ bool PluginView::platformStart() // Calling SetWindowLongPtrA here makes the window proc ASCII, which is required by at least // the Shockwave Director plug-in. -#if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC) +#if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC) ::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); #elif OS(WINCE) ::SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProc); diff --git a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPropertySynchronizer.h b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPropertySynchronizer.h index ddd0493..695b71e 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPropertySynchronizer.h +++ b/src/3rdparty/webkit/WebCore/svg/SVGAnimatedPropertySynchronizer.h @@ -41,13 +41,15 @@ struct GetOwnerElementForType<OwnerType, true> : public Noncopyable { template<typename OwnerType> struct GetOwnerElementForType<OwnerType, false> : public Noncopyable { - static SVGElement* ownerElement(OwnerType* type) + static SVGElement* ownerElement(OwnerType* type); +}; +template<typename OwnerType> +SVGElement* GetOwnerElementForType<OwnerType, false>::ownerElement(OwnerType* type) { SVGElement* context = type->contextElement(); ASSERT(context); return context; } -}; // IsDerivedFromSVGElement implementation template<typename OwnerType> diff --git a/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp b/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp index 29e211e..f5acb38 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp +++ b/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp @@ -68,7 +68,12 @@ NodeSet& Value::modifiableNodeSet() return m_data->m_nodeSet; } +#if COMPILER(WINSCW) +// FIXME --nl-- Symbian WINSCW compiler complains with 'ambiguous access to overloaded function' (double, unsigned long, unsigned int) +unsigned int Value::toBoolean() const +#else bool Value::toBoolean() const +#endif { switch (m_type) { case NodeSetValue: diff --git a/src/3rdparty/webkit/WebCore/xml/XPathValue.h b/src/3rdparty/webkit/WebCore/xml/XPathValue.h index a0cd24d..bd44c91 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathValue.h +++ b/src/3rdparty/webkit/WebCore/xml/XPathValue.h @@ -66,8 +66,11 @@ namespace WebCore { Value(Node* value) : m_type(NodeSetValue), m_bool(false), m_number(0), m_data(ValueData::create()) { m_data->m_nodeSet.append(value); } // This is needed to safely implement constructing from bool - with normal function overloading, any pointer type would match. +#if COMPILER(WINSCW) + Value(bool); +#else template<typename T> Value(T); - +#endif static const struct AdoptTag {} adopt; Value(NodeSet& value, const AdoptTag&) : m_type(NodeSetValue), m_bool(false), m_number(0), m_data(ValueData::create()) { value.swap(m_data->m_nodeSet); } @@ -80,7 +83,12 @@ namespace WebCore { const NodeSet& toNodeSet() const; NodeSet& modifiableNodeSet(); +#if COMPILER(WINSCW) + // FIXME --nl-- Symbian WINSCW compiler complains with 'ambiguous access to overloaded function' (double, unsigned long, unsigned int) + unsigned int toBoolean() const; +#else bool toBoolean() const; +#endif double toNumber() const; String toString() const; @@ -90,8 +98,9 @@ namespace WebCore { double m_number; RefPtr<ValueData> m_data; }; - +#if !COMPILER(WINSCW) template<> +#endif inline Value::Value(bool value) : m_type(BooleanValue) , m_bool(value) diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui index 4f2b3b8..ae5e0b5 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui +++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Widget</string> + <string notr="true">Widget</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> @@ -28,7 +28,7 @@ <item> <widget class="QLabel" name="lbl1"> <property name="text"> - <string/> + <string notr="true"/> </property> </widget> </item> @@ -47,21 +47,21 @@ </size> </property> <property name="text"> - <string>Image from Qt to HTML</string> + <string notr="true">Image from Qt to HTML</string> </property> </widget> </item> <item> <widget class="QLabel" name="lbl3"> <property name="text"> - <string>Pixmap from Qt to HTML</string> + <string notr="true">Pixmap from Qt to HTML</string> </property> </widget> </item> <item> <widget class="QLabel" name="lbl4"> <property name="text"> - <string/> + <string notr="true"/> </property> </widget> </item> diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index ec00915..e94d247 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -101,6 +101,17 @@ QT_END_NAMESPACE return !(isPopup || isToolTip || isTool); } +- (void)becomeMainWindow +{ + [super becomeMainWindow]; + // Cocoa sometimes tell a hidden window to become the + // main window (and as such, show it). This can e.g + // happend when the application gets activated. If + // this is the case, we tell it to hide again: + if (![self isVisible]) + [self orderOut:self]; +} + - (void)toggleToolbarShown:(id)sender { macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]); diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 6a0eb53..7645c23 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -665,6 +665,7 @@ void qt_mac_set_modal_state_helper_recursive(OSMenuRef menu, OSMenuRef merge, bo } } #else + bool modalWindowOnScreen = qApp->activeModalWidget() != 0; for (NSMenuItem *item in [menu itemArray]) { OSMenuRef submenu = [item submenu]; if (submenu != merge) { @@ -674,10 +675,20 @@ void qt_mac_set_modal_state_helper_recursive(OSMenuRef menu, OSMenuRef merge, bo // The item should follow what the QAction has. if ([item tag]) { QAction *action = reinterpret_cast<QAction *>([item tag]); - syncNSMenuItemEnabled(item, action->isEnabled()); - } else { - syncNSMenuItemEnabled(item, YES); - } + syncNSMenuItemEnabled(item, action->isEnabled()); + } else { + syncNSMenuItemEnabled(item, YES); + } + // We sneak in some extra code here to handle a menu problem: + // If there is no window on screen, we cannot set 'nil' as + // menu item target, because then cocoa will disable the item + // (guess it assumes that there will be no first responder to + // catch the trigger anyway?) OTOH, If we have a modal window, + // then setting the menu loader as target will make cocoa not + // deliver the trigger because the loader is then seen as modally + // shaddowed). So either way there are shortcomings. Instead, we + // decide the target as late as possible: + [item setTarget:modalWindowOnScreen ? nil : getMenuLoader()]; } else { syncNSMenuItemEnabled(item, NO); } |