[Webkit-unassigned] [Bug 84936] [chromium] Compute highlight for touch targets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 22 02:18:43 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=84936





--- Comment #53 from Allan Sandfeld Jensen <allan.jensen at nokia.com>  2012-08-22 02:18:38 PST ---
(In reply to comment #52)
> (In reply to comment #50)
> > (In reply to comment #48)
> > > I think our RenderObject::hitQuadsForContainer works very similar to RenderObject::addFocusRingRects if you pass null as the repaintContainer (so it returns in absolute coordinate), except with two difference:
> > > 
> > > 1. hitQuadsForContainer returns quads instead of rects. If the rendering code is not capable of dealing with quads, I think using the enclosingBoundingBox would be a feasible solution.
> > > 
> > > 2. hitQuadsForContainer returns the raw hit-rects without decorations such as rounded-corner. Our "beautifying" code in is done in the WebHighlight class.
> > 
> > Would it make sense to change addFocusRing, to return quads? It is intended for this purpose but I guess has just not been upgraded to handle transformations. Alternatively, leave it mostly as is (on RenderObject level), but let RenderLayer apply the transformations and still end up returning quads.
> 
> What about making addFocusRing use hitQuadsForContainer and then just do the beautifying code on top? Drawing highlights or focus rings should be quite similar

It turns out to be unnecessary. AddFocusRing is used by normal paint logic, which means it is already clipped and transformed automatically by RenderLayer, so it doesn't need quads.

But that does give me an idea: What we are doing with hitQuadsForContainer (and GestureTapHighlighter), is duplicating the clipping code from painting, because we are doing the painting outside of the normal painting logic. If the painting was instead performed by RenderObject like it is for focusRings, this would not be necessary. So would it be possible to call a function similar to paintFocusRing to paint the tap-highlight, and give it the right graphicscontext making it paint it on another layer?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list