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

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

Issue 1056763002: Reland: Made content editables report the caret and text selection by treating them as text controls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merged with master. 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, 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 virtual bool isProgressIndicator() const { return false; } 402 virtual bool isProgressIndicator() const { return false; }
403 bool isRadioButton() const { return roleValue() == RadioButtonRole; } 403 bool isRadioButton() const { return roleValue() == RadioButtonRole; }
404 bool isScrollbar() const { return roleValue() == ScrollBarRole; } 404 bool isScrollbar() const { return roleValue() == ScrollBarRole; }
405 virtual bool isSlider() const { return false; } 405 virtual bool isSlider() const { return false; }
406 virtual bool isNativeSlider() const { return false; } 406 virtual bool isNativeSlider() const { return false; }
407 virtual bool isSpinButton() const { return roleValue() == SpinButtonRole; } 407 virtual bool isSpinButton() const { return roleValue() == SpinButtonRole; }
408 virtual bool isSpinButtonPart() const { return false; } 408 virtual bool isSpinButtonPart() const { return false; }
409 bool isTabItem() const { return roleValue() == TabRole; } 409 bool isTabItem() const { return roleValue() == TabRole; }
410 virtual bool isTableCell() const { return false; } 410 virtual bool isTableCell() const { return false; }
411 virtual bool isTableRow() const { return false; } 411 virtual bool isTableRow() const { return false; }
412 virtual bool isTextControl() const { return false; }
412 virtual bool isTableCol() const { return false; } 413 virtual bool isTableCol() const { return false; }
413 bool isTextControl() const;
414 bool isTree() const { return roleValue() == TreeRole; } 414 bool isTree() const { return roleValue() == TreeRole; }
415 bool isTreeItem() const { return roleValue() == TreeItemRole; } 415 bool isTreeItem() const { return roleValue() == TreeItemRole; }
416 bool isWebArea() const { return roleValue() == WebAreaRole; } 416 bool isWebArea() const { return roleValue() == WebAreaRole; }
417 417
418 // Check object state. 418 // Check object state.
419 virtual bool isChecked() const { return false; } 419 virtual bool isChecked() const { return false; }
420 virtual bool isClickable() const; 420 virtual bool isClickable() const;
421 virtual bool isCollapsed() const { return false; } 421 virtual bool isCollapsed() const { return false; }
422 virtual bool isEnabled() const { return false; } 422 virtual bool isEnabled() const { return false; }
423 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined; } 423 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined; }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 virtual bool computeAccessibilityIsIgnored() const { return true; } 684 virtual bool computeAccessibilityIsIgnored() const { return true; }
685 virtual bool computeHasInheritedPresentationalRole() const { return false; } 685 virtual bool computeHasInheritedPresentationalRole() const { return false; }
686 686
687 // If this object itself scrolls, return its ScrollableArea. 687 // If this object itself scrolls, return its ScrollableArea.
688 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } 688 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; }
689 virtual void scrollTo(const IntPoint&) const { } 689 virtual void scrollTo(const IntPoint&) const { }
690 690
691 AccessibilityRole buttonRoleType() const; 691 AccessibilityRole buttonRoleType() const;
692 692
693 bool allowsTextRanges() const { return isTextControl(); }
694 unsigned getLengthForTextRange() const { return text().length(); } 693 unsigned getLengthForTextRange() const { return text().length(); }
695 694
696 bool m_detached; 695 bool m_detached;
697 696
698 mutable AXObject* m_parent; 697 mutable AXObject* m_parent;
699 698
700 // The following cached attribute values (the ones starting with m_cached*) 699 // The following cached attribute values (the ones starting with m_cached*)
701 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi ficationCount(). 700 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi ficationCount().
702 mutable int m_lastModificationCount; 701 mutable int m_lastModificationCount;
703 mutable bool m_cachedIsIgnored : 1; 702 mutable bool m_cachedIsIgnored : 1;
(...skipping 13 matching lines...) Expand all
717 static bool includesARIAWidgetRole(const String&); 716 static bool includesARIAWidgetRole(const String&);
718 static bool hasInteractiveARIAAttribute(const Element&); 717 static bool hasInteractiveARIAAttribute(const Element&);
719 }; 718 };
720 719
721 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 720 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
722 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 721 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
723 722
724 } // namespace blink 723 } // namespace blink
725 724
726 #endif // AXObject_h 725 #endif // AXObject_h
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.cpp ('k') | Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698