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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/ElementRareData.h
diff --git a/third_party/WebKit/Source/core/dom/ElementRareData.h b/third_party/WebKit/Source/core/dom/ElementRareData.h
index 665b59a57c2b98af2757cc2eb417ce6ddaf7980b..d33a670f94879fd8a5a18a26a790991aa06e1e39 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.h
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.h
@@ -92,20 +92,8 @@ public:
NamedNodeMap* attributeMap() const { return m_attributeMap.get(); }
void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attributeMap; }
- ComputedStyle* computedStyle() const
- {
- DCHECK(!(layoutObject() && m_computedStyle));
- if (layoutObject())
- return layoutObject()->mutableStyle();
- return m_computedStyle.get();
- }
- void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle)
- {
- if (layoutObject())
- layoutObject()->setStyleInternal(std::move(computedStyle));
- else
- m_computedStyle = computedStyle;
- }
+ ComputedStyle* computedStyle() const { return m_computedStyle.get(); }
+ void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedStyle = computedStyle; }
void clearComputedStyleIfNoLayoutObject()
{
DCHECK(!(layoutObject() && m_computedStyle));
« 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