[webkit-changes] [WebKit/WebKit] 7c125c: Refactor BreakLines.h

fantasai noreply at github.com
Sun May 5 22:26:02 PDT 2024


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

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
    M Source/WebCore/rendering/BreakLines.h

  Log Message:
  -----------
  Refactor BreakLines.h
https://bugs.webkit.org/show_bug.cgi?id=273729
rdar://problem/127532669

Reviewed by Alan Baradlay.

Refactor BreakLines.h to
* Distinguish public vs private functions
* Name things in understandable ways that are relevant to line-breaking concepts
    rather than low-level behaviors in helper functions (like IgnoreNBSP...)
* Use templates rather than repetitive function names with slight variations

* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::findNextBreakablePosition): update callers
* Source/WebCore/rendering/BreakLines.h:
(WebCore::isBreakableSpace): renaming
(WebCore::needsLineBreakIterator): renaming
(WebCore::nextBreakablePosition): templating
(WebCore::nextBreakableSpace): renaming
(WebCore::nextCharacter): renaming
(WebCore::isBreakable): update callers
(WebCore::nextBreakablePositionKeepingAllWords): Deleted.
(WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP): Deleted.
(WebCore::nextBreakablePositionIgnoringNBSP): Deleted.
(WebCore::nextBreakablePositionWithoutShortcut): Deleted.
(WebCore::nextBreakablePositionIgnoringNBSPWithoutShortcut): Deleted.
(WebCore::nextBreakablePositionBreakCharacter): Deleted.

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