Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0e46c0d29422243b629cfb62c1c1419ca9febed0
      
https://github.com/WebKit/WebKit/commit/0e46c0d29422243b629cfb62c1c1419ca9febed0
  Author: Alan Baradlay <za...@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
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to