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

Unified Diff: third_party/WebKit/Source/core/editing/commands/SimplifyMarkupCommand.cpp

Issue 2397963002: Reflow comments in //third_party/WebKit/Source/core/editing/commands (Closed)
Patch Set: . Created 4 years, 2 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
Index: third_party/WebKit/Source/core/editing/commands/SimplifyMarkupCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/SimplifyMarkupCommand.cpp b/third_party/WebKit/Source/core/editing/commands/SimplifyMarkupCommand.cpp
index ea228b59de8dc46f4d52e7e0f2c39551943faa62..c7fd0fdae8d920a1fdd1f13b6715cb3741993760 100644
--- a/third_party/WebKit/Source/core/editing/commands/SimplifyMarkupCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/SimplifyMarkupCommand.cpp
@@ -44,10 +44,11 @@ void SimplifyMarkupCommand::doApply(EditingState* editingState) {
ContainerNode* rootNode = m_firstNode->parentNode();
HeapVector<Member<ContainerNode>> nodesToRemove;
- // Walk through the inserted nodes, to see if there are elements that could be removed
- // without affecting the style. The goal is to produce leaner markup even when starting
- // from a verbose fragment.
- // We look at inline elements as well as non top level divs that don't have attributes.
+ // Walk through the inserted nodes, to see if there are elements that could be
+ // removed without affecting the style. The goal is to produce leaner markup
+ // even when starting from a verbose fragment.
+ // We look at inline elements as well as non top level divs that don't have
+ // attributes.
for (Node* node = m_firstNode.get(); node && node != m_nodeAfterLast;
node = NodeTraversal::next(*node)) {
if (node->hasChildren() || (node->isTextNode() && node->nextSibling()))
@@ -96,7 +97,8 @@ void SimplifyMarkupCommand::doApply(EditingState* editingState) {
// we perform all the DOM mutations at once.
for (size_t i = 0; i < nodesToRemove.size(); ++i) {
- // FIXME: We can do better by directly moving children from nodesToRemove[i].
+ // FIXME: We can do better by directly moving children from
+ // nodesToRemove[i].
int numPrunedAncestors =
pruneSubsequentAncestorsToRemove(nodesToRemove, i, editingState);
if (editingState->isAborted())

Powered by Google App Engine
This is Rietveld 408576698