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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 2248803002: Fix when there are justification opportunities inside text-combine-upright (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 03b79473ece791291c730efa8d808e6cb86a0767..c6214833bd25037fd853e2d1d382ab4a323a9e61 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -59,6 +59,12 @@ public:
if (text.is8Bit()) {
opportunitiesInRun = Character::expansionOpportunityCount(text.characters8() + run.m_start,
run.m_stop - run.m_start, run.m_box->direction(), isAfterExpansion, textJustify);
+ } else if (run.m_lineLayoutItem.isCombineText()) {
+ // Justfication applies to before and after the combined text as if
+ // it is an ideographic character, and is prohibited inside the
+ // combined text.
+ opportunitiesInRun = isAfterExpansion ? 1 : 2;
+ isAfterExpansion = true;
} else {
opportunitiesInRun = Character::expansionOpportunityCount(text.characters16() + run.m_start,
run.m_stop - run.m_start, run.m_box->direction(), isAfterExpansion, textJustify);

Powered by Google App Engine
This is Rietveld 408576698