https://bugs.webkit.org/show_bug.cgi?id=188259
<rdar://problem/
42886896>
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/css/display-contents-to-none.html
* style/StyleTreeResolver.cpp:
(WebCore::Style::affectsRenderedSubtree):
An element with 'display:contents' has a rendered subtree.
LayoutTests:
* fast/css/display-contents-to-none-expected.html: Added.
* fast/css/display-contents-to-none.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243444
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-03-25 Antti Koivisto <antti@apple.com>
+
+ Toggling "display: contents" to "display: none" fails to hide the element
+ https://bugs.webkit.org/show_bug.cgi?id=188259
+ <rdar://problem/42886896>
+
+ Reviewed by Simon Fraser.
+
+ * fast/css/display-contents-to-none-expected.html: Added.
+ * fast/css/display-contents-to-none.html: Added.
+
2019-03-25 Diego Pino Garcia <dpino@igalia.com>
[GTK] Gardening, update expected results for several smart-delete-paragraph tests
--- /dev/null
+<!DOCTYPE html>
+<html>
+<body>
+<p>This test passes if it doesn't say FAIL below.</p>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<body>
+<p>This test passes if it doesn't say FAIL below.</p>
+<div style="display: contents"><span>FAIL</span></div>
+<div style="display: contents">FAIL</div>
+<script>
+for (const div of document.querySelectorAll('div')) {
+ div.getBoundingClientRect();
+ div.style.display = 'none';
+}
+</script>
+</body>
+</html>
+2019-03-25 Antti Koivisto <antti@apple.com>
+
+ Toggling "display: contents" to "display: none" fails to hide the element
+ https://bugs.webkit.org/show_bug.cgi?id=188259
+ <rdar://problem/42886896>
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/css/display-contents-to-none.html
+
+ * style/StyleTreeResolver.cpp:
+ (WebCore::Style::affectsRenderedSubtree):
+
+ An element with 'display:contents' has a rendered subtree.
+
2019-03-25 Justin Fan <justin_fan@apple.com>
Update WebGPU class names based on sketch.idl
static bool affectsRenderedSubtree(Element& element, const RenderStyle& newStyle)
{
- if (element.renderer())
- return true;
if (newStyle.display() != DisplayType::None)
return true;
+ if (element.renderOrDisplayContentsStyle())
+ return true;
if (element.rendererIsNeeded(newStyle))
return true;
return false;