| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/page/DOMSelection.h" | 32 #include "core/page/DOMSelection.h" |
| 33 | 33 |
| 34 #include "Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "ExceptionCode.h" | 35 #include "core/dom/ExceptionCode.h" |
| 36 #include "Node.h" | 36 #include "core/dom/Node.h" |
| 37 #include "Range.h" | 37 #include "core/dom/Range.h" |
| 38 #include "TreeScope.h" | 38 #include "core/dom/TreeScope.h" |
| 39 #include "core/editing/FrameSelection.h" | 39 #include "core/editing/FrameSelection.h" |
| 40 #include "core/editing/TextIterator.h" | 40 #include "core/editing/TextIterator.h" |
| 41 #include "core/editing/htmlediting.h" | 41 #include "core/editing/htmlediting.h" |
| 42 #include "core/page/Frame.h" | 42 #include "core/page/Frame.h" |
| 43 #include <wtf/text/WTFString.h> | 43 #include <wtf/text/WTFString.h> |
| 44 | 44 |
| 45 namespace WebCore { | 45 namespace WebCore { |
| 46 | 46 |
| 47 static Node* selectionShadowAncestor(Frame* frame) | 47 static Node* selectionShadowAncestor(Frame* frame) |
| 48 { | 48 { |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 529 |
| 530 bool DOMSelection::isValidForPosition(Node* node) const | 530 bool DOMSelection::isValidForPosition(Node* node) const |
| 531 { | 531 { |
| 532 ASSERT(m_frame); | 532 ASSERT(m_frame); |
| 533 if (!node) | 533 if (!node) |
| 534 return true; | 534 return true; |
| 535 return node->document() == m_frame->document(); | 535 return node->document() == m_frame->document(); |
| 536 } | 536 } |
| 537 | 537 |
| 538 } // namespace WebCore | 538 } // namespace WebCore |
| OLD | NEW |