Title: [124198] trunk
- Revision
- 124198
- Author
- kei...@webkit.org
- Date
- 2012-07-31 06:50:39 -0700 (Tue, 31 Jul 2012)
Log Message
Slider ticks are drawn at wrong positions
https://bugs.webkit.org/show_bug.cgi?id=92720
Reviewed by Kent Tamura.
Source/WebCore:
Slider tick marks for vertical sliders were drawn reversed. And the tick
mark positions were slightly off from the thumb position because of rounding.
No new tests. Covered in input-appearance-range-with-datalist.html.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
LayoutTests:
* fast/forms/datalist/input-appearance-range-with-datalist.html: Added values to input elements so we can see if the slider thumb position matches with the tick marks.
* platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
* platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
* platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
* platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
* platform/chromium/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (124197 => 124198)
--- trunk/LayoutTests/ChangeLog 2012-07-31 13:42:08 UTC (rev 124197)
+++ trunk/LayoutTests/ChangeLog 2012-07-31 13:50:39 UTC (rev 124198)
@@ -1,3 +1,17 @@
+2012-07-31 Keishi Hattori <kei...@webkit.org>
+
+ Slider ticks are drawn at wrong positions
+ https://bugs.webkit.org/show_bug.cgi?id=92720
+
+ Reviewed by Kent Tamura.
+
+ * fast/forms/datalist/input-appearance-range-with-datalist.html: Added values to input elements so we can see if the slider thumb position matches with the tick marks.
+ * platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
+ * platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
+ * platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
+ * platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
+ * platform/chromium/TestExpectations:
+
2012-07-31 Shinya Kawanaka <shin...@chromium.org>
Older ShadowDOM is still rendered when a new ShadowDOM is added when they don't have any InsertionPoints.
Modified: trunk/LayoutTests/fast/forms/datalist/input-appearance-range-with-datalist.html (124197 => 124198)
--- trunk/LayoutTests/fast/forms/datalist/input-appearance-range-with-datalist.html 2012-07-31 13:42:08 UTC (rev 124197)
+++ trunk/LayoutTests/fast/forms/datalist/input-appearance-range-with-datalist.html 2012-07-31 13:50:39 UTC (rev 124198)
@@ -3,10 +3,10 @@
layoutTestController.dumpAsText(true);
</script>
-<input type=range list=foo />
-<input type=range list=foo style="width: 50px;" />
-<input type=range list=foo style="-webkit-appearance:slider-vertical;" />
-<input type=range list=foo style="-webkit-appearance:slider-vertical; height: 50px;" />
+<input type=range list=foo value=10 />
+<input type=range list=foo style="width: 50px;" value=20 />
+<input type=range list=foo style="-webkit-appearance:slider-vertical;" value=40 />
+<input type=range list=foo style="-webkit-appearance:slider-vertical; height: 50px;" value=80 />
<datalist id=foo>
<option>0</option>
<option>10</option>
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (124197 => 124198)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-07-31 13:42:08 UTC (rev 124197)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-07-31 13:50:39 UTC (rev 124198)
@@ -3432,6 +3432,10 @@
// Needs rebaseline. After localized string is added to chromium.
BUGWK92444 : platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html = PASS TIMEOUT MISSING IMAGE
+// Needs rebaseline.
+BUGWK92721 WIN SNOWLEOPARD : fast/forms/datalist/input-appearance-range-with-datalist-zoomed.html = IMAGE
+BUGWK92721 WIN SNOWLEOPARD : fast/forms/datalist/input-appearance-range-with-datalist.html = IMAGE
+
// Needs Rebaseline.
BUGWK88705 : fast/css/text-overflow-ellipsis-text-align-center.html = MISSING
BUGWK88705 : fast/css/text-overflow-ellipsis-text-align-justify.html = MISSING
Modified: trunk/LayoutTests/platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png
(Binary files differ)
Modified: trunk/Source/WebCore/ChangeLog (124197 => 124198)
--- trunk/Source/WebCore/ChangeLog 2012-07-31 13:42:08 UTC (rev 124197)
+++ trunk/Source/WebCore/ChangeLog 2012-07-31 13:50:39 UTC (rev 124198)
@@ -1,3 +1,18 @@
+2012-07-31 Keishi Hattori <kei...@webkit.org>
+
+ Slider ticks are drawn at wrong positions
+ https://bugs.webkit.org/show_bug.cgi?id=92720
+
+ Reviewed by Kent Tamura.
+
+ Slider tick marks for vertical sliders were drawn reversed. And the tick
+ mark positions were slightly off from the thumb position because of rounding.
+
+ No new tests. Covered in input-appearance-range-with-datalist.html.
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paintSliderTicks):
+
2012-07-31 Shinya Kawanaka <shin...@chromium.org>
Older ShadowDOM is still rendered when a new ShadowDOM is added when they don't have any InsertionPoints.
Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (124197 => 124198)
--- trunk/Source/WebCore/rendering/RenderTheme.cpp 2012-07-31 13:42:08 UTC (rev 124197)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp 2012-07-31 13:50:39 UTC (rev 124198)
@@ -1024,13 +1024,13 @@
if (!input->isValidValue(value))
continue;
double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(value));
- double tickPosition = (parsedValue - min) / (max - min);
- if (!o->style()->isLeftToRightDirection())
- tickPosition = 1.0 - tickPosition;
+ double tickFraction = (parsedValue - min) / (max - min);
+ double tickRatio = isHorizontal && o->style()->isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction;
+ double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tickRatio);
if (isHorizontal)
- tickRect.setX(floor(tickRegionSideMargin + tickRegionWidth * tickPosition));
+ tickRect.setX(tickPosition);
else
- tickRect.setY(floor(tickRegionSideMargin + tickRegionWidth * tickPosition));
+ tickRect.setY(tickPosition);
paintInfo.context->fillRect(tickRect);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes