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

Unified Diff: Source/platform/text/TextRun.h

Issue 54743004: Rendering text-justify:distribute for 8 bit characters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add the test case in the TestExpectaions as NeedsRebaseline Created 6 years, 11 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: Source/platform/text/TextRun.h
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h
index 81657d3b12a370d2e24657a3e2bc5bcf73d9f91c..3ceba79dd6be3cf8b72321b0816e5b4d25569f87 100644
--- a/Source/platform/text/TextRun.h
+++ b/Source/platform/text/TextRun.h
@@ -75,6 +75,7 @@ public:
, m_applyRunRounding((roundingHacks & RunRounding) && s_allowsRoundingHacks)
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks)
, m_disableSpacing(false)
+ , m_distributeJustification(false)
, m_tabSize(0)
{
m_data.characters8 = c;
@@ -95,6 +96,7 @@ public:
, m_applyRunRounding((roundingHacks & RunRounding) && s_allowsRoundingHacks)
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks)
, m_disableSpacing(false)
+ , m_distributeJustification(false)
, m_tabSize(0)
{
m_data.characters16 = c;
@@ -114,6 +116,7 @@ public:
, m_applyRunRounding((roundingHacks & RunRounding) && s_allowsRoundingHacks)
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks)
, m_disableSpacing(false)
+ , m_distributeJustification(false)
, m_tabSize(0)
{
if (!m_charactersLength) {
@@ -142,6 +145,7 @@ public:
, m_applyRunRounding((roundingHacks & RunRounding) && s_allowsRoundingHacks)
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks)
, m_disableSpacing(false)
+ , m_distributeJustification(false)
, m_tabSize(0)
{
if (!m_charactersLength) {
@@ -196,6 +200,8 @@ public:
float xPos() const { return m_xpos; }
void setXPos(float xPos) { m_xpos = xPos; }
float expansion() const { return m_expansion; }
+ bool isDistributeJustification() const { return m_distributeJustification; }
+ void setDistributeJustification(bool distributeJustification) { m_distributeJustification = distributeJustification; }
bool allowsLeadingExpansion() const { return m_expansionBehavior & AllowLeadingExpansion; }
bool allowsTrailingExpansion() const { return m_expansionBehavior & AllowTrailingExpansion; }
TextDirection direction() const { return static_cast<TextDirection>(m_direction); }
@@ -254,6 +260,7 @@ private:
unsigned m_applyRunRounding : 1;
unsigned m_applyWordRounding : 1;
unsigned m_disableSpacing : 1;
+ unsigned m_distributeJustification : 1;
unsigned m_tabSize;
RefPtr<RenderingContext> m_renderingContext;
};

Powered by Google App Engine
This is Rietveld 408576698