Title: [212933] trunk
- Revision
- 212933
- Author
- [email protected]
- Date
- 2017-02-23 17:44:40 -0800 (Thu, 23 Feb 2017)
Log Message
[Modern Media Controls] Enforce a minimum layout height of 50pt for <audio>
https://bugs.webkit.org/show_bug.cgi?id=168801
<rdar://problem/30683453>
Patch by Antoine Quint <[email protected]> on 2017-02-23
Reviewed by Eric Carlson.
Source/WebCore:
We enforce a 50pt minimum layout height for <audio> elements. There is no way
for the page author to override this value since the min-height property is set
as !important in a <style> element contained in a ShadowRoot.
* Modules/modern-media-controls/controls/media-controls.css:
(:host(audio)):
LayoutTests:
Update the existing <audio> metrics test to check that we correctly maintain
a 50pt minimum height even if an inline style attribute sets a shorter height
on an <audio> element, and also check that providing a taller height is respected.
* media/modern-media-controls/audio/audio-controls-metrics-expected.txt:
* media/modern-media-controls/audio/audio-controls-metrics.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (212932 => 212933)
--- trunk/LayoutTests/ChangeLog 2017-02-24 01:22:27 UTC (rev 212932)
+++ trunk/LayoutTests/ChangeLog 2017-02-24 01:44:40 UTC (rev 212933)
@@ -1,3 +1,18 @@
+2017-02-23 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] Enforce a minimum layout height of 50pt for <audio>
+ https://bugs.webkit.org/show_bug.cgi?id=168801
+ <rdar://problem/30683453>
+
+ Reviewed by Eric Carlson.
+
+ Update the existing <audio> metrics test to check that we correctly maintain
+ a 50pt minimum height even if an inline style attribute sets a shorter height
+ on an <audio> element, and also check that providing a taller height is respected.
+
+ * media/modern-media-controls/audio/audio-controls-metrics-expected.txt:
+ * media/modern-media-controls/audio/audio-controls-metrics.html:
+
2017-02-23 Carlos Alberto Lopez Perez <[email protected]>
[GTK] Gardening of some flaky tests
Modified: trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-metrics-expected.txt (212932 => 212933)
--- trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-metrics-expected.txt 2017-02-24 01:22:27 UTC (rev 212932)
+++ trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-metrics-expected.txt 2017-02-24 01:44:40 UTC (rev 212933)
@@ -3,8 +3,12 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS bounds.width is 200
-PASS bounds.height is 50
+PASS defaultAudio.getBoundingClientRect().width is 200
+PASS defaultAudio.getBoundingClientRect().height is 50
+PASS shortAudio.getBoundingClientRect().width is 200
+PASS shortAudio.getBoundingClientRect().height is 50
+PASS tallAudio.getBoundingClientRect().width is 200
+PASS tallAudio.getBoundingClientRect().height is 100
PASS successfullyParsed is true
Modified: trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-metrics.html (212932 => 212933)
--- trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-metrics.html 2017-02-24 01:22:27 UTC (rev 212932)
+++ trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-metrics.html 2017-02-24 01:44:40 UTC (rev 212933)
@@ -5,15 +5,30 @@
description("Testing the <code><audio></code> controls metrics.");
-const audio = document.body.appendChild(document.createElement("audio"));
-audio.controls = true;
+const defaultAudio = document.body.appendChild(document.createElement("audio"));
+defaultAudio.controls = true;
-const bounds = audio.getBoundingClientRect();
-shouldBe("bounds.width", "200");
-shouldBe("bounds.height", "50");
+const shortAudio = document.body.appendChild(document.createElement("audio"));
+shortAudio.style.height = "20px !important";
+shortAudio.controls = true;
+const tallAudio = document.body.appendChild(document.createElement("audio"));
+tallAudio.style.height = "100px";
+tallAudio.controls = true;
+
+shouldBe("defaultAudio.getBoundingClientRect().width", "200");
+shouldBe("defaultAudio.getBoundingClientRect().height", "50");
+
+shouldBe("shortAudio.getBoundingClientRect().width", "200");
+shouldBe("shortAudio.getBoundingClientRect().height", "50");
+
+shouldBe("tallAudio.getBoundingClientRect().width", "200");
+shouldBe("tallAudio.getBoundingClientRect().height", "100");
+
debug("");
-audio.remove();
+defaultAudio.remove();
+shortAudio.remove();
+tallAudio.remove();
</script>
<script src=""
Modified: trunk/Source/WebCore/ChangeLog (212932 => 212933)
--- trunk/Source/WebCore/ChangeLog 2017-02-24 01:22:27 UTC (rev 212932)
+++ trunk/Source/WebCore/ChangeLog 2017-02-24 01:44:40 UTC (rev 212933)
@@ -1,3 +1,18 @@
+2017-02-23 Antoine Quint <[email protected]>
+
+ [Modern Media Controls] Enforce a minimum layout height of 50pt for <audio>
+ https://bugs.webkit.org/show_bug.cgi?id=168801
+ <rdar://problem/30683453>
+
+ Reviewed by Eric Carlson.
+
+ We enforce a 50pt minimum layout height for <audio> elements. There is no way
+ for the page author to override this value since the min-height property is set
+ as !important in a <style> element contained in a ShadowRoot.
+
+ * Modules/modern-media-controls/controls/media-controls.css:
+ (:host(audio)):
+
2017-02-23 Youenn Fablet <[email protected]>
[WebRTC] Outgoing video quality is poor
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css (212932 => 212933)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-02-24 01:22:27 UTC (rev 212932)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-02-24 01:44:40 UTC (rev 212933)
@@ -25,7 +25,7 @@
:host(audio) {
width: 200px;
- height: 50px;
+ min-height: 50px !important;
}
/* We need to use relative positioning due to webkit.org/b/163603 */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes