[EFL] Use vertical slider theme when the slider is vertical
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 07:54:41 +0000 (07:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 07:54:41 +0000 (07:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93838

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2012-08-23
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Applied vertical slider theme to the vertical sliders. The height
of the vertical slider is wrong when it's applied horizontal
slider theme.

And do not resize slider when its size is not specified. It's natural
to use the default value of renderer.

No new tests. It's covered by existing range and datalist tests.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):

LayoutTests:

Updated expected result because theme of the slider is changed.

The size of the renderSlider is changed to 129x12 from 129x11
because it has the slider thumb 12x12 and it is not resized when
the size is not specified.

* platform/efl/fast/dom/HTMLInputElement/input-slider-update-expected.txt:
* platform/efl/fast/forms/box-shadow-override-expected.png:
* platform/efl/fast/forms/box-shadow-override-expected.txt:
* platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-expected.png: Added.
* platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png: Added.
* platform/efl/fast/forms/input-appearance-height-expected.png:
* platform/efl/fast/forms/input-appearance-height-expected.txt:
* platform/efl/fast/forms/range/input-appearance-range-expected.png:
* platform/efl/fast/forms/range/input-appearance-range-expected.txt:
* platform/efl/fast/forms/range/slider-padding-expected.png:
* platform/efl/fast/forms/range/slider-padding-expected.txt:
* platform/efl/fast/forms/range/slider-thumb-shared-style-expected.png:
* platform/efl/fast/forms/range/slider-thumb-shared-style-expected.txt:
* platform/efl/fast/repaint/slider-thumb-drag-release-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126401 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/efl/fast/dom/HTMLInputElement/input-slider-update-expected.txt
LayoutTests/platform/efl/fast/forms/box-shadow-override-expected.png
LayoutTests/platform/efl/fast/forms/box-shadow-override-expected.txt
LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-expected.png [new file with mode: 0644]
LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png [new file with mode: 0644]
LayoutTests/platform/efl/fast/forms/input-appearance-height-expected.png
LayoutTests/platform/efl/fast/forms/input-appearance-height-expected.txt
LayoutTests/platform/efl/fast/forms/range/input-appearance-range-expected.png
LayoutTests/platform/efl/fast/forms/range/input-appearance-range-expected.txt
LayoutTests/platform/efl/fast/forms/range/slider-padding-expected.png
LayoutTests/platform/efl/fast/forms/range/slider-padding-expected.txt
LayoutTests/platform/efl/fast/forms/range/slider-thumb-shared-style-expected.png
LayoutTests/platform/efl/fast/forms/range/slider-thumb-shared-style-expected.txt
LayoutTests/platform/efl/fast/repaint/slider-thumb-drag-release-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/efl/RenderThemeEfl.cpp

index eeae892..a9b2e18 100644 (file)
@@ -1,3 +1,31 @@
+2012-08-23  KwangYong Choi  <ky0.choi@samsung.com>
+
+        [EFL] Use vertical slider theme when the slider is vertical
+        https://bugs.webkit.org/show_bug.cgi?id=93838
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Updated expected result because theme of the slider is changed.
+
+        The size of the renderSlider is changed to 129x12 from 129x11
+        because it has the slider thumb 12x12 and it is not resized when
+        the size is not specified.
+
+        * platform/efl/fast/dom/HTMLInputElement/input-slider-update-expected.txt:
+        * platform/efl/fast/forms/box-shadow-override-expected.png:
+        * platform/efl/fast/forms/box-shadow-override-expected.txt:
+        * platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-expected.png: Added.
+        * platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png: Added.
+        * platform/efl/fast/forms/input-appearance-height-expected.png:
+        * platform/efl/fast/forms/input-appearance-height-expected.txt:
+        * platform/efl/fast/forms/range/input-appearance-range-expected.png:
+        * platform/efl/fast/forms/range/input-appearance-range-expected.txt:
+        * platform/efl/fast/forms/range/slider-padding-expected.png:
+        * platform/efl/fast/forms/range/slider-padding-expected.txt:
+        * platform/efl/fast/forms/range/slider-thumb-shared-style-expected.png:
+        * platform/efl/fast/forms/range/slider-thumb-shared-style-expected.txt:
+        * platform/efl/fast/repaint/slider-thumb-drag-release-expected.txt:
+
 2012-08-23  Zan Dobersek  <zandobersek@gmail.com>
 
         Unreviewed gardening.
index d55053e..e55b4c0 100644 (file)
@@ -3,8 +3,8 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderSlider {INPUT} at (2,2) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-        RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+      RenderSlider {INPUT} at (2,2) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+        RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
           RenderBlock {DIV} at (0,0) size 117x12
           RenderBlock {DIV} at (117,0) size 12x12
       RenderText {#text} at (0,0) size 0x0
index 97db441..48b225e 100644 (file)
Binary files a/LayoutTests/platform/efl/fast/forms/box-shadow-override-expected.png and b/LayoutTests/platform/efl/fast/forms/box-shadow-override-expected.png differ
index b567290..bc65d9d 100644 (file)
@@ -37,8 +37,8 @@ layer at (0,0) size 800x600
         RenderBlock {INPUT} at (28,20) size 12x12
         RenderText {#text} at (44,14) size 4x19
           text run at (44,14) width 4: " "
-        RenderSlider {INPUT} at (50,18) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+        RenderSlider {INPUT} at (50,17) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
             RenderBlock {DIV} at (0,0) size 117x12
             RenderBlock {DIV} at (117,0) size 12x12
         RenderText {#text} at (181,14) size 4x19
@@ -80,5 +80,5 @@ layer at (14,116) size 186x18
   RenderBlock {DIV} at (0,0) size 186x18
 layer at (14,148) size 186x18
   RenderBlock {DIV} at (0,0) size 186x18
-layer at (116,190) size 12x12
+layer at (116,189) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
diff --git a/LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-expected.png b/LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
new file mode 100644 (file)
index 0000000..34293c2
Binary files /dev/null and b/LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-expected.png differ
diff --git a/LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png b/LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
new file mode 100644 (file)
index 0000000..6bf9bf4
Binary files /dev/null and b/LayoutTests/platform/efl/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png differ
index 1e1d9cf..8650c57 100644 (file)
Binary files a/LayoutTests/platform/efl/fast/forms/input-appearance-height-expected.png and b/LayoutTests/platform/efl/fast/forms/input-appearance-height-expected.png differ
index db2510c..6af0037 100644 (file)
@@ -49,8 +49,8 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (60,158) size 0x0
         RenderText {#text} at (0,164) size 39x19
           text run at (0,164) width 39: "range "
-        RenderSlider {INPUT} at (41,168) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+        RenderSlider {INPUT} at (41,167) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
             RenderBlock {DIV} at (0,0) size 117x12
             RenderBlock {DIV} at (117,0) size 12x12
         RenderText {#text} at (172,164) size 4x19
@@ -104,5 +104,5 @@ layer at (78,328) size 186x18
   RenderBlock {DIV} at (4,6) size 186x18
 layer at (58,360) size 186x18
   RenderBlock {DIV} at (0,0) size 186x18
-layer at (107,194) size 12x12
+layer at (107,193) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
index 7d250d1..6c8ab76 100644 (file)
Binary files a/LayoutTests/platform/efl/fast/forms/range/input-appearance-range-expected.png and b/LayoutTests/platform/efl/fast/forms/range/input-appearance-range-expected.png differ
index b533f26..6720f50 100644 (file)
@@ -9,13 +9,13 @@ layer at (0,0) size 800x250
             RenderBlock {DIV} at (0,9) size 117x12
             RenderBlock {DIV} at (117,9) size 12x12
       RenderBlock {DIV} at (0,35) size 784x18
-        RenderSlider {INPUT} at (2,4) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+        RenderSlider {INPUT} at (2,3) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
             RenderBlock {DIV} at (0,0) size 117x12
             RenderBlock {DIV} at (117,0) size 12x12
       RenderBlock {DIV} at (0,53) size 784x18
-        RenderSlider {INPUT} at (2,4) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+        RenderSlider {INPUT} at (2,3) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
             RenderBlock {DIV} at (0,0) size 117x12
             RenderBlock {DIV} at (117,0) size 12x12
       RenderBlock {DIV} at (0,71) size 784x145
@@ -26,16 +26,16 @@ layer at (0,0) size 800x250
       RenderBlock {DIV} at (0,216) size 784x18
 layer at (68,19) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
-layer at (10,47) size 12x12
+layer at (10,46) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
-layer at (127,65) size 12x12
+layer at (127,64) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
 layer at (130,145) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
-layer at (10,228) size 129x11
-  RenderSlider {INPUT} at (2,4) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-    RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+layer at (10,227) size 129x12
+  RenderSlider {INPUT} at (2,3) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+    RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
       RenderBlock {DIV} at (0,0) size 117x12
       RenderBlock {DIV} at (117,0) size 12x12
-layer at (97,228) size 12x12
+layer at (97,227) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
index ae3bf27..fa8b594 100644 (file)
Binary files a/LayoutTests/platform/efl/fast/forms/range/slider-padding-expected.png and b/LayoutTests/platform/efl/fast/forms/range/slider-padding-expected.png differ
index a8a2877..9a2ae9f 100644 (file)
@@ -7,12 +7,12 @@ layer at (0,0) size 800x600
         RenderText {#text} at (0,0) size 321x19
           text run at (0,0) width 321: "This tests that the slider control considers padding. "
         RenderBR {BR} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,18) size 784x15 [bgcolor=#ADD8E6]
-        RenderSlider {INPUT} at (2,2) size 100x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 100x11
+      RenderBlock {DIV} at (0,18) size 784x16 [bgcolor=#ADD8E6]
+        RenderSlider {INPUT} at (2,2) size 100x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 100x12
             RenderBlock {DIV} at (0,0) size 88x12
             RenderBlock {DIV} at (88,0) size 12x12
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {PRE} at (0,46) size 784x0
+      RenderBlock {PRE} at (0,47) size 784x0
 layer at (10,28) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
index e42028c..63b981c 100644 (file)
Binary files a/LayoutTests/platform/efl/fast/forms/range/slider-thumb-shared-style-expected.png and b/LayoutTests/platform/efl/fast/forms/range/slider-thumb-shared-style-expected.png differ
index 959ae85..d6e0a97 100644 (file)
@@ -18,18 +18,18 @@ layer at (0,0) size 800x600
       RenderBlock {P} at (0,34) size 784x18
         RenderText {#text} at (0,0) size 282x19
           text run at (0,0) width 282: "The first slider\x{2019}s thumb should be on the left."
-      RenderBlock {DIV} at (0,68) size 784x30
-        RenderSlider {INPUT} at (2,2) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+      RenderBlock {DIV} at (0,68) size 784x32
+        RenderSlider {INPUT} at (2,2) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
             RenderBlock {DIV} at (0,0) size 117x12
             RenderBlock {DIV} at (117,0) size 12x12
-        RenderBR {BR} at (133,13) size 0x0
-        RenderSlider {INPUT} at (2,17) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+        RenderBR {BR} at (133,14) size 0x0
+        RenderSlider {INPUT} at (2,18) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+          RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
             RenderBlock {DIV} at (0,0) size 117x12
             RenderBlock {DIV} at (117,0) size 12x12
         RenderText {#text} at (0,0) size 0x0
 layer at (10,78) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
-layer at (127,93) size 12x12
+layer at (127,94) size 12x12
   RenderBlock (relative positioned) {DIV} at (0,0) size 12x12
index d55053e..e55b4c0 100644 (file)
@@ -3,8 +3,8 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderSlider {INPUT} at (2,2) size 129x11 [color=#909090] [bgcolor=#FFFFFF]
-        RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x11
+      RenderSlider {INPUT} at (2,2) size 129x12 [color=#909090] [bgcolor=#FFFFFF]
+        RenderDeprecatedFlexibleBox {DIV} at (0,0) size 129x12
           RenderBlock {DIV} at (0,0) size 117x12
           RenderBlock {DIV} at (117,0) size 12x12
       RenderText {#text} at (0,0) size 0x0
index a8f7f18..761890a 100644 (file)
@@ -1,3 +1,22 @@
+2012-08-23  KwangYong Choi  <ky0.choi@samsung.com>
+
+        [EFL] Use vertical slider theme when the slider is vertical
+        https://bugs.webkit.org/show_bug.cgi?id=93838
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Applied vertical slider theme to the vertical sliders. The height
+        of the vertical slider is wrong when it's applied horizontal
+        slider theme.
+
+        And do not resize slider when its size is not specified. It's natural
+        to use the default value of renderer.
+
+        No new tests. It's covered by existing range and datalist tests.
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
+
 2012-08-23  Kentaro Hara  <haraken@chromium.org>
 
         [V8] Remove almost all #include "V8Proxy.h"
index 6de86bd..4075430 100644 (file)
@@ -767,13 +767,18 @@ void RenderThemeEfl::adjustSliderTrackStyle(StyleResolver* styleResolver, Render
         return;
     }
 
-    adjustSizeConstraints(style, SliderHorizontal);
+    const ThemePartDesc* desc;
+    if (style->appearance() == SliderHorizontalPart) {
+        adjustSizeConstraints(style, SliderHorizontal);
+        desc = m_partDescs + static_cast<size_t>(SliderHorizontal);
+    } else {
+        adjustSizeConstraints(style, SliderVertical);
+        desc = m_partDescs + static_cast<size_t>(SliderVertical);
+    }
     style->resetBorder();
-
-    const struct ThemePartDesc *desc = m_partDescs + (size_t)SliderHorizontal;
-    if (style->width().value() < desc->min.width().value())
+    if (style->width().value() > 0 && style->width().value() < desc->min.width().value())
         style->setWidth(desc->min.width());
-    if (style->height().value() < desc->min.height().value())
+    if (style->height().value() > 0 && style->height().value() < desc->min.height().value())
         style->setHeight(desc->min.height());
 }