Index: Source/platform/text/TextRun.h |
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h |
index d5f6be43cf44bf269d5c09084f216684d87fb4bd..7eee89c1201811875d23a18cfd7d6766c767931d 100644 |
--- a/Source/platform/text/TextRun.h |
+++ b/Source/platform/text/TextRun.h |
@@ -68,6 +68,7 @@ public: |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_normalizeSpace(false) |
{ |
m_data.characters8 = c; |
} |
@@ -86,11 +87,12 @@ public: |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_normalizeSpace(false) |
{ |
m_data.characters16 = c; |
} |
- TextRun(const String& string, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true) |
+ TextRun(const String& string, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, bool normalizeSpace = false) |
: m_charactersLength(string.length()) |
, m_len(string.length()) |
, m_xpos(xpos) |
@@ -103,6 +105,7 @@ public: |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_normalizeSpace(normalizeSpace) |
{ |
if (!m_charactersLength) { |
m_is8Bit = true; |
@@ -116,7 +119,7 @@ public: |
} |
} |
- TextRun(const StringView& string, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true) |
+ TextRun(const StringView& string, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, bool normalizeSpace = false) |
: m_charactersLength(string.length()) |
, m_len(string.length()) |
, m_xpos(xpos) |
@@ -129,6 +132,7 @@ public: |
, m_characterScanForCodePath(characterScanForCodePath) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_normalizeSpace(normalizeSpace) |
{ |
if (!m_charactersLength) { |
m_is8Bit = true; |
@@ -167,6 +171,9 @@ public: |
int length() const { return m_len; } |
int charactersLength() const { return m_charactersLength; } |
+ bool normalizeSpace() const { return m_normalizeSpace; } |
+ void setNormalizeSpace(bool normalizeSpace) { m_normalizeSpace = normalizeSpace; } |
+ |
void setText(const LChar* c, unsigned len) { m_data.characters8 = c; m_len = len; m_is8Bit = true;} |
void setText(const UChar* c, unsigned len) { m_data.characters16 = c; m_len = len; m_is8Bit = false;} |
void setText(const String&); |
@@ -231,6 +238,7 @@ private: |
unsigned m_characterScanForCodePath : 1; |
unsigned m_disableSpacing : 1; |
unsigned m_tabSize; |
+ bool m_normalizeSpace; |
RefPtr<RenderingContext> m_renderingContext; |
}; |