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

Side by Side Diff: Source/core/svg/SVGElementRareData.h

Issue 23717008: Remove useless null checks from Node::document() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/rendering/RenderTreeAsText.cpp ('k') | Source/core/xml/XMLSerializer.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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void destroyAnimatedSMILStyleProperties() 85 void destroyAnimatedSMILStyleProperties()
86 { 86 {
87 m_animatedSMILStyleProperties.clear(); 87 m_animatedSMILStyleProperties.clear();
88 } 88 }
89 89
90 RenderStyle* overrideComputedStyle(Element* element, RenderStyle* parentStyl e) 90 RenderStyle* overrideComputedStyle(Element* element, RenderStyle* parentStyl e)
91 { 91 {
92 ASSERT(element); 92 ASSERT(element);
93 if (!element->document() || !m_useOverrideComputedStyle) 93 if (!m_useOverrideComputedStyle)
94 return 0; 94 return 0;
95 if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) { 95 if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) {
96 // The style computed here contains no CSS Animations/Transitions or SMIL induced rules - this is needed to compute the "base value" for the SMIL an imation sandwhich model. 96 // The style computed here contains no CSS Animations/Transitions or SMIL induced rules - this is needed to compute the "base value" for the SMIL an imation sandwhich model.
97 m_overrideComputedStyle = element->document()->styleResolver()->styl eForElement(element, parentStyle, DisallowStyleSharing, MatchAllRulesExcludingSM IL); 97 m_overrideComputedStyle = element->document()->styleResolver()->styl eForElement(element, parentStyle, DisallowStyleSharing, MatchAllRulesExcludingSM IL);
98 m_needsOverrideComputedStyleUpdate = false; 98 m_needsOverrideComputedStyleUpdate = false;
99 } 99 }
100 ASSERT(m_overrideComputedStyle); 100 ASSERT(m_overrideComputedStyle);
101 return m_overrideComputedStyle.get(); 101 return m_overrideComputedStyle.get();
102 } 102 }
103 103
104 bool useOverrideComputedStyle() const { return m_useOverrideComputedStyle; } 104 bool useOverrideComputedStyle() const { return m_useOverrideComputedStyle; }
105 void setUseOverrideComputedStyle(bool value) { m_useOverrideComputedStyle = value; } 105 void setUseOverrideComputedStyle(bool value) { m_useOverrideComputedStyle = value; }
106 void setNeedsOverrideComputedStyleUpdate() { m_needsOverrideComputedStyleUpd ate = true; } 106 void setNeedsOverrideComputedStyleUpdate() { m_needsOverrideComputedStyleUpd ate = true; }
107 107
108 private: 108 private:
109 HashSet<SVGElementInstance*> m_elementInstances; 109 HashSet<SVGElementInstance*> m_elementInstances;
110 SVGCursorElement* m_cursorElement; 110 SVGCursorElement* m_cursorElement;
111 CSSCursorImageValue* m_cursorImageValue; 111 CSSCursorImageValue* m_cursorImageValue;
112 SVGElement* m_correspondingElement; 112 SVGElement* m_correspondingElement;
113 bool m_instancesUpdatesBlocked : 1; 113 bool m_instancesUpdatesBlocked : 1;
114 bool m_useOverrideComputedStyle : 1; 114 bool m_useOverrideComputedStyle : 1;
115 bool m_needsOverrideComputedStyleUpdate : 1; 115 bool m_needsOverrideComputedStyleUpdate : 1;
116 RefPtr<MutableStylePropertySet> m_animatedSMILStyleProperties; 116 RefPtr<MutableStylePropertySet> m_animatedSMILStyleProperties;
117 RefPtr<RenderStyle> m_overrideComputedStyle; 117 RefPtr<RenderStyle> m_overrideComputedStyle;
118 }; 118 };
119 119
120 } 120 }
121 121
122 #endif 122 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTreeAsText.cpp ('k') | Source/core/xml/XMLSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698