Bug 51550

Summary: Clean up the selection handling code
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Severity: Normal CC: abarth, darin, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Description Flags
Patch darin: review+

Description Anders Carlsson 2010-12-23 11:57:17 PST
Clean up the selection handling code
Comment 1 Anders Carlsson 2010-12-23 12:03:28 PST
Created attachment 77355 [details]
Comment 2 Darin Adler 2010-12-23 12:40:24 PST
Comment on attachment 77355 [details]

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

> WebKit2/Shared/SelectionState.h:39
> +        , selectedRangeStart(static_cast<uint64_t>(-1))

Can we have a named constant for this? What does it mean? Is it ever exposed to clients of the WK API?

> WebKit2/UIProcess/WebPageProxy.h:177
> +    // These are only used on Mac currently.

Seems like a silly comment just before #if PLATFORM(MAC). Is there something more substantive to say about these functions?

> WebKit2/UIProcess/WebPageProxy.h:497
> +    // The current selection state.
> +    SelectionState m_selectionState;

Comment adds little. Leave it out?

> WebKit2/WebProcess/WebPage/WebPage.cpp:616
> +    location = static_cast<uint64_t>(-1);

Use that constant from above?
Comment 3 Darin Adler 2010-12-23 14:40:45 PST
Anders committed r74582: <http://trac.webkit.org/changeset/74582>.
Comment 4 WebKit Review Bot 2010-12-23 15:31:46 PST
http://trac.webkit.org/changeset/74583 might have broken Qt Linux Release
The following tests are not passing:
Comment 5 Eric Seidel (no email) 2010-12-23 15:35:48 PST
I suspect that's just a flaky test: https://bugs.webkit.org/show_bug.cgi?id=50889