summarylogtreecommitdiffstats
path: root/libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch
blob: 5e9d37aae54fffbc55484e84d23b95cd47bb7afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From aeef68888d4c00b69facead2b934095a8cd17329 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Mon, 20 Apr 2020 18:21:43 +0000
Subject: [PATCH] libstdc++: fix incomplete-type in AXTree for
 NodeSetSizePosInSetInfo

has only forward declaration of NodeSetSizePosInSetInfo. Therefore,
move declaration from ax_tree.cc.

std: :unordered_map<T, U> requires U to be fully declared. ax_tree.h
Bug: 957519
Change-Id: Ic1f4bf3ebfea229ece84251e46d4461b31873868
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132403
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760588}
---
 ui/accessibility/ax_tree.cc | 10 ++--------
 ui/accessibility/ax_tree.h  |  9 ++++++++-
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index 7b8d9b1b161..e9154028d66 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -567,14 +567,8 @@ struct AXTreeUpdateState {
   const AXTree& tree;
 };
 
-struct AXTree::NodeSetSizePosInSetInfo {
-  NodeSetSizePosInSetInfo() = default;
-  ~NodeSetSizePosInSetInfo() = default;
-
-  int32_t pos_in_set = 0;
-  int32_t set_size = 0;
-  base::Optional<int> lowest_hierarchical_level;
-};
+AXTree::NodeSetSizePosInSetInfo::NodeSetSizePosInSetInfo() = default;
+AXTree::NodeSetSizePosInSetInfo::~NodeSetSizePosInSetInfo() = default;
 
 struct AXTree::OrderedSetContent {
   explicit OrderedSetContent(const AXNode* ordered_set = nullptr)
diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h
index a51ca8de4c8..8c1c57517ac 100644
--- a/ui/accessibility/ax_tree.h
+++ b/ui/accessibility/ax_tree.h
@@ -328,7 +328,14 @@ class AX_EXPORT AXTree : public AXNode::OwnerTree {
   bool enable_extra_mac_nodes_ = false;
 
   // Contains pos_in_set and set_size data for an AXNode.
-  struct NodeSetSizePosInSetInfo;
+  struct NodeSetSizePosInSetInfo {
+    NodeSetSizePosInSetInfo();
+    ~NodeSetSizePosInSetInfo();
+
+    int32_t pos_in_set = 0;
+    int32_t set_size = 0;
+    base::Optional<int> lowest_hierarchical_level;
+  };
 
   // Represents the content of an ordered set which includes the ordered set
   // items and the ordered set container if it exists.