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

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

Issue 255323004: Rendering text-justify:distribute for 8 bit characters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: patch for landing 2 Created 6 years, 1 month 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
« no previous file with comments | « Source/platform/fonts/shaping/SimpleShaper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/TextRun.h
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h
index 1ad154a70c17a102748e170cfb344691529540ff..a2b98ec1dc529a0a90bce11b18d206b1fa720096 100644
--- a/Source/platform/text/TextRun.h
+++ b/Source/platform/text/TextRun.h
@@ -37,6 +37,13 @@ class SkTextBlob;
namespace blink {
+enum TextJustify {
+ TextJustifyAuto = 0x0,
+ TextJustifyNone = 0x1,
+ TextJustifyInterWord = 0x2,
+ TextJustifyDistribute = 0x3
+};
+
class PLATFORM_EXPORT TextRun {
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -63,6 +70,7 @@ public:
, m_characterScanForCodePath(characterScanForCodePath)
, m_useComplexCodePath(false)
, m_disableSpacing(false)
+ , m_textJustify(TextJustifyAuto)
, m_tabSize(0)
, m_normalizeSpace(false)
{
@@ -83,6 +91,7 @@ public:
, m_characterScanForCodePath(characterScanForCodePath)
, m_useComplexCodePath(false)
, m_disableSpacing(false)
+ , m_textJustify(TextJustifyAuto)
, m_tabSize(0)
, m_normalizeSpace(false)
{
@@ -102,6 +111,7 @@ public:
, m_characterScanForCodePath(characterScanForCodePath)
, m_useComplexCodePath(false)
, m_disableSpacing(false)
+ , m_textJustify(TextJustifyAuto)
, m_tabSize(0)
, m_normalizeSpace(normalizeSpace)
{
@@ -130,6 +140,7 @@ public:
, m_characterScanForCodePath(characterScanForCodePath)
, m_useComplexCodePath(false)
, m_disableSpacing(false)
+ , m_textJustify(TextJustifyAuto)
, m_tabSize(0)
, m_normalizeSpace(normalizeSpace)
{
@@ -204,6 +215,9 @@ public:
void setCharacterScanForCodePath(bool scan) { m_characterScanForCodePath = scan; }
void setUseComplexCodePath(bool useComplex) { m_useComplexCodePath = useComplex; }
+ void setTextJustify(TextJustify textJustify) { m_textJustify = static_cast<unsigned>(textJustify); }
+ TextJustify textJustify() const { return static_cast<TextJustify>(m_textJustify); }
+
class RenderingContext : public RefCounted<RenderingContext> {
public:
virtual ~RenderingContext() { }
@@ -235,6 +249,7 @@ private:
unsigned m_characterScanForCodePath : 1;
unsigned m_useComplexCodePath : 1;
unsigned m_disableSpacing : 1;
+ unsigned m_textJustify : 2;
unsigned m_tabSize;
bool m_normalizeSpace;
RefPtr<RenderingContext> m_renderingContext;
« no previous file with comments | « Source/platform/fonts/shaping/SimpleShaper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698