Closed Bug 1490464 Opened 2 years ago Closed 2 years ago

XUL attribute persistence is broken in browser.xhtml

Categories

(Firefox :: General, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: bdahl, Assigned: bdahl)

References

Details

Attachments

(1 file)

XUL attribute persistence is handled by the XUL document, so when we move to HTML the same behavior does not exist.

Example test that is broken:
browser/base/content/test/performance/browser_window_resize.js
Assignee: nobody → bdahl
Priority: -- → P3
Status: NEW → ASSIGNED
Previously, XUL attribute persistence was mainly handled by the XUL
document which doesn't work for browser.xhtml. Move the attribute watching
and persisting code to the XUL element and move the loading and setting
of the persisted attributes into XULStore, so they can be used by XUL and
HTML.

How the stored values are applied on document load is handled
slightly differently in XUL and HTML. In a XUL document, the attributes
are automatically applied after parse. In an HTML document we don't want
to have this behavior by default, so applyPersistentAttributes must be
called explicitly if the page wants to use this feature. This also gives
the page finer control over when to apply the persisted attributes.
Comment on attachment 9011856 [details]
Bug 1490464 - Fix XUL attribute persistence for browser.xhtml. r=smaug

Olli Pettay [:smaug] (r- if the bug doesn't explain what the change(s) are about.) has approved the revision.
Attachment #9011856 - Flags: review+
Comment on attachment 9011856 [details]
Bug 1490464 - Fix XUL attribute persistence for browser.xhtml. r=smaug

Olli Pettay [:smaug] (r- if the bug doesn't explain what the change(s) are about.) has requested changes to the revision.
Attachment #9011856 - Flags: review+
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4350340785e4
Fix XUL attribute persistence for browser.xhtml. r=smaug
https://hg.mozilla.org/mozilla-central/rev/4350340785e4
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.