From e45876ce9e178d63998ce8b0d3ad381815e28d7d Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Tue, 4 Aug 2026 18:54:09 +0900 Subject: [PATCH 1/2] Support gcc 10+ toolchains in accessibility headers gcc 9.2.0 (Tizen 6.0/6.5/8.0) compiles these headers as-is, gcc 10 and later do not. Verified clean at -std=c++17 -Werror against gcc 9.2.0 (arm, arm64, x64 sysroots), libstdc++ 10, 11, 12, 13 and gcc 14.2.0 (Tizen 11.0 arm64). AXEventGenerator::Iterator now matches the current Chromium implementation, which spells out the five iterator_traits typedefs instead of deriving from the deprecated std::iterator: https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/ax_event_generator.h --- flutter/third_party/accessibility/ax/ax_active_popup.h | 1 + flutter/third_party/accessibility/ax/ax_event_generator.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/flutter/third_party/accessibility/ax/ax_active_popup.h b/flutter/third_party/accessibility/ax/ax_active_popup.h index 39b8beda..94f15c66 100644 --- a/flutter/third_party/accessibility/ax/ax_active_popup.h +++ b/flutter/third_party/accessibility/ax/ax_active_popup.h @@ -5,6 +5,7 @@ #ifndef UI_ACCESSIBILITY_AX_ACTIVE_POPUP_H_ #define UI_ACCESSIBILITY_AX_ACTIVE_POPUP_H_ +#include #include #include "ax/ax_export.h" diff --git a/flutter/third_party/accessibility/ax/ax_event_generator.h b/flutter/third_party/accessibility/ax/ax_event_generator.h index 688cffcd..f66e5f0c 100644 --- a/flutter/third_party/accessibility/ax/ax_event_generator.h +++ b/flutter/third_party/accessibility/ax/ax_event_generator.h @@ -125,9 +125,13 @@ class AX_EXPORT AXEventGenerator : public AXTreeObserver { const EventParams& event_params; }; - class AX_EXPORT Iterator - : public std::iterator { + class AX_EXPORT Iterator { public: + using iterator_category = std::input_iterator_tag; + using value_type = TargetedEvent; + using difference_type = std::ptrdiff_t; + using pointer = TargetedEvent*; + using reference = TargetedEvent&; Iterator( const std::map>& map, const std::map>::const_iterator& head); From 9ad513d326f84818b6314b9890838f5c3e128101 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Wed, 5 Aug 2026 15:31:14 +0900 Subject: [PATCH 2/2] fix(a11y): remove deprecated iterator base --- flutter/third_party/accessibility/ax/ax_range.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flutter/third_party/accessibility/ax/ax_range.h b/flutter/third_party/accessibility/ax/ax_range.h index 79bcc9f1..57219d51 100644 --- a/flutter/third_party/accessibility/ax/ax_range.h +++ b/flutter/third_party/accessibility/ax/ax_range.h @@ -190,8 +190,14 @@ class AXRange { // // This class allows AXRange to be iterated through all "leaf text ranges" // contained between its endpoints, composing the entire range. - class Iterator : public std::iterator { + class Iterator { public: + using iterator_category = std::input_iterator_tag; + using value_type = AXRange; + using difference_type = std::ptrdiff_t; + using pointer = AXRange*; + using reference = AXRange&; + Iterator() : current_start_(AXPositionType::CreateNullPosition()), iterator_end_(AXPositionType::CreateNullPosition()) {}