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

Unified Diff: Source/core/accessibility/AccessibilityNodeObject.cpp

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, 5 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/AccessibilityNodeObject.cpp
diff --git a/Source/core/accessibility/AccessibilityNodeObject.cpp b/Source/core/accessibility/AccessibilityNodeObject.cpp
index 4eaa667432d26d02576fd3a9012ab62e3b36e9fa..b25e68b33e39033a6c953d9a7b6cb9d5a62be99a 100644
--- a/Source/core/accessibility/AccessibilityNodeObject.cpp
+++ b/Source/core/accessibility/AccessibilityNodeObject.cpp
@@ -1184,6 +1184,10 @@ String AccessibilityNodeObject::helpText() const
LayoutRect AccessibilityNodeObject::elementRect() const
{
+ // First check if it has a custom rect, for example if this element is tied to a canvas path.
+ if (!m_explicitElementRect.isEmpty())
+ return m_explicitElementRect;
+
// AccessibilityNodeObjects have no mechanism yet to return a size or position.
// For now, let's return the position of the ancestor that does have a position,
// and make it the width of that parent, and about the height of a line of text, so that it's clear the object is a child of the parent.

Powered by Google App Engine
This is Rietveld 408576698