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

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

Issue 885163002: [Contextual Search] Check for ARIA widget roles. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleaup usage of Web wrappers. Created 5 years, 10 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 int lineForPosition(const VisiblePosition&) const; 601 int lineForPosition(const VisiblePosition&) const;
602 virtual int index(const VisiblePosition&) const { return -1; } 602 virtual int index(const VisiblePosition&) const { return -1; }
603 virtual void lineBreaks(Vector<int>&) const { } 603 virtual void lineBreaks(Vector<int>&) const { }
604 604
605 // Static helper functions. 605 // Static helper functions.
606 static bool isARIAControl(AccessibilityRole); 606 static bool isARIAControl(AccessibilityRole);
607 static bool isARIAInput(AccessibilityRole); 607 static bool isARIAInput(AccessibilityRole);
608 static AccessibilityRole ariaRoleToWebCoreRole(const String&); 608 static AccessibilityRole ariaRoleToWebCoreRole(const String&);
609 static IntRect boundingBoxForQuads(LayoutObject*, const Vector<FloatQuad>&); 609 static IntRect boundingBoxForQuads(LayoutObject*, const Vector<FloatQuad>&);
610 static const AtomicString& roleName(AccessibilityRole); 610 static const AtomicString& roleName(AccessibilityRole);
611 static bool isInsideFocusableElementOrARIAWidget(const Node&);
611 612
612 protected: 613 protected:
613 AXID m_id; 614 AXID m_id;
614 AccessibilityChildrenVector m_children; 615 AccessibilityChildrenVector m_children;
615 mutable bool m_haveChildren; 616 mutable bool m_haveChildren;
616 AccessibilityRole m_role; 617 AccessibilityRole m_role;
617 AXObjectInclusion m_lastKnownIsIgnoredValue; 618 AXObjectInclusion m_lastKnownIsIgnoredValue;
618 LayoutRect m_explicitElementRect; 619 LayoutRect m_explicitElementRect;
619 620
620 virtual bool computeAccessibilityIsIgnored() const { return true; } 621 virtual bool computeAccessibilityIsIgnored() const { return true; }
(...skipping 15 matching lines...) Expand all
636 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi ficationCount(). 637 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi ficationCount().
637 mutable int m_lastModificationCount; 638 mutable int m_lastModificationCount;
638 mutable bool m_cachedIsIgnored; 639 mutable bool m_cachedIsIgnored;
639 mutable const AXObject* m_cachedLiveRegionRoot; 640 mutable const AXObject* m_cachedLiveRegionRoot;
640 641
641 AXObjectCacheImpl* m_axObjectCache; 642 AXObjectCacheImpl* m_axObjectCache;
642 643
643 // Updates the cached attribute values. This may be recursive, so to prevent deadlocks, 644 // Updates the cached attribute values. This may be recursive, so to prevent deadlocks,
644 // functions called here may only search up the tree (ancestors), not down. 645 // functions called here may only search up the tree (ancestors), not down.
645 void updateCachedAttributeValuesIfNeeded() const; 646 void updateCachedAttributeValuesIfNeeded() const;
647
648 private:
649 static bool includesARIAWidgetRole(const String&);
650 static bool hasInteractiveARIAAttribute(const Element&);
646 }; 651 };
647 652
648 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 653 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
649 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 654 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
650 655
651 } // namespace blink 656 } // namespace blink
652 657
653 #endif // AXObject_h 658 #endif // AXObject_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/accessibility/AXObject.cpp » ('j') | Source/modules/accessibility/AXObject.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698