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

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

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Remove any cases that are forcing the newStyle on the old LayoutObject 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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ElementShadow& ensureShadow() 85 ElementShadow& ensureShadow()
86 { 86 {
87 if (!m_shadow) 87 if (!m_shadow)
88 m_shadow = ElementShadow::create(); 88 m_shadow = ElementShadow::create();
89 return *m_shadow; 89 return *m_shadow;
90 } 90 }
91 91
92 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } 92 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); }
93 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut eMap; } 93 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut eMap; }
94 94
95 ComputedStyle* computedStyle() const 95 ComputedStyle* computedStyle() const { return m_computedStyle.get(); }
96 { 96 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedS tyle = computedStyle; }
97 DCHECK(!(layoutObject() && m_computedStyle));
98 if (layoutObject())
99 return layoutObject()->mutableStyle();
100 return m_computedStyle.get();
101 }
102 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle)
103 {
104 if (layoutObject())
105 layoutObject()->setStyleInternal(std::move(computedStyle));
106 else
107 m_computedStyle = computedStyle;
108 }
109 void clearComputedStyleIfNoLayoutObject() 97 void clearComputedStyleIfNoLayoutObject()
110 { 98 {
111 DCHECK(!(layoutObject() && m_computedStyle)); 99 DCHECK(!(layoutObject() && m_computedStyle));
112 m_computedStyle = nullptr; 100 m_computedStyle = nullptr;
113 } 101 }
114 102
115 ClassList* classList() const { return m_classList.get(); } 103 ClassList* classList() const { return m_classList.get(); }
116 void setClassList(ClassList* classList) { m_classList = classList; } 104 void setClassList(ClassList* classList) { m_classList = classList; }
117 void clearClassListValueForQuirksMode() 105 void clearClassListValueForQuirksMode()
118 { 106 {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() 252 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet()
265 { 253 {
266 if (!m_proxiedProperties) 254 if (!m_proxiedProperties)
267 m_proxiedProperties = CompositorProxiedPropertySet::create(); 255 m_proxiedProperties = CompositorProxiedPropertySet::create();
268 return *m_proxiedProperties; 256 return *m_proxiedProperties;
269 } 257 }
270 258
271 } // namespace blink 259 } // namespace blink
272 260
273 #endif // ElementRareData_h 261 #endif // ElementRareData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/ElementRareDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698