Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
HTMLEditor::ClearStyleAt
stop forgetting removed line break
It does tricky if the styled element contains a padding line break. First, it splits the inline containers at the point. E.g., if the DOM is `<b>abc []<br></b>`, it's split as `<b>abc </b><b><br></b>`. Next, it deletes the latter one if it has only a padding line break. Then, previously, it didn't forget the disconnected `<br>`, but D231655 made it forget [1]. However, the method needs to insert a padding line break temporarily, i.e., It needs to make it as `<b>abc </b><br>`, because `WhiteSpaceVisibilityKeeper` will treat the collapsible white-space as an invisible trailing white-space of the block. Therefore, it does it only when it removes a padding line break [2]. Therefore, this patch makes it forget the deleted padding line break. 1. https://searchfox.org/mozilla-central/rev/94c62970ba2f9c40efd5a4f83a538595425820d9/editor/libeditor/HTMLStyleEditor.cpp#2465-2467 2. https://searchfox.org/mozilla-central/rev/94c62970ba2f9c40efd5a4f83a538595425820d9/editor/libeditor/HTMLStyleEditor.cpp#2499-2502,2512-2514 Differential Revision: https://phabricator.services.mozilla.com/D233232 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1940014 gecko-commit: dd8b1488a379ee395592f636d084cf81117f3b4c gecko-reviewers: m_kato
- Loading branch information