Add a Document::updateStyleIfNeededForNode(Node&) so we can avoid doing full style updates when we're only interested in a single node (whose style isn't dirty.)
Created attachment 225795 [details]
Comment on attachment 225795 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=225795&action=review
> +static inline bool nodeOrItsAncestorNeedsStyleRecalc(const Node& node)
> + if (node.document().hasPendingForcedStyleRecalc())
> + return true;
Please pass in the Document, the caller knows (is!) it.
> +bool Document::updateStyleIfNeededForNode(const Node& node)
It would be better if this took Element. Generic Nodes don't have style.
However since some of the client code is Node-based perhaps it is better to refactor this separately.
Committed r165076: <http://trac.webkit.org/changeset/165076>