Bug 135787 - Refactor ServiceOverlayController in preparation for fading between highlights
Summary: Refactor ServiceOverlayController in preparation for fading between highlights
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-08-09 23:34 PDT by Tim Horton
Modified: 2014-08-11 22:55 PDT (History)
2 users (show)

See Also:


Attachments
patch (36.75 KB, patch)
2014-08-09 23:35 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
patch (37.34 KB, patch)
2014-08-10 02:17 PDT, Tim Horton
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-08-09 23:34:45 PDT
A pretty significant refactor, so it would be nice to get a good review on this.
I think it's a hackability improvement, too, but let me know if you disagree!

Part of <rdar://problem/17935736>.
Comment 1 Tim Horton 2014-08-09 23:35:52 PDT
Created attachment 236340 [details]
patch
Comment 2 Tim Horton 2014-08-09 23:38:45 PDT
The primary motivation for this large change is the Highlight object; for fade, we need to be able to keep around/paint Highlights that might no longer be potentials (and certainly won't be 'active'), so with a refcounted Highlight object we'll be able to keep them around separately and refer to them consistently in various places. Hackability/cleanup was a secondary motivation.
Comment 3 Tim Horton 2014-08-10 00:27:00 PDT
Comment on attachment 236340 [details]
patch

not quite done yet
Comment 4 Tim Horton 2014-08-10 00:33:09 PDT
Comment on attachment 236340 [details]
patch

huh, the thing I found is not a regression from this patch like I assumed it was. re-r?ing
Comment 5 Tim Horton 2014-08-10 02:17:53 PDT
Created attachment 236342 [details]
patch
Comment 6 Brady Eidson 2014-08-10 16:03:50 PDT
Comment on attachment 236342 [details]
patch

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

> Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h:66
> +        enum class Type { TelephoneNumber, Selection };

Even if only two thingies, I like seeing this on multiple lines.

enum class Type {
    Thingy1,
    Thingy2,
};

> Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:242
> +    bool hovered = DDHighlightPointIsOnHighlight(highlight.highlight(), (CGPoint)m_mousePosition, &onButton);

highlight.highlight() reads weirdly to me.

Could the DDHighlightRef accessor be "ddHighlight()" or "ddHighlightRef()"?

It's not too mysterious here because it's being fed into a DD API, but it would be mysterious without that context.
Comment 7 Tim Horton 2014-08-10 18:27:15 PDT
http://trac.webkit.org/changeset/172382
Comment 8 Darin Adler 2014-08-11 22:55:09 PDT
Comment on attachment 236342 [details]
patch

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

>> Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h:66
>> +        enum class Type { TelephoneNumber, Selection };
> 
> Even if only two thingies, I like seeing this on multiple lines.
> 
> enum class Type {
>     Thingy1,
>     Thingy2,
> };

I like them on one line.