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

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: 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
Index: Source/core/svg/SVGTextContentElement.cpp
diff --git a/Source/core/svg/SVGTextContentElement.cpp b/Source/core/svg/SVGTextContentElement.cpp
index 620345e4b5a679e018110c1028bc20210b19d65b..631eeee43381d52b71ead33760c599838ec0dac4 100644
--- a/Source/core/svg/SVGTextContentElement.cpp
+++ b/Source/core/svg/SVGTextContentElement.cpp
@@ -110,28 +110,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.throwUninformativeAndGenericDOMException(IndexSizeError);
- 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.throwUninformativeAndGenericDOMException(IndexSizeError);
- 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)
@@ -159,10 +161,16 @@ 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)
{
+ // FIXME
haraken 2014/01/17 11:50:18 Add some description.
kouhei (in TOK) 2014/01/20 01:10:26 Removed. This was a temporary fix needed before nb
+ if (!point) {
+ exceptionState.throwTypeError("The argument can't be null.");
+ return 0;
+ }
+
document().updateLayoutIgnorePendingStylesheets();
- return SVGTextQuery(renderer()).characterNumberAtPosition(point);
+ return SVGTextQuery(renderer()).characterNumberAtPosition(point->target()->value());
}
void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698