OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 Element* VisibleSelection::rootEditableElement() const | 1040 Element* VisibleSelection::rootEditableElement() const |
1041 { | 1041 { |
1042 return editableRootForPosition(start()); | 1042 return editableRootForPosition(start()); |
1043 } | 1043 } |
1044 | 1044 |
1045 Node* VisibleSelection::nonBoundaryShadowTreeRootNode() const | 1045 Node* VisibleSelection::nonBoundaryShadowTreeRootNode() const |
1046 { | 1046 { |
1047 return start().anchorNode() && !start().anchorNode()->isShadowRoot() ? start
().anchorNode()->nonBoundaryShadowTreeRootNode() : 0; | 1047 return start().anchorNode() && !start().anchorNode()->isShadowRoot() ? start
().anchorNode()->nonBoundaryShadowTreeRootNode() : 0; |
1048 } | 1048 } |
1049 | 1049 |
1050 VisibleSelection::ChangeObserver::ChangeObserver() | 1050 VisibleSelectionChangeObserver::VisibleSelectionChangeObserver() |
1051 { | 1051 { |
1052 } | 1052 } |
1053 | 1053 |
1054 VisibleSelection::ChangeObserver::~ChangeObserver() | 1054 VisibleSelectionChangeObserver::~VisibleSelectionChangeObserver() |
1055 { | 1055 { |
1056 } | 1056 } |
1057 | 1057 |
1058 void VisibleSelection::setChangeObserver(ChangeObserver& observer) | 1058 void VisibleSelection::setChangeObserver(VisibleSelectionChangeObserver& observe
r) |
1059 { | 1059 { |
1060 ASSERT(!m_changeObserver); | 1060 ASSERT(!m_changeObserver); |
1061 m_changeObserver = &observer; | 1061 m_changeObserver = &observer; |
1062 } | 1062 } |
1063 | 1063 |
1064 void VisibleSelection::clearChangeObserver() | 1064 void VisibleSelection::clearChangeObserver() |
1065 { | 1065 { |
1066 ASSERT(m_changeObserver); | 1066 ASSERT(m_changeObserver); |
1067 m_changeObserver = nullptr; | 1067 m_changeObserver = nullptr; |
1068 } | 1068 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 sel.showTreeForThis(); | 1220 sel.showTreeForThis(); |
1221 } | 1221 } |
1222 | 1222 |
1223 void showTree(const blink::VisibleSelection* sel) | 1223 void showTree(const blink::VisibleSelection* sel) |
1224 { | 1224 { |
1225 if (sel) | 1225 if (sel) |
1226 sel->showTreeForThis(); | 1226 sel->showTreeForThis(); |
1227 } | 1227 } |
1228 | 1228 |
1229 #endif | 1229 #endif |
OLD | NEW |