Bug 128197 - WK: Cannot select text inside clickable containers.
Summary: WK: Cannot select text inside clickable containers.
Status: RESOLVED FIXED
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-02-04 11:16 PST by Enrica Casucci
Modified: 2014-02-04 13:35 PST (History)
0 users

See Also:


Attachments
Patch (2.99 KB, patch)
2014-02-04 11:24 PST, Enrica Casucci
simon.fraser: 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-02-04 11:16:04 PST
Open www.repubblica.it and navigate to a page that has comments at the bottom.
Tap and hold to select text in a comment.

Expected
The text is selected.

Actual
Nothing happens.

<rdar://problem/15970890>
Comment 1 Enrica Casucci 2014-02-04 11:24:57 PST
Created attachment 223145 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-02-04 11:28:30 PST
Comment on attachment 223145 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223145&action=review

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:846
> +                info.url = linkElement->document().completeURL(stripLeadingAndTrailingHTMLSpaces(linkElement->getAttribute(HTMLNames::hrefAttr)));
> +        } else if (element->isLink()) {
>              info.url = element->document().completeURL(stripLeadingAndTrailingHTMLSpaces(element->getAttribute(HTMLNames::hrefAttr)));
> +            elementIsLinkOrImage = true;

Would be slightly nice to factor this so you only call completeURL() once.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:852
> +    }
> +    if (!elementIsLinkOrImage) {

I would prefer a blank line between these two.
Comment 3 Enrica Casucci 2014-02-04 13:33:59 PST
Thanks for the review.
I've followed your suggestion and factored out CompleteURL.
Comment 4 Enrica Casucci 2014-02-04 13:35:38 PST
Committed revision 163400.