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

Side by Side Diff: Source/core/svg/SVGTextElement.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGTextElement.h ('k') | Source/core/svg/SVGTextPathElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 12 matching lines...) Expand all
23 #include "core/svg/SVGTextElement.h" 23 #include "core/svg/SVGTextElement.h"
24 24
25 #include "SVGNames.h" 25 #include "SVGNames.h"
26 #include "core/dom/NodeRenderingContext.h" 26 #include "core/dom/NodeRenderingContext.h"
27 #include "core/rendering/svg/RenderSVGResource.h" 27 #include "core/rendering/svg/RenderSVGResource.h"
28 #include "core/rendering/svg/RenderSVGText.h" 28 #include "core/rendering/svg/RenderSVGText.h"
29 #include "core/svg/SVGElementInstance.h" 29 #include "core/svg/SVGElementInstance.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 inline SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* do c) 33 inline SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document& do c)
34 : SVGTextPositioningElement(tagName, doc) 34 : SVGTextPositioningElement(tagName, doc)
35 { 35 {
36 ASSERT(hasTagName(SVGNames::textTag)); 36 ASSERT(hasTagName(SVGNames::textTag));
37 ScriptWrappable::init(this); 37 ScriptWrappable::init(this);
38 } 38 }
39 39
40 PassRefPtr<SVGTextElement> SVGTextElement::create(const QualifiedName& tagName, Document* document) 40 PassRefPtr<SVGTextElement> SVGTextElement::create(const QualifiedName& tagName, Document& document)
41 { 41 {
42 return adoptRef(new SVGTextElement(tagName, document)); 42 return adoptRef(new SVGTextElement(tagName, document));
43 } 43 }
44 44
45 // We override SVGGraphics::animatedLocalTransform() so that the transform-origi n 45 // We override SVGGraphics::animatedLocalTransform() so that the transform-origi n
46 // is not taken into account. 46 // is not taken into account.
47 AffineTransform SVGTextElement::animatedLocalTransform() const 47 AffineTransform SVGTextElement::animatedLocalTransform() const
48 { 48 {
49 AffineTransform matrix; 49 AffineTransform matrix;
50 RenderStyle* style = renderer() ? renderer()->style() : 0; 50 RenderStyle* style = renderer() ? renderer()->style() : 0;
(...skipping 30 matching lines...) Expand all
81 #endif 81 #endif
82 || childContext.node()->hasTagName(SVGNames::textPathTag) 82 || childContext.node()->hasTagName(SVGNames::textPathTag)
83 || childContext.node()->hasTagName(SVGNames::trefTag) 83 || childContext.node()->hasTagName(SVGNames::trefTag)
84 || childContext.node()->hasTagName(SVGNames::tspanTag)) 84 || childContext.node()->hasTagName(SVGNames::tspanTag))
85 return true; 85 return true;
86 86
87 return false; 87 return false;
88 } 88 }
89 89
90 } 90 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTextElement.h ('k') | Source/core/svg/SVGTextPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698