[webkit-reviews] review granted: [Bug 135023] [REGRESSION WK2]The menu bar does not show up when tapping on the caret : [Attachment 235093] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 17 15:01:58 PDT 2014


Benjamin Poulain <benjamin at webkit.org> has granted Enrica Casucci
<enrica at apple.com>'s request for review:
Bug 135023: [REGRESSION WK2]The menu bar does not show up when tapping on the
caret
https://bugs.webkit.org/show_bug.cgi?id=135023

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

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


> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:739
> +		   VisiblePosition first(createLegacyEditingPosition(root, 0));

> +		   VisiblePosition last(createLegacyEditingPosition(root,
root->childNodeCount()));
> +		   result.hasContent = first != last;

This isn't exactly cheap. ContainerNode::childNodeCount() alone can dirty a ton
of memory. I would prefer something that fails on the first node instead of
going through all of them.


More information about the webkit-reviews mailing list