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

Side by Side Diff: Source/core/svg/SVGStyleElement.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, 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/SVGStyleElement.h ('k') | Source/core/svg/SVGTRefElement.cpp » ('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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2006 Apple Inc. All rights reserved. 4 * Copyright (C) 2006 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 22 matching lines...) Expand all
33 : SVGElement(tagName, document) 33 : SVGElement(tagName, document)
34 , StyleElement(document, createdByParser) 34 , StyleElement(document, createdByParser)
35 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired) 35 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired)
36 { 36 {
37 ASSERT(hasTagName(SVGNames::styleTag)); 37 ASSERT(hasTagName(SVGNames::styleTag));
38 ScriptWrappable::init(this); 38 ScriptWrappable::init(this);
39 } 39 }
40 40
41 SVGStyleElement::~SVGStyleElement() 41 SVGStyleElement::~SVGStyleElement()
42 { 42 {
43 StyleElement::clearDocumentData(document(), this); 43 StyleElement::clearDocumentData(&document(), this);
44 } 44 }
45 45
46 PassRefPtr<SVGStyleElement> SVGStyleElement::create(const QualifiedName& tagName , Document* document, bool createdByParser) 46 PassRefPtr<SVGStyleElement> SVGStyleElement::create(const QualifiedName& tagName , Document* document, bool createdByParser)
47 { 47 {
48 return adoptRef(new SVGStyleElement(tagName, document, createdByParser)); 48 return adoptRef(new SVGStyleElement(tagName, document, createdByParser));
49 } 49 }
50 50
51 bool SVGStyleElement::disabled() const 51 bool SVGStyleElement::disabled() const
52 { 52 {
53 if (!m_sheet) 53 if (!m_sheet)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* rootParent) 129 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* rootParent)
130 { 130 {
131 SVGElement::insertedInto(rootParent); 131 SVGElement::insertedInto(rootParent);
132 if (rootParent->inDocument()) 132 if (rootParent->inDocument())
133 return InsertionShouldCallDidNotifySubtreeInsertions; 133 return InsertionShouldCallDidNotifySubtreeInsertions;
134 return InsertionDone; 134 return InsertionDone;
135 } 135 }
136 136
137 void SVGStyleElement::didNotifySubtreeInsertions(ContainerNode* insertionPoint) 137 void SVGStyleElement::didNotifySubtreeInsertions(ContainerNode* insertionPoint)
138 { 138 {
139 StyleElement::processStyleSheet(document(), this); 139 StyleElement::processStyleSheet(&document(), this);
140 } 140 }
141 141
142 void SVGStyleElement::removedFrom(ContainerNode* rootParent) 142 void SVGStyleElement::removedFrom(ContainerNode* rootParent)
143 { 143 {
144 SVGElement::removedFrom(rootParent); 144 SVGElement::removedFrom(rootParent);
145 if (rootParent->inDocument()) 145 if (rootParent->inDocument())
146 StyleElement::removedFromDocument(document(), this); 146 StyleElement::removedFromDocument(&document(), this);
147 } 147 }
148 148
149 void SVGStyleElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) 149 void SVGStyleElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
150 { 150 {
151 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); 151 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta);
152 StyleElement::childrenChanged(this); 152 StyleElement::childrenChanged(this);
153 } 153 }
154 154
155 } 155 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGStyleElement.h ('k') | Source/core/svg/SVGTRefElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698