[Webkit-unassigned] [Bug 236710] [content-visibility] Add support for css content-visibility: hidden

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 10 03:41:22 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=236710

Tim Nguyen (:ntim) <ntim at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ntim at apple.com

--- Comment #19 from Tim Nguyen (:ntim) <ntim at apple.com> ---
Comment on attachment 458860
  --> https://bugs.webkit.org/attachment.cgi?id=458860
Rebase

View in context: https://bugs.webkit.org/attachment.cgi?id=458860&action=review

> LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-with-top-layer-003.tentative.html:14
> +.hidden { ontent-visibility: hidden }

What is this change about?

> Source/WebCore/dom/Element.cpp:3405
> +    if (isSkippedContent())
> +        return;

This is kinda surprising to me, what bit of the spec says this?

> Source/WebCore/dom/Element.cpp:4820
> +void Element::updateDescendantTopLayerElements(ContentVisibility newContentVisibility)
> +{
> +    auto topLayers = document().topLayerElements();
> +    for (auto topLayerElement : topLayers) {
> +        for (auto* ancestor = topLayerElement.ptr(); ancestor; ancestor = ancestor->parentElementInComposedTree()) {
> +            if (ancestor == this) {
> +                if (newContentVisibility ==  ContentVisibility::Visible) {
> +                    if (!topLayerElement->isInTopLayer())
> +                        topLayerElement->addToTopLayer();
> +                } else if (newContentVisibility ==  ContentVisibility::Hidden) {
> +                    if (topLayerElement->isInTopLayer())
> +                        topLayerElement->removeFromTopLayer();
> +                }
> +                break;
> +            }
> +        }
> +    }
> +}

Not sure I'm understanding how this works? Is this trying to add/remove layers based on the node flag? 

I'm confused why the DOM side of the top layer logic should be touched here. Isn't this a layout feature?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220510/3776f5f8/attachment.htm>


More information about the webkit-unassigned mailing list