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

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

Issue 2695193002: Selection API: setBaseAndExtent() and selectAllChildren() should create new Range based on the spec… (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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Microsoft Selection Object API 101 // Microsoft Selection Object API
102 void empty(); 102 void empty();
103 103
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 method 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 114
114 Node* shadowAdjustedNode(const Position&) const; 115 Node* shadowAdjustedNode(const Position&) const;
115 int shadowAdjustedOffset(const Position&) const; 116 int shadowAdjustedOffset(const Position&) const;
116 117
117 bool isValidForPosition(Node*) const; 118 bool isValidForPosition(Node*) const;
118 119
119 void addConsoleError(const String& message); 120 void addConsoleError(const String& message);
120 Range* primaryRangeOrNull() const; 121 Range* primaryRangeOrNull() const;
121 Range* createRangeFromSelectionEditor() const; 122 Range* createRangeFromSelectionEditor() const;
122 123
123 bool isSelectionOfDocument() const; 124 bool isSelectionOfDocument() const;
124 void cacheRangeIfSelectionOfDocument(Range*) const; 125 void cacheRangeIfSelectionOfDocument(Range*) const;
125 Range* documentCachedRange() const; 126 Range* documentCachedRange() const;
126 void clearCachedRangeIfSelectionOfDocument(); 127 void clearCachedRangeIfSelectionOfDocument();
127 128
128 Member<const TreeScope> m_treeScope; 129 Member<const TreeScope> m_treeScope;
129 }; 130 };
130 131
131 } // namespace blink 132 } // namespace blink
132 133
133 #endif // DOMSelection_h 134 #endif // DOMSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698