[webkit-changes] [WebKit/WebKit] cc8812: [IFC][Cleanup] InlineDamage::type is redundant

Alan Baradlay noreply at github.com
Sun Mar 24 20:26:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cc881281b01153513ba5f35ee185f14dc9f24168
      https://github.com/WebKit/WebKit/commit/cc881281b01153513ba5f35ee185f14dc9f24168
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-03-24 (Sun, 24 Mar 2024)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h

  Log Message:
  -----------
  [IFC][Cleanup] InlineDamage::type is redundant
https://bugs.webkit.org/show_bug.cgi?id=271533

Reviewed by Antti Koivisto.

1. Content and/or style change always initiates InlineDamage (with a reason)
2. Partial layout happens when
  - there's an InlineDamage and
  - we manage to figure out a start layout position for all the damages (in many cases there's only one change)

There may be cases with multiple changes when
- we manage to find the layout position (partial layout candidate) for the first damage
- but fail at a subsequent change
In such cases we reset the "layout start position" indicating full layout, but we keep the reason.
(in other words, decouple reason(s) the partial layout)

This setups renders InlineDamage::Type::Invalid redundant. However we can't just
destroy m_inlineDamage as we have to keep it around for "detached" content.

* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h:
(WebCore::Layout::InlineDamage::setDamageReason):
(WebCore::Layout::InlineDamage::resetLayoutPosition):
(WebCore::Layout::InlineDamage::type const): Deleted.
(WebCore::Layout::InlineDamage::setDamageType): Deleted.
(WebCore::Layout::InlineDamage::reset): Deleted.
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::updateInlineDamage):
(WebCore::Layout::InlineInvalidation::setFullLayoutIfNeeded):
(WebCore::Layout::InlineInvalidation::textInserted):
(WebCore::Layout::InlineInvalidation::textWillBeRemoved):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxInserted):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxWillBeRemoved):
(WebCore::Layout::InlineInvalidation::restartForPagination):
(WebCore::Layout::InlineInvalidation::applyFullDamageIfNeeded): Deleted.
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:

Canonical link: https://commits.webkit.org/276617@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