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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObject.h

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform Created 3 years, 5 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/AXObject.h
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.h b/third_party/WebKit/Source/modules/accessibility/AXObject.h
index ba79e1eb85a8c64ee3511a0a174110eb08e6b51a..0f0c04cf498c284a57660067d30fa9c7294f7a65 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -683,9 +683,12 @@ class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> {
// not null, walk up to its container and offset by the container's offset
// from origin, the container's scroll position if any, and apply the
// container's transform. Do this until you reach the root of the tree.
+ // If |out_is_fixed_positioned| is set, the scroll position of the container
+ // should be ignored.
virtual void GetRelativeBounds(AXObject** out_container,
FloatRect& out_bounds_in_container,
- SkMatrix44& out_container_transform) const;
+ SkMatrix44& out_container_transform,
+ bool& out_is_fixed_positioned) const;
// Get the bounds in frame-relative coordinates as a LayoutRect.
LayoutRect GetBoundsInFrameCoordinates() const;
@@ -853,6 +856,15 @@ class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> {
return nullptr;
}
+ // A simpler variant of GetRelativeBounds that can be overridden by
+ // subclasses that don't need to handle transformations or fixed
+ // positionining. Returns true if overridden by this subclass.
+ virtual bool GetSimpleRelativeBounds(
+ AXObject** out_container,
+ FloatRect& out_bounds_in_container) const {
+ return false;
+ }
+
const AXObject* InertRoot() const;
mutable Member<AXObject> parent_;

Powered by Google App Engine
This is Rietveld 408576698