Closed Bug 988991 Opened 11 years ago Closed 11 years ago

Able to pan an iframe that shouldn't be pannable

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(firefox28 affected, firefox29 affected, firefox30 affected, firefox31 affected)

RESOLVED DUPLICATE of bug 953239
Tracking Status
firefox28 --- affected
firefox29 --- affected
firefox30 --- affected
firefox31 --- affected

People

(Reporter: kats, Assigned: kats)

Details

Attachments

(1 file, 1 obsolete file)

STR: 1. Load the attached testcase (stolen from [1]) 2. Pan the youtube thingy (works better when you pan on the left side of the black rect rather than the right side) Expected: Things shouldn't pan Actual: The iframe seems to pan and glitch, with the play icon moving up but also flashing in various other places. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=943206#c12
Attached file Test case (obsolete) —
Attached file Test case
Urgh, mixed-content blocking.
Attachment #8397992 - Attachment is obsolete: true
The iframe has height="510" but layout is also reporting that the iframe has scrollTopMax 510, so Fennec allows panning it. Not sure why scrollTopMax is coming back as 510.
ScrollFrameHelper::GetScrolledRect() is returning the extra-tall rect. That in turn seems to be getting it from mScrolledFrame->GetScrollableOverflowRect().
Also note that this is reproducible even if you get the click-to-play block on the iframe; just pan the click-to-play gray background and it will scroll.
Component: Graphics, Panning and Zooming → Layout: HTML Frames
Product: Firefox for Android → Core
So it seems that even on Mac desktop, the iframe's body has a scrollTopMax equal to the height of the iframe. The difference is that the desktop browser respects the overflow:hidden that is also on the body, and so doesn't provide any mechanism for the user to scroll the frame. On Fennec we don't respect the overflow:hidden (there are existing bugs on file for this) and so we allow scrolling. However I think this is still an underlying layout bug that just so happens to be more easily exposed on Fennec. You can see it on Mac desktop using the scratchpad in the browser chrome environment and inspecting the properties of the iframe. Also interesting is that although the scrollTopMax of the iframe body is nonzero, the scrollLeftMax is not.
.. and it turns out that the embedded iframe actually has a second div that is abs-positioned out of sight but with a height that matches the height of the iframe. So layout is probably doing the right thing here, but we just need to support overflow:hidden better on subframes in Fennec. Sorry for the bugspam/churn in Layout.
Component: Layout: HTML Frames → Graphics, Panning and Zooming
Product: Core → Firefox for Android
Just to bring this back full circle, I'm going to dupe it to the original bug that dholbert filed on Fennec for embedded youtube things being pannable, since this is not really a general problem with iframes and seems to be pretty limited in scope to iframes that are overflow:hidden.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: