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

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

Issue 23983002: Expose InlineTextBoxes in the accessibility tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review feedback Created 7 years, 3 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 | Annotate | Revision Log
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 WEBKIT_EXPORT bool equals(const WebAccessibilityObject&) const; 71 WEBKIT_EXPORT bool equals(const WebAccessibilityObject&) const;
72 72
73 bool isNull() const { return m_private.isNull(); } 73 bool isNull() const { return m_private.isNull(); }
74 // isDetached also checks for null, so it's safe to just call isDetached. 74 // isDetached also checks for null, so it's safe to just call isDetached.
75 WEBKIT_EXPORT bool isDetached() const; 75 WEBKIT_EXPORT bool isDetached() const;
76 76
77 // Static methods for enabling accessibility. 77 // Static methods for enabling accessibility.
78 WEBKIT_EXPORT static void enableAccessibility(); 78 WEBKIT_EXPORT static void enableAccessibility();
79 WEBKIT_EXPORT static bool accessibilityEnabled(); 79 WEBKIT_EXPORT static bool accessibilityEnabled();
80 80
81 // Temporary: this flag will only be toggleable until Chromium has it on by default.
82 WEBKIT_EXPORT static void enableInlineTextBoxAccessibility();
83
81 WEBKIT_EXPORT void startCachingComputedObjectAttributesUntilTreeMutates(); 84 WEBKIT_EXPORT void startCachingComputedObjectAttributesUntilTreeMutates();
82 WEBKIT_EXPORT void stopCachingComputedObjectAttributes(); 85 WEBKIT_EXPORT void stopCachingComputedObjectAttributes();
83 86
84 WEBKIT_EXPORT int axID() const; 87 WEBKIT_EXPORT int axID() const;
85 88
86 // Update the underlying tree, and return true if this object is 89 // Update the underlying tree, and return true if this object is
87 // still valid (not detached). Note that calling this method 90 // still valid (not detached). Note that calling this method
88 // can cause other WebAccessibilityObjects to become invalid, too, 91 // can cause other WebAccessibilityObjects to become invalid, too,
89 // so always call isDetached if updateBackingStoreAndCheckValidity 92 // so always call isDetached if updateBackingStoreAndCheckValidity
90 // has been called on any object, or if any other WebCore code has run. 93 // has been called on any object, or if any other WebCore code has run.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // For a table column 194 // For a table column
192 WEBKIT_EXPORT unsigned columnIndex() const; 195 WEBKIT_EXPORT unsigned columnIndex() const;
193 WEBKIT_EXPORT WebAccessibilityObject columnHeader() const; 196 WEBKIT_EXPORT WebAccessibilityObject columnHeader() const;
194 197
195 // For a table cell 198 // For a table cell
196 WEBKIT_EXPORT unsigned cellColumnIndex() const; 199 WEBKIT_EXPORT unsigned cellColumnIndex() const;
197 WEBKIT_EXPORT unsigned cellColumnSpan() const; 200 WEBKIT_EXPORT unsigned cellColumnSpan() const;
198 WEBKIT_EXPORT unsigned cellRowIndex() const; 201 WEBKIT_EXPORT unsigned cellRowIndex() const;
199 WEBKIT_EXPORT unsigned cellRowSpan() const; 202 WEBKIT_EXPORT unsigned cellRowSpan() const;
200 203
204 // For an inline text box.
205 WEBKIT_EXPORT void characterOffsets(WebVector<int>&) const;
206 WEBKIT_EXPORT void wordBoundaries(WebVector<int>& starts, WebVector<int>& en ds) const;
207
201 // Make this object visible by scrolling as many nested scrollable views as needed. 208 // Make this object visible by scrolling as many nested scrollable views as needed.
202 WEBKIT_EXPORT void scrollToMakeVisible() const; 209 WEBKIT_EXPORT void scrollToMakeVisible() const;
203 // Same, but if the whole object can't be made visible, try for this subrect , in local coordinates. 210 // Same, but if the whole object can't be made visible, try for this subrect , in local coordinates.
204 WEBKIT_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const; 211 WEBKIT_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const;
205 // Scroll this object to a given point in global coordinates of the top-leve l window. 212 // Scroll this object to a given point in global coordinates of the top-leve l window.
206 WEBKIT_EXPORT void scrollToGlobalPoint(const WebPoint&) const; 213 WEBKIT_EXPORT void scrollToGlobalPoint(const WebPoint&) const;
207 214
208 #if WEBKIT_IMPLEMENTATION 215 #if WEBKIT_IMPLEMENTATION
209 WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&) ; 216 WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&) ;
210 WebAccessibilityObject& operator=(const WTF::PassRefPtr<WebCore::Accessibili tyObject>&); 217 WebAccessibilityObject& operator=(const WTF::PassRefPtr<WebCore::Accessibili tyObject>&);
211 operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const; 218 operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const;
212 #endif 219 #endif
213 220
214 private: 221 private:
215 WebPrivatePtr<WebCore::AccessibilityObject> m_private; 222 WebPrivatePtr<WebCore::AccessibilityObject> m_private;
216 }; 223 };
217 224
218 } // namespace WebKit 225 } // namespace WebKit
219 226
220 #endif 227 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698