aboutsummaryrefslogtreecommitdiffstats
path: root/chromium/chromium/chromium-gcc10-r769713.patch
blob: c2feb72441fcfb804e658cba15d1e2c4c26c9e84 (plain) (blame)
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
From f3dfe39f9fd3091cf1a7146b936d9de77a459435 Mon Sep 17 00:00:00 2001
From: Piotr Tworek <ptworek@vewd.com>
Date: Mon, 18 May 2020 15:24:35 +0000
Subject: [PATCH] Make blink::AXObject::AncestorsIterator STL compatible.

Commit 31e5188ffc9a04295997d22bfdb68fc367bef047, "Used some methods from
AXRoleProperties in AXObject" started using std::any_of with this custom
iterator type. Unfortunately this iterator does not provide traits
mandated by the standard. This works fine for libcxx, but fails when
compiling the code against libstdc++.

Bug: 819294
Change-Id: I78fe25475593d73ce255f1de955aa41e936dff86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207112
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Piotr Tworek <ptworek@vewd.com>
Cr-Commit-Position: refs/heads/master@{#769713}
---
 .../blink/renderer/modules/accessibility/ax_object.h        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h
index 841715b3cecf..fbb87bfb8e1e 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_object.h
+++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
@@ -274,6 +274,12 @@ class MODULES_EXPORT AXObject : public GarbageCollected<AXObject> {
   class MODULES_EXPORT AncestorsIterator final
       : public GarbageCollected<AncestorsIterator> {
    public:
+    using iterator_category = std::forward_iterator_tag;
+    using value_type = AXObject;
+    using difference_type = ptrdiff_t;
+    using pointer = value_type*;
+    using reference = value_type&;
+
     ~AncestorsIterator() = default;
 
     AncestorsIterator(const AncestorsIterator& other)
-- 
2.26.2