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

Side by Side Diff: sky/engine/core/editing/DeleteSelectionCommand.cpp

Issue 696413002: Remove HTMLLinkElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 CompositeEditCommand::deleteTextFromNode(node, offset, count); 328 CompositeEditCommand::deleteTextFromNode(node, offset, count);
329 } 329 }
330 330
331 void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr eventStyleLoss() 331 void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr eventStyleLoss()
332 { 332 {
333 RefPtr<Range> range = m_selectionToDelete.toNormalizedRange(); 333 RefPtr<Range> range = m_selectionToDelete.toNormalizedRange();
334 RefPtr<Node> node = range->firstNode(); 334 RefPtr<Node> node = range->firstNode();
335 while (node && node != range->pastLastNode()) { 335 while (node && node != range->pastLastNode()) {
336 RefPtr<Node> nextNode = NodeTraversal::next(*node); 336 RefPtr<Node> nextNode = NodeTraversal::next(*node);
337 if (isHTMLStyleElement(*node) || isHTMLLinkElement(*node)) { 337 if (isHTMLStyleElement(*node)) {
338 nextNode = NodeTraversal::nextSkippingChildren(*node); 338 nextNode = NodeTraversal::nextSkippingChildren(*node);
339 RefPtr<Element> rootEditableElement = node->rootEditableElement(); 339 RefPtr<Element> rootEditableElement = node->rootEditableElement();
340 if (rootEditableElement.get()) { 340 if (rootEditableElement.get()) {
341 removeNode(node); 341 removeNode(node);
342 appendNode(node, rootEditableElement); 342 appendNode(node, rootEditableElement);
343 } 343 }
344 } 344 }
345 node = nextNode; 345 node = nextNode;
346 } 346 }
347 } 347 }
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 visitor->trace(m_startBlock); 686 visitor->trace(m_startBlock);
687 visitor->trace(m_endBlock); 687 visitor->trace(m_endBlock);
688 visitor->trace(m_deleteIntoBlockquoteStyle); 688 visitor->trace(m_deleteIntoBlockquoteStyle);
689 visitor->trace(m_startRoot); 689 visitor->trace(m_startRoot);
690 visitor->trace(m_endRoot); 690 visitor->trace(m_endRoot);
691 visitor->trace(m_temporaryPlaceholder); 691 visitor->trace(m_temporaryPlaceholder);
692 CompositeEditCommand::trace(visitor); 692 CompositeEditCommand::trace(visitor);
693 } 693 }
694 694
695 } // namespace blink 695 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/TreeScopeStyleSheetCollection.cpp ('k') | sky/engine/core/html/HTMLImportElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698