Commit 701e52da authored by Jacques Newman's avatar Jacques Newman Committed by Commit Bot

Only defer accessibility events from the main frame.

This is just a mitigation in case we need it,
I am still investigating to see if there is a
better solution.
CL that introduced regression:

https: //chromium-review.googlesource.com/c/chromium/src/+/2219098
Bug: 1110068
Change-Id: Ib69395ea6ebe56183a9e39d1696ea42c64411b79
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2328051Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Jacques Newman <janewman@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#794742}
parent 483edd7d
...@@ -222,6 +222,11 @@ RenderAccessibilityImpl::RenderAccessibilityImpl( ...@@ -222,6 +222,11 @@ RenderAccessibilityImpl::RenderAccessibilityImpl(
settings->SetAriaModalPrunesAXTree(true); settings->SetAriaModalPrunesAXTree(true);
#endif #endif
if (render_frame_->IsMainFrame())
event_schedule_mode_ = EventScheduleMode::kDeferEvents;
else
event_schedule_mode_ = EventScheduleMode::kProcessEventsImmediately;
const WebDocument& document = GetMainDocument(); const WebDocument& document = GetMainDocument();
if (!document.IsNull()) { if (!document.IsNull()) {
ax_context_ = std::make_unique<WebAXContext>(document); ax_context_ = std::make_unique<WebAXContext>(document);
......
...@@ -297,8 +297,8 @@ class CONTENT_EXPORT RenderAccessibilityImpl : public RenderAccessibility, ...@@ -297,8 +297,8 @@ class CONTENT_EXPORT RenderAccessibilityImpl : public RenderAccessibility,
// (only when debugging flags are enabled, never under normal circumstances). // (only when debugging flags are enabled, never under normal circumstances).
bool has_injected_stylesheet_ = false; bool has_injected_stylesheet_ = false;
// We defer events to improve performance durung the initial page load. // We defer events to improve performance during the initial page load.
EventScheduleMode event_schedule_mode_ = EventScheduleMode::kDeferEvents; EventScheduleMode event_schedule_mode_;
// Whether we should highlight annotation results visually on the page // Whether we should highlight annotation results visually on the page
// for debugging. // for debugging.
......
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