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

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

Issue 2278463002: Get rid of FrameSelection::moveTo() taking two VisiblePosition objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-24T17:07:58 Created 4 years, 4 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 reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 LocalFrame* frame() const { return m_frame; } 101 LocalFrame* frame() const { return m_frame; }
102 Element* rootEditableElement() const { return selection().rootEditableElemen t(); } 102 Element* rootEditableElement() const { return selection().rootEditableElemen t(); }
103 Element* rootEditableElementOrDocumentElement() const; 103 Element* rootEditableElementOrDocumentElement() const;
104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; 104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const;
105 105
106 bool hasEditableStyle() const { return selection().hasEditableStyle(); } 106 bool hasEditableStyle() const { return selection().hasEditableStyle(); }
107 bool isContentEditable() const { return selection().isContentEditable(); } 107 bool isContentEditable() const { return selection().isContentEditable(); }
108 bool isContentRichlyEditable() const { return selection().isContentRichlyEdi table(); } 108 bool isContentRichlyEditable() const { return selection().isContentRichlyEdi table(); }
109 109
110 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso rAlignOnScroll = CursorAlignOnScroll::IfNeeded); 110 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso rAlignOnScroll = CursorAlignOnScroll::IfNeeded);
111 void moveTo(const VisiblePosition&, const VisiblePosition&, EUserTriggered = NotUserTriggered);
112 void moveTo(const Position&, TextAffinity); 111 void moveTo(const Position&, TextAffinity);
113 112
114 template <typename Strategy> 113 template <typename Strategy>
115 const VisibleSelectionTemplate<Strategy>& visibleSelection() const; 114 const VisibleSelectionTemplate<Strategy>& visibleSelection() const;
116 115
117 const VisibleSelection& selection() const; 116 const VisibleSelection& selection() const;
118 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded, TextGr anularity = CharacterGranularity); 117 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded, TextGr anularity = CharacterGranularity);
119 void setSelection(const VisibleSelectionInFlatTree&, SetSelectionOptions = C loseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeed ed, TextGranularity = CharacterGranularity); 118 void setSelection(const VisibleSelectionInFlatTree&, SetSelectionOptions = C loseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeed ed, TextGranularity = CharacterGranularity);
120 // TODO(yosin) We should get rid of two parameters version of 119 // TODO(yosin) We should get rid of two parameters version of
121 // |setSelection()| to avoid conflict of four parameters version. 120 // |setSelection()| to avoid conflict of four parameters version.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 319 }
321 } // namespace blink 320 } // namespace blink
322 321
323 #ifndef NDEBUG 322 #ifndef NDEBUG
324 // Outside the WebCore namespace for ease of invocation from gdb. 323 // Outside the WebCore namespace for ease of invocation from gdb.
325 void showTree(const blink::FrameSelection&); 324 void showTree(const blink::FrameSelection&);
326 void showTree(const blink::FrameSelection*); 325 void showTree(const blink::FrameSelection*);
327 #endif 326 #endif
328 327
329 #endif // FrameSelection_h 328 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698