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

Unified Diff: Source/core/dom/Element.cpp

Issue 30453002: Should not allow style sharing if grandparents matches different rule chain (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@build_hack
Patch Set: reupload Created 7 years, 2 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
« no previous file with comments | « LayoutTests/fast/css/style-sharing-grand-parent-invalidate-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 50a90f83a8b3e7d61dc9ca0ea2432de4f6624a8d..4a60b9e3071ab502725b8451d463b03d930da386 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1578,9 +1578,11 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
if (RenderObject* renderer = this->renderer()) {
if (localChange != NoChange || pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get()) || (change == Force && renderer->requiresForcedStyleRecalcPropagation()) || shouldNotifyRendererWithIdenticalStyles()) {
renderer->setAnimatableStyle(newStyle.get());
- } else if (needsStyleRecalc()) {
+ } else {
// Although no change occurred, we use the new style so that the cousin style sharing code won't get
// fooled into believing this style is the same.
+ // FIXME: We may be able to remove this hack, see discussion in
+ // https://codereview.chromium.org/30453002/
renderer->setStyleInternal(newStyle.get());
}
}
« no previous file with comments | « LayoutTests/fast/css/style-sharing-grand-parent-invalidate-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698