Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb62715ca67c53d52c82cca2eafe460777a2a4ae
https://github.com/WebKit/WebKit/commit/fb62715ca67c53d52c82cca2eafe460777a2a4ae
Author: Matt Woodrow <[email protected]>
Date: 2025-01-16 (Thu, 16 Jan 2025)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/html/dom/render-blocking/element-render-blocking-040-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/html/dom/render-blocking/element-render-blocking-040.html
M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/DocumentParser.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/IdTargetObserver.h
M Source/WebCore/dom/IdTargetObserverRegistry.cpp
M Source/WebCore/dom/IdTargetObserverRegistry.h
M Source/WebCore/dom/TreeScope.cpp
M Source/WebCore/dom/TreeScope.h
M Source/WebCore/html/FormListedElement.cpp
M Source/WebCore/html/HTMLDataListElement.cpp
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLLinkElement.cpp
M Source/WebCore/html/HTMLLinkElement.h
M Source/WebCore/html/parser/HTMLDocumentParser.cpp
M Source/WebCore/html/parser/HTMLDocumentParser.h
M Source/WebCore/html/parser/HTMLElementStack.cpp
M Source/WebCore/html/parser/HTMLTreeBuilder.cpp
M Source/WebCore/html/parser/HTMLTreeBuilder.h
Log Message:
-----------
[render-blocking] Render blocking for <link> should not match elements that
are on a 'stack of open elements' for the parser.
https://bugs.webkit.org/show_bug.cgi?id=279167
<rdar://135846827>
Reviewed by Tim Nguyen.
Check if the Element being considered for matching a <link rel=expect> is still
on the stack of open elements from the parser.
This requires adding another call to processInternalResourceLink when an Element
is popped from the stack, and making sure that finishParsingChildren is called
*after* the stack gets mutated (otherwise recursive calls to check the stack
think its still there).
Generalizes the fast path of processInternalResourceLink (where a specific
Element to check is provided) to accept any Element instead of only anchors, and
uses it for the stack pop case.
Pass the Element being mutated into IdTargetObserver, so that this path too can
use the provided Element fast path check. We should now only do the tree-walk
search for an Element when the <link> itself is mutated.
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/render-blocking/element-render-blocking-040-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/render-blocking/element-render-blocking-040.html:
Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::htmlDocumentParser const):
(WebCore::Document::processInternalResourceLinks):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/DocumentParser.h:
(WebCore::DocumentParser::asHTMLDocumentParser):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::finishParsingChildren):
* Source/WebCore/dom/IdTargetObserver.h:
* Source/WebCore/dom/IdTargetObserverRegistry.cpp:
(WebCore::IdTargetObserverRegistry::notifyObserversInternal):
* Source/WebCore/dom/IdTargetObserverRegistry.h:
(WebCore::IdTargetObserverRegistry::notifyObservers):
* Source/WebCore/dom/TreeScope.cpp:
(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::removeElementById):
(WebCore::TreeScope::findAnchor):
(WebCore::TreeScope::isMatchingAnchor):
* Source/WebCore/dom/TreeScope.h:
* Source/WebCore/html/FormListedElement.cpp:
(WebCore::FormAttributeTargetObserver::idTargetChanged):
* Source/WebCore/html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::optionElementChildrenChanged):
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::ListAttributeTargetObserver::idTargetChanged):
* Source/WebCore/html/HTMLLinkElement.cpp:
(WebCore::ExpectIdTargetObserver::idTargetChanged):
(WebCore::HTMLLinkElement::processInternalResourceLink):
* Source/WebCore/html/HTMLLinkElement.h:
* Source/WebCore/html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::isOnStackOfOpenElements const):
* Source/WebCore/html/parser/HTMLDocumentParser.h:
* Source/WebCore/html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::popAll):
(WebCore::HTMLElementStack::popCommon):
(WebCore::HTMLElementStack::removeNonTopCommon):
* Source/WebCore/html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::isOnStackOfOpenElements const):
* Source/WebCore/html/parser/HTMLTreeBuilder.h:
Canonical link: https://commits.webkit.org/289020@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes