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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXImageMapLink.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/AXImageMapLink.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXImageMapLink.cpp b/third_party/WebKit/Source/modules/accessibility/AXImageMapLink.cpp
index b1d87a9a0b2455ab9d154feab8a178f20b5fa7fe..2d787ab51a9f5d2b6b2c0f369b1f441ef079ca2e 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXImageMapLink.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXImageMapLink.cpp
@@ -28,9 +28,11 @@
#include "modules/accessibility/AXImageMapLink.h"
+#include "SkMatrix44.h"
#include "core/dom/ElementTraversal.h"
#include "modules/accessibility/AXLayoutObject.h"
#include "modules/accessibility/AXObjectCacheImpl.h"
+#include "platform/graphics/Path.h"
namespace blink {
@@ -102,12 +104,16 @@ KURL AXImageMapLink::url() const
return areaElement()->href();
}
-LayoutRect AXImageMapLink::elementRect() const
+void AXImageMapLink::getRelativeBounds(AXObject** outContainer, FloatRect& outBoundsInContainer, SkMatrix44& outContainerTransform) const
{
+ *outContainer = nullptr;
+ outBoundsInContainer = FloatRect();
+ outContainerTransform.setIdentity();
+
HTMLAreaElement* area = areaElement();
HTMLMapElement* map = mapElement();
if (!area || !map)
- return LayoutRect();
+ return;
LayoutObject* layoutObject;
if (m_parent && m_parent->isAXLayoutObject())
@@ -116,9 +122,10 @@ LayoutRect AXImageMapLink::elementRect() const
layoutObject = map->layoutObject();
if (!layoutObject)
- return LayoutRect();
+ return;
- return area->computeAbsoluteRect(layoutObject);
+ outBoundsInContainer = area->getPath(layoutObject).boundingRect();
+ *outContainer = axObjectCache().getOrCreate(layoutObject);
}
DEFINE_TRACE(AXImageMapLink)

Powered by Google App Engine
This is Rietveld 408576698