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

Side by Side Diff: Source/core/editing/DeleteSelectionCommand.cpp

Issue 433663002: Remove the last remnant of <style scoped> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/HTMLAttributeNames.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 CompositeEditCommand::deleteTextFromNode(node, offset, count); 424 CompositeEditCommand::deleteTextFromNode(node, offset, count);
425 } 425 }
426 426
427 void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr eventStyleLoss() 427 void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr eventStyleLoss()
428 { 428 {
429 RefPtrWillBeRawPtr<Range> range = m_selectionToDelete.toNormalizedRange(); 429 RefPtrWillBeRawPtr<Range> range = m_selectionToDelete.toNormalizedRange();
430 RefPtrWillBeRawPtr<Node> node = range->firstNode(); 430 RefPtrWillBeRawPtr<Node> node = range->firstNode();
431 while (node && node != range->pastLastNode()) { 431 while (node && node != range->pastLastNode()) {
432 RefPtrWillBeRawPtr<Node> nextNode = NodeTraversal::next(*node); 432 RefPtrWillBeRawPtr<Node> nextNode = NodeTraversal::next(*node);
433 if ((isHTMLStyleElement(*node) && !toHTMLStyleElement(node)->hasAttribut e(scopedAttr)) 433 if (isHTMLStyleElement(*node) || isHTMLLinkElement(*node)) {
434 || isHTMLLinkElement(*node)) {
435 nextNode = NodeTraversal::nextSkippingChildren(*node); 434 nextNode = NodeTraversal::nextSkippingChildren(*node);
436 RefPtrWillBeRawPtr<Element> rootEditableElement = node->rootEditable Element(); 435 RefPtrWillBeRawPtr<Element> rootEditableElement = node->rootEditable Element();
437 if (rootEditableElement.get()) { 436 if (rootEditableElement.get()) {
438 removeNode(node); 437 removeNode(node);
439 appendNode(node, rootEditableElement); 438 appendNode(node, rootEditableElement);
440 } 439 }
441 } 440 }
442 node = nextNode; 441 node = nextNode;
443 } 442 }
444 } 443 }
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 visitor->trace(m_deleteIntoBlockquoteStyle); 888 visitor->trace(m_deleteIntoBlockquoteStyle);
890 visitor->trace(m_startRoot); 889 visitor->trace(m_startRoot);
891 visitor->trace(m_endRoot); 890 visitor->trace(m_endRoot);
892 visitor->trace(m_startTableRow); 891 visitor->trace(m_startTableRow);
893 visitor->trace(m_endTableRow); 892 visitor->trace(m_endTableRow);
894 visitor->trace(m_temporaryPlaceholder); 893 visitor->trace(m_temporaryPlaceholder);
895 CompositeEditCommand::trace(visitor); 894 CompositeEditCommand::trace(visitor);
896 } 895 }
897 896
898 } // namespace blink 897 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLAttributeNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698