Title: [213098] trunk
Revision
213098
Author
[email protected]
Date
2017-02-27 15:33:45 -0800 (Mon, 27 Feb 2017)

Log Message

[Modern Media Controls] StatusLabel should use similar properties to TimeLabel
https://bugs.webkit.org/show_bug.cgi?id=168938
<rdar://problem/30743185>

Patch by Antoine Quint <[email protected]> on 2017-02-27
Reviewed by Dean Jackson.

Source/WebCore:

Ensure we use the same styling properties for StatusLabel and TimeLabel.

Tests: media/modern-media-controls/status-label/status-label-ios.html
       media/modern-media-controls/status-label/status-label-macos.html

* Modules/modern-media-controls/controls/ios-inline-media-controls.css:
(.media-controls.ios.inline .time-label,):
(.media-controls.ios.inline .time-label): Deleted.
* Modules/modern-media-controls/controls/macos-media-controls.css:
(.media-controls.mac > .controls-bar .time-label,):
(.media-controls.mac > .controls-bar .time-label): Deleted.
* Modules/modern-media-controls/controls/status-label.css:
(.status-label):

LayoutTests:

We add new tests to ensure we test all the various styles that can be applied
to a StatusLabel.

* media/modern-media-controls/status-label/status-label-expected.txt:
* media/modern-media-controls/status-label/status-label-ios-expected.txt: Added.
* media/modern-media-controls/status-label/status-label-ios.html: Added.
* media/modern-media-controls/status-label/status-label-macos-expected.txt: Added.
* media/modern-media-controls/status-label/status-label-macos.html: Added.
* media/modern-media-controls/status-label/status-label.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (213097 => 213098)


--- trunk/LayoutTests/ChangeLog	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/LayoutTests/ChangeLog	2017-02-27 23:33:45 UTC (rev 213098)
@@ -1,3 +1,21 @@
+2017-02-27  Antoine Quint  <[email protected]>
+
+        [Modern Media Controls] StatusLabel should use similar properties to TimeLabel
+        https://bugs.webkit.org/show_bug.cgi?id=168938
+        <rdar://problem/30743185>
+
+        Reviewed by Dean Jackson.
+
+        We add new tests to ensure we test all the various styles that can be applied
+        to a StatusLabel.
+
+        * media/modern-media-controls/status-label/status-label-expected.txt:
+        * media/modern-media-controls/status-label/status-label-ios-expected.txt: Added.
+        * media/modern-media-controls/status-label/status-label-ios.html: Added.
+        * media/modern-media-controls/status-label/status-label-macos-expected.txt: Added.
+        * media/modern-media-controls/status-label/status-label-macos.html: Added.
+        * media/modern-media-controls/status-label/status-label.html:
+
 2017-02-27  Myles C. Maxfield  <[email protected]>
 
         Unprefix -webkit-line-break

Modified: trunk/LayoutTests/media/modern-media-controls/status-label/status-label-expected.txt (213097 => 213098)


--- trunk/LayoutTests/media/modern-media-controls/status-label/status-label-expected.txt	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/LayoutTests/media/modern-media-controls/status-label/status-label-expected.txt	2017-02-27 23:33:45 UTC (rev 213098)
@@ -19,10 +19,6 @@
 PASS style.whiteSpace is "nowrap"
 PASS style.overflow is "hidden"
 PASS style.fontSize is "14px"
-PASS rgba(style.color).r is 255
-PASS rgba(style.color).g is 255
-PASS rgba(style.color).b is 255
-PASS rgba(style.color).a is within 0.001 of 0.572
 
 PASS successfullyParsed is true
 

Added: trunk/LayoutTests/media/modern-media-controls/status-label/status-label-ios-expected.txt (0 => 213098)


--- trunk/LayoutTests/media/modern-media-controls/status-label/status-label-ios-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/status-label/status-label-ios-expected.txt	2017-02-27 23:33:45 UTC (rev 213098)
@@ -0,0 +1,13 @@
+Testing StatusText properties when used in IOSInlineMediaControls.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.body.contains(mediaControls.statusLabel.element) became true
+PASS style.top is "14.5px"
+PASS style.color is "rgb(0, 0, 0)"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/media/modern-media-controls/status-label/status-label-ios.html (0 => 213098)


