diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-04 17:20:24 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-12 08:15:25 +0000 |
commit | 8fa0776f1f79e91fc9c0b9c1ba11a0a29c05196b (patch) | |
tree | 788d8d7549712682703a0310ca4a0f0860d4802b /chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc | |
parent | 606d85f2a5386472314d39923da28c70c60dc8e7 (diff) | |
download | qtwebengine-chromium-8fa0776f1f79e91fc9c0b9c1ba11a0a29c05196b.tar.gz |
BASELINE: Update Chromium to 98.0.4758.90
Change-Id: Ib7c41539bf8a8e0376bd639f27d68294de90f3c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc')
-rw-r--r-- | chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc b/chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc index dd784a583d4..fee47dbc29f 100644 --- a/chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc +++ b/chromium/ui/accessibility/platform/ax_platform_node_delegate_base.cc @@ -209,7 +209,7 @@ ax::mojom::NameFrom AXPlatformNodeDelegateBase::GetNameFrom() const { return GetData().GetNameFrom(); } -std::u16string AXPlatformNodeDelegateBase::GetInnerText() const { +std::u16string AXPlatformNodeDelegateBase::GetTextContentUTF16() const { // Unlike in web content The "kValue" attribute always takes precedence, // because we assume that users of this base class, such as Views controls, // are carefully crafted by hand, in contrast to HTML pages, where any content @@ -228,7 +228,7 @@ std::u16string AXPlatformNodeDelegateBase::GetInnerText() const { if (IsLeaf() && !IsInvisibleOrIgnored()) return GetString16Attribute(ax::mojom::StringAttribute::kName); - std::u16string inner_text; + std::u16string text_content; for (int i = 0; i < GetChildCount(); ++i) { // TODO(nektar): Add const to all tree traversal methods and remove // const_cast. @@ -236,9 +236,9 @@ std::u16string AXPlatformNodeDelegateBase::GetInnerText() const { const_cast<AXPlatformNodeDelegateBase*>(this)->ChildAtIndex(i)); if (!child || !child->GetDelegate()) continue; - inner_text += child->GetDelegate()->GetInnerText(); + text_content += child->GetDelegate()->GetTextContentUTF16(); } - return inner_text; + return text_content; } std::u16string AXPlatformNodeDelegateBase::GetValueForControl() const { @@ -286,7 +286,7 @@ AXPlatformNodeDelegateBase::GetNativeViewAccessible() { return nullptr; } -gfx::NativeViewAccessible AXPlatformNodeDelegateBase::GetParent() { +gfx::NativeViewAccessible AXPlatformNodeDelegateBase::GetParent() const { return nullptr; } @@ -593,18 +593,6 @@ gfx::Rect AXPlatformNodeDelegateBase::GetInnerTextRangeBoundsRect( return gfx::Rect(); } -gfx::Rect AXPlatformNodeDelegateBase::GetClippedScreenBoundsRect( - AXOffscreenResult* offscreen_result) const { - return GetBoundsRect(AXCoordinateSystem::kScreenDIPs, - AXClippingBehavior::kClipped, offscreen_result); -} - -gfx::Rect AXPlatformNodeDelegateBase::GetUnclippedScreenBoundsRect( - AXOffscreenResult* offscreen_result) const { - return GetBoundsRect(AXCoordinateSystem::kScreenDIPs, - AXClippingBehavior::kUnclipped, offscreen_result); -} - gfx::NativeViewAccessible AXPlatformNodeDelegateBase::HitTestSync( int screen_physical_pixel_x, int screen_physical_pixel_y) const { @@ -770,6 +758,17 @@ bool AXPlatformNodeDelegateBase::IsCellOrHeaderOfAriaGrid() const { return false; } +bool AXPlatformNodeDelegateBase::IsWebAreaForPresentationalIframe() const { + if (!IsPlatformDocument(GetRole())) + return false; + + AXPlatformNodeDelegate* parent = GetParentDelegate(); + if (!parent) + return false; + + return parent->GetRole() == ax::mojom::Role::kIframePresentational; +} + bool AXPlatformNodeDelegateBase::IsOrderedSetItem() const { return false; } @@ -941,7 +940,9 @@ absl::optional<int> AXPlatformNodeDelegateBase::FindTextBoundary( } const std::vector<gfx::NativeViewAccessible> -AXPlatformNodeDelegateBase::GetUIADescendants() const { +AXPlatformNodeDelegateBase::GetUIADirectChildrenInRange( + ui::AXPlatformNodeDelegate* start, + ui::AXPlatformNodeDelegate* end) { return {}; } @@ -949,7 +950,7 @@ std::string AXPlatformNodeDelegateBase::GetLanguage() const { return std::string(); } -AXPlatformNodeDelegate* AXPlatformNodeDelegateBase::GetParentDelegate() { +AXPlatformNodeDelegate* AXPlatformNodeDelegateBase::GetParentDelegate() const { AXPlatformNode* parent_node = ui::AXPlatformNode::FromNativeViewAccessible(GetParent()); if (parent_node) |