OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 elements.add(tfootTag.localName()); | 602 elements.add(tfootTag.localName()); |
603 elements.add(thTag.localName()); | 603 elements.add(thTag.localName()); |
604 elements.add(theadTag.localName()); | 604 elements.add(theadTag.localName()); |
605 elements.add(trTag.localName()); | 605 elements.add(trTag.localName()); |
606 elements.add(ulTag.localName()); | 606 elements.add(ulTag.localName()); |
607 elements.add(xmpTag.localName()); | 607 elements.add(xmpTag.localName()); |
608 } | 608 } |
609 return elements.contains(name); | 609 return elements.contains(name); |
610 } | 610 } |
611 | 611 |
612 void ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuild
er(InsertedNodes& insertedNodes) | 612 void ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuild
er(const InsertedNodes& insertedNodes) |
613 { | 613 { |
614 RefPtr<Node> pastEndNode = insertedNodes.pastLastLeaf(); | 614 RefPtr<Node> pastEndNode = insertedNodes.pastLastLeaf(); |
615 RefPtr<Node> next; | 615 RefPtr<Node> next; |
616 for (RefPtr<Node> node = insertedNodes.firstNodeInserted(); node && node !=
pastEndNode; node = next) { | 616 for (RefPtr<Node> node = insertedNodes.firstNodeInserted(); node && node !=
pastEndNode; node = next) { |
617 next = NodeTraversal::next(*node); | 617 next = NodeTraversal::next(*node); |
618 | 618 |
619 if (!node->isHTMLElement()) | 619 if (!node->isHTMLElement()) |
620 continue; | 620 continue; |
621 | 621 |
622 if (isProhibitedParagraphChild(toHTMLElement(node)->localName())) { | 622 if (isProhibitedParagraphChild(toHTMLElement(node)->localName())) { |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 removeNodeAndPruneAncestors(nodeAfterInsertionPos.get()); | 1494 removeNodeAndPruneAncestors(nodeAfterInsertionPos.get()); |
1495 | 1495 |
1496 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); | 1496 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); |
1497 | 1497 |
1498 setEndingSelection(selectionAfterReplace); | 1498 setEndingSelection(selectionAfterReplace); |
1499 | 1499 |
1500 return true; | 1500 return true; |
1501 } | 1501 } |
1502 | 1502 |
1503 } // namespace WebCore | 1503 } // namespace WebCore |
OLD | NEW |