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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXSlider.cpp

Issue 2287433003: Get rid of remaining uses of AXObject::elementRect (Closed)
Patch Set: Rebase Created 4 years, 3 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: third_party/WebKit/Source/modules/accessibility/AXSlider.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXSlider.cpp b/third_party/WebKit/Source/modules/accessibility/AXSlider.cpp
index dbe20eb628753bd0449cc371c719c11d8f00f3ad..8bba2784b18ad2d64696480a9fe71d38b5f4e96b 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXSlider.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXSlider.cpp
@@ -108,7 +108,7 @@ AXObject* AXSlider::elementAccessibilityHitTest(const IntPoint& point) const
{
if (m_children.size()) {
ASSERT(m_children.size() == 1);
- if (m_children[0]->elementRect().contains(point))
+ if (m_children[0]->getBoundsInFrameCoordinates().contains(point))
return m_children[0].get();
}
@@ -143,15 +143,17 @@ AXSliderThumb* AXSliderThumb::create(AXObjectCacheImpl& axObjectCache)
return new AXSliderThumb(axObjectCache);
}
-LayoutRect AXSliderThumb::elementRect() const
+LayoutObject* AXSliderThumb::layoutObjectForRelativeBounds() const
{
if (!m_parent)
- return LayoutRect();
+ return nullptr;
LayoutObject* sliderLayoutObject = m_parent->getLayoutObject();
if (!sliderLayoutObject || !sliderLayoutObject->isSlider())
- return LayoutRect();
- return toElement(sliderLayoutObject->node())->userAgentShadowRoot()->getElementById(ShadowElementNames::sliderThumb())->boundingBox();
+ return nullptr;
+ Element* thumbElement = toElement(sliderLayoutObject->node())->userAgentShadowRoot()->getElementById(ShadowElementNames::sliderThumb());
+ DCHECK(thumbElement);
+ return thumbElement->layoutObject();
}
bool AXSliderThumb::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReasons) const

Powered by Google App Engine
This is Rietveld 408576698