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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXMenuListOption.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/AXMenuListOption.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp b/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
index c80a85df8f74703fca423195d3b015cf58da10bd..9bcd16fd0f05211d77765d5bc9fadb52454ff6fa 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
@@ -25,6 +25,7 @@
#include "modules/accessibility/AXMenuListOption.h"
+#include "SkMatrix44.h"
#include "modules/accessibility/AXMenuListPopup.h"
#include "modules/accessibility/AXObjectCacheImpl.h"
@@ -115,19 +116,22 @@ bool AXMenuListOption::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReas
return accessibilityIsIgnoredByDefault(ignoredReasons);
}
-LayoutRect AXMenuListOption::elementRect() const
+void AXMenuListOption::getRelativeBounds(AXObject** outContainer, FloatRect& outBoundsInContainer, SkMatrix44& outContainerTransform) const
{
+ *outContainer = nullptr;
+ outBoundsInContainer = FloatRect();
+ outContainerTransform.setIdentity();
+
AXObject* parent = parentObject();
if (!parent)
- return LayoutRect();
+ return;
ASSERT(parent->isMenuListPopup());
AXObject* grandparent = parent->parentObject();
if (!grandparent)
- return LayoutRect();
+ return;
ASSERT(grandparent->isMenuList());
-
- return grandparent->elementRect();
+ grandparent->getRelativeBounds(outContainer, outBoundsInContainer, outContainerTransform);
}
String AXMenuListOption::textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedObjects, NameSources* nameSources) const

Powered by Google App Engine
This is Rietveld 408576698