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

Unified Diff: Source/core/dom/Node.h

Issue 144963002: Make pseudo element update work with LocalStyleChange. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased onto newer master Created 6 years, 11 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: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 1ace0bed9880f9c022326f392a725be48933ba54..ddeee8297246e86888f528119c73cf5f566d0c7f 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -542,6 +542,9 @@ public:
// Returns true if recalcStyle should be called on the object, if there is such a method (on Document and Element).
bool shouldCallRecalcStyle(StyleRecalcChange);
+ // Returns true if updatePseudoElement should be called on the object.
+ bool shouldUpdatePseudoElements(StyleRecalcChange) const;
+
// Wrapper for nodes that don't have a renderer, but still cache the style (like HTMLOptionElement).
RenderStyle* renderStyle() const;
RenderStyle* parentRenderStyle() const;
@@ -868,6 +871,11 @@ inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change)
return change >= Inherit || needsStyleRecalc() || childNeedsStyleRecalc();
}
+inline bool Node::shouldUpdatePseudoElements(StyleRecalcChange change) const
esprehn 2014/01/28 18:08:05 You only have this check in two places, I'd just i
+{
+ return change >= UpdatePseudoElements || childNeedsStyleRecalc();
+}
+
inline bool isTreeScopeRoot(const Node* node)
{
return !node || node->isDocumentNode() || node->isShadowRoot();

Powered by Google App Engine
This is Rietveld 408576698