forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1539110 - Make HTMLEditor::RemoveStyleInside() and HTMLEditor::Sp…
…litStyleAbovePoint() check tag names with whitelist r=m_kato `document.execCommand("removeformat")` removes any elements in the range which are editable, not `<a>`, not block and a container. https://searchfox.org/mozilla-central/rev/dd7e27f4a805e4115d0dbee70e1220b23b23c567/editor/libeditor/HTMLStyleEditor.cpp#760-763 This means that it removes hidden elements like `<script>` and `<style>`, or non-HTML elements like SVG elements. However, the unofficial document of `execCommand()` lists up elements which should be handled by the command. https://w3c.github.io/editing/execCommand.html#removeformat-candidate Additionally, Chrome respects this list since not including `<del>` element into the list does not make sense but Chrome ignores it. So, we should respect the list. Differential Revision: https://phabricator.services.mozilla.com/D27018 --HG-- extra : moz-landing-system : lando
- Loading branch information
1 parent
3c9d0f0
commit 349901d
Showing
6 changed files
with
81 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters