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

Side by Side Diff: Source/modules/accessibility/AXLayoutObject.h

Issue 1039873002: AX presentation role should be inherited to its required owned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual AccessibilityRole determineAccessibilityRole() override; 65 virtual AccessibilityRole determineAccessibilityRole() override;
66 void checkCachedElementRect() const; 66 void checkCachedElementRect() const;
67 void updateCachedElementRect() const; 67 void updateCachedElementRect() const;
68 68
69 protected: 69 protected:
70 LayoutObject* m_layoutObject; 70 LayoutObject* m_layoutObject;
71 mutable LayoutRect m_cachedElementRect; 71 mutable LayoutRect m_cachedElementRect;
72 mutable LayoutRect m_cachedFrameRect; 72 mutable LayoutRect m_cachedFrameRect;
73 mutable IntPoint m_cachedScrollPosition; 73 mutable IntPoint m_cachedScrollPosition;
74 mutable bool m_cachedElementRectDirty; 74 mutable bool m_cachedElementRectDirty;
75 mutable bool m_hasInheritedPresentationRole;
75 76
76 // 77 //
77 // Overridden from AXObject. 78 // Overridden from AXObject.
78 // 79 //
79 80
80 virtual void init() override; 81 virtual void init() override;
81 virtual void detach() override; 82 virtual void detach() override;
82 virtual bool isDetached() const override { return !m_layoutObject; } 83 virtual bool isDetached() const override { return !m_layoutObject; }
83 virtual bool isAXLayoutObject() const override { return true; } 84 virtual bool isAXLayoutObject() const override { return true; }
84 85
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Notifications that this object may have changed. 186 // Notifications that this object may have changed.
186 virtual void handleActiveDescendantChanged() override; 187 virtual void handleActiveDescendantChanged() override;
187 virtual void handleAriaExpandedChanged() override; 188 virtual void handleAriaExpandedChanged() override;
188 virtual void textChanged() override; 189 virtual void textChanged() override;
189 190
190 // Text metrics. Most of these should be deprecated, needs major cleanup. 191 // Text metrics. Most of these should be deprecated, needs major cleanup.
191 virtual int index(const VisiblePosition&) const override; 192 virtual int index(const VisiblePosition&) const override;
192 virtual VisiblePosition visiblePositionForIndex(int) const override; 193 virtual VisiblePosition visiblePositionForIndex(int) const override;
193 virtual void lineBreaks(Vector<int>&) const override; 194 virtual void lineBreaks(Vector<int>&) const override;
194 195
196 virtual bool hasInheritedPresentationRole() const override { return m_hasInh eritedPresentationRole; }
197 bool isPresentationRole(AXObject*) const;
dmazzoni 2015/03/29 07:46:22 Implement this in AXNodeObject instead of AXLayout
je_julie(Not used) 2015/03/31 16:14:27 Thanks for suggestion. I move it at AXNodeObject.
198 bool isPresentationRoleInTable(AXObject*) const;
199
195 private: 200 private:
196 bool isAllowedChildOfTree() const; 201 bool isAllowedChildOfTree() const;
197 void ariaListboxSelectedChildren(AccessibilityChildrenVector&); 202 void ariaListboxSelectedChildren(AccessibilityChildrenVector&);
198 PlainTextRange ariaSelectedTextRange() const; 203 PlainTextRange ariaSelectedTextRange() const;
199 bool nodeIsTextControl(const Node*) const; 204 bool nodeIsTextControl(const Node*) const;
200 bool isTabItemSelected() const; 205 bool isTabItemSelected() const;
201 AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) co nst; 206 AXObject* accessibilityImageMapHitTest(HTMLAreaElement*, const IntPoint&) co nst;
202 bool layoutObjectIsObservable(LayoutObject*) const; 207 bool layoutObjectIsObservable(LayoutObject*) const;
203 LayoutObject* layoutParentObject() const; 208 LayoutObject* layoutParentObject() const;
204 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; 209 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const;
210 bool isListElement(Node*) const;
211 bool isRequiredOwnedElement(AXObject*) const;
205 bool isSVGImage() const; 212 bool isSVGImage() const;
206 void detachRemoteSVGRoot(); 213 void detachRemoteSVGRoot();
207 AXSVGRoot* remoteSVGRootElement() const; 214 AXSVGRoot* remoteSVGRootElement() const;
208 AXObject* remoteSVGElementHitTest(const IntPoint&) const; 215 AXObject* remoteSVGElementHitTest(const IntPoint&) const;
209 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const; 216 void offsetBoundingBoxForRemoteSVGElement(LayoutRect&) const;
210 void addHiddenChildren(); 217 void addHiddenChildren();
211 void addTextFieldChildren(); 218 void addTextFieldChildren();
212 void addImageMapChildren(); 219 void addImageMapChildren();
213 void addCanvasChildren(); 220 void addCanvasChildren();
214 void addAttachmentChildren(); 221 void addAttachmentChildren();
215 void addPopupChildren(); 222 void addPopupChildren();
216 void addRemoteSVGChildren(); 223 void addRemoteSVGChildren();
217 void addInlineTextBoxChildren(bool force); 224 void addInlineTextBoxChildren(bool force);
218 225
219 void ariaSelectedRows(AccessibilityChildrenVector&); 226 void ariaSelectedRows(AccessibilityChildrenVector&);
220 bool elementAttributeValue(const QualifiedName&) const; 227 bool elementAttributeValue(const QualifiedName&) const;
221 bool inheritsPresentationalRole() const; 228 bool inheritsPresentationalRole() const;
222 LayoutRect computeElementRect() const; 229 LayoutRect computeElementRect() const;
223 VisibleSelection selection() const; 230 VisibleSelection selection() const;
224 int indexForVisiblePosition(const VisiblePosition&) const; 231 int indexForVisiblePosition(const VisiblePosition&) const;
225 void accessibilityChildrenFromAttribute(QualifiedName attr, AccessibilityChi ldrenVector&) const; 232 void accessibilityChildrenFromAttribute(QualifiedName attr, AccessibilityChi ldrenVector&) const;
226 }; 233 };
227 234
228 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject()); 235 DEFINE_AX_OBJECT_TYPE_CASTS(AXLayoutObject, isAXLayoutObject());
229 236
230 } // namespace blink 237 } // namespace blink
231 238
232 #endif // AXLayoutObject_h 239 #endif // AXLayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698