Title: [209450] trunk/Source/WebCore
- Revision
- 209450
- Author
- d...@apple.com
- Date
- 2016-12-06 22:07:42 -0800 (Tue, 06 Dec 2016)
Log Message
Apply styling to media documents with modern controls
https://bugs.webkit.org/show_bug.cgi?id=165499
<rdar://problems/29543847>
Reviewed by Antoine Quint.
Forgot to commit most of the changes in MediaDocument.cpp :(
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (209449 => 209450)
--- trunk/Source/WebCore/ChangeLog 2016-12-07 05:31:57 UTC (rev 209449)
+++ trunk/Source/WebCore/ChangeLog 2016-12-07 06:07:42 UTC (rev 209450)
@@ -1,3 +1,16 @@
+2016-12-06 Dean Jackson <d...@apple.com>
+
+ Apply styling to media documents with modern controls
+ https://bugs.webkit.org/show_bug.cgi?id=165499
+ <rdar://problems/29543847>
+
+ Reviewed by Antoine Quint.
+
+ Forgot to commit most of the changes in MediaDocument.cpp :(
+
+ * html/MediaDocument.cpp:
+ (WebCore::MediaDocumentParser::createDocumentStructure):
+
2016-12-06 Simon Fraser <simon.fra...@apple.com>
Two tiled drawing tests failing with visual viewports enabled.
Modified: trunk/Source/WebCore/html/MediaDocument.cpp (209449 => 209450)
--- trunk/Source/WebCore/html/MediaDocument.cpp 2016-12-07 05:31:57 UTC (rev 209449)
+++ trunk/Source/WebCore/html/MediaDocument.cpp 2016-12-07 06:07:42 UTC (rev 209450)
@@ -47,6 +47,7 @@
#include "NodeList.h"
#include "Page.h"
#include "RawDataDocumentParser.h"
+#include "RuntimeEnabledFeatures.h"
#include "ScriptController.h"
#include "ShadowRoot.h"
#include "TypedElementDescendantIterator.h"
@@ -103,6 +104,13 @@
#endif
auto body = HTMLBodyElement::create(document);
+ if (RuntimeEnabledFeatures::sharedFeatures().modernMediaControlsEnabled()) {
+ StringBuilder bodyStyle;
+ bodyStyle.appendLiteral("margin: 0; padding: 0;");
+ bodyStyle.appendLiteral("background-color: rgb(38, 38, 38);");
+ bodyStyle.appendLiteral("display: flex; justify-content: center; align-items: center;");
+ body->setAttribute(styleAttr, bodyStyle.toString());
+ }
rootElement->appendChild(body);
auto videoElement = HTMLVideoElement::create(document);
@@ -116,6 +124,9 @@
#if PLATFORM(IOS)
elementStyle.appendLiteral("width: 100%; height: 100%;");
#endif
+ if (RuntimeEnabledFeatures::sharedFeatures().modernMediaControlsEnabled()) {
+ elementStyle.appendLiteral("min-height: 50px;");
+ }
videoElement->setAttribute(styleAttr, elementStyle.toString());
auto sourceElement = HTMLSourceElement::create(document);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes