-
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.
Using ruby tag within a hanging-punctuation specifies element, hangin…
…g appears not to apply. https://bugs.webkit.org/show_bug.cgi?id=270780 <rdar://problem/124386802> Reviewed by Antti Koivisto. Let's take punctuation offset into account when processing (left-to-right) bidi based inline content. 1. Pass leading punctuation width over to display content build as part of the line layout result 2. Offset "visual left start position" with the punctuation width (negative offset) - non-bidi content works fine as we already take this negative offset into account while building the line -which we lose when dealing with bidi reordering - right-to-left is also fine as punctuation width being visually trailing does not contribute to visual left * LayoutTests/fast/text/hanging-punctuation-with-bidi-expected.html: Added. * LayoutTests/fast/text/hanging-punctuation-with-bidi.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp: (WebCore::Layout::Line::close): * Source/WebCore/layout/formattingContexts/inline/InlineLine.h: (WebCore::Layout::Line::HangingContent::leadingPunctuationWidth const): * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::layoutInlineContent): * Source/WebCore/layout/formattingContexts/inline/LineLayoutResult.h: * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::processBidiContent): Canonical link: https://commits.webkit.org/276026@main
- Loading branch information
1 parent
99e7a28
commit 722de1a
Showing
7 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
LayoutTests/fast/text/hanging-punctuation-with-bidi-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,15 @@ | ||
<meta charset="utf-8"> | ||
<style> | ||
div { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
background-color: blue; | ||
hanging-punctuation: first; | ||
color: green; | ||
margin-left: 12px; | ||
} | ||
</style> | ||
<div>“content</div> | ||
<div>“content</div> | ||
<div>“content</div> | ||
<div>“content</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<meta charset="utf-8"> | ||
<style> | ||
div { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
background-color: blue; | ||
hanging-punctuation: first; | ||
color: green; | ||
margin-left: 12px; | ||
} | ||
</style> | ||
<div>“content</div> | ||
<div>“<span>content</span></div> | ||
<div>“<span style="unicode-bidi: isolate">content</span></div> | ||
<div>“<ruby>content</ruby></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