Commit b0d114d7 authored by Annie Sullivan's avatar Annie Sullivan Committed by Commit Bot

Record input start time in LocalFrame::Reload and CreateWindowForRequest

I found these additional cases in an audit of the code for bug 889220.

Bug: 889220
Change-Id: I649200d91625c2a47848132b79a846174fa4a3e1
Reviewed-on: https://chromium-review.googlesource.com/c/1276551
Commit-Queue: Annie Sullivan <sullivan@chromium.org>
Reviewed-by: default avatarSteve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598820}
parent 2e9d01ad
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include "third_party/blink/renderer/core/editing/serializers/serialization.h" #include "third_party/blink/renderer/core/editing/serializers/serialization.h"
#include "third_party/blink/renderer/core/editing/spellcheck/spell_checker.h" #include "third_party/blink/renderer/core/editing/spellcheck/spell_checker.h"
#include "third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller.h" #include "third_party/blink/renderer/core/editing/suggestion/text_suggestion_controller.h"
#include "third_party/blink/renderer/core/events/current_input_event.h"
#include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h" #include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h"
#include "third_party/blink/renderer/core/frame/ad_tracker.h" #include "third_party/blink/renderer/core/frame/ad_tracker.h"
#include "third_party/blink/renderer/core/frame/content_settings_client.h" #include "third_party/blink/renderer/core/frame/content_settings_client.h"
...@@ -458,6 +459,9 @@ void LocalFrame::Reload(WebFrameLoadType load_type, ...@@ -458,6 +459,9 @@ void LocalFrame::Reload(WebFrameLoadType load_type,
nullptr, nullptr,
loader_.ResourceRequestForReload(load_type, client_redirect_policy)); loader_.ResourceRequestForReload(load_type, client_redirect_policy));
request.SetClientRedirect(client_redirect_policy); request.SetClientRedirect(client_redirect_policy);
if (const WebInputEvent* input_event = CurrentInputEvent::Get()) {
request.SetInputStartTime(input_event->TimeStamp());
}
loader_.StartNavigation(request, load_type); loader_.StartNavigation(request, load_type);
} else { } else {
DCHECK_EQ(WebFrameLoadType::kReload, load_type); DCHECK_EQ(WebFrameLoadType::kReload, load_type);
......
...@@ -493,6 +493,9 @@ void CreateWindowForRequest(const FrameLoadRequest& request, ...@@ -493,6 +493,9 @@ void CreateWindowForRequest(const FrameLoadRequest& request,
// TODO(japhet): Form submissions on RemoteFrames don't work yet. // TODO(japhet): Form submissions on RemoteFrames don't work yet.
FrameLoadRequest new_request(nullptr, request.GetResourceRequest()); FrameLoadRequest new_request(nullptr, request.GetResourceRequest());
new_request.SetForm(request.Form()); new_request.SetForm(request.Form());
if (const WebInputEvent* input_event = CurrentInputEvent::Get()) {
new_request.SetInputStartTime(input_event->TimeStamp());
}
auto blob_url_token = request.GetBlobURLToken(); auto blob_url_token = request.GetBlobURLToken();
if (blob_url_token) if (blob_url_token)
new_request.SetBlobURLToken(std::move(blob_url_token)); new_request.SetBlobURLToken(std::move(blob_url_token));
......
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