Blame chromium-84-AXObject-stl-iterator.patch

4f31ec8
From f3dfe39f9fd3091cf1a7146b936d9de77a459435 Mon Sep 17 00:00:00 2001
4f31ec8
From: Piotr Tworek <ptworek@vewd.com>
4f31ec8
Date: Mon, 18 May 2020 15:24:35 +0000
4f31ec8
Subject: [PATCH] Make blink::AXObject::AncestorsIterator STL compatible.
4f31ec8
4f31ec8
Commit 31e5188ffc9a04295997d22bfdb68fc367bef047, "Used some methods from
4f31ec8
AXRoleProperties in AXObject" started using std::any_of with this custom
4f31ec8
iterator type. Unfortunately this iterator does not provide traits
4f31ec8
mandated by the standard. This works fine for libcxx, but fails when
4f31ec8
compiling the code against libstdc++.
4f31ec8
4f31ec8
Bug: 819294
4f31ec8
Change-Id: I78fe25475593d73ce255f1de955aa41e936dff86
4f31ec8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207112
4f31ec8
Reviewed-by: Kentaro Hara <haraken@chromium.org>
4f31ec8
Commit-Queue: Piotr Tworek <ptworek@vewd.com>
4f31ec8
Cr-Commit-Position: refs/heads/master@{#769713}
4f31ec8
---
4f31ec8
4f31ec8
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h
4f31ec8
index 841715b..fbb87bf 100644
4f31ec8
--- a/third_party/blink/renderer/modules/accessibility/ax_object.h
4f31ec8
+++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
4f31ec8
@@ -274,6 +274,12 @@
4f31ec8
   class MODULES_EXPORT AncestorsIterator final
4f31ec8
       : public GarbageCollected<AncestorsIterator> {
4f31ec8
    public:
4f31ec8
+    using iterator_category = std::forward_iterator_tag;
4f31ec8
+    using value_type = AXObject;
4f31ec8
+    using difference_type = ptrdiff_t;
4f31ec8
+    using pointer = value_type*;
4f31ec8
+    using reference = value_type&;
4f31ec8
+
4f31ec8
     ~AncestorsIterator() = default;
4f31ec8
 
4f31ec8
     AncestorsIterator(const AncestorsIterator& other)