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

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

Issue 2704443002: Selection API: extend() should operate DOM Ranges. (Closed)
Patch Set: rebase Created 3 years, 10 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 DECLARE_VIRTUAL_TRACE(); 104 DECLARE_VIRTUAL_TRACE();
105 105
106 private: 106 private:
107 explicit DOMSelection(const TreeScope*); 107 explicit DOMSelection(const TreeScope*);
108 108
109 bool isAvailable() const; 109 bool isAvailable() const;
110 110
111 // Convenience methods for accessors, does not check m_frame present. 111 // Convenience methods for accessors, does not check m_frame present.
112 const VisibleSelection& visibleSelection() const; 112 const VisibleSelection& visibleSelection() const;
113 bool isBaseFirstInSelection() const; 113 bool isBaseFirstInSelection() const;
114 const Position& anchorPosition() const;
114 115
115 Node* shadowAdjustedNode(const Position&) const; 116 Node* shadowAdjustedNode(const Position&) const;
116 int shadowAdjustedOffset(const Position&) const; 117 int shadowAdjustedOffset(const Position&) const;
117 118
118 bool isValidForPosition(Node*) const; 119 bool isValidForPosition(Node*) const;
119 120
120 void addConsoleError(const String& message); 121 void addConsoleError(const String& message);
121 Range* primaryRangeOrNull() const; 122 Range* primaryRangeOrNull() const;
122 Range* createRangeFromSelectionEditor() const; 123 Range* createRangeFromSelectionEditor() const;
123 124
124 bool isSelectionOfDocument() const; 125 bool isSelectionOfDocument() const;
125 void cacheRangeIfSelectionOfDocument(Range*) const; 126 void cacheRangeIfSelectionOfDocument(Range*) const;
126 Range* documentCachedRange() const; 127 Range* documentCachedRange() const;
127 void clearCachedRangeIfSelectionOfDocument(); 128 void clearCachedRangeIfSelectionOfDocument();
128 129
129 Member<const TreeScope> m_treeScope; 130 Member<const TreeScope> m_treeScope;
130 }; 131 };
131 132
132 } // namespace blink 133 } // namespace blink
133 134
134 #endif // DOMSelection_h 135 #endif // DOMSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698