[webkit-changes] [WebKit/WebKit] 0e46c0: [Cleanup] Checking needsLayout() does not need Che...
Alan Baradlay
noreply at github.com
Wed Apr 3 08:20:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0e46c0d29422243b629cfb62c1c1419ca9febed0
https://github.com/WebKit/WebKit/commit/0e46c0d29422243b629cfb62c1c1419ca9febed0
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-04-03 (Wed, 03 Apr 2024)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
Log Message:
-----------
[Cleanup] Checking needsLayout() does not need CheckedPtr in Document::updateLayoutIfDimensionsOutOfDate
https://bugs.webkit.org/show_bug.cgi?id=271983
Reviewed by Antti Koivisto.
1. Fix FIXME in Document::DimensionsCheck. All is indeed Width | Height. Let's use that in the incoming OptionSet instead.
2. When parent document is dirty, let's just run updateLayout and return right away instead of going through the "can we optimize case" codepath (it saves calling updateRelevancyOfContentVisibilityElements/updateStyleIfNeeded twice)
3. Move isVertical/hasSpecifiedLogicalHeight/checkingLogicalWidth/checkingLogicalHeight inside [if (!requireFullLayout) { }] where they are actually used.
4. requireFullLayout should just read "element.renderer()->needsLayout() || is<HTMLInputElement>(element)" at this point (accessing const needsLayout() should not require a CheckedPtr)
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
* Source/WebCore/dom/Document.h:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
Canonical link: https://commits.webkit.org/277002@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