Closed Bug 1504362 Opened 6 years ago Closed 5 years ago

Consider unifying nsViewportInfo::mDefaultZoom and mDefaultZoomvalid into Maybe<CSSToScreenScale>

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox65 --- affected

People

(Reporter: hiro, Unassigned)

References

Details

      No description provided.

I don't know if this is doable. We set mDefaultZoom to a clamped value and use it in places even when mDefaultZoomValid is false. So if we replace that state with a Nothing() we lose information that we currently have. It would require some change in semantics on the calling code side to make this possible. Hiro, is that what you had in mind?

Flags: needinfo?(hikezoe)

Hmm, actually I hadn't checked all call sites of nsViewportInfo::GetDefaultZoom() at that time.

Here are the call sites where the function gets called without checking the result of nsViewportInfo::IsDefaultZoomValue():

That's being said, it seems that it's probably not worth doing make mDefaultZoom and mDefaultZoomValid into Maybe<CSSToScreenScale> for now.

I am going to close this bug as WONTFIX, please feel free to reopen this bug if someone wants to fix this.

Thanks!

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(hikezoe)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.