Title: [107913] trunk/Source/WebCore
Revision
107913
Author
[email protected]
Date
2012-02-16 02:06:38 -0800 (Thu, 16 Feb 2012)

Log Message

Unreviewed prospective Qt 4.8/Mac build fix.

Cast the PlatformWidget from QObject* to QWidget* to gain access
to QWidget methods.

* plugins/mac/PluginViewMac.mm:
(WebCore::nativeWindowFor):
(WebCore::cgHandleFor):
(WebCore::topLevelOffsetFor):
(WebCore::PluginView::setFocus):
(WebCore::PluginView::invalidateRect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107912 => 107913)


--- trunk/Source/WebCore/ChangeLog	2012-02-16 10:06:28 UTC (rev 107912)
+++ trunk/Source/WebCore/ChangeLog	2012-02-16 10:06:38 UTC (rev 107913)
@@ -1,3 +1,17 @@
+2012-02-16  Simon Hausmann  <[email protected]>
+
+        Unreviewed prospective Qt 4.8/Mac build fix.
+
+        Cast the PlatformWidget from QObject* to QWidget* to gain access
+        to QWidget methods.
+
+        * plugins/mac/PluginViewMac.mm:
+        (WebCore::nativeWindowFor):
+        (WebCore::cgHandleFor):
+        (WebCore::topLevelOffsetFor):
+        (WebCore::PluginView::setFocus):
+        (WebCore::PluginView::invalidateRect):
+
 2012-02-16  Roland Steiner  <[email protected]>
 
         <style scoped>: Implement scoped selector matching in the slow path

Modified: trunk/Source/WebCore/plugins/mac/PluginViewMac.mm (107912 => 107913)


--- trunk/Source/WebCore/plugins/mac/PluginViewMac.mm	2012-02-16 10:06:28 UTC (rev 107912)
+++ trunk/Source/WebCore/plugins/mac/PluginViewMac.mm	2012-02-16 10:06:38 UTC (rev 107913)
@@ -104,7 +104,7 @@
 #if PLATFORM(QT)
     if (widget)
 #if QT_MAC_USE_COCOA
-        return static_cast<WindowRef>([qt_mac_window_for(widget) windowRef]);
+        return static_cast<WindowRef>([qt_mac_window_for(static_cast<QWidget*>(widget)) windowRef]);
 #else
         return static_cast<WindowRef>(qt_mac_window_for(widget));
 #endif
@@ -119,7 +119,7 @@
 {
 #if PLATFORM(QT)
     if (widget)
-        return (CGContextRef)widget->macCGHandle();
+        return (CGContextRef)static_cast<QWidget*>(widget)->macCGHandle();
 #endif
 #if PLATFORM(WX)
     if (widget)
@@ -132,8 +132,8 @@
 {
 #if PLATFORM(QT)
     if (widget) {
-        PlatformWidget topLevel = widget->window();
-        return widget->mapTo(topLevel, QPoint(0, 0)) + topLevel->geometry().topLeft() - topLevel->pos();
+        QWidget* topLevel = static_cast<QWidget*>(widget)->window();
+        return static_cast<QWidget*>(widget)->mapTo(topLevel, QPoint(0, 0)) + topLevel->geometry().topLeft() - topLevel->pos();
     }
 #endif
 #if PLATFORM(WX)
@@ -348,7 +348,7 @@
 
     if (platformPluginWidget())
 #if PLATFORM(QT)
-       platformPluginWidget()->setFocus(Qt::OtherFocusReason);
+       static_cast<QWidget*>(platformPluginWidget())->setFocus(Qt::OtherFocusReason);
 #else
         platformPluginWidget()->SetFocus();
 #endif
@@ -535,7 +535,7 @@
 {
     if (platformPluginWidget())
 #if PLATFORM(QT)
-        platformPluginWidget()->update(convertToContainingWindow(rect));
+        static_cast<QWidget*>(platformPluginWidget())->update(convertToContainingWindow(rect));
 #else
         platformPluginWidget()->RefreshRect(convertToContainingWindow(rect));
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to