Title: [136685] trunk/Source/WebKit/qt
Revision
136685
Author
[email protected]
Date
2012-12-05 07:31:09 -0800 (Wed, 05 Dec 2012)

Log Message

[Qt][Mac] QWebView disappears when the system tries to hide the scrollbars.
https://bugs.webkit.org/show_bug.cgi?id=104116

This is a workaround for an issue in Qt that was
caused by Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e
in qtbase.
Since we are drawing the scrollbars by ourselves, there is no
widget available that needs to be hidden by the style.
Therefore we have to disable transient scrollbar
animations on Mac.

Patch by: J-P Nurmi <[email protected]>

Reviewed by Simon Hausmann.

* WidgetSupport/QStyleFacadeImp.cpp:
(WebKit::QStyleFacadeImp::paintScrollBar):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (136684 => 136685)


--- trunk/Source/WebKit/qt/ChangeLog	2012-12-05 15:25:22 UTC (rev 136684)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-12-05 15:31:09 UTC (rev 136685)
@@ -1,3 +1,23 @@
+2012-12-05  Zeno Albisser  <[email protected]>
+
+        [Qt][Mac] QWebView disappears when the system tries to hide the scrollbars.
+        https://bugs.webkit.org/show_bug.cgi?id=104116
+
+        This is a workaround for an issue in Qt that was
+        caused by Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e
+        in qtbase.
+        Since we are drawing the scrollbars by ourselves, there is no
+        widget available that needs to be hidden by the style.
+        Therefore we have to disable transient scrollbar
+        animations on Mac.
+
+        Patch by: J-P Nurmi <[email protected]>
+
+        Reviewed by Simon Hausmann.
+
+        * WidgetSupport/QStyleFacadeImp.cpp:
+        (WebKit::QStyleFacadeImp::paintScrollBar):
+
 2012-12-04  Pierre Rossi  <[email protected]>
 
         [Qt] Yet another unreviewed speculative windows build fix. 

Modified: trunk/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp (136684 => 136685)


--- trunk/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp	2012-12-05 15:25:22 UTC (rev 136684)
+++ trunk/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp	2012-12-05 15:31:09 UTC (rev 136685)
@@ -454,23 +454,18 @@
 
     MappedStyleOption<QStyleOptionSlider> opt(widget, proxyOption);
 
-#ifdef Q_OS_MAC
-    // FIXME: We also need to check the widget style but today ScrollbarTheme is not aware of the page so we
-    // can't get the widget.
-    if (m_style->inherits("QMacStyle"))
-        m_style->drawComplexControl(QStyle::CC_ScrollBar, &opt, painter, widget);
-    else
-#endif
-    {
-        // The QStyle expects the background to be already filled.
-        painter->fillRect(opt.rect, opt.palette.background());
-
-        const QPoint topLeft = opt.rect.topLeft();
-        painter->translate(topLeft);
-        opt.rect.moveTo(QPoint(0, 0));
-        style()->drawComplexControl(QStyle::CC_ScrollBar, &opt, painter, widget);
-        opt.rect.moveTo(topLeft);
+    if (m_style->inherits("QMacStyle")) {
+        // FIXME: Disable transient scrollbar animations on OSX to avoid hiding the whole webview with the scrollbar fade out animation.
+        opt.styleObject = 0;
     }
+
+    painter->fillRect(opt.rect, opt.palette.background());
+
+    const QPoint topLeft = opt.rect.topLeft();
+    painter->translate(topLeft);
+    opt.rect.moveTo(QPoint(0, 0));
+    style()->drawComplexControl(QStyle::CC_ScrollBar, &opt, painter, widget);
+    opt.rect.moveTo(topLeft);
 }
 
 QObject* QStyleFacadeImp::widgetForPainter(QPainter* painter)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to