Title: [91460] trunk
- Revision
- 91460
- Author
- [email protected]
- Date
- 2011-07-21 04:21:40 -0700 (Thu, 21 Jul 2011)
Log Message
REGRESSION(r88757): input[type=range] renders incorrectly in RTL context.
https://bugs.webkit.org/show_bug.cgi?id=64904
Reviewed by Ryosuke Niwa.
Source/WebCore:
Tests: fast/forms/input-appearance-range-rtl.html
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::layout):
The thumb should be positioned based on 'right' CSS property instead of 'left.'
(WebCore::SliderThumbElement::setPositionFromPoint):
The fraction should be flipped in RTL.
LayoutTests:
* fast/forms/input-appearance-range-rtl-expected.html: Added.
* fast/forms/input-appearance-range-rtl.html: Added.
* platform/chromium/test_expectatinos.txt:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (91459 => 91460)
--- trunk/LayoutTests/ChangeLog 2011-07-21 10:22:26 UTC (rev 91459)
+++ trunk/LayoutTests/ChangeLog 2011-07-21 11:21:40 UTC (rev 91460)
@@ -1,3 +1,14 @@
+2011-07-21 Kent Tamura <[email protected]>
+
+ REGRESSION(r88757): input[type=range] renders incorrectly in RTL context.
+ https://bugs.webkit.org/show_bug.cgi?id=64904
+
+ Reviewed by Ryosuke Niwa.
+
+ * fast/forms/input-appearance-range-rtl-expected.html: Added.
+ * fast/forms/input-appearance-range-rtl.html: Added.
+ * platform/chromium/test_expectatinos.txt:
+
2011-07-21 Balazs Kelemen <[email protected]>
Unreviewed gardening for Qt.
Added: trunk/LayoutTests/fast/forms/input-appearance-range-rtl-expected.html (0 => 91460)
--- trunk/LayoutTests/fast/forms/input-appearance-range-rtl-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/input-appearance-range-rtl-expected.html 2011-07-21 11:21:40 UTC (rev 91460)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div><input type=range value=100></div>
+<div><input type=range value=50></div>
+<div><input type=range value=0></div>
+<div><input type=range value=0></div>
+<div><input type=range value=0></div>
+<div><input type=range value=0></div>
+<div><input type=range value=0></div>
+<div><input type=range value=0></div>
+<div><input type=range style="-webkit-appearance:slider-vertical; height:140px;" value=80></div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/forms/input-appearance-range-rtl-expected.html
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/fast/forms/input-appearance-range-rtl.html (0 => 91460)
--- trunk/LayoutTests/fast/forms/input-appearance-range-rtl.html (rev 0)
+++ trunk/LayoutTests/fast/forms/input-appearance-range-rtl.html 2011-07-21 11:21:40 UTC (rev 91460)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div><input type=range value=0 dir=rtl></div>
+<div><input type=range value=50 dir=rtl></div>
+<div><input type=range value=100 dir=rtl></div>
+<div><input type=range value=100 style="direction:rtl"></div>
+<div><input type=range value=100 id=r1></div>
+<div><input type=range value=100 id=r2></div>
+<div><input type=range value=0 id=r3 dir=rtl></div>
+<div><input type=range value=0 id=r4 style="direction:rtl"></div>
+<div><input type=range style="-webkit-appearance:slider-vertical; height:140px;" value=80 dir=rtl></div>
+<script>
+document.getElementById('r1').dir = 'rtl';
+document.getElementById('r2').style.direction = 'rtl';
+document.getElementById('r3').dir = 'ltr';
+document.getElementById('r4').style.direction = 'ltr';
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/forms/input-appearance-range-rtl.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (91459 => 91460)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-07-21 10:22:26 UTC (rev 91459)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-07-21 11:21:40 UTC (rev 91460)
@@ -3775,6 +3775,8 @@
BUGWK64788 : http/tests/websocket/tests/hybi/reserved-opcodes.html = TIMEOUT
+BUGWK64904 : fast/forms/input-appearance-range-rtl.html = IMAGE
+
BUGWK64844 DEBUG : svg/custom/crash-textPath-attributes.html = CRASH
BUGWK64874 MAC DEBUG : css3/images/optimize-contrast-canvas.html = CRASH
@@ -3783,4 +3785,4 @@
BUGWK64920 WIN DEBUG : fast/canvas/webgl/renderbuffer-initialization.html = CRASH PASS
-BUGWK64857 LINUX : fast/speech/input-text-speechbutton.html = TEXT
\ No newline at end of file
+BUGWK64857 LINUX : fast/speech/input-text-speechbutton.html = TEXT
Modified: trunk/Source/WebCore/ChangeLog (91459 => 91460)
--- trunk/Source/WebCore/ChangeLog 2011-07-21 10:22:26 UTC (rev 91459)
+++ trunk/Source/WebCore/ChangeLog 2011-07-21 11:21:40 UTC (rev 91460)
@@ -1,3 +1,18 @@
+2011-07-21 Kent Tamura <[email protected]>
+
+ REGRESSION(r88757): input[type=range] renders incorrectly in RTL context.
+ https://bugs.webkit.org/show_bug.cgi?id=64904
+
+ Reviewed by Ryosuke Niwa.
+
+ Tests: fast/forms/input-appearance-range-rtl.html
+
+ * html/shadow/SliderThumbElement.cpp:
+ (WebCore::RenderSliderThumb::layout):
+ The thumb should be positioned based on 'right' CSS property instead of 'left.'
+ (WebCore::SliderThumbElement::setPositionFromPoint):
+ The fraction should be flipped in RTL.
+
2011-07-18 Vsevolod Vlasov <[email protected]>
Web Inspector: Remove networkDataRemoved field from resource.
Modified: trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp (91459 => 91460)
--- trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp 2011-07-21 10:22:26 UTC (rev 91459)
+++ trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp 2011-07-21 11:21:40 UTC (rev 91460)
@@ -116,8 +116,10 @@
double fraction = sliderPosition(input) * 100;
if (isVertical)
style()->setTop(Length(100 - fraction, Percent));
+ else if (style()->isLeftToRightDirection())
+ style()->setLeft(Length(fraction, Percent));
else
- style()->setLeft(Length(fraction, Percent));
+ style()->setRight(Length(fraction, Percent));
RenderBlock::layout();
}
@@ -238,7 +240,7 @@
StepRange range(input);
double fraction = static_cast<double>(position) / trackSize;
- if (isVertical)
+ if (isVertical || !renderBox()->style()->isLeftToRightDirection())
fraction = 1 - fraction;
double value = range.clampValue(range.valueFromProportion(fraction));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes