You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/chromium-82-gcc-incomplete-...

54 lines
1.8 KiB

From c0b32910da192edf1b41eb52c088d0213ab2807a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sun, 05 Apr 2020 08:29:21 +0000
Subject: [PATCH] libstdc++: fix incomplete-type in AXTree for NodeSetSizePosInSetInfo
std::unordered_map<T, U> requires U to be fully declared. ax_tree.h
has only forward declaration of NodeSetSizePosInSetInfo. Therefore,
move declaration from ax_tree.cc.
Bug: 957519
Change-Id: Ic1f4bf3ebfea229ece84251e46d4461b31873868
---
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index 7b8d9b1..e915402 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -567,14 +567,8 @@
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 a51ca8d..8c1c575 100644
--- a/ui/accessibility/ax_tree.h
+++ b/ui/accessibility/ax_tree.h
@@ -328,7 +328,14 @@
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.