[webkit-changes] [WebKit/WebKit] 76f7fe: [Content Visibility] onedrive.live.com: content-vi...
Sammy Gill
noreply at github.com
Mon Sep 9 09:10:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 76f7fe96cdbb551285d6cd5c7fbf9eb1aa171a05
https://github.com/WebKit/WebKit/commit/76f7fe96cdbb551285d6cd5c7fbf9eb1aa171a05
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2024-09-09 (Mon, 09 Sep 2024)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-on-display-contents-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-on-display-contents.html
M Source/WebCore/rendering/style/RenderStyleInlines.h
Log Message:
-----------
[Content Visibility] onedrive.live.com: content-visibility does not apply to display: contents elements.
https://bugs.webkit.org/show_bug.cgi?id=278477
rdar://134436437
Reviewed by Alan Baradlay.
We attempt to apply some content-visibility: auto logic to a
display: contents item which results in descendant content not appearing
on OneDrive since the root element does not have an associated renderer.
The spec actually handles this case by stating that content-visibility
applies to: "elements for which size containment can apply." The size
containment portion of the spec then states size containment has no
effect if, "if the element does not generate a principal box (as is the
case with display: contents or display: none)."
https://drafts.csswg.org/css-contain-2/#content-visibility
https://drafts.csswg.org/css-contain-2/#size-containment
We can handle this by checking the display type in isSkippedContentRoot
which is used for, among other things, propagating the
usedContentVisibility value to descendant renderers. As a result, we
should not be propagating this content visibility information to
descendant renderers and they should go through layout as if
content-visibility was not set on the display: contents element.
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-on-display-contents-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-on-display-contents.html: Added.
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::isSkippedContentRoot):
Canonical link: https://commits.webkit.org/283345@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list