-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. | | | | | text-indent logic consults now both previousLineEndsWithBreak and hasInlineContent. * 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/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/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::layoutInlineContent): * Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h: * Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp: (WebCore::Layout::IntrinsicWidthHandler::computedIntrinsicWidthForConstraint): Canonical link: https://commits.webkit.org/270238@main
- Loading branch information
1 parent
66793be
commit e918ced
Showing
7 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/text/text-indent-with-wide-float-before-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<style> | ||
.indent { | ||
text-indent: 40px; | ||
width: 400px; | ||
font-family: Monospace; | ||
margin-bottom: 1px; | ||
} | ||
</style> | ||
<div class="indent"> | ||
Pass if this text is indented | ||
</div> | ||
<div class="indent"> | ||
Pass if this text is indented | ||
</div> | ||
<div class="indent"> | ||
Pass if this text is indented | ||
</div> |
29 changes: 29 additions & 0 deletions
29
LayoutTests/fast/text/text-indent-with-wide-float-before.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<style> | ||
.container { | ||
width: 400px; | ||
font-family: Monospace; | ||
} | ||
|
||
.indent { | ||
text-indent: 40px; | ||
} | ||
|
||
.float_box { | ||
float: left; | ||
width: 400px; | ||
height: 1px; | ||
} | ||
</style> | ||
<div class="container indent"> | ||
Pass if this text is indented | ||
</div> | ||
<div class="container indent"> | ||
<div class=float_box></div> | ||
Pass if this text is indented | ||
</div> | ||
<div class=container> | ||
<div class=float_box></div> | ||
<div class=indent> | ||
Pass if this text is indented | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters