Title: [211685] trunk
- Revision
- 211685
- Author
- commit-qu...@webkit.org
- Date
- 2017-02-05 12:40:31 -0800 (Sun, 05 Feb 2017)
Log Message
[Modern Media Controls] Time labels may wrap instead of displaying on a single line
https://bugs.webkit.org/show_bug.cgi?id=167835
<rdar://problem/30340534>
Patch by Antoine Quint <grao...@apple.com> on 2017-02-05
Reviewed by Dean Jackson.
Source/WebCore:
No text in modern media controls is expected to wrap, so let's prevent any wrapping.
Test: media/modern-media-controls/time-label/time-label-white-space-nowrap.html
* Modules/modern-media-controls/controls/media-controls.css:
(.media-controls):
LayoutTests:
New test that checks that time labels have "white-space: nowrap" applied.
* media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt: Added.
* media/modern-media-controls/time-label/time-label-white-space-nowrap.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (211684 => 211685)
--- trunk/LayoutTests/ChangeLog 2017-02-05 19:26:50 UTC (rev 211684)
+++ trunk/LayoutTests/ChangeLog 2017-02-05 20:40:31 UTC (rev 211685)
@@ -1,3 +1,16 @@
+2017-02-05 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Time labels may wrap instead of displaying on a single line
+ https://bugs.webkit.org/show_bug.cgi?id=167835
+ <rdar://problem/30340534>
+
+ Reviewed by Dean Jackson.
+
+ New test that checks that time labels have "white-space: nowrap" applied.
+
+ * media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt: Added.
+ * media/modern-media-controls/time-label/time-label-white-space-nowrap.html: Added.
+
2017-02-04 Simon Fraser <simon.fra...@apple.com>
Clean up how GraphicsLayer's "inWindow" state is set, and fix some issues with Page Overlays
Added: trunk/LayoutTests/media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt (0 => 211685)
--- trunk/LayoutTests/media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt 2017-02-05 20:40:31 UTC (rev 211685)
@@ -0,0 +1,11 @@
+Testing that time labels inside media controls have 'white-space: nowrap'.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS timeLabel.ownerDocument.defaultView.getComputedStyle(timeLabel).whiteSpace is "nowrap"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/time-label/time-label-white-space-nowrap.html (0 => 211685)
--- trunk/LayoutTests/media/modern-media-controls/time-label/time-label-white-space-nowrap.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/time-label/time-label-white-space-nowrap.html 2017-02-05 20:40:31 UTC (rev 211685)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src=""
+<body>
+<video src="" style="position: absolute; left: 0; top: 0; width: 800px;" controls autoplay></video>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing that time labels inside media controls have 'white-space: nowrap'.");
+
+let timeLabel;
+
+document.querySelector("video").addEventListener("play", (event) => {
+ const media = event.target;
+ media.pause();
+
+ timeLabel = window.internals.shadowRoot(media).querySelector(".time-label");
+ shouldBeEqualToString("timeLabel.ownerDocument.defaultView.getComputedStyle(timeLabel).whiteSpace", "nowrap");
+
+ debug("");
+ media.remove();
+ finishJSTest();
+});
+
+</script>
+<script src=""
+</body>
Modified: trunk/Source/WebCore/ChangeLog (211684 => 211685)
--- trunk/Source/WebCore/ChangeLog 2017-02-05 19:26:50 UTC (rev 211684)
+++ trunk/Source/WebCore/ChangeLog 2017-02-05 20:40:31 UTC (rev 211685)
@@ -1,3 +1,18 @@
+2017-02-05 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] Time labels may wrap instead of displaying on a single line
+ https://bugs.webkit.org/show_bug.cgi?id=167835
+ <rdar://problem/30340534>
+
+ Reviewed by Dean Jackson.
+
+ No text in modern media controls is expected to wrap, so let's prevent any wrapping.
+
+ Test: media/modern-media-controls/time-label/time-label-white-space-nowrap.html
+
+ * Modules/modern-media-controls/controls/media-controls.css:
+ (.media-controls):
+
2017-02-04 Simon Fraser <simon.fra...@apple.com>
Clean up how GraphicsLayer's "inWindow" state is set, and fix some issues with Page Overlays
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css (211684 => 211685)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-02-05 19:26:50 UTC (rev 211684)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-02-05 20:40:31 UTC (rev 211685)
@@ -54,6 +54,7 @@
height: 100%;
font-family: -apple-system;
-webkit-user-select: none;
+ white-space: nowrap;
cursor: default;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes