Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 251d60227d7e180fd93206de09746d1211af60c4
https://github.com/WebKit/WebKit/commit/251d60227d7e180fd93206de09746d1211af60c4
Author: Alan Baradlay <[email protected]>
Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths:
M LayoutTests/TestExpectations
A
LayoutTests/fast/inline/soft-wrap-between-characters-and-whitespace-expected.html
A LayoutTests/fast/inline/soft-wrap-between-characters-and-whitespace.html
M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.h
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h
Log Message:
-----------
[IFC][Soft wrap opportunity] When at the boundary of two characters, the
white-space property on the nearest common ancestor controls breaking
https://bugs.webkit.org/show_bug.cgi?id=269263
Reviewed by Antti Koivisto.
https://www.w3.org/TR/css-text-4/#line-break-details
"For soft wrap opportunities created by characters that disappear at the line
break
(e.g. U+0020 SPACE), properties on the box directly containing that character
control
the line breaking at that opportunity. For soft wrap opportunities defined by
the boundary between two characters, the white-space property on the nearest
common ancestor
of the two characters controls breaking;"
1. Merge previous/next isWhitespace cases (handling the first part of the
sentence)
2. Implement nearestCommonAncestor for the non-whitespace case.
*
LayoutTests/fast/inline/soft-wrap-between-characters-and-whitespace-expected.html:
Added.
* LayoutTests/fast/inline/soft-wrap-between-characters-and-whitespace.html:
Added.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp:
(WebCore::Layout::InlineContentBalancer::balanceRangeWithLineRequirement):
(WebCore::Layout::InlineContentBalancer::balanceRangeWithNoLineRequirement):
(WebCore::Layout::InlineContentBalancer::computeBreakOpportunities const):
(WebCore::Layout::computeBreakOpportunities): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.h:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::nearestCommonAncestor):
(WebCore::Layout::InlineFormattingUtils::isAtSoftWrapOpportunity const):
(WebCore::Layout::InlineFormattingUtils::nextWrapOpportunity const):
(WebCore::Layout::isAtSoftWrapOpportunity): Deleted.
(WebCore::Layout::InlineFormattingUtils::nextWrapOpportunity): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h:
Canonical link: https://commits.webkit.org/274566@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes