Title: [127626] trunk
Revision
127626
Author
[email protected]
Date
2012-09-05 12:14:48 -0700 (Wed, 05 Sep 2012)

Log Message

[EFL] Slider progress bar goes crazy with negative ranges
https://bugs.webkit.org/show_bug.cgi?id=95753

Patch by Thiago Marcos P. Santos <[email protected]> on 2012-09-05
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Now the calculation of what the current value represents in terms
of progress (from 0 to 1) is correctly done.

Test: fast/forms/range/input-range-progress-indicator.html

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

LayoutTests:

Added ref test to check if rendering results of sliders using
negative value ranges are coherent.

* fast/forms/range/input-range-progress-indicator-expected.html: Added.
* fast/forms/range/input-range-progress-indicator.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (127625 => 127626)


--- trunk/LayoutTests/ChangeLog	2012-09-05 19:07:35 UTC (rev 127625)
+++ trunk/LayoutTests/ChangeLog	2012-09-05 19:14:48 UTC (rev 127626)
@@ -1,3 +1,16 @@
+2012-09-05  Thiago Marcos P. Santos  <[email protected]>
+
+        [EFL] Slider progress bar goes crazy with negative ranges
+        https://bugs.webkit.org/show_bug.cgi?id=95753
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added ref test to check if rendering results of sliders using
+        negative value ranges are coherent.
+
+        * fast/forms/range/input-range-progress-indicator-expected.html: Added.
+        * fast/forms/range/input-range-progress-indicator.html: Added.
+
 2012-09-05  Sami Kyostila  <[email protected]>
 
         Enable/disable composited scrolling based on overflow

Added: trunk/LayoutTests/fast/forms/range/input-range-progress-indicator-expected.html (0 => 127626)


--- trunk/LayoutTests/fast/forms/range/input-range-progress-indicator-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/range/input-range-progress-indicator-expected.html	2012-09-05 19:14:48 UTC (rev 127626)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<body>
+
+<div><input type=range value=25 min=0 max=100></div>
+<div><input type=range value=25 min=0 max=100></div>
+<div><input type=range value=50 min=0 max=100></div>
+<div><input type=range value=50 min=0 max=100></div>
+<div><input type=range value=75 min=0 max=100></div>
+<div><input type=range value=75 min=0 max=100></div>
+
+</body>

Added: trunk/LayoutTests/fast/forms/range/input-range-progress-indicator.html (0 => 127626)


--- trunk/LayoutTests/fast/forms/range/input-range-progress-indicator.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/range/input-range-progress-indicator.html	2012-09-05 19:14:48 UTC (rev 127626)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<body>
+<!--
+  The idea of this test is to test if ports that paint
+  a progress indicator on the slider's groove are painting
+  it correcly with a variety of range combinations.
+
+  You'll see:
+   - two horizontal sliders with the thumb at 25%.
+   - two horizontal sliders with the thumb at 50%.
+   - two horizontal sliders with the thumb at 75%.
+-->
+
+<div><input type=range value=-25 min=-50 max=50></div>
+<div><input type=range value=125 min=100 max=200></div>
+<div><input type=range value=0 min=-100 max=100></div>
+<div><input type=range value=0 min=-500 max=500></div>
+<div><input type=range value=-125 min=-200 max=-100></div>
+<div><input type=range value=-25 min=-100 max=0></div>
+
+</body>

Modified: trunk/Source/WebCore/ChangeLog (127625 => 127626)


--- trunk/Source/WebCore/ChangeLog	2012-09-05 19:07:35 UTC (rev 127625)
+++ trunk/Source/WebCore/ChangeLog	2012-09-05 19:14:48 UTC (rev 127626)
@@ -1,3 +1,18 @@
+2012-09-05  Thiago Marcos P. Santos  <[email protected]>
+
+        [EFL] Slider progress bar goes crazy with negative ranges
+        https://bugs.webkit.org/show_bug.cgi?id=95753
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Now the calculation of what the current value represents in terms
+        of progress (from 0 to 1) is correctly done.
+
+        Test: fast/forms/range/input-range-progress-indicator.html
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::paintThemePart):
+
 2012-09-05  Mark Pilgrim  <[email protected]>
 
         [Chromium] Remove getRenderStyleForStrike from PlatformSupport

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (127625 => 127626)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-09-05 19:07:35 UTC (rev 127625)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-09-05 19:14:48 UTC (rev 127626)
@@ -350,7 +350,7 @@
         else
             msg->val[0] = 0;
 
-        msg->val[1] = input->valueAsNumber() / valueRange;
+        msg->val[1] = (input->valueAsNumber() - input->minimum()) / valueRange;
         edje_object_message_send(entry->o, EDJE_MESSAGE_FLOAT_SET, 0, msg);
 #if ENABLE(PROGRESS_ELEMENT)
     } else if (type == ProgressBar) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to