Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
index 342874f1e40051063de30fc6d7e0ecffa909c1ae..073bc4b8893d0c77d003d6147e792bbe2a9f42c2 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
@@ -80,6 +80,7 @@ |
#include "modules/accessibility/AXSpinButton.h" |
#include "modules/accessibility/AXTable.h" |
#include "platform/fonts/FontTraits.h" |
+#include "platform/geometry/TransformState.h" |
#include "platform/text/PlatformLocale.h" |
#include "platform/text/TextDirection.h" |
#include "wtf/StdLibExtras.h" |
@@ -218,6 +219,23 @@ LayoutRect AXLayoutObject::elementRect() const |
return m_cachedElementRect; |
} |
+SkMatrix44 AXLayoutObject::transformFromLocalParentFrame() const |
+{ |
+ if (!m_layoutObject) |
+ return SkMatrix44(); |
+ LayoutView* layoutView = documentFrameView()->layoutView(); |
+ |
+ FrameView* parentFrameView = documentFrameView()->parentFrameView(); |
+ if (!parentFrameView) |
+ return SkMatrix44(); |
+ LayoutView* parentLayoutView = parentFrameView->layoutView(); |
+ |
+ TransformationMatrix accumulatedTransform = layoutView->localToAncestorTransform(parentLayoutView, TraverseDocumentBoundaries); |
+ IntPoint scrollPosition = documentFrameView()->scrollPosition(); |
+ accumulatedTransform.translate(scrollPosition.x(), scrollPosition.y()); |
+ return TransformationMatrix::toSkMatrix44(accumulatedTransform); |
+} |
+ |
LayoutBoxModelObject* AXLayoutObject::getLayoutBoxModelObject() const |
{ |
if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) |