[webkit-changes] [WebKit/WebKit] 2b27eb: Optimize control flow in nextBreakablePosition()

fantasai noreply at github.com
Wed May 8 21:34:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b27eb4841d2487fd4d3cd00a78f888b246da42c
      https://github.com/WebKit/WebKit/commit/2b27eb4841d2487fd4d3cd00a78f888b246da42c
  Author: Elika Etemad <fantasai.bugs at inkedblade.net>
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
    M Source/WebCore/rendering/BreakLines.h

  Log Message:
  -----------
  Optimize control flow in nextBreakablePosition()
https://bugs.webkit.org/show_bug.cgi?id=273793
rdar://127763823

Reviewed by Alan Baradlay.

Reduces conditional checks in nextBreakablePosition by rearranging control flow.
(Also renames some key variables for better understandability.)

* Source/WebCore/rendering/BreakLines.h:
(WebCore::lineBreakTableUnsafeLookup): Create a table lookup inline function.
(WebCore::nextBreakablePosition): Reorganize control flow.
(WebCore::shouldBreakAfter): Deleted by incorporating into nextBreakablePosition.
(WebCore::needsLineBreakIterator): Deleted by dissolving into nextBreakablePosition.

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