[webkit-changes] [WebKit/WebKit] e72aac: [IFC][Cleanup] Simplify damage invalidation logic ...

Alan Baradlay noreply at github.com
Sun Mar 3 09:34:15 PST 2024


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

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

  Log Message:
  -----------
  [IFC][Cleanup] Simplify damage invalidation logic by specializing the append case
https://bugs.webkit.org/show_bug.cgi?id=270391

Reviewed by Antti Koivisto.

When content gets appended we don't have DamagedContent which means we pass around it as std::optional to some helper functions. However these functions do very little (if anything at all) in std::null_opt cases.
"leadingInlineItemPositionOnLastLine" function should be able to compute the leading inline item position without calling into those helpers.

(This is also in preparation for fixing webkit.org/b/270388)

* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::damagedLineIndex):
(WebCore::Layout::leadingInlineItemPositionOnLastLine):
(WebCore::Layout::damagedLineByDamagedBox):
(WebCore::Layout::InlineInvalidation::textInserted):
(WebCore::Layout::InlineInvalidation::textWillBeRemoved):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxInserted):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxWillBeRemoved):
(WebCore::Layout::leadingInlineItemPositionForDamage): Deleted.
(WebCore::Layout::leadingInlineItemPositionByDamagedBox): Deleted.

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