diff options
author | Mike Reed <reed@google.com> | 2009-08-31 14:25:39 -0400 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-08-31 14:25:39 -0400 |
commit | 0f11606c89c49176758ed567ace0bd2e481fdca1 (patch) | |
tree | b9f431eac89a3ced03dfa4140573202d4bb311ad /WebCore | |
parent | 194211f214e16956c937d03c2aff03936c22f928 (diff) | |
download | external_webkit-0f11606c89c49176758ed567ace0bd2e481fdca1.zip external_webkit-0f11606c89c49176758ed567ace0bd2e481fdca1.tar.gz external_webkit-0f11606c89c49176758ed567ace0bd2e481fdca1.tar.bz2 |
change our hasCurrentPoint() to call skia's getPoints() instead of isEmpty(), as the latter
returns true even if moveTo() has already been called on it, and webkit wants to treat that
as non-empty.
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/graphics/android/PathAndroid.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/PathAndroid.cpp b/WebCore/platform/graphics/android/PathAndroid.cpp index a643fc0..90cd2db 100644 --- a/WebCore/platform/graphics/android/PathAndroid.cpp +++ b/WebCore/platform/graphics/android/PathAndroid.cpp @@ -68,7 +68,11 @@ bool Path::isEmpty() const bool Path::hasCurrentPoint() const { - return !isEmpty(); + // webkit wants to know if we have any points, including any moveTos. + // Skia's empty() will return true if it has just a moveTo, so we need to + // call getPoints(NULL), which returns the number of points, + // including moveTo. + return m_path->getPoints(0, 0) > 0; } bool Path::contains(const FloatPoint& point, WindRule rule) const |