[webkit-changes] [WebKit/WebKit] 7137ef: A floating element can cause the following element...
Alan Baradlay
noreply at github.com
Thu Oct 26 14:37:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7137ef54ac3fe231f469a5c387faee78623223e2
https://github.com/WebKit/WebKit/commit/7137ef54ac3fe231f469a5c387faee78623223e2
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-10-26 (Thu, 26 Oct 2023)
Changed paths:
A LayoutTests/fast/text/text-indent-with-wide-float-before-expected.html
A LayoutTests/fast/text/text-indent-with-wide-float-before.html
M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h
M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h
M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp
M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h
Log Message:
-----------
A floating element can cause the following element’s text-indent to fail
https://bugs.webkit.org/show_bug.cgi?id=263698
<rdar://problem/117538081>
Reviewed by Antti Koivisto.
text-indent should work even when the "first line" is completely taken by float(s).
______________________
| ____________________ |
|| ||
|| float box ||
||____________________||
| this is still con- |
|sidered first line and|
|text-indent should |
|take affect. |
| |
| |
Replace PreviousLine with PreviousContent that holds on to the PreviousLine and hasSeenPreviousInlineContent (block global).
text-indent logic consults now both previousLineEndsWithBreak and hasSeenPreviousInlineContent.
* LayoutTests/fast/text/text-indent-with-wide-float-before-expected.html: Added.
* LayoutTests/fast/text/text-indent-with-wide-float-before.html: Added.
* Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp:
(WebCore::Layout::InlineContentBalancer::initialize):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
(WebCore::Layout::InlineFormattingContext::lineLayout):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::computedTextIndent const):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::initialConstraintsForLine const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h:
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp:
(WebCore::Layout::IntrinsicWidthHandler::computedIntrinsicWidthForConstraint):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::layoutInlineContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::initialize):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:
(WebCore::Layout::TextOnlySimpleLineBuilder::isFirstFormattedLine const):
Canonical link: https://commits.webkit.org/269827@main
More information about the webkit-changes
mailing list