Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 43db1ee01868a20cd9448bc160dd3bbb708e0693
      
https://github.com/WebKit/WebKit/commit/43db1ee01868a20cd9448bc160dd3bbb708e0693
  Author: Alan Bujtas <[email protected]>
  Date:   2022-09-25 (Sun, 25 Sep 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/fast/text/pre-wrap-with-line-break-after-white-space-expected.html
    A LayoutTests/fast/text/pre-wrap-with-line-break-after-white-space.html
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h

  Log Message:
  -----------
  [LFC][IFC] Hang whitespace when 'line-break: after-white-space' is present
https://bugs.webkit.org/show_bug.cgi?id=245644

Reviewed by Antti Koivisto.

This patch ensures that we don't assume that the hanging trailing run is a 
dedicated whitespace run.

Before this non-standard "line-break: after-white-space" it was a correct 
assumption because
- we either had whitespace runs with soft wrap opportunities at both sides ("A 
B" produces the following runs [A][ ][B])
- or in case of soft wrap opportunity only after whitespace (white-space: 
break-spaces) the "end-of-line spaces" rule says no "hang".

"line-break: after-white-space" introduces hanging trailing whitespace content 
with soft wrap opportunity only after whitespace: "A B" -> [A ][B].

* LayoutTests/TestExpectations:
* 
LayoutTests/fast/text/pre-wrap-with-line-break-after-white-space-expected.html: 
Added.
* LayoutTests/fast/text/pre-wrap-with-line-break-after-white-space.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h:
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hangingContentWidth 
const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasHangingContent 
const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::isHangingContent 
const):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to