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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/SVGTRefElement.cpp ('k') | Source/core/svg/SVGTextPathElement.cpp » ('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 48c806af588f9d6e7c80f581da57f089d7da1f5f..1270f0ee265a77e8c602742f74c297bc745dc46e 100644
--- a/Source/core/svg/SVGTextContentElement.cpp
+++ b/Source/core/svg/SVGTextContentElement.cpp
@@ -103,19 +103,19 @@ PassRefPtr<SVGAnimatedLength> SVGTextContentElement::textLength()
unsigned SVGTextContentElement::getNumberOfChars()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
return SVGTextQuery(renderer()).numberOfCharacters();
}
float SVGTextContentElement::getComputedTextLength()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
return SVGTextQuery(renderer()).textLength();
}
float SVGTextContentElement::getSubStringLength(unsigned charnum, unsigned nchars, ExceptionState& es)
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
unsigned numberOfChars = getNumberOfChars();
if (charnum >= numberOfChars) {
@@ -131,7 +131,7 @@ float SVGTextContentElement::getSubStringLength(unsigned charnum, unsigned nchar
SVGPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionState& es)
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
es.throwDOMException(IndexSizeError);
@@ -143,7 +143,7 @@ SVGPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, Excepti
SVGPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionState& es)
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
es.throwDOMException(IndexSizeError);
@@ -155,7 +155,7 @@ SVGPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, Exception
SVGRect SVGTextContentElement::getExtentOfChar(unsigned charnum, ExceptionState& es)
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
es.throwDOMException(IndexSizeError);
@@ -167,7 +167,7 @@ SVGRect SVGTextContentElement::getExtentOfChar(unsigned charnum, ExceptionState&
float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState& es)
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
if (charnum > getNumberOfChars()) {
es.throwDOMException(IndexSizeError);
@@ -179,7 +179,7 @@ float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState&
int SVGTextContentElement::getCharNumAtPosition(const SVGPoint& point)
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
return SVGTextQuery(renderer()).characterNumberAtPosition(point);
}
@@ -194,10 +194,9 @@ void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, E
if (nchars > numberOfChars - charnum)
nchars = numberOfChars - charnum;
- ASSERT(document());
- ASSERT(document()->frame());
+ ASSERT(document().frame());
- FrameSelection* selection = document()->frame()->selection();
+ FrameSelection* selection = document().frame()->selection();
if (!selection)
return;
« no previous file with comments | « Source/core/svg/SVGTRefElement.cpp ('k') | Source/core/svg/SVGTextPathElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698