Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r242237 - Use-after-move in RenderCombineText::combineTextIfNee…
…ded() https://bugs.webkit.org/show_bug.cgi?id=195188 Reviewed by Zalan Bujtas. Source/WebCore: r241288 uncovered an existing problem with our text-combine code. r242204 alleviated the symptom, but this patch fixes the source of the problem (and reverts r242204). The code in RenderCombineText::combineTextIfNeeded() has a bit that’s like: FontDescription bestFitDescription; while (...) { FontCascade compressedFont(WTFMove(bestFitDescription), ...); ... } Clearly this is wrong. Test: fast/text/text-combine-crash-2.html * platform/graphics/cocoa/FontDescriptionCocoa.cpp: (WebCore::FontDescription::platformResolveGenericFamily): * rendering/RenderCombineText.cpp: (WebCore::RenderCombineText::combineTextIfNeeded): LayoutTests: * fast/text/text-combine-crash-2-expected.html: Added. * fast/text/text-combine-crash-2.html: Added.
- Loading branch information
1 parent
45761d3
commit 2e1e436
Showing
6 changed files
with
105 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
This test passes if there is no crash. | ||
<p xmlns="http://www.w3.org/1999/xhtml" style="-webkit-font-smoothing: subpixel-antialiased; | ||
-webkit-hyphenate-limit-after: 3; | ||
-webkit-hyphenate-limit-before: 3; | ||
-webkit-hyphenate-limit-lines: 2; | ||
-webkit-hyphens: auto; | ||
-webkit-line-box-contain: block inline replaced; | ||
-webkit-locale: ja; | ||
display: block; | ||
font-family: serif; | ||
font-size: 22.399999618530273px; | ||
height: 636px; | ||
line-break: strict; | ||
margin-bottom: 0px; | ||
margin-left: 0px; | ||
margin-right: 0px; | ||
margin-top: 0px; | ||
orphans: 2; | ||
text-align: start; | ||
text-indent: 22.399999618530273px; | ||
text-rendering: auto; | ||
widows: 2; | ||
width: 33px; | ||
word-wrap: break-word; | ||
writing-mode: vertical-rl;">四桁文字<span class="tcy" style="-epub-text-combine: horizontal;">ABCD</span></p> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="ja"> | ||
<head> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
This test passes if there is no crash. | ||
<p xmlns="http://www.w3.org/1999/xhtml" style="-webkit-font-smoothing: subpixel-antialiased; | ||
-webkit-hyphenate-limit-after: 3; | ||
-webkit-hyphenate-limit-before: 3; | ||
-webkit-hyphenate-limit-lines: 2; | ||
-webkit-hyphens: auto; | ||
-webkit-line-box-contain: block inline replaced; | ||
-webkit-locale: ja; | ||
display: block; | ||
font-family: serif; | ||
font-size: 22.399999618530273px; | ||
height: 636px; | ||
line-break: strict; | ||
margin-bottom: 0px; | ||
margin-left: 0px; | ||
margin-right: 0px; | ||
margin-top: 0px; | ||
orphans: 2; | ||
text-align: start; | ||
text-indent: 22.399999618530273px; | ||
text-rendering: auto; | ||
widows: 2; | ||
width: 33px; | ||
word-wrap: break-word; | ||
writing-mode: vertical-rl;">四桁文字<span class="tcy" style="-epub-text-combine: horizontal;">ABCD</span></p> | ||
</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
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