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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.h

Issue 2047873002: Add interface to get relative bounding box rect of AX objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from aboxhall, add aria-owns test Created 4 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, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 virtual const AtomicString& liveRegionStatus() const { return nullAtom; } 813 virtual const AtomicString& liveRegionStatus() const { return nullAtom; }
814 virtual const AtomicString& liveRegionRelevant() const { return nullAtom; } 814 virtual const AtomicString& liveRegionRelevant() const { return nullAtom; }
815 virtual bool liveRegionAtomic() const { return false; } 815 virtual bool liveRegionAtomic() const { return false; }
816 virtual bool liveRegionBusy() const { return false; } 816 virtual bool liveRegionBusy() const { return false; }
817 817
818 const AtomicString& containerLiveRegionStatus() const; 818 const AtomicString& containerLiveRegionStatus() const;
819 const AtomicString& containerLiveRegionRelevant() const; 819 const AtomicString& containerLiveRegionRelevant() const;
820 bool containerLiveRegionAtomic() const; 820 bool containerLiveRegionAtomic() const;
821 bool containerLiveRegionBusy() const; 821 bool containerLiveRegionBusy() const;
822 822
823 // Location and click point in frame-relative coordinates. 823 // Location and click point in frame-relative coordinates. DEPRECATED, to be
824 // replaced by getRelativeBounds.
824 virtual LayoutRect elementRect() const { return m_explicitElementRect; } 825 virtual LayoutRect elementRect() const { return m_explicitElementRect; }
825 void setElementRect(LayoutRect r) { m_explicitElementRect = r; } 826 void setElementRect(LayoutRect r) { m_explicitElementRect = r; }
826 virtual void markCachedElementRectDirty() const; 827 virtual void markCachedElementRectDirty() const;
827 virtual IntPoint clickPoint(); 828 virtual IntPoint clickPoint();
828 829
829 // Transformation relative to the parent frame, if local (otherwise returns identity). 830 // Transformation relative to the parent frame, if local (otherwise returns identity).
831 // DEPRECATED, to be replaced by getRelativeBounds.
830 virtual SkMatrix44 transformFromLocalParentFrame() const; 832 virtual SkMatrix44 transformFromLocalParentFrame() const;
831 833
834 // NEW bounds calculation interface. Every object's bounding box is returned
835 // relative to a container object (which is guaranteed to be an ancestor) an d
836 // optionally a transformation matrix that needs to be applied too.
837 // To compute the absolute bounding box of an element, start with its
838 // boundsInContainer and apply the transform. Then as long as its container is
839 // not null, walk up to its container and offset by the container's offset f rom
840 // origin, the container's scroll position if any, and apply the container's transform.
841 // Do this until you reach the root of the tree.
842 virtual void getRelativeBounds(AXObject** container, FloatRect& boundsInCont ainer, SkMatrix44& containerTransform) const;
843
832 // Hit testing. 844 // Hit testing.
833 // Called on the root AX object to return the deepest available element. 845 // Called on the root AX object to return the deepest available element.
834 virtual AXObject* accessibilityHitTest(const IntPoint&) const { return 0; } 846 virtual AXObject* accessibilityHitTest(const IntPoint&) const { return 0; }
835 // Called on the AX object after the layout tree determines which is the rig ht AXLayoutObject. 847 // Called on the AX object after the layout tree determines which is the rig ht AXLayoutObject.
836 virtual AXObject* elementAccessibilityHitTest(const IntPoint&) const; 848 virtual AXObject* elementAccessibilityHitTest(const IntPoint&) const;
837 849
838 // High-level accessibility tree access. Other modules should only use these functions. 850 // High-level accessibility tree access. Other modules should only use these functions.
839 const AXObjectVector& children(); 851 const AXObjectVector& children();
840 AXObject* parentObject() const; 852 AXObject* parentObject() const;
841 AXObject* parentObjectIfExists() const; 853 AXObject* parentObjectIfExists() const;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 996
985 static unsigned s_numberOfLiveAXObjects; 997 static unsigned s_numberOfLiveAXObjects;
986 }; 998 };
987 999
988 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 1000 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
989 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 1001 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
990 1002
991 } // namespace blink 1003 } // namespace blink
992 1004
993 #endif // AXObject_h 1005 #endif // AXObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698