[CherryPick] [EFL] Slider progress bar goes crazy with negative ranges
authorJiyeon Kim <jiyeon0402.kim@samsung.com>
Fri, 5 Apr 2013 07:48:58 +0000 (16:48 +0900)
committerGerrit Code Review <gerrit2@kim11>
Fri, 5 Apr 2013 12:01:16 +0000 (21:01 +0900)
[Title] [EFL] Slider progress bar goes crazy with negative ranges
[Problem] Check the 2nd and 3rd example of the page bellow : http://www.html5tutorial.info/html5-range.php
[Cause] N/A
[Solution] https://bugs.webkit.org/show_bug.cgi?id=95753
Now the calculation of what the current value represents in terms of progress (from 0 to 1) is correctly done.

Change-Id: I26fd2a785853f03fbb459055d551d465ecfc6661

Source/WebCore/platform/efl/RenderThemeEfl.cpp

index be7eefc..8b8c452 100755 (executable)
@@ -361,7 +361,7 @@ bool RenderThemeEfl::paintThemePart(RenderObject* object, FormType type, const P
         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) {