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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 468483003: Implement canvas2d direction attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months 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
Index: Source/core/html/canvas/CanvasRenderingContext2D.h
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
index 6eba5f5b313772a10a5e9c24f1d7f6c3be305281..554d377fea5feb1e75ff103d9b971570e5c55e35 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -39,6 +39,7 @@
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageBuffer.h"
#include "platform/graphics/Path.h"
+#include "platform/text/TextDirection.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/HashMap.h"
#include "wtf/Vector.h"
@@ -211,6 +212,9 @@ public:
String textBaseline() const;
void setTextBaseline(const String&);
+ String direction() const;
+ void setDirection(const String&);
+
void fillText(const String& text, float x, float y);
void fillText(const String& text, float x, float y, float maxWidth);
void strokeText(const String& text, float x, float y);
@@ -243,7 +247,7 @@ public:
private:
class State FINAL : public CSSFontSelectorClient {
public:
- State();
+ explicit State(TextDirection = LTR);
virtual ~State();
State(const State&);
@@ -279,6 +283,7 @@ private:
// Text state.
TextAlign m_textAlign;
TextBaseline m_textBaseline;
+ TextDirection m_direction;
String m_unparsedFont;
Font m_font;

Powered by Google App Engine
This is Rietveld 408576698