Tapping on an input field that has focus, should toggle the menu bar.
Created attachment 235093 [details]
Comment on attachment 235093 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=235093&action=review
> + 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.