[webkit-reviews] review granted: [Bug 110786] Style recalculation takes too long when adding whitespace text nodes : [Attachment 191086] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 1 20:29:51 PST 2013


Darin Adler <darin at apple.com> has granted Kentaro Hara <haraken at chromium.org>'s
request for review:
Bug 110786: Style recalculation takes too long when adding whitespace text
nodes
https://bugs.webkit.org/show_bug.cgi?id=110786

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

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=191086&action=review


It would be better if this came with a test. The tests in LayoutTests/perf can
be used to check for unwanted O(n^2) in a really nice clean way. I would love
it if you’d add one of those tests.

> Source/WebCore/dom/Node.cpp:1079
> +	       if (next->isTextNode()) {

Might read nicer if this said:

    if (!next->isTextNode())
	continue;

Instead of nesting the rest of the loop inside an if.


More information about the webkit-reviews mailing list