Commit e19fa28d authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

Marks the document object as busy while it is still loading

Screen readers want to have a reliable way to know whether a document is still loading so as to ignore events coming from it.
The current change can be made irrespective to whether we will mark the document as loaded when HTML parsing has started or when the "interactive" readyState has been entered.

R=dmazzoni@chromium.org, aleventhal@chromium.org

Bug: 897177
Change-Id: I5d734ff9d32c53b7ba12a6d5d4eeb74b26ba0a02
Reviewed-on: https://chromium-review.googlesource.com/c/1295769
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606147}
parent 6320a166
......@@ -207,8 +207,7 @@ void BrowserAccessibilityManager::FireFocusEventsIfNeeded() {
// or for the document to actually finish loading.
if (focus && focus == focus->manager()->GetRoot() &&
focus->PlatformChildCount() == 0 &&
!focus->GetBoolAttribute(ax::mojom::BoolAttribute::kBusy) &&
!focus->manager()->GetTreeData().loaded) {
focus->GetBoolAttribute(ax::mojom::BoolAttribute::kBusy)) {
focus = nullptr;
}
......
......@@ -443,6 +443,9 @@ void BlinkAXTreeSource::SerializeNode(WebAXObject src,
TRACE_EVENT1("accessibility", "BlinkAXTreeSource::SerializeNode", "role",
ui::ToString(dst->role));
if (src.Equals(root()) && !root().IsLoaded())
dst->AddBoolAttribute(ax::mojom::BoolAttribute::kBusy, true);
WebAXObject offset_container;
WebFloatRect bounds_in_container;
SkMatrix44 container_transform;
......
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