Closed Bug 1727868 Opened 3 years ago Closed 3 years ago

`HTMLEditUtils::IsVisibleBRElement()` shouldn't use `WSRunScanner`

Categories

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

defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

WSRunScanner is designed for handling editable contents. However, HTMLEditUtils::IsVisibleBRElement() needs to check it even if the <br> element is in non-editable element. Therefore, we may hit the assertion.

The method may be used for checking a <br> element visibility in non-editable
content too. Therefore, using WSRunScanner which is designed for scanning
editable content hits assertions.

The visibility of <br> element is considered only with the following
visible thing. If it's followed only by another or current block boundary,
the <br> element is invisible. But otherwise, it's visible. So, it needs
to scan following contents to look for first visible thing until reaching
a block boundary. And it does not need to check its previous content.

Depends on D123875

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/0c79c667c59a Make `HTMLEditUtils::IsVisibleBRElement()` stop using `WSRunScanner` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Regressions: 1738134
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: