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

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

Issue 1288883002: Make SelectionController not to set invalid selection by mouse down (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-13T18:48:09 Created 5 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
« no previous file with comments | « Source/core/editing/SelectionController.cpp ('k') | Source/core/editing/VisibleSelection.cpp » ('j') | 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 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 bool isContentEditable() const; 166 bool isContentEditable() const;
167 bool hasEditableStyle() const; 167 bool hasEditableStyle() const;
168 bool isContentRichlyEditable() const; 168 bool isContentRichlyEditable() const;
169 // Returns a shadow tree node for legacy shadow trees, a child of the 169 // Returns a shadow tree node for legacy shadow trees, a child of the
170 // ShadowRoot node for new shadow trees, or 0 for non-shadow trees. 170 // ShadowRoot node for new shadow trees, or 0 for non-shadow trees.
171 Node* nonBoundaryShadowTreeRootNode() const; 171 Node* nonBoundaryShadowTreeRootNode() const;
172 172
173 VisiblePosition visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const; 173 VisiblePosition visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const;
174 PositionWithAffinity positionRespectingEditingBoundary(const LayoutPoint& lo calPoint, Node* targetNode) const; 174 PositionWithAffinity positionRespectingEditingBoundary(const LayoutPoint& lo calPoint, Node* targetNode) const;
175 175
176 bool isValidFor(const Document&) const;
176 void setWithoutValidation(const Position&, const Position&); 177 void setWithoutValidation(const Position&, const Position&);
177 void setWithoutValidation(const PositionInComposedTree&, const PositionInCom posedTree&); 178 void setWithoutValidation(const PositionInComposedTree&, const PositionInCom posedTree&);
178 179
179 // Listener of VisibleSelection modification. didChangeVisibleSelection() wi ll be invoked when base, extent, start 180 // Listener of VisibleSelection modification. didChangeVisibleSelection() wi ll be invoked when base, extent, start
180 // or end is moved to a different position. 181 // or end is moved to a different position.
181 // 182 //
182 // Objects implementing |ChangeObserver| interface must outlive the VisibleS election object. 183 // Objects implementing |ChangeObserver| interface must outlive the VisibleS election object.
183 class CORE_EXPORT ChangeObserver : public WillBeGarbageCollectedMixin { 184 class CORE_EXPORT ChangeObserver : public WillBeGarbageCollectedMixin {
184 WTF_MAKE_NONCOPYABLE(ChangeObserver); 185 WTF_MAKE_NONCOPYABLE(ChangeObserver);
185 public: 186 public:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 255
255 } // namespace blink 256 } // namespace blink
256 257
257 #ifndef NDEBUG 258 #ifndef NDEBUG
258 // Outside the WebCore namespace for ease of invocation from gdb. 259 // Outside the WebCore namespace for ease of invocation from gdb.
259 void showTree(const blink::VisibleSelection&); 260 void showTree(const blink::VisibleSelection&);
260 void showTree(const blink::VisibleSelection*); 261 void showTree(const blink::VisibleSelection*);
261 #endif 262 #endif
262 263
263 #endif // VisibleSelection_h 264 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « Source/core/editing/SelectionController.cpp ('k') | Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698