`RangeBoundaryBase::AsRangeBoundaryInFlatTree` needs to use proper parent node for the pointing child
Categories
(Core :: DOM: Selection, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
Currently, RangeBoundaryBase::AsRangeBoundaryInFlatTree() use the parent node as-is and the offset. However, the pointing child may be moved into a <slot> in the flat tree. Therefore, it should compute parent node from pointing child.
| Assignee | ||
Comment 1•8 months ago
|
||
Currently, the method may return unset boundary. However, we need to
map a DOM tree point to a flat tree point.
The wrong point of current implementation is, the method respect the
container and offset. However, that may be wrong if the pointing child
node is moved into a <slot> or a ShadowRoot. Instead, this patch
computes proper parent from pointing child node if there is.
(I think there should be nsINode::ComputeFlatTreeIndexOfForSelection
or something, but I'd like to put off doing that later because it'd
affect to wider scope of our code.)
Backed out for causing wpt failures @setBaseAndExtent-start-or-end-in-anonymous-shadow-container.html.
| Assignee | ||
Comment 5•7 months ago
|
||
It's odd, that was not reproduced on Linux before landing... Although the crash itself looks like a possible case and explicitly a bug of GetPromotedEndPoint().
Now, I'm waiting the test result on tryserver.
https://treeherder.mozilla.org/jobs?repo=try&revision=3a4f57bba5aa759979f51dbf9a5d1506e6697d5c
| Comment hidden (obsolete) |
| Assignee | ||
Comment 7•7 months ago
|
||
Ah, I misunderstand about the shadow DOM construction, but I still don't understand why the result becomes different if I run the path even on Windows. Anyway, the assertion failure cases on macOS are caused by 2 trivial bugs of the patch.
Comment 9•7 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 10•7 months ago
|
||
FYI: I guess the fuzzing team will file some assertion failures related to this series of patches. Especially related to nsContentUtils::ComparePoints. However, I won't work on them immediately because now I'm writing patches to fix the known issues of the flattened tree handling.
Updated•6 months ago
|
Description
•