OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) | 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) |
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) | 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) |
5 * (C) 2001 Peter Kelly (pmk@post.com) | 5 * (C) 2001 Peter Kelly (pmk@post.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 ASSERT_NOT_REACHED(); | 663 ASSERT_NOT_REACHED(); |
664 return 0; | 664 return 0; |
665 } | 665 } |
666 | 666 |
667 PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
State& es) | 667 PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
State& es) |
668 { | 668 { |
669 typedef Vector<RefPtr<Node> > NodeVector; | 669 typedef Vector<RefPtr<Node> > NodeVector; |
670 | 670 |
671 RefPtr<DocumentFragment> fragment; | 671 RefPtr<DocumentFragment> fragment; |
672 if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) | 672 if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) |
673 fragment = DocumentFragment::create(m_ownerDocument.get()); | 673 fragment = DocumentFragment::create(*m_ownerDocument.get()); |
674 | 674 |
675 if (collapsed(es)) | 675 if (collapsed(es)) |
676 return fragment.release(); | 676 return fragment.release(); |
677 if (es.hadException()) | 677 if (es.hadException()) |
678 return 0; | 678 return 0; |
679 | 679 |
680 RefPtr<Node> commonRoot = commonAncestorContainer(es); | 680 RefPtr<Node> commonRoot = commonAncestorContainer(es); |
681 if (es.hadException()) | 681 if (es.hadException()) |
682 return 0; | 682 return 0; |
683 ASSERT(commonRoot); | 683 ASSERT(commonRoot); |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 | 1899 |
1900 void showTree(const WebCore::Range* range) | 1900 void showTree(const WebCore::Range* range) |
1901 { | 1901 { |
1902 if (range && range->boundaryPointsValid()) { | 1902 if (range && range->boundaryPointsValid()) { |
1903 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r
ange->endContainer(), "E"); | 1903 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r
ange->endContainer(), "E"); |
1904 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset
(), range->endOffset()); | 1904 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset
(), range->endOffset()); |
1905 } | 1905 } |
1906 } | 1906 } |
1907 | 1907 |
1908 #endif | 1908 #endif |
OLD | NEW |