Commit 8b456382 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

Cleanup: Move reset accessibility_reset_count_ = 0;

It was previous reset once per navigations, including the same-document
ones. This moves it toward DidCommitNewDocument();

Bug: 1113294
Change-Id: I7a947d9b693fd1380da54996e60431642f4cdde1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538212
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829184}
parent 07c02b74
......@@ -982,8 +982,6 @@ RenderFrameHostImpl::RenderFrameHostImpl(
was_discarded_(false),
is_loading_(false),
nav_entry_id_(0),
accessibility_reset_token_(0),
accessibility_reset_count_(0),
browser_plugin_embedder_ax_tree_id_(ui::AXTreeIDUnknown()),
no_create_browser_accessibility_manager_for_testing_(false),
web_ui_type_(WebUI::kNoWebUI),
......@@ -8669,11 +8667,6 @@ bool RenderFrameHostImpl::DidCommitNavigationInternal(
if (!is_same_document_navigation)
UpdateRenderProcessHostFramePriorities();
// TODO(arthursonzogni): Updating this flag for same-document or bfcache
// navigation might not be right. Should this be moved to
// DidCommitNewDocument()?
accessibility_reset_count_ = 0;
// TODO(arthursonzogni): Updating this flag for same-document or bfcache
// navigation isn't right. This should be moved to DidCommitNewDocument().
appcache_handle_ = navigation_request->TakeAppCacheHandle();
......@@ -8883,6 +8876,8 @@ void RenderFrameHostImpl::DidCommitNewDocument(
// TODO(arthursonzogni): Updating this flag for same-document or bfcache
// navigation isn't right. This should be moved to DidCommitNewDocument().
loading_mem_tracker_ = navigation_request->TakePeakGpuMemoryTracker();
accessibility_reset_count_ = 0;
}
void RenderFrameHostImpl::OnSameDocumentCommitProcessed(
......
......@@ -2762,11 +2762,11 @@ class CONTENT_EXPORT RenderFrameHostImpl
// This is nonzero if we sent an accessibility reset to the renderer and
// we're waiting for an IPC containing this reset token (sequentially
// assigned) and a complete replacement accessibility tree.
int accessibility_reset_token_;
int accessibility_reset_token_ = 0;
// A count of the number of times we needed to reset accessibility, so
// we don't keep trying to reset forever.
int accessibility_reset_count_;
int accessibility_reset_count_ = 0;
// The last AXTreeData for this frame received from the RenderFrame.
ui::AXTreeData ax_tree_data_;
......
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