Title: [214517] branches/safari-603-branch

Diff

Modified: branches/safari-603-branch/LayoutTests/ChangeLog (214516 => 214517)


--- branches/safari-603-branch/LayoutTests/ChangeLog	2017-03-29 03:28:08 UTC (rev 214516)
+++ branches/safari-603-branch/LayoutTests/ChangeLog	2017-03-29 03:28:12 UTC (rev 214517)
@@ -1,5 +1,20 @@
 2017-03-28  Jason Marcell  <[email protected]>
 
+        Merge r214232. rdar://problem/30922105
+
+    2017-03-21  Zalan Bujtas  <[email protected]>
+
+            Tear down descendant renderers when <slot>'s display value is set to no "contents".
+            https://bugs.webkit.org/show_bug.cgi?id=169921
+            <rdar://problem/30336417>
+
+            Reviewed by Antti Koivisto.
+
+            * fast/shadow-dom/slot-with-continuation-descendants-expected.txt: Added.
+            * fast/shadow-dom/slot-with-continuation-descendants.html: Added.
+
+2017-03-28  Jason Marcell  <[email protected]>
+
         Merge r211645. rdar://problem/30922105
 
     2017-02-03  Chris Dumez  <[email protected]>

Added: branches/safari-603-branch/LayoutTests/fast/shadow-dom/slot-with-continuation-descendants-expected.txt (0 => 214517)


--- branches/safari-603-branch/LayoutTests/fast/shadow-dom/slot-with-continuation-descendants-expected.txt	                        (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/shadow-dom/slot-with-continuation-descendants-expected.txt	2017-03-29 03:28:12 UTC (rev 214517)
@@ -0,0 +1,2 @@
+PASS if no crash
+or assert.

Added: branches/safari-603-branch/LayoutTests/fast/shadow-dom/slot-with-continuation-descendants.html (0 => 214517)


--- branches/safari-603-branch/LayoutTests/fast/shadow-dom/slot-with-continuation-descendants.html	                        (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/shadow-dom/slot-with-continuation-descendants.html	2017-03-29 03:28:12 UTC (rev 214517)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we can handle continuation when "display: contents" element becomes non-contents</title>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<slot id=slot>PASS if no crash<span><div></div></span>or assert.</slot>
+<script>
+document.body.offsetHeight;
+slot.style.display = "inline";
+</script>
+</body>
+</html>

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (214516 => 214517)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-03-29 03:28:08 UTC (rev 214516)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-03-29 03:28:12 UTC (rev 214517)
@@ -1,5 +1,27 @@
 2017-03-28  Jason Marcell  <[email protected]>
 
+        Merge r214232. rdar://problem/30922105
+
+    2017-03-21  Zalan Bujtas  <[email protected]>
+
+            Tear down descendant renderers when <slot>'s display value is set to no "contents".
+            https://bugs.webkit.org/show_bug.cgi?id=169921
+            <rdar://problem/30336417>
+
+            Reviewed by Antti Koivisto.
+
+            Since "display: contents" does not generate a renderer, when an element's display value is
+            changed to something other than "contents", we not only create a renderer but also reparent its descendant
+            subtree (e.g from slot's parent to the newly constructed slot renderer). During this reparenting, we
+            need to tear down the descendant subtree tree and build it up again to reflect the new rendering context.
+
+            Test: fast/shadow-dom/slot-with-continuation-descendants.html
+
+            * style/RenderTreeUpdater.cpp:
+            (WebCore::RenderTreeUpdater::updateElementRenderer):
+
+2017-03-28  Jason Marcell  <[email protected]>
+
         Merge r211645. rdar://problem/30922105
 
     2017-02-03  Chris Dumez  <[email protected]>

Modified: branches/safari-603-branch/Source/WebCore/style/RenderTreeUpdater.cpp (214516 => 214517)


--- branches/safari-603-branch/Source/WebCore/style/RenderTreeUpdater.cpp	2017-03-29 03:28:08 UTC (rev 214516)
+++ branches/safari-603-branch/Source/WebCore/style/RenderTreeUpdater.cpp	2017-03-29 03:28:12 UTC (rev 214517)
@@ -253,7 +253,8 @@
     CheckForVisibilityChange checkForVisibilityChange(element);
 #endif
 
-    bool shouldTearDownRenderers = update.change == Style::Detach && (element.renderer() || element.isNamedFlowContentElement());
+    bool shouldTearDownRenderers = update.change == Style::Detach
+        && (element.renderer() || element.isNamedFlowContentElement() || element.hasDisplayContents());
     if (shouldTearDownRenderers)
         tearDownRenderers(element, TeardownType::KeepHoverAndActive);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to