[webkit-reviews] review granted: [Bug 136957] Minimize virtual function calls in MarkupAccumulator : [Attachment 238380] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 19 13:19:35 PDT 2014


Benjamin Poulain <benjamin at webkit.org> has granted Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 136957: Minimize virtual function calls in MarkupAccumulator
https://bugs.webkit.org/show_bug.cgi?id=136957

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

------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=238380&action=review


> Source/WebCore/page/PageSerializer.cpp:109
> -    virtual void appendEndTag(const Node&) override;
> +    virtual void appendEndTag(const Element&) override;

Instead of adding isElementNode() everywhere, you could have:
inline void appendEndTag(Node& node) {
    if (node.isElementNode())
	appendEndTag(toElement(node));	 
}


More information about the webkit-reviews mailing list