[webkit-reviews] review granted: [Bug 129689] Add a Document::updateStyleIfNeededForNode(Node&). : [Attachment 225795] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 4 11:38:52 PST 2014


Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <akling at apple.com>'s
request for review:
Bug 129689: Add a Document::updateStyleIfNeededForNode(Node&).
https://bugs.webkit.org/show_bug.cgi?id=129689

Attachment 225795: Patch
https://bugs.webkit.org/attachment.cgi?id=225795&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=225795&action=review


> Source/WebCore/dom/Document.cpp:6055
> +static inline bool nodeOrItsAncestorNeedsStyleRecalc(const Node& node)
> +{
> +    if (node.document().hasPendingForcedStyleRecalc())
> +	   return true;

Please pass in the Document, the caller knows (is!) it.

> Source/WebCore/dom/Document.cpp:6063
> +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.


More information about the webkit-reviews mailing list