RESOLVED FIXED 135787
Refactor ServiceOverlayController in preparation for fading between highlights
https://bugs.webkit.org/show_bug.cgi?id=135787
Summary Refactor ServiceOverlayController in preparation for fading between highlights
Tim Horton
Reported 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>.
Attachments
patch (36.75 KB, patch)
2014-08-09 23:35 PDT, Tim Horton
no flags
patch (37.34 KB, patch)
2014-08-10 02:17 PDT, Tim Horton
beidson: review+
Tim Horton
Comment 1 2014-08-09 23:35:52 PDT
Tim Horton
Comment 2 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.
Tim Horton
Comment 3 2014-08-10 00:27:00 PDT
Comment on attachment 236340 [details] patch not quite done yet
Tim Horton
Comment 4 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
Tim Horton
Comment 5 2014-08-10 02:17:53 PDT
Brady Eidson
Comment 6 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.
Tim Horton
Comment 7 2014-08-10 18:27:15 PDT
Darin Adler
Comment 8 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.
Note You need to log in before you can comment on or make changes to this bug.