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

Unified Diff: public/web/WebAXObject.h

Issue 1185343003: Implements the ability to get and set the caret position and the current selection from anywhere in… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved layout tests to another CL. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebAXObject.h
diff --git a/public/web/WebAXObject.h b/public/web/WebAXObject.h
index 2464e5960f465f80a887db470cbc3d33cf930413..89796095f9685725f117a7a86bbf09848887678e 100644
--- a/public/web/WebAXObject.h
+++ b/public/web/WebAXObject.h
@@ -156,10 +156,6 @@ public:
BLINK_EXPORT WebString language() const;
BLINK_EXPORT WebAXOrientation orientation() const;
BLINK_EXPORT WebAXRole role() const;
- BLINK_EXPORT unsigned selectionEnd() const;
- BLINK_EXPORT unsigned selectionEndLineNumber() const;
- BLINK_EXPORT unsigned selectionStart() const;
- BLINK_EXPORT unsigned selectionStartLineNumber() const;
BLINK_EXPORT WebString stringValue() const;
BLINK_EXPORT WebAXTextDirection textDirection() const;
BLINK_EXPORT WebAXTextStyle textStyle() const;
@@ -200,6 +196,21 @@ public:
// exposed by one of the two functions above.
BLINK_EXPORT WebString placeholder(WebAXNameFrom, WebAXDescriptionFrom);
+ // The following selection functions get or set the global document
+ // selection and can be called on any object in the tree.
+ BLINK_EXPORT void selection(WebAXObject& anchorObject, int& anchorOffset,
+ WebAXObject& focusObject, int& focusOffset) const;
+ BLINK_EXPORT void setSelection(const WebAXObject& anchorObject, int anchorOffset,
+ const WebAXObject& focusObject, int focusOffset) const;
+
+ // The following selection functions return text offsets calculated starting
+ // the current object. They only report on a selection that is placed on
+ // the current object or on any of its descendants.
+ BLINK_EXPORT unsigned selectionEnd() const;
+ BLINK_EXPORT unsigned selectionEndLineNumber() const;
+ BLINK_EXPORT unsigned selectionStart() const;
+ BLINK_EXPORT unsigned selectionStartLineNumber() const;
+
// 1-based position in set & Size of set.
BLINK_EXPORT int posInSet() const;
BLINK_EXPORT int setSize() const;
« no previous file with comments | « Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698