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

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

Issue 1933183002: Move isEmptyValue and emptyValue to SVGCharacterData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp ('k') | no next file » | 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.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
index 0f2248218cd9326f30c839a831a8b49df53d0a4f..4e1b635d631b1e3c506abf7219fef0b9a4fb1118 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
@@ -54,11 +54,11 @@ SVGTextLayoutEngine::~SVGTextLayoutEngine() = default;
bool SVGTextLayoutEngine::setCurrentTextPosition(const SVGCharacterData& data)
{
- bool hasX = !SVGTextLayoutAttributes::isEmptyValue(data.x);
+ bool hasX = data.hasX();
if (hasX)
m_textPosition.setX(data.x);
- bool hasY = !SVGTextLayoutAttributes::isEmptyValue(data.y);
+ bool hasY = data.hasY();
if (hasY)
m_textPosition.setY(data.y);
@@ -93,11 +93,11 @@ void SVGTextLayoutEngine::advanceCurrentTextPosition(float glyphAdvance)
bool SVGTextLayoutEngine::applyRelativePositionAdjustmentsIfNeeded(const SVGCharacterData& data)
{
FloatPoint delta;
- bool hasDx = !SVGTextLayoutAttributes::isEmptyValue(data.dx);
+ bool hasDx = data.hasDx();
if (hasDx)
delta.setX(data.dx);
- bool hasDy = !SVGTextLayoutAttributes::isEmptyValue(data.dy);
+ bool hasDy = data.hasDy();
if (hasDy)
delta.setY(data.dy);
@@ -449,7 +449,7 @@ void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, Line
position += baselineShift;
}
- if (!SVGTextLayoutAttributes::isEmptyValue(data.rotate))
+ if (data.hasRotate())
angle += data.rotate;
// Determine whether we have to start a new fragment.
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributesBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698