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

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: Fixed another skia dependency Created 4 years, 10 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 457b67eb20efffd9fed6453768d62a55c09f565a..b43f39edb7d524a07a06fdd0913f0f76aaedfa12 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,30 @@ LayoutRect AXLayoutObject::elementRect() const
return m_cachedElementRect;
}
+SkMatrix44 AXLayoutObject::localFrameRootTransform() const
+{
+ if (!m_layoutObject || !documentFrameView() || !documentFrameView()->layoutView())
+ return SkMatrix44();
+
+ TransformationMatrix accumulatedTransform;
+ LayoutObject* layoutObject = documentFrameView()->layoutView();
+ for (;;) {
+ LayoutObject* container = layoutObject->parent();
+ if (!container && layoutObject->frame())
+ container = layoutObject->frame()->ownerLayoutObject();
+ if (!container)
+ break;
+
+ LayoutSize offset = layoutObject->offsetFromContainer(container, LayoutPoint());
+ TransformationMatrix transformFromContainer;
+ layoutObject->getTransformFromContainer(container, offset, transformFromContainer);
+ accumulatedTransform *= transformFromContainer;
+ layoutObject = container;
+ }
+
+ return TransformationMatrix::toSkMatrix44(accumulatedTransform);
+}
+
LayoutBoxModelObject* AXLayoutObject::layoutBoxModelObject() const
{
if (!m_layoutObject || !m_layoutObject->isBoxModelObject())

Powered by Google App Engine
This is Rietveld 408576698