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

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

Issue 1713723002: Implement accessibility support for CSS-transformed iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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/AXLayoutObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
index 3ba0e4eb032618e46fe2f99a28ab31ea29ca25df..5659a9560d9f5a48df708959b57d245c243c2046 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 || !documentFrameView() || !documentFrameView()->layoutView())
dcheng 2016/03/23 05:26:00 I'm a little surprised we need the latter two chec
dmazzoni 2016/03/24 04:26:53 What about during tear-down? We've been bitten by
dcheng 2016/03/24 04:33:14 I guess I don't know enough about how AX hooks in
dmazzoni 2016/03/24 04:50:07 Yes, it happens synchronously, in Node::removedFro
+ return SkMatrix44();
+ LayoutView* layoutView = documentFrameView()->layoutView();
+
+ FrameView* parentFrameView = documentFrameView()->parentFrameView();
+ if (!parentFrameView || !parentFrameView->layoutView())
dcheng 2016/03/23 05:26:00 Similar thought about the null check for parentFra
dmazzoni 2016/03/24 04:50:07 Done.
+ 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())

Powered by Google App Engine
This is Rietveld 408576698