Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: sky/engine/core/editing/DeleteSelectionCommand.cpp

Issue 1215103007: Remove remaining HTML elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/dom/shadow/InsertionPoint.cpp ('k') | sky/engine/core/editing/Editor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/DeleteSelectionCommand.cpp
diff --git a/sky/engine/core/editing/DeleteSelectionCommand.cpp b/sky/engine/core/editing/DeleteSelectionCommand.cpp
index 27c7ba626072da9b968b6d060dac23882c4ca046..53300f12d0699d3a116087320e8d52e6714b23dc 100644
--- a/sky/engine/core/editing/DeleteSelectionCommand.cpp
+++ b/sky/engine/core/editing/DeleteSelectionCommand.cpp
@@ -34,7 +34,6 @@
#include "sky/engine/core/editing/VisibleUnits.h"
#include "sky/engine/core/editing/htmlediting.h"
#include "sky/engine/core/frame/LocalFrame.h"
-#include "sky/engine/core/html/HTMLStyleElement.h"
#include "sky/engine/core/rendering/RenderText.h"
namespace blink {
@@ -329,20 +328,6 @@ void DeleteSelectionCommand::deleteTextFromNode(PassRefPtr<Text> node, unsigned
void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss()
{
- RefPtr<Range> range = m_selectionToDelete.toNormalizedRange();
- RefPtr<Node> node = range->firstNode();
- while (node && node != range->pastLastNode()) {
- RefPtr<Node> nextNode = NodeTraversal::next(*node);
- if (isHTMLStyleElement(*node)) {
- nextNode = NodeTraversal::nextSkippingChildren(*node);
- RefPtr<Element> rootEditableElement = node->rootEditableElement();
- if (rootEditableElement.get()) {
- removeNode(node);
- appendNode(node, rootEditableElement);
- }
- }
- node = nextNode;
- }
}
void DeleteSelectionCommand::handleGeneralDelete()
« no previous file with comments | « sky/engine/core/dom/shadow/InsertionPoint.cpp ('k') | sky/engine/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698