Commit 7d715073 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Ensure accessibility updates get sent when a window is transformed

When an aura Window receives a new transform, it possibly impacts its bounds. Previously, we were only observing OnWindowBoundsChanged, which does not get called for transform changes.

This change makes it so we also observe OnWindowTransformed and fire a location change to push the new location to all accessibility clients.

Bug: 842868
Change-Id: I5251198da8b4af6cb96ad3197a6d37caa0a37faa
Reviewed-on: https://chromium-review.googlesource.com/1195645Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587237}
parent f02655a3
......@@ -161,4 +161,12 @@ void AXWindowObjWrapper::OnWindowVisibilityChanged(aura::Window* window,
ax::mojom::Event::kStateChanged);
}
void AXWindowObjWrapper::OnWindowTransformed(aura::Window* window,
ui::PropertyChangeReason reason) {
if (window != window_)
return;
FireLocationChanges(window_);
}
} // namespace views
......@@ -50,6 +50,8 @@ class AXWindowObjWrapper : public AXAuraObjWrapper,
const void* key,
intptr_t old) override;
void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
void OnWindowTransformed(aura::Window* window,
ui::PropertyChangeReason reason) override;
private:
aura::Window* window_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment