Bug 135023 - [REGRESSION WK2]The menu bar does not show up when tapping on the caret
Summary: [REGRESSION WK2]The menu bar does not show up when tapping on the caret
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-17 13:58 PDT by Enrica Casucci
Modified: 2014-07-17 15:02 PDT (History)
0 users

See Also:


Attachments
Patch (4.64 KB, patch)
2014-07-17 14:44 PDT, Enrica Casucci
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-07-17 13:58:02 PDT
Tapping on an input field that has focus, should toggle the menu bar.

<rdar://problem/17617282>
Comment 1 Enrica Casucci 2014-07-17 14:44:54 PDT
Created attachment 235093 [details]
Patch
Comment 2 Benjamin Poulain 2014-07-17 15:02:14 PDT
Comment on attachment 235093 [details]
Patch

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.