Chromium Code Reviews| Index: Source/platform/text/TextRun.h |
| diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h |
| index d5f6be43cf44bf269d5c09084f216684d87fb4bd..11b399d09f89703c24285591850d52395d3052bc 100644 |
| --- a/Source/platform/text/TextRun.h |
| +++ b/Source/platform/text/TextRun.h |
| @@ -42,6 +42,15 @@ class SimpleFontData; |
| struct GlyphData; |
| struct WidthIterator; |
| +enum TextJustify { |
| + TextJustifyAuto = 0x0, |
|
leviw_travelin_and_unemployed
2014/11/05 23:23:39
You actually don't need to set these values.
|
| + TextJustifyNone = 0x1, |
| + TextJustifyInterWord = 0x2, |
| + TextJustifyDistribute = 0x3 |
| +}; |
| + |
| +typedef unsigned TextJustifyStore; |
|
leviw_travelin_and_unemployed
2014/11/05 23:23:39
You don't need this. Look at how RenderObject hand
|
| + |
| class PLATFORM_EXPORT TextRun { |
| WTF_MAKE_FAST_ALLOCATED; |
| public: |
| @@ -67,6 +76,7 @@ public: |
| , m_directionalOverride(directionalOverride) |
| , m_characterScanForCodePath(characterScanForCodePath) |
| , m_disableSpacing(false) |
| + , m_textJustifyStore(TextJustifyAuto) |
| , m_tabSize(0) |
| { |
| m_data.characters8 = c; |
| @@ -85,6 +95,7 @@ public: |
| , m_directionalOverride(directionalOverride) |
| , m_characterScanForCodePath(characterScanForCodePath) |
| , m_disableSpacing(false) |
| + , m_textJustifyStore(TextJustifyAuto) |
| , m_tabSize(0) |
| { |
| m_data.characters16 = c; |
| @@ -102,6 +113,7 @@ public: |
| , m_directionalOverride(directionalOverride) |
| , m_characterScanForCodePath(characterScanForCodePath) |
| , m_disableSpacing(false) |
| + , m_textJustifyStore(TextJustifyAuto) |
| , m_tabSize(0) |
| { |
| if (!m_charactersLength) { |
| @@ -128,6 +140,7 @@ public: |
| , m_directionalOverride(directionalOverride) |
| , m_characterScanForCodePath(characterScanForCodePath) |
| , m_disableSpacing(false) |
| + , m_textJustifyStore(TextJustifyAuto) |
| , 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 setTextJustifyStore(TextJustifyStore textJustify) { m_textJustifyStore = textJustify; } |
| + TextJustifyStore textJustifyStore() const { return m_textJustifyStore; } |
|
leviw_travelin_and_unemployed
2014/11/05 23:23:39
How about just textJustify()/setTextJustify?
|
| + |
| 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_textJustifyStore : 2; |
|
leviw_travelin_and_unemployed
2014/11/05 23:23:39
How about just "m_textJustify"?
|
| unsigned m_tabSize; |
| RefPtr<RenderingContext> m_renderingContext; |
| }; |