--- trunk/LayoutTests/media/modern-media-controls/status-label/status-label-ios.html	                        (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/status-label/status-label-ios.html	2017-02-27 23:33:45 UTC (rev 213098)
@@ -0,0 +1,31 @@
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
+<body>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing <code>StatusText</code> properties when used in <code>IOSInlineMediaControls</code>.");
+
+const mediaControls = new IOSInlineMediaControls({ width: 600, height: 300 });
+mediaControls.statusLabel.enabled = true;
+mediaControls.statusLabel.text = "Hello World";
+
+document.body.appendChild(mediaControls.element);
+
+let style;
+shouldBecomeEqual("document.body.contains(mediaControls.statusLabel.element)", "true", () => {
+    style = getComputedStyle(mediaControls.statusLabel.element);
+
+    shouldBeEqualToString("style.top", "14.5px");
+    shouldBeEqualToString("style.color", "rgb(0, 0, 0)");
+
+    mediaControls.element.remove();
+    debug("");
+    finishJSTest();
+});
+
+</script>
+<script src=""
+</body>

Added: trunk/LayoutTests/media/modern-media-controls/status-label/status-label-macos-expected.txt (0 => 213098)


--- trunk/LayoutTests/media/modern-media-controls/status-label/status-label-macos-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/status-label/status-label-macos-expected.txt	2017-02-27 23:33:45 UTC (rev 213098)
@@ -0,0 +1,17 @@
+Testing StatusText properties when used in MacOSInlineMediaControls.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.body.contains(mediaControls.statusLabel.element) became true
+PASS style.top is "14.5px"
+PASS style.mixBlendMode is "plus-lighter"
+PASS rgba(style.color).r is 255
+PASS rgba(style.color).g is 255
+PASS rgba(style.color).b is 255
+PASS rgba(style.color).a is within 0.001 of 0.45
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/media/modern-media-controls/status-label/status-label-macos.html (0 => 213098)


--- trunk/LayoutTests/media/modern-media-controls/status-label/status-label-macos.html	                        (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/status-label/status-label-macos.html	2017-02-27 23:33:45 UTC (rev 213098)
@@ -0,0 +1,32 @@
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
+<body>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing <code>StatusText</code> properties when used in <code>MacOSInlineMediaControls</code>.");
+
+const mediaControls = new MacOSInlineMediaControls({ width: 600, height: 300 });
+mediaControls.statusLabel.enabled = true;
+mediaControls.statusLabel.text = "Hello World";
+
+document.body.appendChild(mediaControls.element);
+
+let style;
+shouldBecomeEqual("document.body.contains(mediaControls.statusLabel.element)", "true", () => {
+    style = getComputedStyle(mediaControls.statusLabel.element);
+
+    shouldBeEqualToString("style.top", "14.5px");
+    shouldBeEqualToString("style.mixBlendMode", "plus-lighter");
+    shouldBeEqualToRGBAColor("style.color", "rgba(255, 255, 255, 0.45)");
+
+    mediaControls.element.remove();
+    debug("");
+    finishJSTest();
+});
+
+</script>
+<script src=""
+</body>

Modified: trunk/LayoutTests/media/modern-media-controls/status-label/status-label.html (213097 => 213098)


--- trunk/LayoutTests/media/modern-media-controls/status-label/status-label.html	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/LayoutTests/media/modern-media-controls/status-label/status-label.html	2017-02-27 23:33:45 UTC (rev 213098)
@@ -40,7 +40,6 @@
     shouldBeEqualToString("style.whiteSpace", "nowrap");
     shouldBeEqualToString("style.overflow", "hidden");
     shouldBeEqualToString("style.fontSize", "14px");
-    shouldBeEqualToRGBAColor("style.color", "rgba(255, 255, 255, 0.572)");
 
     statusLabel.element.remove();
     debug("");

Modified: trunk/Source/WebCore/ChangeLog (213097 => 213098)


--- trunk/Source/WebCore/ChangeLog	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/Source/WebCore/ChangeLog	2017-02-27 23:33:45 UTC (rev 213098)
@@ -1,3 +1,25 @@
+2017-02-27  Antoine Quint  <[email protected]>
+
+        [Modern Media Controls] StatusLabel should use similar properties to TimeLabel
+        https://bugs.webkit.org/show_bug.cgi?id=168938
+        <rdar://problem/30743185>
+
+        Reviewed by Dean Jackson.
+
+        Ensure we use the same styling properties for StatusLabel and TimeLabel.
+
+        Tests: media/modern-media-controls/status-label/status-label-ios.html
+               media/modern-media-controls/status-label/status-label-macos.html
+
+        * Modules/modern-media-controls/controls/ios-inline-media-controls.css:
+        (.media-controls.ios.inline .time-label,):
+        (.media-controls.ios.inline .time-label): Deleted.
+        * Modules/modern-media-controls/controls/macos-media-controls.css:
+        (.media-controls.mac > .controls-bar .time-label,):
+        (.media-controls.mac > .controls-bar .time-label): Deleted.
+        * Modules/modern-media-controls/controls/status-label.css:
+        (.status-label):
+
 2017-02-27  Myles C. Maxfield  <[email protected]>
 
         Rename ICU cursor iterator to caret iterator

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.css (213097 => 213098)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.css	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.css	2017-02-27 23:33:45 UTC (rev 213098)
@@ -94,9 +94,10 @@
     -webkit-mask-position-y: 13px;
 }
 
-/* Time labels */
+/* Labels */
 
-.media-controls.ios.inline .time-label {
+.media-controls.ios.inline .time-label,
+.media-controls.ios.inline .status-label {
     top: 14.5px;
     color: black;
 }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.css (213097 => 213098)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.css	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.css	2017-02-27 23:33:45 UTC (rev 213098)
@@ -35,7 +35,8 @@
     mix-blend-mode: plus-lighter;
 }
 
-.media-controls.mac > .controls-bar .time-label {
+.media-controls.mac > .controls-bar .time-label,
+.media-controls.mac > .controls-bar .status-label {
     color: rgba(255, 255, 255, 0.45);
     mix-blend-mode: plus-lighter;
 }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/status-label.css (213097 => 213098)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/status-label.css	2017-02-27 23:07:25 UTC (rev 213097)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/status-label.css	2017-02-27 23:33:45 UTC (rev 213098)
@@ -32,6 +32,4 @@
     overflow: hidden;
 
     font-size: 14px;
-
-    color: rgba(255, 255, 255, 0.572);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to