Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Repaint rect does not take into account text-underline-offset
https://bugs.webkit.org/show_bug.cgi?id=241442 Reviewed by Antti Koivisto. This patch add support for text decoration ink overflow (IFC). 1. Collect decoration ink overflow (logical) 2. Update display box ink overflow (visual) * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::build): (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes): (WebCore::Layout::visualBottomForTextDecorationContent): (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForTextDecorations): * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h: * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::visualOverflowForDecorations): (WebCore::defaultGap): * Source/WebCore/style/InlineTextBoxStyle.h: Canonical link: https://commits.webkit.org/251477@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
9 changed files
with
135 additions
and
11 deletions.
There are no files selected for viewing
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
| @@ -0,0 +1,10 @@ | ||
| PASS if the underlines are green. | ||
| content | ||
| content | ||
| content | ||
| (repaint rects | ||
| (rect 48 46 112 25) | ||
| (rect 39 82 25 112) | ||
| (rect 39 214 25 112) | ||
| ) | ||
|
|
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
| @@ -0,0 +1,36 @@ | ||
| <style> | ||
| div { | ||
| margin: 20px; | ||
| font-family: Ahem; | ||
| } | ||
| span { | ||
| text-decoration: underline; | ||
| text-underline-offset: 10px; | ||
| color: blue; | ||
| } | ||
| </style> | ||
| PASS if the underlines are green. | ||
| <div id=container> | ||
| <div><span>content</span></div> | ||
| <div style="writing-mode: vertical-lr"><span>content</span></div> | ||
| <div style="writing-mode: vertical-rl"><span>content</span></div> | ||
| </div> | ||
| <pre id=result></pre> | ||
| <script> | ||
| if (window.testRunner) { | ||
| testRunner.dumpAsText(); | ||
| testRunner.waitUntilDone(); | ||
| } | ||
| setTimeout(function() { | ||
| if (window.internals) | ||
| window.internals.startTrackingRepaints(); | ||
| for (let changeThis of container.getElementsByTagName("span")) | ||
| changeThis.style.textDecorationColor = "green"; | ||
| if (window.internals) { | ||
| result.innerText = window.internals.repaintRectsAsText(); | ||
| window.internals.stopTrackingRepaints(); | ||
| } | ||
| if (window.testRunner) | ||
| testRunner.notifyDone(); | ||
| }, 10); | ||
| </script> |
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