Closed Bug 1607575 Opened 5 years ago Closed 5 years ago

Remove all support for and usage of the XUL ordinal attribute

Categories

(Core :: XUL, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

To completely remove the ordinal attribute from XUL, the C++ handling should be removed, and consumers should instead use el.style.MozBoxOrdinalGroup.

Assignee: nobody → ksteuber

During the course of removing the ordinal attribute, I have come across this crash test (added in Bug 430394), which I am unable to make any sense of. I'm fairly confident that setting ordinal to 0.5 should not work as I believe we parse this value as an integer. This may be related to why I cannot get the test to fail, even if I remove the code that it was added to test.

Is this test still useful? If not, does it need to be fixed or just completely removed? If it is still relevant, what should happen to the ordinal attribute once I remove support for it? I could replace the attribute with style="MozBoxOrdinalGroup: 0.5;". I don't think this would have any effect, but I also don't think the existing attribute has any effect. I could also just remove the attribute.

Flags: needinfo?(bob)

Personally I think the test has out lived its usefulness. Whatever conditions it exercised to provoke the crash 11 years ago are probably as non-existent as xul these days. A xul peer might be able to find something useful in the test but failing that, I would just remove it.

Flags: needinfo?(bob)

This removes nsTreeColumns::RestoreNaturalOrder, which requires the ordinal attribute to function. It only has one consumer: toolkit/content/widgets/tree.js. The call is removed from that consumer in this patch. This will break column ordering in MozTree's, which is fixed by a later changeset in this stack.

MozTree's would previously persist column ordering using the XUL persist="ordinal" magic attribute. Now that the ordinal attribute is being removed, it must not rely on this.

The new mechanism implements column order saving/restoring directly in the MozTree implementation. It uses kvstore to store the data in the user profile in a database called MozTree/columnOrdering. This functionality can be enabled on a <tree> element by adding the attribute: saveColumnOrder="true". The implementation relies on the tree and all <treecol>s having IDs.

Depends on D59762

Attachment #9120559 - Attachment description: Bug 1607575 - Change consumers of XUL ordinal attribute to use the MozBoxOrdinalGroup style instead r=bgrins → Bug 1607575 - Change consumers of XUL ordinal attribute to use the -moz-box-ordinal-group style instead r=bgrins
Attachment #9120560 - Attachment description: Bug 1607575 - Restore support for saving/restoring MozTree column ordering r=vporof → Bug 1607575 - Restore support for saving/restoring MozTree column ordering r=bgrins

I'm having some trouble landing this. I believe it is due to Bug 1610583.

Depends on: 1610583
No longer depends on: 1610583
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/5a23d2af7031 Remove support for the XUL ordinal attribute r=bgrins,bz https://hg.mozilla.org/integration/autoland/rev/e2c67219b588 Change consumers of XUL ordinal attribute to use the -moz-box-ordinal-group style instead r=bgrins https://hg.mozilla.org/integration/autoland/rev/ac902c6ec305 Restore support for saving/restoring MozTree column ordering r=bgrins CLOSED TREE
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Regressions: 1612055
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: