Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1058)

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp

Issue 1982313002: Re-evaluate ShapeResult::m_hasVerticalOffsets after applying spacing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/vertical-spacing-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
index 786924d0ea952c4e3994a8ed2f7943c248528f85..1298b7651be9fbf00809e0d9cb924dc7bc860385 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
@@ -241,19 +241,19 @@ void ShapeResult::applySpacing(ShapeResultSpacing& spacing, const TextRun& textR
offset = spacing.letterSpacing();
glyphData.offset.expand(offsetX, offsetY);
}
- continue;
- }
-
- offsetX = offsetY = 0;
- float space = spacing.computeSpacing(textRun,
- run->m_startIndex + glyphData.characterIndex, offset);
- glyphData.advance += space;
- totalSpaceForRun += space;
- if (textRun.rtl()) {
- // In RTL, spacing should be added to left side of glyphs.
- offset += space;
+ } else {
+ offsetX = offsetY = 0;
+ float space = spacing.computeSpacing(textRun,
+ run->m_startIndex + glyphData.characterIndex, offset);
+ glyphData.advance += space;
+ totalSpaceForRun += space;
+ if (textRun.rtl()) {
+ // In RTL, spacing should be added to left side of glyphs.
+ offset += space;
+ }
+ glyphData.offset.expand(offsetX, offsetY);
}
- glyphData.offset.expand(offsetX, offsetY);
+ m_hasVerticalOffsets |= (glyphData.offset.height() != 0);
}
run->m_width += totalSpaceForRun;
totalSpace += totalSpaceForRun;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/vertical-spacing-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698