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

Unified Diff: Source/platform/fonts/mac/ComplexTextController.cpp

Issue 54743004: Rendering text-justify:distribute for 8 bit characters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use const parameter Created 6 years, 8 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 | « Source/platform/fonts/mac/ComplexTextController.h ('k') | Source/platform/text/TextRun.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/ComplexTextController.cpp
diff --git a/Source/platform/fonts/mac/ComplexTextController.cpp b/Source/platform/fonts/mac/ComplexTextController.cpp
index 4537d16d5de528f220f87f2441e769fe45e2c418..c8312e7435da2763f6622abe1b43cb4282d090d3 100644
--- a/Source/platform/fonts/mac/ComplexTextController.cpp
+++ b/Source/platform/fonts/mac/ComplexTextController.cpp
@@ -76,16 +76,18 @@ ComplexTextController::ComplexTextController(const Font* font, const TextRun& ru
, m_minGlyphBoundingBoxY(numeric_limits<float>::max())
, m_maxGlyphBoundingBoxY(numeric_limits<float>::min())
, m_lastRoundingGlyph(0)
+ , m_distributeJustification(false)
{
if (!m_expansion)
m_expansionPerOpportunity = 0;
else {
bool isAfterExpansion = m_afterExpansion;
unsigned expansionOpportunityCount;
+ m_distributeJustification = m_run.isDistributeJustification();
if (m_run.is8Bit())
- expansionOpportunityCount = Character::expansionOpportunityCount(m_run.characters8(), m_end, m_run.ltr() ? LTR : RTL, isAfterExpansion);
+ expansionOpportunityCount = Character::expansionOpportunityCount(m_run.characters8(), m_end, m_run.ltr() ? LTR : RTL, isAfterExpansion, m_distributeJustification);
else
- expansionOpportunityCount = Character::expansionOpportunityCount(m_run.characters16(), m_end, m_run.ltr() ? LTR : RTL, isAfterExpansion);
+ expansionOpportunityCount = Character::expansionOpportunityCount(m_run.characters16(), m_end, m_run.ltr() ? LTR : RTL, isAfterExpansion, m_distributeJustification);
if (isAfterExpansion && !m_run.allowsTrailingExpansion())
expansionOpportunityCount--;
« no previous file with comments | « Source/platform/fonts/mac/ComplexTextController.h ('k') | Source/platform/text/TextRun.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698