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

Unified Diff: Source/core/svg/SVGPathElement.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/SVGMPathElement.cpp ('k') | Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathElement.cpp
diff --git a/Source/core/svg/SVGPathElement.cpp b/Source/core/svg/SVGPathElement.cpp
index 8d16bbfc5a203f27c2365aeb543aa595658fa492..2e367ae180c3297e6cbd45f2dee5b6ee895e6580 100644
--- a/Source/core/svg/SVGPathElement.cpp
+++ b/Source/core/svg/SVGPathElement.cpp
@@ -230,14 +230,14 @@ void SVGPathElement::parseAttribute(const QualifiedName& name, const AtomicStrin
if (name == SVGNames::dAttr) {
if (!buildSVGPathByteStreamFromString(value, m_pathByteStream.get(), UnalteredParsing))
- document()->accessSVGExtensions()->reportError("Problem parsing d=\"" + value + "\"");
+ document().accessSVGExtensions()->reportError("Problem parsing d=\"" + value + "\"");
return;
}
if (name == SVGNames::pathLengthAttr) {
setPathLengthBaseValue(value.toFloat());
if (pathLengthBaseValue() < 0)
- document()->accessSVGExtensions()->reportError("A negative value for path attribute <pathLength> is not allowed");
+ document().accessSVGExtensions()->reportError("A negative value for path attribute <pathLength> is not allowed");
return;
}
@@ -279,8 +279,7 @@ void SVGPathElement::invalidateMPathDependencies()
{
// <mpath> can only reference <path> but this dependency is not handled in
// markForLayoutAndParentResourceInvalidation so we update any mpath dependencies manually.
- ASSERT(document());
- if (HashSet<SVGElement*>* dependencies = document()->accessSVGExtensions()->setOfElementsReferencingTarget(this)) {
+ if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions()->setOfElementsReferencingTarget(this)) {
HashSet<SVGElement*>::iterator end = dependencies->end();
for (HashSet<SVGElement*>::iterator it = dependencies->begin(); it != end; ++it) {
if ((*it)->hasTagName(SVGNames::mpathTag))
@@ -389,7 +388,7 @@ void SVGPathElement::pathSegListChanged(SVGPathSegRole role, ListModification li
FloatRect SVGPathElement::getBBox(StyleUpdateStrategy styleUpdateStrategy)
{
if (styleUpdateStrategy == AllowStyleUpdate)
- this->document()->updateLayoutIgnorePendingStylesheets();
+ this->document().updateLayoutIgnorePendingStylesheets();
RenderSVGPath* renderer = toRenderSVGPath(this->renderer());
« no previous file with comments | « Source/core/svg/SVGMPathElement.cpp ('k') | Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698