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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 return createVisiblePosition(m_startOfInsertedContent); | 778 return createVisiblePosition(m_startOfInsertedContent); |
779 } | 779 } |
780 | 780 |
781 static void removeHeadContents(ReplacementFragment& fragment) | 781 static void removeHeadContents(ReplacementFragment& fragment) |
782 { | 782 { |
783 Node* next = nullptr; | 783 Node* next = nullptr; |
784 for (Node* node = fragment.firstChild(); node; node = next) { | 784 for (Node* node = fragment.firstChild(); node; node = next) { |
785 if (isHTMLBaseElement(*node) | 785 if (isHTMLBaseElement(*node) |
786 || isHTMLLinkElement(*node) | 786 || isHTMLLinkElement(*node) |
787 || isHTMLMetaElement(*node) | 787 || isHTMLMetaElement(*node) |
788 || isHTMLStyleElement(*node) | |
789 || isHTMLTitleElement(*node)) { | 788 || isHTMLTitleElement(*node)) { |
790 next = NodeTraversal::nextSkippingChildren(*node); | 789 next = NodeTraversal::nextSkippingChildren(*node); |
791 fragment.removeNode(node); | 790 fragment.removeNode(node); |
792 } else { | 791 } else { |
793 next = NodeTraversal::next(*node); | 792 next = NodeTraversal::next(*node); |
794 } | 793 } |
795 } | 794 } |
796 } | 795 } |
797 | 796 |
798 static bool followBlockElementStyle(const Node* node) | 797 static bool followBlockElementStyle(const Node* node) |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 visitor->trace(m_startOfInsertedContent); | 1756 visitor->trace(m_startOfInsertedContent); |
1758 visitor->trace(m_endOfInsertedContent); | 1757 visitor->trace(m_endOfInsertedContent); |
1759 visitor->trace(m_insertionStyle); | 1758 visitor->trace(m_insertionStyle); |
1760 visitor->trace(m_documentFragment); | 1759 visitor->trace(m_documentFragment); |
1761 visitor->trace(m_startOfInsertedRange); | 1760 visitor->trace(m_startOfInsertedRange); |
1762 visitor->trace(m_endOfInsertedRange); | 1761 visitor->trace(m_endOfInsertedRange); |
1763 CompositeEditCommand::trace(visitor); | 1762 CompositeEditCommand::trace(visitor); |
1764 } | 1763 } |
1765 | 1764 |
1766 } // namespace blink | 1765 } // namespace blink |
OLD | NEW |