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

Unified Diff: Source/core/accessibility/AccessibilityObject.h

Issue 14740025: Simplify and add caching for accessible bounding box calculation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-landing with null check fix Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AccessibilityObject.h
diff --git a/Source/core/accessibility/AccessibilityObject.h b/Source/core/accessibility/AccessibilityObject.h
index 91edb7de5d6ed7f26ec0635bb57397115559641c..1bc960e9663317a854a2829fec94257dfee42fd7 100644
--- a/Source/core/accessibility/AccessibilityObject.h
+++ b/Source/core/accessibility/AccessibilityObject.h
@@ -503,15 +503,12 @@ public:
virtual String title() const { return String(); }
virtual String helpText() const { return String(); }
- // Position and size.
- virtual LayoutRect boundingBoxRect() const { return LayoutRect(); }
- IntRect pixelSnappedBoundingBoxRect() const { return pixelSnappedIntRect(boundingBoxRect()); }
- virtual LayoutRect elementRect() const = 0;
- IntRect pixelSnappedElementRect() const { return pixelSnappedIntRect(elementRect()); }
- LayoutSize size() const { return elementRect().size(); }
- IntSize pixelSnappedSize() const { return elementRect().pixelSnappedSize(); }
+ // Location and click point in frame-relative coordinates.
+ virtual LayoutRect elementRect() const { return LayoutRect(); }
+ virtual void checkCachedElementRect() const { }
+ virtual void updateCachedElementRect() const { }
+ virtual void markCachedElementRectDirty() const;
virtual IntPoint clickPoint();
- static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&);
// Hit testing.
// Called on the root AX object to return the deepest available element.
@@ -674,6 +671,7 @@ public:
static bool isARIAInput(AccessibilityRole);
static AccessibilityObject* anchorElementForNode(Node*);
static AccessibilityRole ariaRoleToWebCoreRole(const String&);
+ static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&);
protected:
AXID m_id;
« no previous file with comments | « Source/core/accessibility/AccessibilityNodeObject.cpp ('k') | Source/core/accessibility/AccessibilityObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698