- Revision
- 209375
- Author
- [email protected]
- Date
- 2016-12-05 18:37:43 -0800 (Mon, 05 Dec 2016)
Log Message
ERROR: post-layout: dirty renderer(s) - Encountered with LayoutTest media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
https://bugs.webkit.org/show_bug.cgi?id=165312
Patch by Antoine Quint <[email protected]> on 2016-12-05
Reviewed by Simon Fraser.
Source/WebCore:
Reverting part of the code added in https://bugs.webkit.org/show_bug.cgi?id=165287 that triggered
an assertion. We go back to removing previous media controls as we add new ones when the fullscreen
status changes, and simply hide the controls during the animated transition using a CSS pseudo-class.
This also fixes an issue where we wouldn't have removed the previous controls should we have entered
fullscreen in a different way than clicking on the fullscreen button in the media controls.
We restore testing coverage that was fixed due to this assertion.
* Modules/modern-media-controls/controls/media-controls.css:
(:host(:-webkit-animating-full-screen-transition) .media-controls):
* Modules/modern-media-controls/controls/media-controls.js:
(MediaControls.prototype.fadeIn):
(MediaControls.prototype.presentInElement): Deleted.
* Modules/modern-media-controls/media/fullscreen-support.js:
(FullscreenSupport.prototype.buttonWasClicked):
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype._updateControlsIfNeeded):
LayoutTests:
Restore previously skipped tests.
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (209374 => 209375)
--- trunk/LayoutTests/ChangeLog 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/LayoutTests/ChangeLog 2016-12-06 02:37:43 UTC (rev 209375)
@@ -1,3 +1,14 @@
+2016-12-05 Antoine Quint <[email protected]>
+
+ ERROR: post-layout: dirty renderer(s) - Encountered with LayoutTest media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
+ https://bugs.webkit.org/show_bug.cgi?id=165312
+
+ Reviewed by Simon Fraser.
+
+ Restore previously skipped tests.
+
+ * platform/mac/TestExpectations:
+
2016-12-05 Dave Hyatt <[email protected]>
[CSS Parser] Tweak more layout tests to pass
Modified: trunk/LayoutTests/platform/mac/TestExpectations (209374 => 209375)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-12-06 02:37:43 UTC (rev 209375)
@@ -1472,10 +1472,6 @@
webkit.org/b/165290 media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html [ Pass Timeout ]
webkit.org/b/164598 media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html [ Pass Failure ]
-webkit.org/b/165312 media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html [ Skip ]
-webkit.org/b/165312 media/modern-media-controls/seek-backward-support/seek-backward-support.html [ Skip ]
-webkit.org/b/165312 media/modern-media-controls/seek-forward-support/seek-forward-support.html [ Skip ]
-
webkit.org/b/164277 fast/preloader/image-srcset.html [ Pass Failure ]
webkit.org/b/161650 http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html [ Pass Failure ]
Modified: trunk/Source/WebCore/ChangeLog (209374 => 209375)
--- trunk/Source/WebCore/ChangeLog 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/Source/WebCore/ChangeLog 2016-12-06 02:37:43 UTC (rev 209375)
@@ -1,3 +1,28 @@
+2016-12-05 Antoine Quint <[email protected]>
+
+ ERROR: post-layout: dirty renderer(s) - Encountered with LayoutTest media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
+ https://bugs.webkit.org/show_bug.cgi?id=165312
+
+ Reviewed by Simon Fraser.
+
+ Reverting part of the code added in https://bugs.webkit.org/show_bug.cgi?id=165287 that triggered
+ an assertion. We go back to removing previous media controls as we add new ones when the fullscreen
+ status changes, and simply hide the controls during the animated transition using a CSS pseudo-class.
+ This also fixes an issue where we wouldn't have removed the previous controls should we have entered
+ fullscreen in a different way than clicking on the fullscreen button in the media controls.
+
+ We restore testing coverage that was fixed due to this assertion.
+
+ * Modules/modern-media-controls/controls/media-controls.css:
+ (:host(:-webkit-animating-full-screen-transition) .media-controls):
+ * Modules/modern-media-controls/controls/media-controls.js:
+ (MediaControls.prototype.fadeIn):
+ (MediaControls.prototype.presentInElement): Deleted.
+ * Modules/modern-media-controls/media/fullscreen-support.js:
+ (FullscreenSupport.prototype.buttonWasClicked):
+ * Modules/modern-media-controls/media/media-controller.js:
+ (MediaController.prototype._updateControlsIfNeeded):
+
2016-12-05 Dean Jackson <[email protected]>
MediaDocuments crash with modern media controls
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css (209374 => 209375)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2016-12-06 02:37:43 UTC (rev 209375)
@@ -36,6 +36,10 @@
cursor: default;
}
+:host(:-webkit-animating-full-screen-transition) .media-controls {
+ display: none;
+}
+
.media-controls > .controls-bar {
position: absolute;
}
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.js (209374 => 209375)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.js 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.js 2016-12-06 02:37:43 UTC (rev 209375)
@@ -101,11 +101,9 @@
this._invalidateChildren();
}
- presentInElement(parentElement, animated)
+ fadeIn()
{
- if (animated)
- this.element.classList.add("fade-in");
- parentElement.appendChild(this.element);
+ this.element.classList.add("fade-in");
}
// Private
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js (209374 => 209375)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js 2016-12-06 02:37:43 UTC (rev 209375)
@@ -60,8 +60,6 @@
buttonWasClicked(control)
{
- this.mediaController.controls.element.remove();
-
const media = this.mediaController.media;
if (media.webkitDisplayingFullscreen)
media.webkitExitFullscreen();
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js (209374 => 209375)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js 2016-12-06 02:30:38 UTC (rev 209374)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js 2016-12-06 02:37:43 UTC (rev 209375)
@@ -94,11 +94,13 @@
this.controls = new ControlsClass;
- if (previousControls)
+ if (previousControls) {
+ this.controls.fadeIn();
+ this.shadowRoot.replaceChild(this.controls.element, previousControls.element);
this.controls.usesLTRUserInterfaceLayoutDirection = previousControls.usesLTRUserInterfaceLayoutDirection;
+ } else
+ this.shadowRoot.appendChild(this.controls.element);
- this.controls.presentInElement(this.shadowRoot, !!previousControls);
-
this._updateControlsSize();
this._supportingObjects = [AirplaySupport, ControlsVisibilitySupport, ElapsedTimeSupport, FullscreenSupport, MuteSupport, PiPSupport, PlacardSupport, PlaybackSupport, RemainingTimeSupport, ScrubbingSupport, SeekBackwardSupport, SeekForwardSupport, SkipBackSupport, StartSupport, StatusSupport, TracksSupport, VolumeSupport].map(SupportClass => {