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

Side by Side Diff: Source/core/accessibility/AccessibilityObject.h

Issue 19786002: Implement canvas focus ring methods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unused IntRect array Created 7 years, 4 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 | Annotate | Revision Log
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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // Accessibility Text. 431 // Accessibility Text.
432 virtual void accessibilityText(Vector<AccessibilityText>&) { }; 432 virtual void accessibilityText(Vector<AccessibilityText>&) { };
433 virtual String textUnderElement() const { return String(); } 433 virtual String textUnderElement() const { return String(); }
434 434
435 // Accessibility Text - (To be deprecated). 435 // Accessibility Text - (To be deprecated).
436 virtual String accessibilityDescription() const { return String(); } 436 virtual String accessibilityDescription() const { return String(); }
437 virtual String title() const { return String(); } 437 virtual String title() const { return String(); }
438 virtual String helpText() const { return String(); } 438 virtual String helpText() const { return String(); }
439 439
440 // Location and click point in frame-relative coordinates. 440 // Location and click point in frame-relative coordinates.
441 virtual LayoutRect elementRect() const { return LayoutRect(); } 441 virtual LayoutRect elementRect() const { return m_explicitElementRect; }
442 void setElementRect(LayoutRect r) { m_explicitElementRect = r; }
442 virtual void markCachedElementRectDirty() const; 443 virtual void markCachedElementRectDirty() const;
443 virtual IntPoint clickPoint(); 444 virtual IntPoint clickPoint();
444 445
445 // Hit testing. 446 // Hit testing.
446 // Called on the root AX object to return the deepest available element. 447 // Called on the root AX object to return the deepest available element.
447 virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const { r eturn 0; } 448 virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const { r eturn 0; }
448 // Called on the AX object after the render tree determines which is the rig ht AccessibilityRenderObject. 449 // Called on the AX object after the render tree determines which is the rig ht AccessibilityRenderObject.
449 virtual AccessibilityObject* elementAccessibilityHitTest(const IntPoint&) co nst; 450 virtual AccessibilityObject* elementAccessibilityHitTest(const IntPoint&) co nst;
450 451
451 // High-level accessibility tree access. Other modules should only use these functions. 452 // High-level accessibility tree access. Other modules should only use these functions.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 static bool isARIAInput(AccessibilityRole); 533 static bool isARIAInput(AccessibilityRole);
533 static AccessibilityRole ariaRoleToWebCoreRole(const String&); 534 static AccessibilityRole ariaRoleToWebCoreRole(const String&);
534 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&); 535 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&);
535 536
536 protected: 537 protected:
537 AXID m_id; 538 AXID m_id;
538 AccessibilityChildrenVector m_children; 539 AccessibilityChildrenVector m_children;
539 mutable bool m_haveChildren; 540 mutable bool m_haveChildren;
540 AccessibilityRole m_role; 541 AccessibilityRole m_role;
541 AccessibilityObjectInclusion m_lastKnownIsIgnoredValue; 542 AccessibilityObjectInclusion m_lastKnownIsIgnoredValue;
543 LayoutRect m_explicitElementRect;
542 544
543 virtual bool computeAccessibilityIsIgnored() const { return true; } 545 virtual bool computeAccessibilityIsIgnored() const { return true; }
544 546
545 // If this object itself scrolls, return its ScrollableArea. 547 // If this object itself scrolls, return its ScrollableArea.
546 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } 548 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; }
547 virtual void scrollTo(const IntPoint&) const { } 549 virtual void scrollTo(const IntPoint&) const { }
548 550
549 AccessibilityRole buttonRoleType() const; 551 AccessibilityRole buttonRoleType() const;
550 bool ariaIsHidden() const; 552 bool ariaIsHidden() const;
551 553
552 bool allowsTextRanges() const { return isTextControl(); } 554 bool allowsTextRanges() const { return isTextControl(); }
553 unsigned getLengthForTextRange() const { return text().length(); } 555 unsigned getLengthForTextRange() const { return text().length(); }
554 556
555 bool m_detached; 557 bool m_detached;
556 }; 558 };
557 559
558 #if !HAVE(ACCESSIBILITY) 560 #if !HAVE(ACCESSIBILITY)
559 inline const AccessibilityObject::AccessibilityChildrenVector& AccessibilityObje ct::children() { return m_children; } 561 inline const AccessibilityObject::AccessibilityChildrenVector& AccessibilityObje ct::children() { return m_children; }
560 inline String AccessibilityObject::actionVerb() const { return emptyString(); } 562 inline String AccessibilityObject::actionVerb() const { return emptyString(); }
561 inline int AccessibilityObject::lineForPosition(const VisiblePosition&) const { return -1; } 563 inline int AccessibilityObject::lineForPosition(const VisiblePosition&) const { return -1; }
562 inline void AccessibilityObject::updateBackingStore() { } 564 inline void AccessibilityObject::updateBackingStore() { }
563 #endif 565 #endif
564 566
565 } // namespace WebCore 567 } // namespace WebCore
566 568
567 #endif // AccessibilityObject_h 569 #endif // AccessibilityObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698