Title: [131657] trunk
- Revision
- 131657
- Author
- [email protected]
- Date
- 2012-10-17 15:33:29 -0700 (Wed, 17 Oct 2012)
Log Message
fast/forms/range/input-appearance-range-rtl.html off by one pixel
https://bugs.webkit.org/show_bug.cgi?id=99625
Reviewed by Ojan Vafai.
Source/WebCore:
Previously, we would assume that a vertical slider in RTL would render identically to
a vertical slider in LTR. Due to differing thumb sizes, there is an off by one.
This worked in deprecated flexbox because it doesn't adjust for RTL when applying
box-align: center.
Tests: fast/forms/range/input-appearance-range-rtl.html
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::layout): Force LTR for flexbox layout when vertical. We have to restore the old value
just in case the user switches from vertical to horizontal.
LayoutTests:
Run test on GTK+ and Qt now that it is fixed.
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (131656 => 131657)
--- trunk/LayoutTests/ChangeLog 2012-10-17 22:17:49 UTC (rev 131656)
+++ trunk/LayoutTests/ChangeLog 2012-10-17 22:33:29 UTC (rev 131657)
@@ -1,5 +1,17 @@
2012-10-17 Tony Chang <[email protected]>
+ fast/forms/range/input-appearance-range-rtl.html off by one pixel
+ https://bugs.webkit.org/show_bug.cgi?id=99625
+
+ Reviewed by Ojan Vafai.
+
+ Run test on GTK+ and Qt now that it is fixed.
+
+ * platform/gtk/TestExpectations:
+ * platform/qt/TestExpectations:
+
+2012-10-17 Tony Chang <[email protected]>
+
Unreviewed, Qt baselines for shadow DOM changes to RenderSlider.
There are a couple unexplained failures that I'm still investigating.
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (131656 => 131657)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2012-10-17 22:17:49 UTC (rev 131656)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2012-10-17 22:33:29 UTC (rev 131657)
@@ -1353,8 +1353,6 @@
webkit.org/b/98585 fast/exclusions/shape-inside/shape-inside-rounded-rectangle-003.html [ ImageOnlyFailure ]
-webkit.org/b/98666 fast/forms/range/input-appearance-range-rtl.html [ ImageOnlyFailure ]
-
webkit.org/b/98587 fast/writing-mode/vertical-subst-font-vert-no-dflt.html [ ImageOnlyFailure ]
webkit.org/b/98612 [ Release ] fast/dom/gc-dom-tree-lifetime.html [ Failure ]
Modified: trunk/LayoutTests/platform/qt/TestExpectations (131656 => 131657)
--- trunk/LayoutTests/platform/qt/TestExpectations 2012-10-17 22:17:49 UTC (rev 131656)
+++ trunk/LayoutTests/platform/qt/TestExpectations 2012-10-17 22:33:29 UTC (rev 131657)
@@ -2412,7 +2412,6 @@
webkit.org/b/91379 http/tests/security/contentSecurityPolicy/object-src-none-allowed.html [ Failure Pass ]
webkit.org/b/98666 fast/events/touch/touch-slider.html [ Failure ]
-webkit.org/b/98666 fast/forms/range/input-appearance-range-rtl.html [ ImageOnlyFailure ]
webkit.org/b/98666 media/video-playing-and-pause.html [ Failure ]
webkit.org/b/93247 [ Debug ] fast/lists/list-marker-remove-crash.html [ Crash ]
Modified: trunk/Source/WebCore/ChangeLog (131656 => 131657)
--- trunk/Source/WebCore/ChangeLog 2012-10-17 22:17:49 UTC (rev 131656)
+++ trunk/Source/WebCore/ChangeLog 2012-10-17 22:33:29 UTC (rev 131657)
@@ -1,3 +1,22 @@
+2012-10-17 Tony Chang <[email protected]>
+
+ fast/forms/range/input-appearance-range-rtl.html off by one pixel
+ https://bugs.webkit.org/show_bug.cgi?id=99625
+
+ Reviewed by Ojan Vafai.
+
+ Previously, we would assume that a vertical slider in RTL would render identically to
+ a vertical slider in LTR. Due to differing thumb sizes, there is an off by one.
+
+ This worked in deprecated flexbox because it doesn't adjust for RTL when applying
+ box-align: center.
+
+ Tests: fast/forms/range/input-appearance-range-rtl.html
+
+ * html/shadow/SliderThumbElement.cpp:
+ (WebCore::RenderSliderContainer::layout): Force LTR for flexbox layout when vertical. We have to restore the old value
+ just in case the user switches from vertical to horizontal.
+
2012-10-17 Michael Saboff <[email protected]>
Creating a String from an NSString should check for all 8 bit strings
Modified: trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp (131656 => 131657)
--- trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp 2012-10-17 22:17:49 UTC (rev 131656)
+++ trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp 2012-10-17 22:33:29 UTC (rev 131657)
@@ -169,9 +169,17 @@
HTMLInputElement* input = node()->shadowHost()->toInputElement();
bool isVertical = hasVerticalAppearance(input);
style()->setFlexDirection(isVertical ? FlowColumn : FlowRow);
+ TextDirection oldTextDirection = style()->direction();
+ if (isVertical) {
+ // FIXME: Work around rounding issues in RTL vertical sliders. We want them to
+ // render identically to LTR vertical sliders. We can remove this work around when
+ // subpixel rendering is enabled on all ports.
+ style()->setDirection(LTR);
+ }
RenderFlexibleBox::layout();
+ style()->setDirection(oldTextDirection);
// These should always exist, unless someone mutates the shadow DOM (e.g., in the inspector).
if (!input->sliderThumbElement() || !input->sliderThumbElement()->renderer())
return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes