Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: db30cc63c7ac0e8a61e33b2dcf0b5089e46e3482
      
https://github.com/WebKit/WebKit/commit/db30cc63c7ac0e8a61e33b2dcf0b5089e46e3482
  Author: Vitor Roriz <[email protected]>
  Date:   2024-11-14 (Thu, 14 Nov 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/layout/formattingContexts/inline/InlineContentCache.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h
    M Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp

  Log Message:
  -----------
  text-autospace: Trim spacing between text runs placed on different lines
https://bugs.webkit.org/show_bug.cgi?id=283079
rdar://139824338

Reviewed by Alan Baradlay.

Text content can be split into multiple different inline text items.
At this patch we use TrimmableTextSpacings in the TextSpacingContext to 
identify spacing that was added to a text item because of
its adjacency to another text item.

Ex: if we have 2 text items A and B, and the last character of A and the first 
character of B require spacing to be added between them.
This spacing is always added as a leading spacing to B. However, during line 
breaking, if B gets placed on a different line as A, they
are no longer adjacent and we must trim such spacing.

* LayoutTests/TestExpectations:
* Source/WebCore/layout/formattingContexts/inline/InlineContentCache.h:
(WebCore::Layout::InlineContentCache::InlineItems::hasTextAutospace const):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::handleTextSpacing):
(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::candidateContentForLine):
* Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h:
* Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.cpp:
(WebCore::Layout::RangeBasedLineBuilder::isEligibleForRangeInlineLayout):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::isEligibleForSimplifiedTextOnlyInlineLayoutByContent):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to