Closed Bug 1725291 Opened 3 years ago Closed 3 years ago

Fix or reduce assertion hits of "Given content is not editable" in `WSRunScanner::TextFragmentData::TextFragmentData()`

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

A lot of tests expect some assertion hits of the assertion. But it makes hard to change behavior only in Nightly channel because assertion count may be changed in the other channels.

It tries to delete a text node if it's invisible both selection start and
selection end. However, the selection range may be in a text node. If it's
an invisible, the node is deleted at first call of
DeleteNodeIfInvisibleAndEditableTextNode(), but it keep trying to remove
again with same method.

Depends on D122548

Attachment #9236104 - Attachment is obsolete: true

They clean up the tail of descendant block first. At this time, running script
may change one of or both of the left block element and the right block element.
In such situation, they should stop handling to join the blocks because of
unexpected case.

Depends on D122562

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/d875e0f7413e
part 1: Make `HTMLEditor::AutoDeleteRangesHandler::DeleteUnnecessaryNodesAndCollapseSelection()` try to delete same text node twice r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/103ec049dcf0
part 2: Make `HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal()` guarantee that `WhiteSpaceVisibilityKeeper::NormalizeVisibleWhiteSpacesAt()` is called with editable point r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/5df70b1c4daa
part 3: Make `WhiteSpaceVisibilityKeeper::MergeFirstLineOf(Right|Left)BlockElementIntoDescendant(Left|Right)BlockElement()` abort handling it if joining elements become non-editable r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: