Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Side by Side Diff: Source/core/editing/VisibleSelection.cpp

Issue 1309413006: Move VisibleSelection::ChangeObserver out from VisibleSelection class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-04T15:50:42 Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/editing/VisibleSelection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/VisibleSelection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698