Index: Source/platform/text/TextRun.h |
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h |
old mode 100644 |
new mode 100755 |
index 81657d3b12a370d2e24657a3e2bc5bcf73d9f91c..8b45a5cd04ed9a672411fb3310be5306176c8e4c |
--- a/Source/platform/text/TextRun.h |
+++ b/Source/platform/text/TextRun.h |
@@ -27,6 +27,7 @@ |
#include "platform/PlatformExport.h" |
#include "platform/geometry/FloatRect.h" |
#include "platform/text/TextDirection.h" |
+#include "platform/text/TextPath.h" |
#include "wtf/RefCounted.h" |
#include "wtf/text/WTFString.h" |
@@ -76,6 +77,7 @@ public: |
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_textCodePath(AutoPath) |
{ |
m_data.characters8 = c; |
} |
@@ -96,6 +98,7 @@ public: |
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_textCodePath(AutoPath) |
{ |
m_data.characters16 = c; |
} |
@@ -115,6 +118,7 @@ public: |
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_textCodePath(AutoPath) |
{ |
if (!m_charactersLength) { |
m_is8Bit = true; |
@@ -143,6 +147,7 @@ public: |
, m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks) |
, m_disableSpacing(false) |
, m_tabSize(0) |
+ , m_textCodePath(AutoPath) |
{ |
if (!m_charactersLength) { |
m_is8Bit = true; |
@@ -170,6 +175,16 @@ public: |
return result; |
} |
+ void setCharacterScanForCodePathValue(CodePath textCodePath) |
+ { |
+ m_textCodePath = textCodePath; |
+ |
+#if ENABLE(SVG_FONTS) |
+ if (renderingContext()) |
+ m_textCodePath = SimplePath; |
+#endif |
+ } |
+ |
UChar operator[](unsigned i) const { ASSERT_WITH_SECURITY_IMPLICATION(i < m_len); return is8Bit() ? m_data.characters8[i] :m_data.characters16[i]; } |
const LChar* data8(unsigned i) const { ASSERT_WITH_SECURITY_IMPLICATION(i < m_len); ASSERT(is8Bit()); return &m_data.characters8[i]; } |
const UChar* data16(unsigned i) const { ASSERT_WITH_SECURITY_IMPLICATION(i < m_len); ASSERT(!is8Bit()); return &m_data.characters16[i]; } |
@@ -203,6 +218,7 @@ public: |
bool ltr() const { return m_direction == LTR; } |
bool directionalOverride() const { return m_directionalOverride; } |
bool characterScanForCodePath() const { return m_characterScanForCodePath; } |
+ CodePath characterScanForCodePathValue() const { return m_textCodePath; } |
bool applyRunRounding() const { return m_applyRunRounding; } |
bool applyWordRounding() const { return m_applyWordRounding; } |
bool spacingDisabled() const { return m_disableSpacing; } |
@@ -255,6 +271,7 @@ private: |
unsigned m_applyWordRounding : 1; |
unsigned m_disableSpacing : 1; |
unsigned m_tabSize; |
+ CodePath m_textCodePath; |
RefPtr<RenderingContext> m_renderingContext; |
}; |