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

Unified Diff: Source/core/svg/SVGTextContentElement.cpp

Issue 132233016: [SVG] SVGAnimatedPointList migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: set NeedsRebaseline Created 6 years, 11 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 | « Source/core/svg/SVGTextContentElement.h ('k') | Source/core/svg/SVGTextContentElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTextContentElement.cpp
diff --git a/Source/core/svg/SVGTextContentElement.cpp b/Source/core/svg/SVGTextContentElement.cpp
index 313ce140eb5af633ea21dd3644b5d4dcd2821126..c5b8e0f23a697d53afe3e88b2b885f85e635ba7d 100644
--- a/Source/core/svg/SVGTextContentElement.cpp
+++ b/Source/core/svg/SVGTextContentElement.cpp
@@ -111,28 +111,30 @@ float SVGTextContentElement::getSubStringLength(unsigned charnum, unsigned nchar
return SVGTextQuery(renderer()).subStringLength(charnum, nchars);
}
-SVGPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionState& exceptionState)
+PassRefPtr<SVGPointTearOff> SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionState& exceptionState)
{
document().updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("charnum", charnum, getNumberOfChars()));
- return FloatPoint();
+ return 0;
}
- return SVGTextQuery(renderer()).startPositionOfCharacter(charnum);
+ FloatPoint point = SVGTextQuery(renderer()).startPositionOfCharacter(charnum);
+ return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnimVal);
}
-SVGPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionState& exceptionState)
+PassRefPtr<SVGPointTearOff> SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionState& exceptionState)
{
document().updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("charnum", charnum, getNumberOfChars()));
- return FloatPoint();
+ return 0;
}
- return SVGTextQuery(renderer()).endPositionOfCharacter(charnum);
+ FloatPoint point = SVGTextQuery(renderer()).endPositionOfCharacter(charnum);
+ return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnimVal);
}
PassRefPtr<SVGRectTearOff> SVGTextContentElement::getExtentOfChar(unsigned charnum, ExceptionState& exceptionState)
@@ -160,10 +162,10 @@ float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState&
return SVGTextQuery(renderer()).rotationOfCharacter(charnum);
}
-int SVGTextContentElement::getCharNumAtPosition(const SVGPoint& point)
+int SVGTextContentElement::getCharNumAtPosition(PassRefPtr<SVGPointTearOff> point, ExceptionState& exceptionState)
{
document().updateLayoutIgnorePendingStylesheets();
- return SVGTextQuery(renderer()).characterNumberAtPosition(point);
+ return SVGTextQuery(renderer()).characterNumberAtPosition(point->target()->value());
}
void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, ExceptionState& exceptionState)
« no previous file with comments | « Source/core/svg/SVGTextContentElement.h ('k') | Source/core/svg/SVGTextContentElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698