Bug 1940377 - part 4: Make HTMLEditor normalize white-spaces before inserting HTML fragment if the new normalizer is enabled r=m_kato
Unfortunately, this change does not make `white-spaces-after-insert-image.tentative.html?paste-image` pass because we paste the `<div>` at pasting the `<img>`, but Chrome pastes only the `<img>`. Differential Revision: https://phabricator.services.mozilla.com/D239466
This commit is contained in:
@@ -561,11 +561,10 @@ nsresult HTMLEditor::OnEndHandlingTopLevelEditSubActionInternal() {
|
||||
case EditSubAction::eInsertTextComingFromIME:
|
||||
case EditSubAction::eInsertLineBreak:
|
||||
case EditSubAction::eInsertParagraphSeparator:
|
||||
return !StaticPrefs::
|
||||
editor_white_space_normalization_blink_compatible();
|
||||
case EditSubAction::ePasteHTMLContent:
|
||||
case EditSubAction::eInsertHTMLSource:
|
||||
return true;
|
||||
return !StaticPrefs::
|
||||
editor_white_space_normalization_blink_compatible();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user