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

Side by Side Diff: Source/core/css/SVGCSSComputedStyleDeclaration.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/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/css/SelectorChecker.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) 2007 Eric Seidel <eric@webkit.org> 2 Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 3 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp ertyID propertyID, EUpdateLayout updateLayout) const 94 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp ertyID propertyID, EUpdateLayout updateLayout) const
95 { 95 {
96 Node* node = m_node.get(); 96 Node* node = m_node.get();
97 if (!node) 97 if (!node)
98 return 0; 98 return 0;
99 99
100 // Make sure our layout is up to date before we allow a query on these attri butes. 100 // Make sure our layout is up to date before we allow a query on these attri butes.
101 if (updateLayout) 101 if (updateLayout)
102 node->document()->updateLayout(); 102 node->document().updateLayout();
103 103
104 RenderStyle* style = node->computedStyle(); 104 RenderStyle* style = node->computedStyle();
105 if (!style) 105 if (!style)
106 return 0; 106 return 0;
107 107
108 const SVGRenderStyle* svgStyle = style->svgStyle(); 108 const SVGRenderStyle* svgStyle = style->svgStyle();
109 if (!svgStyle) 109 if (!svgStyle)
110 return 0; 110 return 0;
111 111
112 switch (propertyID) { 112 switch (propertyID) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 default: 227 default:
228 // If you crash here, it's because you added a css property and are not handling it 228 // If you crash here, it's because you added a css property and are not handling it
229 // in either this switch statement or the one in CSSComputedStyleDelcara tion::getPropertyCSSValue 229 // in either this switch statement or the one in CSSComputedStyleDelcara tion::getPropertyCSSValue
230 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID); 230 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID);
231 } 231 }
232 LOG_ERROR("unimplemented propertyID: %d", propertyID); 232 LOG_ERROR("unimplemented propertyID: %d", propertyID);
233 return 0; 233 return 0;
234 } 234 }
235 235
236 } 236 }
OLDNEW
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698