Title: [93644] trunk
Revision
93644
Author
[email protected]
Date
2011-08-23 15:57:49 -0700 (Tue, 23 Aug 2011)

Log Message

Source/WebCore: Prepare to paint slider thumb separately.
Provide proper size values for vertical SliderThumb.
https://bugs.webkit.org/show_bug.cgi?id=66732

Patch by Tatiana Meshkova <[email protected]> on 2011-08-23
Reviewed by Kenneth Rohde Christiansen.

* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::adjustSliderThumbSize):
Swap length and thickness for sliderthumb-vertical.

LayoutTests: Swap width and height for sliderthumb-vertical.
https://bugs.webkit.org/show_bug.cgi?id=66732

Patch by Tatiana Meshkova <[email protected]> on 2011-08-23
Reviewed by Kenneth Rohde Christiansen.

* platform/qt/fast/forms/range/thumbslider-no-parent-slider-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (93643 => 93644)


--- trunk/LayoutTests/ChangeLog	2011-08-23 22:35:00 UTC (rev 93643)
+++ trunk/LayoutTests/ChangeLog	2011-08-23 22:57:49 UTC (rev 93644)
@@ -1,3 +1,12 @@
+2011-08-23  Tatiana Meshkova  <[email protected]>
+
+        Swap width and height for sliderthumb-vertical.
+        https://bugs.webkit.org/show_bug.cgi?id=66732
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/qt/fast/forms/range/thumbslider-no-parent-slider-expected.txt:
+
 2011-08-23  Peter Kasting  <[email protected]>
 
         [chromium] Typo fix.

Modified: trunk/LayoutTests/platform/qt/fast/forms/range/thumbslider-no-parent-slider-expected.txt (93643 => 93644)


--- trunk/LayoutTests/platform/qt/fast/forms/range/thumbslider-no-parent-slider-expected.txt	2011-08-23 22:35:00 UTC (rev 93643)
+++ trunk/LayoutTests/platform/qt/fast/forms/range/thumbslider-no-parent-slider-expected.txt	2011-08-23 22:57:49 UTC (rev 93644)
@@ -5,5 +5,5 @@
     RenderBody {BODY} at (8,8) size 784x584
       RenderBlock {SPAN} at (0,0) size 11x16
       RenderBR {BR} at (11,16) size 0x0
-      RenderBlock {SPAN} at (0,16) size 11x16
+      RenderBlock {SPAN} at (0,16) size 16x11
       RenderText {#text} at (0,0) size 0x0

Modified: trunk/Source/WebCore/ChangeLog (93643 => 93644)


--- trunk/Source/WebCore/ChangeLog	2011-08-23 22:35:00 UTC (rev 93643)
+++ trunk/Source/WebCore/ChangeLog	2011-08-23 22:57:49 UTC (rev 93644)
@@ -1,3 +1,15 @@
+2011-08-23  Tatiana Meshkova  <[email protected]>
+
+        Prepare to paint slider thumb separately.
+        Provide proper size values for vertical SliderThumb.
+        https://bugs.webkit.org/show_bug.cgi?id=66732
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::adjustSliderThumbSize):
+        Swap length and thickness for sliderthumb-vertical.
+
 2011-08-23  Adrienne Walker  <[email protected]>
 
         [chromium] Fix potential nullptr deref in TiledLayerChromium::pushPropertiesTo

Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (93643 => 93644)


--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2011-08-23 22:35:00 UTC (rev 93643)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2011-08-23 22:57:49 UTC (rev 93644)
@@ -1491,10 +1491,15 @@
 
         QStyle* qstyle = qStyle();
 
-        int width = qstyle->pixelMetric(QStyle::PM_SliderLength, &option);
-        int height = qstyle->pixelMetric(QStyle::PM_SliderThickness, &option);
-        style->setWidth(Length(width, Fixed));
-        style->setHeight(Length(height, Fixed));
+        int length = qstyle->pixelMetric(QStyle::PM_SliderLength, &option);
+        int thickness = qstyle->pixelMetric(QStyle::PM_SliderThickness, &option);
+        if (option.orientation == Qt::Vertical) {
+            style->setWidth(Length(thickness, Fixed));
+            style->setHeight(Length(length, Fixed));
+        } else {
+            style->setWidth(Length(length, Fixed));
+            style->setHeight(Length(thickness, Fixed));
+        }
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to