Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 2721423003: Reset Frame::m_hasReceivedUserGesture for main frames on navigation (Closed)
Patch Set: One bit, reset for main frames on commit Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/web/WebFrame.h" 5 #include "public/web/WebFrame.h"
6 6
7 #include "bindings/core/v8/WindowProxyManager.h" 7 #include "bindings/core/v8/WindowProxyManager.h"
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // This trace event is needed to detect the main frame of the 103 // This trace event is needed to detect the main frame of the
104 // renderer in telemetry metrics. See crbug.com/692112#c11. 104 // renderer in telemetry metrics. See crbug.com/692112#c11.
105 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame", 105 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame",
106 TRACE_EVENT_SCOPE_THREAD, "frame", &localFrame); 106 TRACE_EVENT_SCOPE_THREAD, "frame", &localFrame);
107 } 107 }
108 } else { 108 } else {
109 toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name, 109 toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name,
110 uniqueName); 110 uniqueName);
111 } 111 }
112 112
113 if (oldFrame->hasReceivedUserGesture()) 113 if (m_parent && oldFrame->hasReceivedUserGesture())
114 frame->toImplBase()->frame()->setDocumentHasReceivedUserGesture(); 114 frame->toImplBase()->frame()->setDocumentHasReceivedUserGesture();
115 115
116 frame->toImplBase()->frame()->getWindowProxyManager()->setGlobals(globals); 116 frame->toImplBase()->frame()->getWindowProxyManager()->setGlobals(globals);
117 117
118 m_parent = nullptr; 118 m_parent = nullptr;
119 119
120 return true; 120 return true;
121 } 121 }
122 122
123 void WebFrame::detach() { 123 void WebFrame::detach() {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 for (WebFrame* child = frame->firstChild(); child; 313 for (WebFrame* child = frame->firstChild(); child;
314 child = child->nextSibling()) 314 child = child->nextSibling())
315 traceFrame(visitor, child); 315 traceFrame(visitor, child);
316 } 316 }
317 317
318 void WebFrame::close() { 318 void WebFrame::close() {
319 m_openedFrameTracker->dispose(); 319 m_openedFrameTracker->dispose();
320 } 320 }
321 321
322 } // namespace blink 322 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698