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

Unified Diff: ui/accessibility/ax_position.h

Issue 2234913002: Added support for header and footer inside other sections, according to HTML API Mappings 1.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Checked if node if present. Created 4 years, 4 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: ui/accessibility/ax_position.h
diff --git a/ui/accessibility/ax_position.h b/ui/accessibility/ax_position.h
new file mode 100644
index 0000000000000000000000000000000000000000..293b23e36f11d70f0880e025819327714885ce4f
--- /dev/null
+++ b/ui/accessibility/ax_position.h
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_ACCESSIBILITY_AX_POSITION_H_
dmazzoni 2016/08/10 20:45:52 Looks cool but doesn't belong in this change?
+#define UI_ACCESSIBILITY_AX_POSITION_H_
+
+#include "ui/accessibility/ax_node.h"
+
+namespace ui {
+
+// A position in the |AXTree|.
+class AX_EXPORT AXPosition {
+ public:
+ AXPosition();
+ AXPosition(AXNode* anchor, int offset);
+ virtual ~AXPosition();
+
+ static AXPosition* CreateNullPosition();
+
+ AXNode* get_anchor() const { return anchor_; }
+ int get_offset() const { return offset_; }
+
+ bool IsNull() const;
+ AXPosition ToLeafEquivalent() const;
+ AXPosition GetCorrespondingPositionInParent(const AXNode& parent) const;
+
+ private:
+ AXNode* anchor_;
+ int offset_;
+};
+
+} // namespace ui
+
+#endif // UI_ACCESSIBILITY_AX_POSITION_H_

Powered by Google App Engine
This is Rietveld 408576698