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

Side by Side Diff: public/web/WebWidget.h

Issue 177903010: Expose the selection root bounds in WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« Source/web/WebViewImpl.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // returns false on failure. 187 // returns false on failure.
188 virtual bool compositionRange(size_t* location, size_t* length) { return fal se; } 188 virtual bool compositionRange(size_t* location, size_t* length) { return fal se; }
189 189
190 // Returns information about the current text input of this WebWidget. 190 // Returns information about the current text input of this WebWidget.
191 virtual WebTextInputInfo textInputInfo() { return WebTextInputInfo(); } 191 virtual WebTextInputInfo textInputInfo() { return WebTextInputInfo(); }
192 192
193 // Returns the anchor and focus bounds of the current selection. 193 // Returns the anchor and focus bounds of the current selection.
194 // If the selection range is empty, it returns the caret bounds. 194 // If the selection range is empty, it returns the caret bounds.
195 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { return false; } 195 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { return false; }
196 196
197 // Compute the bounds of the root element of the current selection and fills
198 // the out-parameter on success. |bounds| coordinate will be relative to the
timvolodine 2014/03/05 19:41:02 coordinate -> coordinates
mlamouri (slow - plz ping) 2014/03/06 13:45:31 Done.
199 // contents window and will take into account the current scale level.
200 // Returns false if there is no selection or on failure.
timvolodine 2014/03/05 19:41:02 what does failure mean here? instead maybe better
mlamouri (slow - plz ping) 2014/03/06 13:45:31 You can have a selection even though there is no e
201 virtual bool selectionRootBounds(WebRect& bounds) const { return false; }
202
197 // Called to notify that IME candidate window has changed its visibility or 203 // Called to notify that IME candidate window has changed its visibility or
198 // its appearance. These calls correspond to trigger 204 // its appearance. These calls correspond to trigger
199 // candidatewindow{show,update,hide} events defined in W3C IME API. 205 // candidatewindow{show,update,hide} events defined in W3C IME API.
200 virtual void didShowCandidateWindow() { } 206 virtual void didShowCandidateWindow() { }
201 virtual void didUpdateCandidateWindow() { } 207 virtual void didUpdateCandidateWindow() { }
202 virtual void didHideCandidateWindow() { } 208 virtual void didHideCandidateWindow() { }
203 209
204 // Returns the text direction at the start and end bounds of the current sel ection. 210 // Returns the text direction at the start and end bounds of the current sel ection.
205 // If the selection range is empty, it returns false. 211 // If the selection range is empty, it returns false.
206 virtual bool selectionTextDirection(WebTextDirection& start, WebTextDirectio n& end) const { return false; } 212 virtual bool selectionTextDirection(WebTextDirection& start, WebTextDirectio n& end) const { return false; }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // content. 257 // content.
252 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } 258 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ }
253 259
254 protected: 260 protected:
255 ~WebWidget() { } 261 ~WebWidget() { }
256 }; 262 };
257 263
258 } // namespace blink 264 } // namespace blink
259 265
260 #endif 266 #endif
OLDNEW
« Source/web/WebViewImpl.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698