Closed Bug 1104809 Opened 10 years ago Closed 10 years ago

Unable to scroll a scrollable div with event-regions enabled

Categories

(Core :: Layout, defect)

36 Branch
All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(3 files)

Attached file Layers dump (deleted) —
STR:
1. Turn on layout.event-regions.enabled
2. Go to people.mozilla.com/~kgupta/griddiv.html and scroll the div

Expected:
div is scrollable

Actual:
div is not scrollable

Regression from bug 1082594. What's happening is that the scrollframe for the div is active, but isn't getting event regions populated correctly. Prior to bug 1082594 we would use the scroll info layer's composition bounds to make event regions and so it worked, but bug 1082594 removed that code and so now the underlying bug is exposed.
Assignee: nobody → bugmail.mozilla
Attachment #8528555 - Flags: review?(tnikkel)
Attachment #8528555 - Flags: review?(mstange)
Half of this change is what tn suggested at https://bugzilla.mozilla.org/show_bug.cgi?id=1104099#c5, so that the event regions are associated with the correct layer. The other half is so that the event regions aren't just thrown away - I'm not sure that I'm adding it to the right list but it seems close enough to what the other users of nsDisplayLayerEventRegions do. Without this it looks like once the AutoBuildingDisplayList [1] gets popped off the stack at [2], the event regions are just thrown away because they never get added to an actual display list.

[1] http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.cpp?rev=e497957b79b2#2374
[2] http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.cpp?rev=e497957b79b2#2446
Attachment #8528558 - Flags: review?(tnikkel)
Attachment #8528558 - Flags: review?(mstange)
Attachment #8528555 - Flags: review?(mstange) → review+
Attachment #8528558 - Flags: review?(mstange) → review+
Comment on attachment 8528558 [details] [diff] [review]
Part 2 - Ensure the event regions for non-stacking children are kept

Oops!
Attachment #8528558 - Flags: review?(tnikkel) → review+
Comment on attachment 8528555 [details] [diff] [review]
Part 1 - Log which event region objects get accumulated into which layers

>+  void AccumulateEventRegions(nsDisplayLayerEventRegions* aEventRegions)
>   {
>-    mHitRegion.Or(mHitRegion, aHitRegion);
>-    mMaybeHitRegion.Or(mMaybeHitRegion, aMaybeHitRegion);
>-    mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aDispatchToContentHitRegion);
>+    FLB_LOG_PAINTED_LAYER_DECISION(this, "Accumulating regions %p against tld=%p\n", aEventRegions, this);

Call them event regions in the log for clarity maybe?

I guess we should change tld to pld at some point in this debug logging too. (But not here)
Attachment #8528555 - Flags: review?(tnikkel) → review+
(In reply to Timothy Nikkel (:tn) from comment #4)
> Call them event regions in the log for clarity maybe?

Done

> I guess we should change tld to pld at some point in this debug logging too.
> (But not here)

Yeah I'll file a bug for that.

remote:   https://hg.mozilla.org/integration/b2g-inbound/rev/d0c4d779391b
remote:   https://hg.mozilla.org/integration/b2g-inbound/rev/5a77aacfd82e
https://hg.mozilla.org/mozilla-central/rev/d0c4d779391b
https://hg.mozilla.org/mozilla-central/rev/5a77aacfd82e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: