Title: [213899] trunk
- Revision
- 213899
- Author
- commit-qu...@webkit.org
- Date
- 2017-03-14 09:13:14 -0700 (Tue, 14 Mar 2017)
Log Message
[Modern Media Controls] Controls are laid out incorrectly with RTL languages
https://bugs.webkit.org/show_bug.cgi?id=169605
<rdar://problem/30975709>
Patch by Antoine Quint <grao...@apple.com> on 2017-03-14
Reviewed by Eric Carlson.
Source/WebCore:
Encorce "direction: ltr" on the controls since the controls layout should not be changed
by the host page's direction.
Test: media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html
* Modules/modern-media-controls/controls/controls-bar.css:
(.controls-bar):
LayoutTests:
Add a test that enforces "direction: rtl" on a parent element to check that the controls
bar use "direction: ltr" anyway.
* media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr-expected.txt: Added.
* media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (213898 => 213899)
--- trunk/LayoutTests/ChangeLog 2017-03-14 15:52:44 UTC (rev 213898)
+++ trunk/LayoutTests/ChangeLog 2017-03-14 16:13:14 UTC (rev 213899)
@@ -1,3 +1,17 @@
+2017-03-14 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Controls are laid out incorrectly with RTL languages
+ https://bugs.webkit.org/show_bug.cgi?id=169605
+ <rdar://problem/30975709>
+
+ Reviewed by Eric Carlson.
+
+ Add a test that enforces "direction: rtl" on a parent element to check that the controls
+ bar use "direction: ltr" anyway.
+
+ * media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr-expected.txt: Added.
+ * media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html: Added.
+
2017-03-13 Wenson Hsieh <wenson_hs...@apple.com>
Make RepaintRegionAccumulator hold a WeakPtr to its root RenderView
Added: trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr-expected.txt (0 => 213899)
--- trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr-expected.txt 2017-03-14 16:13:14 UTC (rev 213899)
@@ -0,0 +1,10 @@
+Testing that the controls bar enforces left-to-right layout.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getComputedStyle(mediaControls.controlsBar.element).direction became "ltr"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html (0 => 213899)
--- trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html 2017-03-14 16:13:14 UTC (rev 213899)
@@ -0,0 +1,20 @@
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<body>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing that the controls bar enforces left-to-right layout.");
+
+const mediaControls = new MediaControls({ layoutTraits: LayoutTraits.macOS });
+
+// Add the media controls and set the direction to be RTL.
+document.body.appendChild(mediaControls.element).style.direction = "rtl";
+
+// Ensure that the controls bar itself enforces an LTR direction.
+shouldBecomeEqualToString("getComputedStyle(mediaControls.controlsBar.element).direction", "ltr", finishJSTest);
+
+</script>
+<script src=""
+</body>
Modified: trunk/Source/WebCore/ChangeLog (213898 => 213899)
--- trunk/Source/WebCore/ChangeLog 2017-03-14 15:52:44 UTC (rev 213898)
+++ trunk/Source/WebCore/ChangeLog 2017-03-14 16:13:14 UTC (rev 213899)
@@ -1,3 +1,19 @@
+2017-03-14 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Controls are laid out incorrectly with RTL languages
+ https://bugs.webkit.org/show_bug.cgi?id=169605
+ <rdar://problem/30975709>
+
+ Reviewed by Eric Carlson.
+
+ Encorce "direction: ltr" on the controls since the controls layout should not be changed
+ by the host page's direction.
+
+ Test: media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html
+
+ * Modules/modern-media-controls/controls/controls-bar.css:
+ (.controls-bar):
+
2017-03-13 Wenson Hsieh <wenson_hs...@apple.com>
Make RepaintRegionAccumulator hold a WeakPtr to its root RenderView
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/controls-bar.css (213898 => 213899)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/controls-bar.css 2017-03-14 15:52:44 UTC (rev 213898)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/controls-bar.css 2017-03-14 16:13:14 UTC (rev 213899)
@@ -26,6 +26,7 @@
.controls-bar {
position: absolute;
transition: opacity 0.1s linear;
+ direction: ltr;
}
.controls-bar.faded {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes