Title: [289349] branches/safari-613-branch
- Revision
- 289349
- Author
- [email protected]
- Date
- 2022-02-07 18:58:11 -0800 (Mon, 07 Feb 2022)
Log Message
Cherry-pick r289108. rdar://problem/88599722
HTMLMediaElement should dispatch the resize event asynchronously
https://bugs.webkit.org/show_bug.cgi?id=230895
Reviewed by Darin Adler.
Source/WebCore:
The HTMLMediaElement is currently queueing a task to dispatch the resize event in the post layout phase.
There is no need to run it synchronously and we could move it to another queue were it will be run
asynchronously as it was done for other similar tasks in the past.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::layoutSizeChanged):
LayoutTests:
* media/modern-media-controls/media-controller/media-controller-resize.html: Remove the event
listener to avoid an extra notification.
* platform/mac/TestExpectations: Unskipped tests that pass now.
* platform/wincairo/TestExpectations: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (289348 => 289349)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-02-08 02:58:07 UTC (rev 289348)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-02-08 02:58:11 UTC (rev 289349)
@@ -1,5 +1,45 @@
2022-02-07 Russell Epstein <[email protected]>
+ Cherry-pick r289108. rdar://problem/88599722
+
+ HTMLMediaElement should dispatch the resize event asynchronously
+ https://bugs.webkit.org/show_bug.cgi?id=230895
+
+ Reviewed by Darin Adler.
+
+ Source/WebCore:
+
+ The HTMLMediaElement is currently queueing a task to dispatch the resize event in the post layout phase.
+ There is no need to run it synchronously and we could move it to another queue were it will be run
+ asynchronously as it was done for other similar tasks in the past.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::layoutSizeChanged):
+
+ LayoutTests:
+
+ * media/modern-media-controls/media-controller/media-controller-resize.html: Remove the event
+ listener to avoid an extra notification.
+ * platform/mac/TestExpectations: Unskipped tests that pass now.
+ * platform/wincairo/TestExpectations: Ditto.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-04 Sergio Villar Senin <[email protected]>
+
+ HTMLMediaElement should dispatch the resize event asynchronously
+ https://bugs.webkit.org/show_bug.cgi?id=230895
+
+ Reviewed by Darin Adler.
+
+ * media/modern-media-controls/media-controller/media-controller-resize.html: Remove the event
+ listener to avoid an extra notification.
+ * platform/mac/TestExpectations: Unskipped tests that pass now.
+ * platform/wincairo/TestExpectations: Ditto.
+
+2022-02-07 Russell Epstein <[email protected]>
+
Cherry-pick r289060. rdar://problem/86337125
null ptr deref in RenderTreeBuilder::Block::attachIgnoringContinuation
Modified: branches/safari-613-branch/LayoutTests/media/modern-media-controls/media-controller/media-controller-resize.html (289348 => 289349)
--- branches/safari-613-branch/LayoutTests/media/modern-media-controls/media-controller/media-controller-resize.html 2022-02-08 02:58:07 UTC (rev 289348)
+++ branches/safari-613-branch/LayoutTests/media/modern-media-controls/media-controller/media-controller-resize.html 2022-02-08 02:58:11 UTC (rev 289349)
@@ -16,16 +16,19 @@
shouldBeEqualToString("mediaControls.style.width", "320px");
shouldBeEqualToString("mediaControls.style.height", "240px");
-shadowRoot.addEventListener("resize", () => {
+function testResize() {
shouldBeEqualToString("mediaControls.style.width", "400px");
shouldBeEqualToString("mediaControls.style.height", "300px");
+ shadowRoot.removeEventListener("resize", testResize);
setTimeout(() => {
debug("");
media.remove();
finishJSTest();
});
-});
+}
+shadowRoot.addEventListener("resize", testResize);
+
debug("");
debug("Resizing to 400x300");
media.style.width = "400px";
Modified: branches/safari-613-branch/LayoutTests/platform/mac/TestExpectations (289348 => 289349)
--- branches/safari-613-branch/LayoutTests/platform/mac/TestExpectations 2022-02-08 02:58:07 UTC (rev 289348)
+++ branches/safari-613-branch/LayoutTests/platform/mac/TestExpectations 2022-02-08 02:58:11 UTC (rev 289349)
@@ -2082,8 +2082,6 @@
# @counter-style WPT failures specific to Mac platforms
[ Mojave Catalina ] imported/w3c/web-platform-tests/css/css-counter-styles/lower-armenian/css3-counter-styles-112.html [ ImageOnlyFailure ]
-webkit.org/b/222185 media/media-extension-with-fragment.html [ Crash ]
-
webkit.org/b/222205 css3/calc/transforms-translate.html [ Pass ImageOnlyFailure ]
webkit.org/b/222422 imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Pass Failure Slow ]
Modified: branches/safari-613-branch/LayoutTests/platform/wincairo/TestExpectations (289348 => 289349)
--- branches/safari-613-branch/LayoutTests/platform/wincairo/TestExpectations 2022-02-08 02:58:07 UTC (rev 289348)
+++ branches/safari-613-branch/LayoutTests/platform/wincairo/TestExpectations 2022-02-08 02:58:11 UTC (rev 289349)
@@ -241,7 +241,6 @@
media/track/in-band/track-in-band-srt-mkv-language.html [ Skip ]
media/track/in-band/track-in-band-srt-mkv-track-order.html [ Skip ]
media/invalid-media-url-crash.html [ Skip ]
-media/media-extension-with-fragment.html [ Skip ]
# VIDEO_PRESENTATION_MODE is disabled
media/media-fullscreen-not-in-document.html [ Skip ]
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (289348 => 289349)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-02-08 02:58:07 UTC (rev 289348)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-02-08 02:58:11 UTC (rev 289349)
@@ -1,5 +1,47 @@
2022-02-07 Russell Epstein <[email protected]>
+ Cherry-pick r289108. rdar://problem/88599722
+
+ HTMLMediaElement should dispatch the resize event asynchronously
+ https://bugs.webkit.org/show_bug.cgi?id=230895
+
+ Reviewed by Darin Adler.
+
+ Source/WebCore:
+
+ The HTMLMediaElement is currently queueing a task to dispatch the resize event in the post layout phase.
+ There is no need to run it synchronously and we could move it to another queue were it will be run
+ asynchronously as it was done for other similar tasks in the past.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::layoutSizeChanged):
+
+ LayoutTests:
+
+ * media/modern-media-controls/media-controller/media-controller-resize.html: Remove the event
+ listener to avoid an extra notification.
+ * platform/mac/TestExpectations: Unskipped tests that pass now.
+ * platform/wincairo/TestExpectations: Ditto.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-04 Sergio Villar Senin <[email protected]>
+
+ HTMLMediaElement should dispatch the resize event asynchronously
+ https://bugs.webkit.org/show_bug.cgi?id=230895
+
+ Reviewed by Darin Adler.
+
+ The HTMLMediaElement is currently queueing a task to dispatch the resize event in the post layout phase.
+ There is no need to run it synchronously and we could move it to another queue were it will be run
+ asynchronously as it was done for other similar tasks in the past.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::layoutSizeChanged):
+
+2022-02-07 Russell Epstein <[email protected]>
+
Cherry-pick r289062. rdar://problem/87617695
Crash at com.apple.WebKit: WebKit::RemoteLayerBackingStore::display
Modified: branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp (289348 => 289349)
--- branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp 2022-02-08 02:58:07 UTC (rev 289348)
+++ branches/safari-613-branch/Source/WebCore/html/HTMLMediaElement.cpp 2022-02-08 02:58:11 UTC (rev 289349)
@@ -4654,13 +4654,11 @@
void HTMLMediaElement::layoutSizeChanged()
{
- if (RefPtr frameView = document().view()) {
- auto task = [this, protectedThis = Ref { *this }] {
- if (auto root = userAgentShadowRoot())
- root->dispatchEvent(Event::create("resize", Event::CanBubble::No, Event::IsCancelable::No));
- };
- frameView->queuePostLayoutCallback(WTFMove(task));
- }
+ auto task = [this] {
+ if (auto root = userAgentShadowRoot())
+ root->dispatchEvent(Event::create("resize", Event::CanBubble::No, Event::IsCancelable::No));
+ };
+ queueTaskKeepingObjectAlive(*this, TaskSource::MediaElement, WTFMove(task));
if (!m_receivedLayoutSizeChanged) {
m_receivedLayoutSizeChanged = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes