Bug 80606

Summary: [chromium] WebPluginContainer::isRectTopmost() gives incorrect result when scrolling.
Product: WebKit Reporter: Viet-Trung Luu <viettrungluu>
Component: New BugsAssignee: Raymes Khoury <raymes>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, fishd, raymes, viettrungluu, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Viet-Trung Luu 2012-03-08 10:16:25 PST
[chromium] Make WebPluginContainer::isRectTopmost() only test for being above visible content.
Comment 1 Viet-Trung Luu 2012-03-08 10:23:12 PST
Created attachment 130843 [details]
Patch
Comment 2 WebKit Review Bot 2012-03-08 10:26:10 PST
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 3 Darin Fisher (:fishd, Google) 2012-03-08 10:28:20 PST
Comment on attachment 130843 [details]
Patch

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

> Source/WebKit/chromium/src/WebPluginContainerImpl.cpp:463
> +        if (it->get() == m_element)

what if the plugin is on a layer that is visible but positioned above an invisible layer?
Comment 4 Viet-Trung Luu 2012-03-08 12:31:06 PST
(In reply to comment #3)
> (From update of attachment 130843 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=130843&action=review
> 
> > Source/WebKit/chromium/src/WebPluginContainerImpl.cpp:463
> > +        if (it->get() == m_element)
> 
> what if the plugin is on a layer that is visible but positioned above an invisible layer?

I'm not seeing the problem here. In that case, presumably only the plugin will be in the hit test results, no?

(Now, what happens if the plugin is on an invisible layer, etc.? Hmmmm.)
Comment 5 Darin Fisher (:fishd, Google) 2012-03-08 12:40:10 PST
(In reply to comment #4)
...
> I'm not seeing the problem here. In that case, presumably only the plugin will be in the hit test results, no?
> 
> (Now, what happens if the plugin is on an invisible layer, etc.? Hmmmm.)

Yeah, what you mentioned in parens is sort of what I was wondering about.  I don't fully know all of the interesting cases.  I don't understand what the hit test node set contains or doesn't contain.
Comment 6 Viet-Trung Luu 2012-03-28 13:31:22 PDT
(In reply to comment #5)
> (In reply to comment #4)
> ...
> > I'm not seeing the problem here. In that case, presumably only the plugin will be in the hit test results, no?
> > 
> > (Now, what happens if the plugin is on an invisible layer, etc.? Hmmmm.)
> 
> Yeah, what you mentioned in parens is sort of what I was wondering about.  I don't fully know all of the interesting cases.  I don't understand what the hit test node set contains or doesn't contain.

The more I think about it, the odder I find that invisible layers show up in the (rect-based) hittest at all. (I'm guessing they don't show up in the non-rect-based hittests? I should check that.) That could be a bug.

More investigation needed, at any rate.
Comment 7 Raymes Khoury 2012-04-11 15:55:20 PDT
The problem is that hitTestResultAtPoint() expects the point to be in document coordinates, not window coordinates.
Comment 8 Raymes Khoury 2012-04-11 16:02:25 PDT
Created attachment 136772 [details]
Patch
Comment 9 WebKit Review Bot 2012-04-16 10:43:37 PDT
Comment on attachment 136772 [details]
Patch

Clearing flags on attachment: 136772

Committed r114275: <http://trac.webkit.org/changeset/114275>
Comment 10 WebKit Review Bot 2012-04-16 10:43:42 PDT
All reviewed patches have been landed.  Closing bug.