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

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

Issue 1121473004: Expose scroll containers via accessibility APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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/web/WebAXObject.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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebAXObject_h 31 #ifndef WebAXObject_h
32 #define WebAXObject_h 32 #define WebAXObject_h
33 33
34 #include "../platform/WebCommon.h" 34 #include "../platform/WebCommon.h"
35 #include "../platform/WebPoint.h"
35 #include "../platform/WebPrivatePtr.h" 36 #include "../platform/WebPrivatePtr.h"
36 #include "../platform/WebVector.h" 37 #include "../platform/WebVector.h"
37 #include "WebAXEnums.h" 38 #include "WebAXEnums.h"
38 39
39 #if BLINK_IMPLEMENTATION 40 #if BLINK_IMPLEMENTATION
40 namespace WTF { template <typename T> class PassRefPtr; } 41 namespace WTF { template <typename T> class PassRefPtr; }
41 #endif 42 #endif
42 43
43 namespace blink { 44 namespace blink {
44 45
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 277
277 // Walk the WebAXObjects on the same line. This is supported on any 278 // Walk the WebAXObjects on the same line. This is supported on any
278 // object type but primarily intended to be used for inline text boxes. 279 // object type but primarily intended to be used for inline text boxes.
279 BLINK_EXPORT WebAXObject nextOnLine() const; 280 BLINK_EXPORT WebAXObject nextOnLine() const;
280 BLINK_EXPORT WebAXObject previousOnLine() const; 281 BLINK_EXPORT WebAXObject previousOnLine() const;
281 282
282 // For an inline text box. 283 // For an inline text box.
283 BLINK_EXPORT void characterOffsets(WebVector<int>&) const; 284 BLINK_EXPORT void characterOffsets(WebVector<int>&) const;
284 BLINK_EXPORT void wordBoundaries(WebVector<int>& starts, WebVector<int>& end s) const; 285 BLINK_EXPORT void wordBoundaries(WebVector<int>& starts, WebVector<int>& end s) const;
285 286
287 // Scrollable containers.
288 BLINK_EXPORT bool isScrollableContainer() const;
289 BLINK_EXPORT WebPoint scrollOffset() const;
290 BLINK_EXPORT WebPoint minimumScrollOffset() const;
291 BLINK_EXPORT WebPoint maximumScrollOffset() const;
292 BLINK_EXPORT void setScrollOffset(const WebPoint&) const;
293
286 // Make this object visible by scrolling as many nested scrollable views as needed. 294 // Make this object visible by scrolling as many nested scrollable views as needed.
287 BLINK_EXPORT void scrollToMakeVisible() const; 295 BLINK_EXPORT void scrollToMakeVisible() const;
288 // Same, but if the whole object can't be made visible, try for this subrect , in local coordinates. 296 // Same, but if the whole object can't be made visible, try for this subrect , in local coordinates.
289 BLINK_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const; 297 BLINK_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const;
290 // Scroll this object to a given point in global coordinates of the top-leve l window. 298 // Scroll this object to a given point in global coordinates of the top-leve l window.
291 BLINK_EXPORT void scrollToGlobalPoint(const WebPoint&) const; 299 BLINK_EXPORT void scrollToGlobalPoint(const WebPoint&) const;
292 300
293 #if BLINK_IMPLEMENTATION 301 #if BLINK_IMPLEMENTATION
294 WebAXObject(const WTF::PassRefPtr<AXObject>&); 302 WebAXObject(const WTF::PassRefPtr<AXObject>&);
295 WebAXObject& operator=(const WTF::PassRefPtr<AXObject>&); 303 WebAXObject& operator=(const WTF::PassRefPtr<AXObject>&);
296 operator WTF::PassRefPtr<AXObject>() const; 304 operator WTF::PassRefPtr<AXObject>() const;
297 #endif 305 #endif
298 306
299 private: 307 private:
300 WebPrivatePtr<AXObject> m_private; 308 WebPrivatePtr<AXObject> m_private;
301 }; 309 };
302 310
303 } // namespace blink 311 } // namespace blink
304 312
305 #endif 313 #endif
OLDNEW
« 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