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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h

Issue 1883553004: Refactor the current text position update in SVGTextLayoutEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore old behavior wrt text-on-a-path. Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
index fc510dfec94e157245de711946e81e9649ba7a5b..cdac5757fdb34d34d0ea7a167e02fecfbf29de03 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.h
@@ -58,9 +58,9 @@ public:
void finishLayout();
private:
- void updateCharacterPositionIfNeeded(float& x, float& y);
- void updateCurrentTextPosition(float x, float y, float glyphAdvance);
- void updateRelativePositionAdjustmentsIfNeeded(float dx, float dy);
+ bool setCurrentTextPosition(const SVGCharacterData&);
+ void advanceCurrentTextPosition(float glyphAdvance);
+ bool applyRelativePositionAdjustmentsIfNeeded(const SVGCharacterData&);
void computeCurrentFragmentMetrics(SVGInlineTextBox*);
void recordTextFragment(SVGInlineTextBox*);
@@ -85,10 +85,7 @@ private:
unsigned m_logicalCharacterOffset;
unsigned m_logicalMetricsListOffset;
SVGInlineTextMetricsIterator m_visualMetricsIterator;
- float m_x;
- float m_y;
- float m_dx;
- float m_dy;
+ FloatPoint m_textPosition;
bool m_isVerticalText;
bool m_inPathLayout;
bool m_textLengthSpacingInEffect;
@@ -97,6 +94,7 @@ private:
OwnPtr<PathPositionMapper> m_textPath;
float m_textPathStartOffset;
float m_textPathCurrentOffset;
+ float m_textPathDisplacement;
float m_textPathSpacing;
float m_textPathScaling;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698