CompareTreePosition uses flat tree order for DOM operations, which seems unexpected.
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox122 | --- | wontfix |
firefox123 | --- | wontfix |
firefox124 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
So bug 1837540 introduced nsContentUtils::CompareTreePosition
which reuses nsLayoutUtils::CompareTreePosition
. However I don't think these should do the same.
nsLayoutUtils::CompareTreePosition
uses the flat tree, mostly because it needs to for quotes and counters.
However it's weird that nsContentUtils::CompareTreePosition
does that. It doesn't match the semantics of nsContentUtils::PositionIsBefore
, and it seems likely that it's causing subtle correctness issues in presence of shadow DOM.
Assignee | ||
Comment 1•1 year ago
|
||
Maybe we should have a single CompareTreePosition
that takes a template parameter or something enum class TreeKind { Light, Flat }
or so.
Comment 2•1 year ago
|
||
Yeah, I think we should be always clear on what kind of tree we're considering.
When nsContentUtils::CompareTreePosition was created it just moved some existing nsLayoutUtils::CompareTreePosition usage inside it.
Comment 3•1 year ago
|
||
Set release status flags based on info from the regressing bug 1837540
:avandolder, since you are the author of the regressor, bug 1837540, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Assignee | ||
Comment 4•1 year ago
|
||
It should be easy to construct a test-case that causes incorrect behavior (pre-existing) with something like:
<form>
<some-component-with-two-slots>
<input slot="second-slot">
<input slot="first-slot">
</some-component-with-two-slots>
</form>
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
Err, wrong field, similar bug # :)
Assignee | ||
Comment 6•1 year ago
|
||
Make TreeOrderedArray support what the form controls stuff needs, and
use it instead of custom nsContentUtils stuff.
Assignee | ||
Comment 7•1 year ago
|
||
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Backed out changeset 1acc95286189 (Bug 1879579) for causing mass failures CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=446920333&repo=autoland&lineNumber=2502
https://treeherder.mozilla.org/logviewer?job_id=446920213&repo=autoland&lineNumber=7864
https://treeherder.mozilla.org/logviewer?job_id=446920191&repo=autoland&lineNumber=14127
https://treeherder.mozilla.org/logviewer?job_id=446920184&repo=autoland&lineNumber=5585
https://treeherder.mozilla.org/logviewer?job_id=446920535&repo=autoland&lineNumber=10268
and many more
Backout: https://hg.mozilla.org/integration/autoland/rev/36e8bac7c6f3c93cfbe1b2a209663b8e293bed9a
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Assignee | ||
Updated•1 year ago
|
Comment 13•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Description
•