OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return selectionRoot ? selectionRoot : m_frame->document()->documentElement(
); | 107 return selectionRoot ? selectionRoot : m_frame->document()->documentElement(
); |
108 } | 108 } |
109 | 109 |
110 Node* FrameSelection::rootEditableElementOrTreeScopeRootNode() const | 110 Node* FrameSelection::rootEditableElementOrTreeScopeRootNode() const |
111 { | 111 { |
112 Element* selectionRoot = m_selection.rootEditableElement(); | 112 Element* selectionRoot = m_selection.rootEditableElement(); |
113 if (selectionRoot) | 113 if (selectionRoot) |
114 return selectionRoot; | 114 return selectionRoot; |
115 | 115 |
116 Node* node = m_selection.base().containerNode(); | 116 Node* node = m_selection.base().containerNode(); |
117 return node ? node->treeScope().rootNode() : 0; | 117 return node ? node->treeScope()->rootNode() : 0; |
118 } | 118 } |
119 | 119 |
120 Element* FrameSelection::rootEditableElementRespectingShadowTree() const | 120 Element* FrameSelection::rootEditableElementRespectingShadowTree() const |
121 { | 121 { |
122 Element* selectionRoot = m_selection.rootEditableElement(); | 122 Element* selectionRoot = m_selection.rootEditableElement(); |
123 if (selectionRoot && selectionRoot->isInShadowTree()) | 123 if (selectionRoot && selectionRoot->isInShadowTree()) |
124 selectionRoot = selectionRoot->shadowHost(); | 124 selectionRoot = selectionRoot->shadowHost(); |
125 return selectionRoot; | 125 return selectionRoot; |
126 } | 126 } |
127 | 127 |
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 sel.showTreeForThis(); | 1958 sel.showTreeForThis(); |
1959 } | 1959 } |
1960 | 1960 |
1961 void showTree(const WebCore::FrameSelection* sel) | 1961 void showTree(const WebCore::FrameSelection* sel) |
1962 { | 1962 { |
1963 if (sel) | 1963 if (sel) |
1964 sel->showTreeForThis(); | 1964 sel->showTreeForThis(); |
1965 } | 1965 } |
1966 | 1966 |
1967 #endif | 1967 #endif |
OLD | NEW |