Title: [288496] branches/safari-613-branch
Revision
288496
Author
[email protected]
Date
2022-01-24 17:54:42 -0800 (Mon, 24 Jan 2022)

Log Message

Cherry-pick r287878. rdar://problem/85359803

    ::backdrop pseudo element should react to associated element event listeners
    https://bugs.webkit.org/show_bug.cgi?id=233072

    Reviewed by Alan Bujtas.

    LayoutTests/imported/w3c:

    Update test expectations.

    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt:

    Source/WebCore:

    Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html

    We now append the ::backdrop renderer as a child of the top layer element, rather than a sibling of the
    top layer element. This gets hit testing working properly for free.

    We used to append the ::backdrop renderer as a sibling to get the proper layout, but this is no longer
    necessary after r287683 and r287845.

    * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
    (WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):

    LayoutTests:

    iOS failure is due to WPT test_driver actions being unsupported.

    * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/ChangeLog (288495 => 288496)


--- branches/safari-613-branch/LayoutTests/ChangeLog	2022-01-25 01:54:37 UTC (rev 288495)
+++ branches/safari-613-branch/LayoutTests/ChangeLog	2022-01-25 01:54:42 UTC (rev 288496)
@@ -1,3 +1,51 @@
+2022-01-24  Alan Coon  <[email protected]>
+
+        Cherry-pick r287878. rdar://problem/85359803
+
+    ::backdrop pseudo element should react to associated element event listeners
+    https://bugs.webkit.org/show_bug.cgi?id=233072
+    
+    Reviewed by Alan Bujtas.
+    
+    LayoutTests/imported/w3c:
+    
+    Update test expectations.
+    
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt:
+    
+    Source/WebCore:
+    
+    Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html
+    
+    We now append the ::backdrop renderer as a child of the top layer element, rather than a sibling of the
+    top layer element. This gets hit testing working properly for free.
+    
+    We used to append the ::backdrop renderer as a sibling to get the proper layout, but this is no longer
+    necessary after r287683 and r287845.
+    
+    * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+    (WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
+    
+    LayoutTests:
+    
+    iOS failure is due to WPT test_driver actions being unsupported.
+    
+    * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-11  Tim Nguyen  <[email protected]>
+
+            ::backdrop pseudo element should react to associated element event listeners
+            https://bugs.webkit.org/show_bug.cgi?id=233072
+
+            Reviewed by Alan Bujtas.
+
+            iOS failure is due to WPT test_driver actions being unsupported.
+
+            * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt: Added.
+
 2022-01-20  Russell Epstein  <[email protected]>
 
         Cherry-pick r288078. rdar://problem/87662271

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (288495 => 288496)


--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-01-25 01:54:37 UTC (rev 288495)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-01-25 01:54:42 UTC (rev 288496)
@@ -1,5 +1,53 @@
 2022-01-24  Alan Coon  <[email protected]>
 
+        Cherry-pick r287878. rdar://problem/85359803
+
+    ::backdrop pseudo element should react to associated element event listeners
+    https://bugs.webkit.org/show_bug.cgi?id=233072
+    
+    Reviewed by Alan Bujtas.
+    
+    LayoutTests/imported/w3c:
+    
+    Update test expectations.
+    
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt:
+    
+    Source/WebCore:
+    
+    Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html
+    
+    We now append the ::backdrop renderer as a child of the top layer element, rather than a sibling of the
+    top layer element. This gets hit testing working properly for free.
+    
+    We used to append the ::backdrop renderer as a sibling to get the proper layout, but this is no longer
+    necessary after r287683 and r287845.
+    
+    * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+    (WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
+    
+    LayoutTests:
+    
+    iOS failure is due to WPT test_driver actions being unsupported.
+    
+    * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-11  Tim Nguyen  <[email protected]>
+
+            ::backdrop pseudo element should react to associated element event listeners
+            https://bugs.webkit.org/show_bug.cgi?id=233072
+
+            Reviewed by Alan Bujtas.
+
+            Update test expectations.
+
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt:
+
+2022-01-24  Alan Coon  <[email protected]>
+
         Cherry-pick r287835. rdar://problem/87338875
 
     [Web Animations] getKeyframes() for a CSS Animation should not use computed style for keyframes (part 2)

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt (288495 => 288496)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt	2022-01-25 01:54:37 UTC (rev 288495)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt	2022-01-25 01:54:42 UTC (rev 288496)
@@ -1,5 +1,3 @@
 
-Harness Error (TIMEOUT), message = null
+PASS Test that ::backdrop receives events for the associated element
 
-NOTRUN Test that ::backdrop receives events for the associated element
-

Copied: branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt (from rev 288495, branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt) (0 => 288496)


--- branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt	2022-01-25 01:54:42 UTC (rev 288496)
@@ -0,0 +1,4 @@
+
+Harness Error (TIMEOUT), message = null
+
+NOTRUN Test that ::backdrop receives events for the associated element

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (288495 => 288496)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-01-25 01:54:37 UTC (rev 288495)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-01-25 01:54:42 UTC (rev 288496)
@@ -1,5 +1,60 @@
 2022-01-24  Alan Coon  <[email protected]>
 
+        Cherry-pick r287878. rdar://problem/85359803
+
+    ::backdrop pseudo element should react to associated element event listeners
+    https://bugs.webkit.org/show_bug.cgi?id=233072
+    
+    Reviewed by Alan Bujtas.
+    
+    LayoutTests/imported/w3c:
+    
+    Update test expectations.
+    
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt:
+    
+    Source/WebCore:
+    
+    Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html
+    
+    We now append the ::backdrop renderer as a child of the top layer element, rather than a sibling of the
+    top layer element. This gets hit testing working properly for free.
+    
+    We used to append the ::backdrop renderer as a sibling to get the proper layout, but this is no longer
+    necessary after r287683 and r287845.
+    
+    * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+    (WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
+    
+    LayoutTests:
+    
+    iOS failure is due to WPT test_driver actions being unsupported.
+    
+    * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-11  Tim Nguyen  <[email protected]>
+
+            ::backdrop pseudo element should react to associated element event listeners
+            https://bugs.webkit.org/show_bug.cgi?id=233072
+
+            Reviewed by Alan Bujtas.
+
+            Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html
+
+            We now append the ::backdrop renderer as a child of the top layer element, rather than a sibling of the
+            top layer element. This gets hit testing working properly for free.
+
+            We used to append the ::backdrop renderer as a sibling to get the proper layout, but this is no longer
+            necessary after r287683 and r287845.
+
+            * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+            (WebCore::RenderTreeUpdater::GeneratedContent::updateBackdropRenderer):
+
+2022-01-24  Alan Coon  <[email protected]>
+
         Cherry-pick r287835. rdar://problem/87338875
 
     [Web Animations] getKeyframes() for a CSS Animation should not use computed style for keyframes (part 2)

Modified: branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp (288495 => 288496)


--- branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp	2022-01-25 01:54:37 UTC (rev 288495)
+++ branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp	2022-01-25 01:54:42 UTC (rev 288496)
@@ -185,30 +185,14 @@
     }
 
     auto newStyle = RenderStyle::clone(*style);
-    RenderPtr<RenderBlockFlow> newBackdropRenderer;
-    auto backdropRenderer = renderer.backdropRenderer();
-    if (backdropRenderer)
+    if (auto backdropRenderer = renderer.backdropRenderer())
         backdropRenderer->setStyle(WTFMove(newStyle));
     else {
-        newBackdropRenderer = WebCore::createRenderer<RenderBlockFlow>(renderer.document(), WTFMove(newStyle));
+        auto newBackdropRenderer = WebCore::createRenderer<RenderBlockFlow>(renderer.document(), WTFMove(newStyle));
         newBackdropRenderer->initializeStyle();
-        backdropRenderer = newBackdropRenderer.get();
-        renderer.setBackdropRenderer(*backdropRenderer);
+        renderer.setBackdropRenderer(*newBackdropRenderer.get());
+        m_updater.m_builder.attach(renderer, WTFMove(newBackdropRenderer), renderer.firstChild());
     }
-
-    // Update or attach to renderer parent
-    WeakPtr currentParent = backdropRenderer->parent();
-    WeakPtr newParent = renderer.parent();
-
-    ASSERT(newParent, "Should have new parent");
-
-    if (newParent == currentParent)
-        return;
-
-    if (currentParent)
-        m_updater.m_builder.attach(*newParent, m_updater.m_builder.detach(*currentParent, *backdropRenderer, RenderTreeBuilder::CanCollapseAnonymousBlock::No), &renderer);
-    else
-        m_updater.m_builder.attach(*newParent, WTFMove(newBackdropRenderer), &renderer);
 }
 
 bool RenderTreeUpdater::GeneratedContent::needsPseudoElement(const Style::ElementUpdate* update)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to