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

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

Issue 14740025: Simplify and add caching for accessible bounding box calculation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comment Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AccessibilityListBoxOption.cpp
diff --git a/Source/core/accessibility/AccessibilityListBoxOption.cpp b/Source/core/accessibility/AccessibilityListBoxOption.cpp
index dd3dbe98f9fb67857c66605887c8521da3b740a6..fa49f22fe0e50b3310f5881e4e72a5301fbcc17c 100644
--- a/Source/core/accessibility/AccessibilityListBoxOption.cpp
+++ b/Source/core/accessibility/AccessibilityListBoxOption.cpp
@@ -92,7 +92,7 @@ bool AccessibilityListBoxOption::isSelectedOptionActive() const
return listBoxParentNode->activeSelectionEndListIndex() == listBoxOptionIndex();
}
-LayoutRect AccessibilityListBoxOption::elementRect() const
+LayoutRect AccessibilityListBoxOption::elementRect()
{
LayoutRect rect;
if (!m_optionElement)
@@ -106,7 +106,7 @@ LayoutRect AccessibilityListBoxOption::elementRect() const
if (!listBoxRenderer)
return rect;
- LayoutRect parentRect = listBoxRenderer->document()->axObjectCache()->getOrCreate(listBoxRenderer)->boundingBoxRect();
+ LayoutRect parentRect = listBoxRenderer->document()->axObjectCache()->getOrCreate(listBoxRenderer)->elementRect();
int index = listBoxOptionIndex();
if (index != -1)
rect = toRenderListBox(listBoxRenderer)->itemBoundingBoxRect(parentRect.location(), index);

Powered by Google App Engine
This is Rietveld 408576698