[webkit-changes] [WebKit/WebKit] f59f78: Remove the mechanism for blocking paint on non-fin...
Antti Koivisto
noreply at github.com
Wed Apr 5 16:18:16 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f59f78a8be0bda72e2019411f3111088dd6c9fba
https://github.com/WebKit/WebKit/commit/f59f78a8be0bda72e2019411f3111088dd6c9fba
Author: Antti Koivisto <antti at apple.com>
Date: 2023-04-05 (Wed, 05 Apr 2023)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/html/HTMLFrameSetElement.cpp
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleMiscNonInheritedData.h
M Source/WebCore/rendering/svg/RenderSVGRoot.cpp
M Source/WebCore/style/StyleScope.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
Remove the mechanism for blocking paint on non-final style
https://bugs.webkit.org/show_bug.cgi?id=255045
rdar://106805458
Reviewed by Alan Baradlay.
Normally we don't compute element style until all relevant stylesheets have been loaded. However a script
may force us to compute the style earlier. In this case we were marking the style as "non-final" and avoided
painting such elements (because their style may change later, resulting in a flash of miss-styled content).
In practice hitting this case is rather difficult since we block script execution on stylesheet loads. You need
to insert a stylesheet from a script and then force a style recalc.
Our current main anti-FOUC mechanism is to delay layer tree unfreezing. The non-final style mechanism
is likely not useful anymore.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::resolveStyle):
* Source/WebCore/dom/Document.h:
(WebCore::Document::hasNodesWithNonFinalStyle const): Deleted.
(WebCore::Document::setHasNodesWithNonFinalStyle): Deleted.
* Source/WebCore/html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintContents):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::shouldSuppressPaintingLayer):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::miscDataChangeRequiresRepaint):
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::isNotFinal const): Deleted.
(WebCore::RenderStyle::setIsNotFinal): Deleted.
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp:
(WebCore::StyleMiscNonInheritedData::StyleMiscNonInheritedData):
(WebCore::StyleMiscNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.h:
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintContents):
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::invalidateStyleAfterStyleSheetChange):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolveComposedTree):
(WebCore::Style::TreeResolver::resolve):
Canonical link: https://commits.webkit.org/262641@main
More information about the webkit-changes
mailing list