Bug 51550 - Clean up the selection handling code
Summary: Clean up the selection handling code
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Anders Carlsson
Depends on:
Reported: 2010-12-23 11:57 PST by Anders Carlsson
Modified: 2010-12-23 15:35 PST (History)
4 users (show)

See Also:

Patch (32.37 KB, patch)
2010-12-23 12:03 PST, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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