Closed Bug 1523453 Opened 4 years ago Closed 2 years ago

Remove unused workaround for gAppUpdater in preferences

Categories

(Firefox :: Preferences, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: timdream, Assigned: ntim)

References

Details

Attachments

(1 file)

In bug 1520350 I got a patch where the markup of the <deck> is inserted at the same tick main.js calls into aboutDialog-appUpdater.js.

In the test toolkit/mozapps/update/tests/browser/browser_aboutPrefs_fc_check_otherInstance.js, the later script correctly deduces the state of the updater and set the selectedIndex to 9 (via MozDeck).

However, the attribute value gets magically changed to 7 when the test assertion tries to access it.

There is nowhere in JS that could have set the attribute value. The only offender seems to be in nsDeckFrame::RemoveFrame(). I can't create a Windows build to verify this claim though.

https://searchfox.org/mozilla-central/rev/5c8ea961d04767db723a0a15e3a8f7fbca154129/layout/xul/nsDeckFrame.cpp#156

I will workaround this in bug 1520350 but we really shouldn't mutate DOM states from layout ...

I don't understand layout enough to tell why nsDeckFrame::RemoveFrame() can be called during document load. The <hbox>es are not moved nor set to display: none or whatnot. I will need to leave it to someone with a Windows build...

It'd be really nice if we could remove nsDeckFrame though...
It seems to me it could be replaced with a 1x1 CSS Grid with
all children placed in the same grid area, and then put
visibility:hidden on all except the selected one.

Priority: -- → P5

Bug 1689727 removed this specific usage. Bug 1559192 will stop using nsDeckFrame for <deck> entirely.

Component: XUL → Preferences
Depends on: 1689727
Product: Core → Firefox
Summary: nsDeckFrame::RemoveFrame() can get confused perhaps because selectedIndex is set before the child frames are constructed → Remove unused nsDeckFrame workaround in preferences
Summary: Remove unused nsDeckFrame workaround in preferences → Remove unused workaround for gAppUpdater in preferences
Assignee: nobody → ntim.bugs
Status: NEW → ASSIGNED
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c5d0c46c6bc2
Remove unused workaround for gAppUpdater in preferences. r=preferences-reviewers,Gijs
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.