Changeset 283481 in webkit
- Timestamp:
- Oct 3, 2021, 2:57:12 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockFlow.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderText.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderText.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r283465 r283481 1 2021-10-03 Alan Bujtas <zalan@apple.com> 2 3 Incorrect preferred width computation when trimmable leading whitespace is present 4 https://bugs.webkit.org/show_bug.cgi?id=231139 5 6 Reviewed by Antti Koivisto. 7 8 * TestExpectations: IFC already supports these cases. Preferred width computation produced an incorrect shrink-fit width. 9 1 10 2021-10-03 Simon Fraser <simon.fraser@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r283321 r283481 4443 4443 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-transform/text-transform-upperlower-016.html [ ImageOnlyFailure ] 4444 4444 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-transform/text-transform-upperlower-044.html [ ImageOnlyFailure ] 4445 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-051.html [ ImageOnlyFailure ]4446 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-052.html [ ImageOnlyFailure ]4447 4445 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-015.html [ ImageOnlyFailure ] 4448 4446 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/eol-spaces-bidi-001.html [ ImageOnlyFailure ] 4449 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-051.html [ ImageOnlyFailure ]4450 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-052.html [ ImageOnlyFailure ]4451 4447 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/seg-break-transformation-018.html [ ImageOnlyFailure ] 4452 4448 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/seg-break-transformation-019.html [ ImageOnlyFailure ] … … 4458 4454 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/trailing-other-space-separators-004.html [ ImageOnlyFailure ] 4459 4455 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/trailing-space-align-start.tentative.html [ ImageOnlyFailure ] 4460 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/white-space-pre-051.html [ ImageOnlyFailure ]4461 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/white-space/white-space-pre-052.html [ ImageOnlyFailure ]4462 4456 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-boundary/word-boundary-001.html [ ImageOnlyFailure ] 4463 4457 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-boundary/word-boundary-002.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r283477 r283481 1 2021-10-03 Alan Bujtas <zalan@apple.com> 2 3 Incorrect preferred width computation when trimmable leading whitespace is present 4 https://bugs.webkit.org/show_bug.cgi?id=231139 5 6 Reviewed by Antti Koivisto. 7 8 stripFrontSpaces should be reset to the default value whenever we are at the beginning of the line, while computing the preferred trimmed width. 9 This is already done for line break boxes (<br>) but not when the force line break comes from a text content with 10 preserved linebreak ("\n"). 11 12 See WPT progressions. 13 14 * rendering/RenderBlockFlow.cpp: 15 (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const): 16 * rendering/RenderText.cpp: 17 (WebCore::RenderText::trimmedPreferredWidths): 18 * rendering/RenderText.h: 19 1 20 2021-10-03 Alan Bujtas <zalan@apple.com> 2 21 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r283443 r283481 4552 4552 addedTextIndent = true; 4553 4553 addedStartPunctuationHang = true; 4554 if (widths.endsWithBreak) 4555 stripFrontSpaces = true; 4556 4554 4557 } else 4555 4558 inlineMax += std::max<float>(0, childMax); -
trunk/Source/WebCore/rendering/RenderText.cpp
r283464 r283481 816 816 widths.hasBreakableChar = m_hasBreakableChar; 817 817 widths.hasBreak = m_hasBreak; 818 widths.endsWithBreak = m_hasBreak && text()[length - 1] == '\n'; 818 819 819 820 if (text()[0] == ' ' || (text()[0] == '\n' && !style.preserveNewline()) || text()[0] == '\t') { -
trunk/Source/WebCore/rendering/RenderText.h
r282223 r283481 108 108 bool hasBreakableChar { false }; 109 109 bool hasBreak { false }; 110 bool endsWithBreak { false }; 110 111 }; 111 112 Widths trimmedPreferredWidths(float leadWidth, bool& stripFrontSpaces);
Note:
See TracChangeset
for help on using the changeset viewer.