[webkit-changes] [WebKit/WebKit] 68c161: [Cleanup] Refactor LineBuilder::processLineBreakin...

yulunwu2 noreply at github.com
Tue Jan 14 11:51:19 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 68c1618bb112429a6c71f2a09fcd0838e4870881
      https://github.com/WebKit/WebKit/commit/68c1618bb112429a6c71f2a09fcd0838e4870881
  Author: Yulun Wu <yulun_wu at apple.com>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

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

  Log Message:
  -----------
  [Cleanup] Refactor LineBuilder::processLineBreakingResult.
https://bugs.webkit.org/show_bug.cgi?id=285861
<rdar://142759226>

Reviewed by Alan Baradlay.

This change updates LineBuilder::processLineBreakingResult to use a switch statement instead of a a series of if statements. This should help improve readability and force future developers to update this function when making additions to InlineContentBreaker::Result::Action. Jump tables are also *marginally* faster than if statements.

* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::processLineBreakingResult):

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