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

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementRareData.h

Issue 2318973003: Test cl (Closed)
Patch Set: Replaced LayoutObject check for attachLayoutTree and removed check from recalcStyle Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | no next file » | 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) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ElementShadow& ensureShadow() 84 ElementShadow& ensureShadow()
85 { 85 {
86 if (!m_shadow) 86 if (!m_shadow)
87 m_shadow = ElementShadow::create(); 87 m_shadow = ElementShadow::create();
88 return *m_shadow; 88 return *m_shadow;
89 } 89 }
90 90
91 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } 91 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); }
92 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut eMap; } 92 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut eMap; }
93 93
94 ComputedStyle* computedStyle() const { return m_computedStyle.get(); } 94 ComputedStyle* computedStyle() const
95 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedS tyle = computedStyle; } 95 {
96 void clearComputedStyle() { m_computedStyle = nullptr; } 96 DCHECK(!(layoutObject() && m_computedStyle));
97 if (layoutObject())
98 return layoutObject()->mutableStyle();
99 return m_computedStyle.get();
100 }
101 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle)
102 {
103 if (layoutObject())
104 layoutObject()->setStyleInternal(computedStyle);
105 else
106 m_computedStyle = computedStyle;
107 }
108 void clearComputedStyle() { setComputedStyle(nullptr); }
97 109
98 ClassList* classList() const { return m_classList.get(); } 110 ClassList* classList() const { return m_classList.get(); }
99 void setClassList(ClassList* classList) { m_classList = classList; } 111 void setClassList(ClassList* classList) { m_classList = classList; }
100 void clearClassListValueForQuirksMode() 112 void clearClassListValueForQuirksMode()
101 { 113 {
102 if (!m_classList) 114 if (!m_classList)
103 return; 115 return;
104 m_classList->clearValueForQuirksMode(); 116 m_classList->clearValueForQuirksMode();
105 } 117 }
106 118
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() 259 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet()
248 { 260 {
249 if (!m_proxiedProperties) 261 if (!m_proxiedProperties)
250 m_proxiedProperties = CompositorProxiedPropertySet::create(); 262 m_proxiedProperties = CompositorProxiedPropertySet::create();
251 return *m_proxiedProperties; 263 return *m_proxiedProperties;
252 } 264 }
253 265
254 } // namespace blink 266 } // namespace blink
255 267
256 #endif // ElementRareData_h 268 #endif // ElementRareData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698