diff options
author | kenrb <kenrb@chromium.org> | 2015-10-02 07:22:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-02 14:23:22 +0000 |
commit | d79de93d888aa78e3caeab8d5288915cdb4c7f29 (patch) | |
tree | 317434fdc42ad592307f7a37983a882c4dd5ceca /content/renderer | |
parent | 1f99ff0f7ccd143dcfcd46161500bc9d62d031c6 (diff) | |
download | chromium_src-d79de93d888aa78e3caeab8d5288915cdb4c7f29.zip chromium_src-d79de93d888aa78e3caeab8d5288915cdb4c7f29.tar.gz chromium_src-d79de93d888aa78e3caeab8d5288915cdb4c7f29.tar.bz2 |
Make rendering timeouts work even if paint data received early
The initial implementation of the browser paint timer for a new page
load assumed that the DidCommitProvisionalLoad IPC would be received
before any compositor frame generated from rendering the new page.
This turns out to be false. This CL adds a new IPC that is queued to
be sent when a new compositor frame is generated, and can be handled by
the browser even if it arrives too early. In that case, a flag is set
that tells RenderWidgetHost to not set the timer.
BUG=535375
Review URL: https://codereview.chromium.org/1376003002
Cr-Commit-Position: refs/heads/master@{#352028}
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/render_frame_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 045540d..ff5d269 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -2740,6 +2740,14 @@ void RenderFrameImpl::didCommitProvisionalLoad( } } + // For new page navigations, the browser process needs to be notified of the + // first paint of that page, so it can cancel the timer that waits for it. + if (is_main_frame_ && !navigation_state->WasWithinSamePage()) { + render_view_->QueueMessage( + new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_), + MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); + } + // When we perform a new navigation, we need to update the last committed // session history entry with state for the page we are leaving. Do this // before updating the HistoryController state. |