Closed Bug 1218991 Opened 10 years ago Closed 10 years ago

Initial zoom constraints can be dropped

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: snorp, Unassigned)

Details

Attachments

(1 file)

Because the compositor and APZCTreeManager are lazily created when we do the first paint, it's possible that zoom constraints will be dropped since we have nowhere for them to go.
Comment on attachment 8679660 [details] [diff] [review] Save initial zoom constraints to be used once compositor is created Review of attachment 8679660 [details] [diff] [review]: ----------------------------------------------------------------- r+ with the change described below. I'm still a little uneasy about this but I don't have any better suggestions. ::: widget/nsBaseWidget.cpp @@ +937,5 @@ > if (!mCompositorParent || !mAPZC) { > + if (aConstraints) { > + // We have some constraints, but the compositor and APZC aren't created yet. > + // Save these so we can use them later. > + mInitialZoomConstraints = Some(InitialZoomConstraints(aPresShellId, aViewId, aConstraints.ref())); I'm assuming that UpdateZoomConstraints can get called multiple times before the compositor is created. Technically this should get stashed into a map of (presShellId, viewId) -> ZoomConstraints. But in practice I'm thinking this will only happen in a limited set of cases, so we can get away with what you're doing here. However I still want to assert that we don't run into the other scenarios. So do this instead: if (!mCompositorParent || !mAPZC) { if (mInitialZoomConstraints) { MOZ_ASSERT(mInitialZoomConstraints->mPresShellID == aPresShellId); MOZ_ASSERT(mInitialZoomConstraints->mViewID == aViewId); if (!aConstraints) { mInitialZoomConstraints.reset(); } } if (aConstraints) { ... // what you have now } return;
Attachment #8679660 - Flags: review?(bugmail.mozilla) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: