rollup event consuming behavior is non-deterministic

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
8 years ago
4 years ago

People

(Reporter: Gavin, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

gConsumeRollupEvent in nsCocoaWindow.mm is not initialized, so whether or not we consume rollup events on Mac for a given popup is random, unless it's explicitly specified (via setConsumeRollupEvent).
Blocks: 415440
Summary: default rollup event consuming is non-deterministic → default rollup event consuming behavior depends the value of uninitialized memory
Actually, I may have misdiagnosed this. Initializing it doesn't seem to help - I still seem to see seemingly-random behavior. Need to investigate more.
Summary: default rollup event consuming behavior depends the value of uninitialized memory → rollup event consuming behavior is non-deterministic
My test case is http://gavinsharp.com/tmp/geo.html . It triggers a popup notification, and clicking the link while the popup is up let's you see whether the event is consumed. If I reload and click continuously, I occasionally get the event consumed, and occasionally don't.
When the event isn't consumed, ConsumeOutsideClicks() returns false because mConsumeRollupEvent == nsIPopupBoxObject::ROLLUP_NO_CONSUME.

When it is consumed, ConsumeOutsideClicks() returns true because (mConsumeRollupEvent == nsIPopupBoxObject::ROLLUP_DEFAULT), and none of the special cases are hit.
It looks like rollups where the event is consumed are always preceded by rollups where we don't get into the if (shouldRollup) block in maybeRollup.
Blocks: 596723
Some changes have been made to the rollup code recently for bug 701760 to is this still a problem? I cannot reproduce.
Flags: needinfo?(gavin.sharp)
I can't reproduce this anymore.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: needinfo?(gavin.sharp)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.