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

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

Issue 2872133003: Remove dependency of WebNode.cpp on AXObjectImpl (Closed)
Patch Set: Rebase Created 3 years, 7 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 int LineForPosition(const VisiblePosition&) const; 788 int LineForPosition(const VisiblePosition&) const;
789 virtual int Index(const VisiblePosition&) const { return -1; } 789 virtual int Index(const VisiblePosition&) const { return -1; }
790 virtual void LineBreaks(Vector<int>&) const {} 790 virtual void LineBreaks(Vector<int>&) const {}
791 791
792 // Static helper functions. 792 // Static helper functions.
793 static bool IsARIAControl(AccessibilityRole); 793 static bool IsARIAControl(AccessibilityRole);
794 static bool IsARIAInput(AccessibilityRole); 794 static bool IsARIAInput(AccessibilityRole);
795 static AccessibilityRole AriaRoleToWebCoreRole(const String&); 795 static AccessibilityRole AriaRoleToWebCoreRole(const String&);
796 static const AtomicString& RoleName(AccessibilityRole); 796 static const AtomicString& RoleName(AccessibilityRole);
797 static const AtomicString& InternalRoleName(AccessibilityRole); 797 static const AtomicString& InternalRoleName(AccessibilityRole);
798 static bool IsInsideFocusableElementOrARIAWidget(const Node&);
799 798
800 protected: 799 protected:
801 AXID id_; 800 AXID id_;
802 AXObjectVector children_; 801 AXObjectVector children_;
803 mutable bool have_children_; 802 mutable bool have_children_;
804 AccessibilityRole role_; 803 AccessibilityRole role_;
805 AXObjectInclusion last_known_is_ignored_value_; 804 AXObjectInclusion last_known_is_ignored_value_;
806 LayoutRect explicit_element_rect_; 805 LayoutRect explicit_element_rect_;
807 AXID explicit_container_id_; 806 AXID explicit_container_id_;
808 807
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 860
862 Member<AXObjectCacheImpl> ax_object_cache_; 861 Member<AXObjectCacheImpl> ax_object_cache_;
863 862
864 // Updates the cached attribute values. This may be recursive, so to prevent 863 // Updates the cached attribute values. This may be recursive, so to prevent
865 // deadlocks, 864 // deadlocks,
866 // functions called here may only search up the tree (ancestors), not down. 865 // functions called here may only search up the tree (ancestors), not down.
867 void UpdateCachedAttributeValuesIfNeeded() const; 866 void UpdateCachedAttributeValuesIfNeeded() const;
868 867
869 private: 868 private:
870 static bool IsNativeInputInMixedState(const Node*); 869 static bool IsNativeInputInMixedState(const Node*);
871 static bool IncludesARIAWidgetRole(const String&);
872 static bool HasInteractiveARIAAttribute(const Element&);
873 870
874 static unsigned number_of_live_ax_objects_; 871 static unsigned number_of_live_ax_objects_;
875 }; 872 };
876 873
877 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); 874 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true);
878 875
879 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 876 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
880 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ 877 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \
881 object.predicate) 878 object.predicate)
882 879
883 } // namespace blink 880 } // namespace blink
884 881
885 #endif // AXObjectImpl_h 882 #endif // AXObjectImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698