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

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameSelection.h

Issue 2715913002: Introduce rootEditableElementOrTreeScopeRootNodeOf() as replacement of FrameSelection member (Closed)
Patch Set: 2017-02-24T16:18:33 Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 static inline EUserTriggered selectionOptionsToUserTriggered( 94 static inline EUserTriggered selectionOptionsToUserTriggered(
95 SetSelectionOptions options) { 95 SetSelectionOptions options) {
96 return static_cast<EUserTriggered>(options & UserTriggered); 96 return static_cast<EUserTriggered>(options & UserTriggered);
97 } 97 }
98 98
99 bool isAvailable() const { return lifecycleContext(); } 99 bool isAvailable() const { return lifecycleContext(); }
100 // You should not call |document()| when |!isAvailable()|. 100 // You should not call |document()| when |!isAvailable()|.
101 Document& document() const; 101 Document& document() const;
102 LocalFrame* frame() const { return m_frame; } 102 LocalFrame* frame() const { return m_frame; }
103 Element* rootEditableElementOrDocumentElement() const; 103 Element* rootEditableElementOrDocumentElement() const;
104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const;
105 104
106 // An implementation of |WebFrame::moveCaretSelection()| 105 // An implementation of |WebFrame::moveCaretSelection()|
107 void moveCaretSelection(const IntPoint&); 106 void moveCaretSelection(const IntPoint&);
108 107
109 const VisibleSelection& computeVisibleSelectionInDOMTree() const; 108 const VisibleSelection& computeVisibleSelectionInDOMTree() const;
110 const VisibleSelectionInFlatTree& computeVisibleSelectionInFlatTree() const; 109 const VisibleSelectionInFlatTree& computeVisibleSelectionInFlatTree() const;
111 110
112 // TODO(editing-dev): We should replace 111 // TODO(editing-dev): We should replace
113 // |computeVisibleSelectionInDOMTreeDeprecated()| with update layout and 112 // |computeVisibleSelectionInDOMTreeDeprecated()| with update layout and
114 // |computeVisibleSelectionInDOMTree()| to increase places hoisting update 113 // |computeVisibleSelectionInDOMTree()| to increase places hoisting update
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 323
325 } // namespace blink 324 } // namespace blink
326 325
327 #ifndef NDEBUG 326 #ifndef NDEBUG
328 // Outside the WebCore namespace for ease of invocation from gdb. 327 // Outside the WebCore namespace for ease of invocation from gdb.
329 void showTree(const blink::FrameSelection&); 328 void showTree(const blink::FrameSelection&);
330 void showTree(const blink::FrameSelection*); 329 void showTree(const blink::FrameSelection*);
331 #endif 330 #endif
332 331
333 #endif // FrameSelection_h 332 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.h ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698