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

Unified Diff: third_party/WebKit/Source/platform/graphics/Path.cpp

Issue 1418663004: SVG animateMotion paths that only cause offsets are no longer ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/platform/graphics/Path.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Path.cpp b/third_party/WebKit/Source/platform/graphics/Path.cpp
index f88cc53d3ffba8d47cd445043fcf1ebb86f0eb1f..f38f6902910017271fccbc245ed726d2a04667d2 100644
--- a/third_party/WebKit/Source/platform/graphics/Path.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Path.cpp
@@ -204,12 +204,12 @@ static bool calculatePointAndNormalOnPath(SkPathMeasure& measure, SkScalar lengt
bool Path::pointAndNormalAtLength(float length, FloatPoint& point, float& normal) const
{
SkPathMeasure measure(m_path, false);
-
if (calculatePointAndNormalOnPath(measure, WebCoreFloatToSkScalar(length), point, normal))
return true;
+ SkPoint position = m_path.getPoint(0);
+ point = FloatPoint(SkScalarToFloat(position.fX), SkScalarToFloat(position.fY));
normal = 0;
- point = FloatPoint(0, 0);
return false;
}
@@ -236,8 +236,9 @@ bool Path::PositionCalculator::pointAndNormalAtLength(float length, FloatPoint&
return true;
}
+ SkPoint position = m_path.getPoint(0);
+ point = FloatPoint(SkScalarToFloat(position.fX), SkScalarToFloat(position.fY));
normalAngle = 0;
- point = FloatPoint(0, 0);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698