[webkit-changes] [WebKit/WebKit] 514d0a: canvas-as-container-005.html & canvas-as-container...
Antti Koivisto
noreply at github.com
Fri Sep 8 04:29:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 514d0acadd369b1e25caa9d1705af22448feabc5
https://github.com/WebKit/WebKit/commit/514d0acadd369b1e25caa9d1705af22448feabc5
Author: Antti Koivisto <antti at apple.com>
Date: 2023-09-08 (Fri, 08 Sep 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/canvas-as-container-005-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/canvas-as-container-006-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Element.cpp
Log Message:
-----------
canvas-as-container-005.html & canvas-as-container-006.html fail
https://bugs.webkit.org/show_bug.cgi?id=253936
rdar://106739131
Reviewed by Alan Baradlay.
When resolving computed style in a non-rendered subtree we fail to take container queries into account.
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/canvas-as-container-005-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/canvas-as-container-006-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
Take care to have updated document style if it is not clean and we are resolving the root element.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::resolveComputedStyle):
- Ensure the style scope is flushed so stylesheet data is current.
- Don't bail out when encountering display:none subtree, the ancestors may still affect its style.
- Fall back to a full style update if we encounter a query container with invalid style in the ancestor chain.
Canonical link: https://commits.webkit.org/267786@main
More information about the webkit-changes
mailing list