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

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

Issue 1323243002: WIP - Rough draft of style observation in style of apply hooks. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/style/StyleObserver.h » ('j') | 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 c8033444844eb4eadf59ca737ca7a7b009a090f6..549ab306f3b1aec6dbff9af7f029c4cfdf374c35 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -115,6 +115,7 @@
#include "core/page/SpatialNavigation.h"
#include "core/page/scrolling/ScrollState.h"
#include "core/paint/DeprecatedPaintLayer.h"
+#include "core/style/StyleObserver.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGElement.h"
#include "platform/EventDispatchForbiddenScope.h"
@@ -1709,8 +1710,11 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
ASSERT(oldStyle);
- if (localChange != NoChange)
+ if (localChange != NoChange) {
+ if (document().hasStyleObserver())
+ document().notifyStyleObservers(this, oldStyle.get(), newStyle.get());
updateCallbackSelectors(oldStyle.get(), newStyle.get());
+ }
if (LayoutObject* layoutObject = this->layoutObject()) {
if (localChange != NoChange || pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get()) || svgFilterNeedsLayerUpdate()) {
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/style/StyleObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698