Chromium Code Reviews| 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(); |