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

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: Send over for review 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 96c1c9dca4be1052fdee87c31cfc657ee67a9129..d31dbdf3b97733e284932b3fe46e59fdc2b11f68 100644
--- a/third_party/WebKit/Source/core/dom/ElementRareData.h
+++ b/third_party/WebKit/Source/core/dom/ElementRareData.h
@@ -100,10 +100,11 @@ public:
}
void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle)
{
- if (layoutObject())
- layoutObject()->setStyleInternal(computedStyle);
- else
+ if (layoutObject()) {
+ layoutObject()->setStyleFromNodeOrElement(computedStyle);
+ } else {
m_computedStyle = computedStyle;
+ }
}
void clearComputedStyleIfNoLayoutObject()
{

Powered by Google App Engine
This is Rietveld 408576698