Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Some style changes cause tatechuyoko to be drawn off center
https://bugs.webkit.org/show_bug.cgi?id=150986 <rdar://problem/20748013> Reviewed by Darin Adler. Source/WebCore: Layouts should be idempotent. In particular, during layout, an element should not rely on a previous call to styleDidChange() with a sufficiently high StyleDifference. RenderCombineText was assuming that, if a layout occurs, a previous call to styleDidChange() would have reset the renderedText. However, an ancestor element might cause the RenderCombineText to re-combine when it is already combined. Therefore, the recombination should fully uncombine before recombining. Test: fast/text/text-combine-style-change-extra-layout.html * rendering/RenderCombineText.cpp: (WebCore::RenderCombineText::combineText): Fully uncombine before recombining. LayoutTests: * fast/text/text-combine-style-change-extra-layout-expected.html: Added. * fast/text/text-combine-style-change-extra-layout.html: Added. Canonical link: https://commits.webkit.org/169246@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
71 additions
and
2 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
12 changes: 12 additions & 0 deletions
12
LayoutTests/fast/text/text-combine-style-change-extra-layout-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,12 @@ | ||
<html> | ||
<head> | ||
<style> | ||
#w { | ||
background-color: green; | ||
} | ||
</style> | ||
</head> | ||
<body style="-webkit-writing-mode: vertical-rl; font-size: 320px;"> | ||
<span id="w" style="-webkit-text-combine: horizontal;">39</span> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
LayoutTests/fast/text/text-combine-style-change-extra-layout.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,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
.asdf { | ||
background-color: green; | ||
} | ||
</style> | ||
</head> | ||
<body style="-webkit-writing-mode: vertical-rl; font-size: 320px;"> | ||
<span id="w" style="-webkit-text-combine: horizontal;">39</span> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
window.setTimeout(function() { | ||
document.getElementById("w").className = "asdf"; | ||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
}, 0); | ||
</script> | ||
</body> | ||
</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
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