Bug 135918

Summary: [Services with UI] Use a longer delay duration for editable content
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebCore Misc.Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Enrica Casucci 2014-08-13 17:20:17 PDT
Use a longer delay before showing the service UI.

<rdar://problem/17998929>
Comment 1 Enrica Casucci 2014-08-13 17:22:46 PDT
Created attachment 236568 [details]
Patch
Comment 2 Tim Horton 2014-08-13 17:25:57 PDT
Comment on attachment 236568 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:408
> +    std::chrono::steady_clock::duration minimumTimeUntilHighlightShouldBeShown = m_webPage.corePage()->focusController().focusedOrMainFrame().selection().selection().isContentEditable() ? 1000_ms : 200_ms;

This line is crazy long; could we maybe pull the 'isContentEditable' check out onto its own line? Also, could we maybe move the two constants to the top of the file?
Comment 3 Enrica Casucci 2014-08-13 17:33:29 PDT
(In reply to comment #2)
> (From update of attachment 236568 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=236568&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:408
> > +    std::chrono::steady_clock::duration minimumTimeUntilHighlightShouldBeShown = m_webPage.corePage()->focusController().focusedOrMainFrame().selection().selection().isContentEditable() ? 1000_ms : 200_ms;
> 
> This line is crazy long; could we maybe pull the 'isContentEditable' check out onto its own line? Also, could we maybe move the two constants to the top of the file?
I can split the line. I prefer not to move the constants since they are only used in this method.
Comment 4 Enrica Casucci 2014-08-13 17:40:09 PDT
Committed revision 172546.