Closed
Bug 1134021
Opened 10 years ago
Closed 10 years ago
[ShadowDOM] Scrollable elements are clipped and hit testing assumes no scrolling
Categories
(Core :: Layout, defect, P1)
Tracking
()
People
(Reporter: drs, Assigned: wchen)
References
Details
(Whiteboard: [spark])
Attachments
(3 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
Reduced test case: http://people.mozilla.org/~dsherk/wc.html This bug only occurs on B2G. It also occurs on Geckos for both v2.2 and v3.0. On desktop, the scrollable region containing "aaa ... [x100]" is scrollable and behaves as expected. On v3.0 from today, the scrollable region is completely unscrollable. On v2.2, the scrollable region is scrollable, but is clipped after a few hundred px and events such as "click"'s are always from the origin, {0, 0}. For example, if I scroll down 100px and then tap at the top left of the scrollable region, my event should be somewhere around {0, 100}, but instead, it's at {0, 0}. William, could you take a look at this? Kartikaya (:kats) says that this is unlikely to be an issue with APZ. As a side note, we have fixed this in one of our apps improperly this way: https://github.com/gaia-components/gaia-dom-tree/commit/509e6b61d8c618f43066a5bd544c56feea36c227
Flags: needinfo?(wchen)
Updated•10 years ago
|
Component: DOM → Layout
Reporter | ||
Updated•10 years ago
|
Priority: -- → P1
Whiteboard: [lightsaber]
Assignee | ||
Comment 1•10 years ago
|
||
Here is a work around that lets scrolling work but likely causes a bug somewhere else. It seems like the ScrollableLayerGuid for stuff in shadow DOM isn't getting the right PresShellId which is causing it to fail a comparison in APZCTreeManager::FindTargetNode.
Flags: needinfo?(wchen)
Comment 2•10 years ago
|
||
I'm surprised that failure to set the zoom constraints would result in failure to scroll. At most it should allow zooming when it shouldn't. Does the shadow DOM stuff get a separate presShell or something? I know nothing about how it works.
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8566947 [details] [diff] [review] work around This doesn't seem to fix the issue for me, even in the reduced test case. On m-c from today both with and without this patch, the region containing "aaa [...]" is unscrollable.
Flags: needinfo?(wchen)
Reporter | ||
Comment 4•10 years ago
|
||
This workaround in addition to attachment 8566947 [details] [diff] [review] seems to fix the issue for now.
Reporter | ||
Comment 5•10 years ago
|
||
Both landed on cypress: https://hg.mozilla.org/projects/cypress/rev/319654fb4d8e https://hg.mozilla.org/projects/cypress/rev/56d627560621
Assignee | ||
Comment 6•10 years ago
|
||
I uploaded the wrong patch, I meant to upload the changes in Doug's patch with changes to GetTargetAPZC instead of UpdateZoomConstraints. The changes to UpdateZoomConstraints are unnecessary. (In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2) > Does the shadow DOM stuff get a separate presShell or something? I know > nothing about how it works. No, it doesn't. My guess is that wherever we are getting the doc shell, we are doing it in a way that doesn't work for shadow DOM content (e.g. GetCurrentDoc()->GetDocShell(), nodes in a shadow DOM don't have a current doc).
Flags: needinfo?(wchen)
Comment 7•10 years ago
|
||
I think the main places we obtain the presShellId are at [1] and [2]. I can't recall offhand if we go through the doc to get that anywhere. [1] http://mxr.mozilla.org/mozilla-central/source/layout/base/nsDisplayList.cpp?rev=5ef8e549a1d9#893 [2] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/util/APZCCallbackHelper.cpp#264
Comment 8•10 years ago
|
||
Oh I guess it might be http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/util/APZCCallbackHelper.cpp?rev=abe8b4e23df0#247 - is it possible to get a domwindowutils for shadow dom content?
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #8) > Oh I guess it might be > http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/util/ > APZCCallbackHelper.cpp?rev=abe8b4e23df0#247 - is it possible to get a > domwindowutils for shadow dom content? Yeah, it looks like that was it.
Assignee: nobody → wchen
Attachment #8567332 -
Flags: review?(bugmail.mozilla)
Updated•10 years ago
|
Attachment #8567332 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f97b9f85516
https://hg.mozilla.org/mozilla-central/rev/0f97b9f85516
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•9 years ago
|
Whiteboard: [lightsaber] → [ignite]
Updated•9 years ago
|
Updated•9 years ago
|
Whiteboard: [ignite] → [spark]
blocking-b2g: spark+ → 2.5+
Updated•9 years ago
|
status-b2g-v2.5:
--- → fixed
Updated•9 years ago
|
status-b2g-v2.5:
fixed → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•