[webkit-changes] [WebKit/WebKit] 4d0e3a: [IFC][hanging punctuation] Line's trailing hanging...

Alan Baradlay noreply at github.com
Tue Dec 20 13:04:59 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4d0e3a44df3b5bf8ad9c6c218a1feab80918b175
      https://github.com/WebKit/WebKit/commit/4d0e3a44df3b5bf8ad9c6c218a1feab80918b175
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2022-12-20 (Tue, 20 Dec 2022)

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

  Log Message:
  -----------
  [IFC][hanging punctuation] Line's trailing hanging content is either preserved whitespace or punctuation
https://bugs.webkit.org/show_bug.cgi?id=249649

Reviewed by Antti Koivisto.

The hanging content could be
- leading punctuation (at the front of the first formatted line)
- trailing punctuation (at the end of the last formatted line)
  or preserved whitespace (and the end of each line)

This patch ensures that Line::HangingContent reflects ^^. It also computes trailing hanging punctuation when applicable.

* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::resetTrailingContent):
(WebCore::Layout::Line::removeHangingGlyphs):
(WebCore::Layout::Line::appendInlineBoxStart):
(WebCore::Layout::Line::appendInlineBoxEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::HangingContent::addLeadingGlyphs): Deleted.
(WebCore::Layout::Line::HangingContent::addTrailingGlyphs): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::hangingTrailingWhitespaceWidth const):
(WebCore::Layout::Line::hangingTrailingContentWidth const):
(WebCore::Layout::Line::HangingContent::setLeadingPunctuation):
(WebCore::Layout::Line::HangingContent::resetTrailingContent):
(WebCore::Layout::Line::HangingContent::trailingWhitespaceWidth const):
(WebCore::Layout::Line::HangingContent::trailingWidth const):
(WebCore::Layout::Line::HangingContent::width const):
(WebCore::Layout::Line::HangingContent::setTrailingPunctuation):
(WebCore::Layout::Line::HangingContent::setTrailingWhitespace):
(WebCore::Layout::Line::HangingContent::length const):
(WebCore::Layout::Line::HangingContent::resetTrailingPunctuation):
(WebCore::Layout::Line::hangingLeadingContentWidth const): Deleted.
(WebCore::Layout::Line::HangingContent::leadingLength const): Deleted.
(WebCore::Layout::Line::HangingContent::trailingLength const): Deleted.
(WebCore::Layout::Line::HangingContent::leadingWidth const): Deleted.
(WebCore::Layout::Line::HangingContent::reset): Deleted.
(WebCore::Layout::Line::HangingContent::resetTrailingGlyphs): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::trimmableTrailingContentWidth):

Canonical link: https://commits.webkit.org/258159@main




More information about the webkit-changes mailing list