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

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: 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 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 25 matching lines...) Expand all
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class AXObjectCacheImpl; 39 class AXObjectCacheImpl;
40 class AXSVGRoot; 40 class AXSVGRoot;
41 class Element; 41 class Element;
42 class FrameView; 42 class FrameView;
43 class HTMLAreaElement; 43 class HTMLAreaElement;
44 class IntPoint; 44 class IntPoint;
45 class Node; 45 class Node;
46 class VisibleSelection;
47 class Widget; 46 class Widget;
48 47
49 class MODULES_EXPORT AXLayoutObject : public AXNodeObject { 48 class MODULES_EXPORT AXLayoutObject : public AXNodeObject {
50 protected: 49 protected:
51 AXLayoutObject(LayoutObject*, AXObjectCacheImpl&); 50 AXLayoutObject(LayoutObject*, AXObjectCacheImpl&);
52 51
53 public: 52 public:
54 static PassRefPtrWillBeRawPtr<AXLayoutObject> create(LayoutObject*, AXObject CacheImpl&); 53 static PassRefPtrWillBeRawPtr<AXLayoutObject> create(LayoutObject*, AXObject CacheImpl&);
55 ~AXLayoutObject() override; 54 ~AXLayoutObject() override;
56 55
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const AtomicString& liveRegionRelevant() const override; 143 const AtomicString& liveRegionRelevant() const override;
145 bool liveRegionAtomic() const override; 144 bool liveRegionAtomic() const override;
146 bool liveRegionBusy() const override; 145 bool liveRegionBusy() const override;
147 146
148 // Accessibility Text. 147 // Accessibility Text.
149 String deprecatedTextUnderElement(TextUnderElementMode) const override; 148 String deprecatedTextUnderElement(TextUnderElementMode) const override;
150 149
151 // Accessibility Text - (To be deprecated). 150 // Accessibility Text - (To be deprecated).
152 String deprecatedHelpText() const override; 151 String deprecatedHelpText() const override;
153 152
153 // Methods that retrieve or manipulate the current selection.
154
155 AXRange selection() const override;
156 AXRange selectionUnderObject() const override;
157 void setSelection(const AXRange&) override;
158
154 // Location and click point in frame-relative coordinates. 159 // Location and click point in frame-relative coordinates.
155 void markCachedElementRectDirty() const override; 160 void markCachedElementRectDirty() const override;
156 IntPoint clickPoint() override; 161 IntPoint clickPoint() override;
157 162
158 // Hit testing. 163 // Hit testing.
159 AXObject* accessibilityHitTest(const IntPoint&) const override; 164 AXObject* accessibilityHitTest(const IntPoint&) const override;
160 AXObject* elementAccessibilityHitTest(const IntPoint&) const override; 165 AXObject* elementAccessibilityHitTest(const IntPoint&) const override;
161 166
162 // High-level accessibility tree access. Other modules should only use these functions. 167 // High-level accessibility tree access. Other modules should only use these functions.
163 AXObject* computeParent() const override; 168 AXObject* computeParent() const override;
(...skipping 12 matching lines...) Expand all
176 // Properties of the object's owning document or page. 181 // Properties of the object's owning document or page.
177 double estimatedLoadingProgress() const override; 182 double estimatedLoadingProgress() const override;
178 183
179 // DOM and layout tree access. 184 // DOM and layout tree access.
180 Node* node() const override; 185 Node* node() const override;
181 Document* document() const override; 186 Document* document() const override;
182 FrameView* documentFrameView() const override; 187 FrameView* documentFrameView() const override;
183 Element* anchorElement() const override; 188 Element* anchorElement() const override;
184 Widget* widgetForAttachmentView() const override; 189 Widget* widgetForAttachmentView() const override;
185 190
186 // Selected text.
187 PlainTextRange selectedTextRange() const override;
188
189 // Modify or take an action on an object.
190 void setSelectedTextRange(const PlainTextRange&) override;
191 void setValue(const String&) override; 191 void setValue(const String&) override;
192 192
193 // Notifications that this object may have changed. 193 // Notifications that this object may have changed.
194 void handleActiveDescendantChanged() override; 194 void handleActiveDescendantChanged() override;
195 void handleAriaExpandedChanged() override; 195 void handleAriaExpandedChanged() override;
196 void textChanged() override; 196 void textChanged() override;
197 197
198 // Text metrics. Most of these should be deprecated, needs major cleanup. 198 // Text metrics. Most of these should be deprecated, needs major cleanup.
199 int index(const VisiblePosition&) const override; 199 int index(const VisiblePosition&) const override;
200 VisiblePosition visiblePositionForIndex(int) const override; 200 VisiblePosition visiblePositionForIndex(int) const override;
201 void lineBreaks(Vector<int>&) const override; 201 void lineBreaks(Vector<int>&) const override;
202 202
203 private: 203 private:
204 AXObject* treeAncestorDisallowingChild() const; 204 AXObject* treeAncestorDisallowingChild() const;
205 void ariaListboxSelectedChildren(AccessibilityChildrenVector&); 205 void ariaListboxSelectedChildren(AccessibilityChildrenVector&);
206 PlainTextRange visibleSelectionUnderObject() const;
207 bool nodeIsTextControl(const Node*) const; 206 bool nodeIsTextControl(const Node*) const;
208 bool isTabItemSelected() const; 207 bool isTabItemSelected() const;
208 bool isValidSelectionBound(const AXObject*) const;
209 AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) co nst; 209 AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) co nst;
210 LayoutObject* layoutParentObject() const; 210 LayoutObject* layoutParentObject() const;
211 bool isSVGImage() const; 211 bool isSVGImage() const;
212 void detachRemoteSVGRoot(); 212 void detachRemoteSVGRoot();
213 AXSVGRoot* remoteSVGRootElement() const; 213 AXSVGRoot* remoteSVGRootElement() const;
214 AXObject* remoteSVGElementHitTest(const IntPoint&) const; 214 AXObject* remoteSVGElementHitTest(const IntPoint&) const;
215 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const; 215 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const;
216 void addHiddenChildren(); 216 void addHiddenChildren();
217 void addTextFieldChildren(); 217 void addTextFieldChildren();
218 void addImageMapChildren(); 218 void addImageMapChildren();
219 void addCanvasChildren(); 219 void addCanvasChildren();
220 void addAttachmentChildren(); 220 void addAttachmentChildren();
221 void addPopupChildren(); 221 void addPopupChildren();
222 void addRemoteSVGChildren(); 222 void addRemoteSVGChildren();
223 void addInlineTextBoxChildren(bool force); 223 void addInlineTextBoxChildren(bool force);
224 224
225 void ariaSelectedRows(AccessibilityChildrenVector&); 225 void ariaSelectedRows(AccessibilityChildrenVector&);
226 bool elementAttributeValue(const QualifiedName&) const; 226 bool elementAttributeValue(const QualifiedName&) const;
227 LayoutRect computeElementRect() const; 227 LayoutRect computeElementRect() const;
228 VisibleSelection selection() const; 228 AXRange textControlSelection() const;
229 int indexForVisiblePosition(const VisiblePosition&) const; 229 int indexForVisiblePosition(const VisiblePosition&) const;
230 }; 230 };
231 231
232 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject()); 232 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject());
233 233
234 } // namespace blink 234 } // namespace blink
235 235
236 #endif // AXLayoutObject_h 236 #endif // AXLayoutObject_h
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXInlineTextBox.cpp ('k') | Source/modules/accessibility/AXLayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698