Index: Source/platform/text/TextRun.h |
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h |
index d5f6be43cf44bf269d5c09084f216684d87fb4bd..fd94c299ee22761a6fa0dbde7eefb720e6d508f7 100644 |
--- a/Source/platform/text/TextRun.h |
+++ b/Source/platform/text/TextRun.h |
@@ -42,6 +42,15 @@ class SimpleFontData; |
struct GlyphData; |
struct WidthIterator; |
+enum ETextJustifyFlags { |
+ JustifyAuto = 0x00, |
leviw_travelin_and_unemployed
2014/08/18 17:55:43
You don't need 2 digits after the x. 0x1, 0x2, etc
dw.im
2014/08/21 00:20:55
I'm not sure we can move it. will try to look into
|
+ JustifyNone = 0x01, |
+ JustifyInterWord = 0x02, |
+ JustifyDistribute = 0x03 |
+}; |
+ |
+typedef unsigned ETextJustify; |
+ |
class PLATFORM_EXPORT TextRun { |
WTF_MAKE_FAST_ALLOCATED; |
public: |
@@ -67,6 +76,7 @@ public: |
, m_directionalOverride(directionalOverride) |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
+ , m_textJustify(JustifyAuto) |
, m_tabSize(0) |
{ |
m_data.characters8 = c; |
@@ -85,6 +95,7 @@ public: |
, m_directionalOverride(directionalOverride) |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
+ , m_textJustify(JustifyAuto) |
, m_tabSize(0) |
{ |
m_data.characters16 = c; |
@@ -102,6 +113,7 @@ public: |
, m_directionalOverride(directionalOverride) |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
+ , m_textJustify(JustifyAuto) |
, m_tabSize(0) |
{ |
if (!m_charactersLength) { |
@@ -128,6 +140,7 @@ public: |
, m_directionalOverride(directionalOverride) |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
+ , m_textJustify(JustifyAuto) |
, m_tabSize(0) |
{ |
if (!m_charactersLength) { |
@@ -196,6 +209,9 @@ public: |
void setDirectionalOverride(bool override) { m_directionalOverride = override; } |
void setCharacterScanForCodePath(bool scan) { m_characterScanForCodePath = scan; } |
+ void setTextJustify(ETextJustify textJustify) { m_textJustify = textJustify; } |
+ ETextJustify textJustify() const { return m_textJustify; } |
+ |
class RenderingContext : public RefCounted<RenderingContext> { |
public: |
virtual ~RenderingContext() { } |
@@ -230,6 +246,7 @@ private: |
unsigned m_directionalOverride : 1; // Was this direction set by an override character. |
unsigned m_characterScanForCodePath : 1; |
unsigned m_disableSpacing : 1; |
+ unsigned m_textJustify : 2; |
unsigned m_tabSize; |
RefPtr<RenderingContext> m_renderingContext; |
}; |