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

Side by Side Diff: Source/modules/accessibility/AXLayoutObject.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: Created 5 years, 6 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 // Properties of the object's owning document or page. 176 // Properties of the object's owning document or page.
177 virtual double estimatedLoadingProgress() const override; 177 virtual double estimatedLoadingProgress() const override;
178 178
179 // DOM and layout tree access. 179 // DOM and layout tree access.
180 virtual Node* node() const override; 180 virtual Node* node() const override;
181 virtual Document* document() const override; 181 virtual Document* document() const override;
182 virtual FrameView* documentFrameView() const override; 182 virtual FrameView* documentFrameView() const override;
183 virtual Element* anchorElement() const override; 183 virtual Element* anchorElement() const override;
184 virtual Widget* widgetForAttachmentView() const override; 184 virtual Widget* widgetForAttachmentView() const override;
185 185 virtual AXSelection selection() const override;
dmazzoni 2015/06/16 17:24:03 These should all be in their own section with comm
186 // Selected text. 186 virtual AXSelection selectionUnderObject() const override;
187 virtual PlainTextRange selectedTextRange() const override;
188 187
189 // Modify or take an action on an object. 188 // Modify or take an action on an object.
190 virtual void setSelectedTextRange(const PlainTextRange&) override; 189 virtual void setSelection(const AXSelection&) override;
191 virtual void setValue(const String&) override; 190 virtual void setValue(const String&) override;
192 191
193 // Notifications that this object may have changed. 192 // Notifications that this object may have changed.
194 virtual void handleActiveDescendantChanged() override; 193 virtual void handleActiveDescendantChanged() override;
195 virtual void handleAriaExpandedChanged() override; 194 virtual void handleAriaExpandedChanged() override;
196 virtual void textChanged() override; 195 virtual void textChanged() override;
197 196
198 // Text metrics. Most of these should be deprecated, needs major cleanup. 197 // Text metrics. Most of these should be deprecated, needs major cleanup.
199 virtual int index(const VisiblePosition&) const override; 198 virtual int index(const VisiblePosition&) const override;
200 virtual VisiblePosition visiblePositionForIndex(int) const override; 199 virtual VisiblePosition visiblePositionForIndex(int) const override;
201 virtual void lineBreaks(Vector<int>&) const override; 200 virtual void lineBreaks(Vector<int>&) const override;
202 201
203 private: 202 private:
204 AXObject* treeAncestorDisallowingChild() const; 203 AXObject* treeAncestorDisallowingChild() const;
205 void ariaListboxSelectedChildren(AccessibilityChildrenVector&); 204 void ariaListboxSelectedChildren(AccessibilityChildrenVector&);
206 PlainTextRange visibleSelectionUnderObject() const;
207 bool nodeIsTextControl(const Node*) const; 205 bool nodeIsTextControl(const Node*) const;
208 bool isTabItemSelected() const; 206 bool isTabItemSelected() const;
209 AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) co nst; 207 AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) co nst;
210 LayoutObject* layoutParentObject() const; 208 LayoutObject* layoutParentObject() const;
211 bool isSVGImage() const; 209 bool isSVGImage() const;
212 void detachRemoteSVGRoot(); 210 void detachRemoteSVGRoot();
213 AXSVGRoot* remoteSVGRootElement() const; 211 AXSVGRoot* remoteSVGRootElement() const;
214 AXObject* remoteSVGElementHitTest(const IntPoint&) const; 212 AXObject* remoteSVGElementHitTest(const IntPoint&) const;
215 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const; 213 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const;
216 void addHiddenChildren(); 214 void addHiddenChildren();
217 void addTextFieldChildren(); 215 void addTextFieldChildren();
218 void addImageMapChildren(); 216 void addImageMapChildren();
219 void addCanvasChildren(); 217 void addCanvasChildren();
220 void addAttachmentChildren(); 218 void addAttachmentChildren();
221 void addPopupChildren(); 219 void addPopupChildren();
222 void addRemoteSVGChildren(); 220 void addRemoteSVGChildren();
223 void addInlineTextBoxChildren(bool force); 221 void addInlineTextBoxChildren(bool force);
224 222
225 void ariaSelectedRows(AccessibilityChildrenVector&); 223 void ariaSelectedRows(AccessibilityChildrenVector&);
226 bool elementAttributeValue(const QualifiedName&) const; 224 bool elementAttributeValue(const QualifiedName&) const;
227 LayoutRect computeElementRect() const; 225 LayoutRect computeElementRect() const;
228 VisibleSelection selection() const; 226 AXObject::AXSelection textControlSelection() const;
dmazzoni 2015/06/16 17:24:03 The AXObject:: qualifier shouldn't be needed here
227 VisibleSelection visibleSelection() const;
229 int indexForVisiblePosition(const VisiblePosition&) const; 228 int indexForVisiblePosition(const VisiblePosition&) const;
230 }; 229 };
231 230
232 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject()); 231 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject());
233 232
234 } // namespace blink 233 } // namespace blink
235 234
236 #endif // AXLayoutObject_h 235 #endif // AXLayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698