[webkit-changes] [WebKit/WebKit] b8e289: [content-visibility] Improve skipped content namin...

Rob Buis noreply at github.com
Sun Jan 21 14:22:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b8e28937f4ed4c2f98458b185f7b462bc1c1a18e
      https://github.com/WebKit/WebKit/commit/b8e28937f4ed4c2f98458b185f7b462bc1c1a18e
  Author: Rob Buis <rbuis at igalia.com>
  Date:   2024-01-21 (Sun, 21 Jan 2024)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/rendering/RenderElement.cpp
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderObject.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleInlines.h
    M Source/WebCore/rendering/style/RenderStyleSetters.h
    M Source/WebCore/rendering/style/StyleRareInheritedData.cpp
    M Source/WebCore/rendering/style/StyleRareInheritedData.h
    M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
    M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  -----------
  [content-visibility] Improve skipped content naming in RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=267817

Reviewed by Tim Nguyen.

In hindsight skippedContentReason returning a std::optional seems to make
things less readable, especially since we test for has_value() a lot instead
of relying on the implicit bool conversion, so remove it, and rename skippedContentReason
to effectiveContentVisibility.
Also add a hasSkippedContent method as a more readable replacement
for the has_value() checks.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayout):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::hasFocusableStyle const):
(WebCore::Element::checkVisibility):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateDescendantDependentFlags):
(WebCore::RenderLayer::calculateClipRects const):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::isSkippedContent const):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::rareInheritedDataChangeRequiresLayout):
(WebCore::RenderStyle::conservativelyCollectChangedAnimatableProperties const):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::effectiveContentVisibility const):
(WebCore::RenderStyle::hasSkippedContent const):
(WebCore::RenderStyle::skippedContentReason const): Deleted.
* Source/WebCore/rendering/style/RenderStyleSetters.h:
(WebCore::RenderStyle::setEffectiveContentVisibility):
(WebCore::RenderStyle::setSkippedContentReason): Deleted.
* Source/WebCore/rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareInheritedData.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):

Canonical link: https://commits.webkit.org/273276@main




More information about the webkit-changes mailing list