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

Side by Side Diff: third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp

Issue 2910233002: Do not fallback to FocusedOrMainFrame() in FocusedLocalFrameInWidget() (Closed)
Patch Set: Fixed a crashing test Created 3 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/frame/WebFrameWidgetBase.h" 5 #include "core/frame/WebFrameWidgetBase.h"
6 6
7 #include "core/dom/UserGestureIndicator.h" 7 #include "core/dom/UserGestureIndicator.h"
8 #include "core/events/WebInputEventConversion.h" 8 #include "core/events/WebInputEventConversion.h"
9 #include "core/exported/WebViewBase.h" 9 #include "core/exported/WebViewBase.h"
10 #include "core/frame/LocalFrameView.h" 10 #include "core/frame/LocalFrameView.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 } 318 }
319 319
320 LocalFrame* WebFrameWidgetBase::FocusedLocalFrameInWidget() const { 320 LocalFrame* WebFrameWidgetBase::FocusedLocalFrameInWidget() const {
321 LocalFrame* frame = GetPage()->GetFocusController().FocusedFrame(); 321 LocalFrame* frame = GetPage()->GetFocusController().FocusedFrame();
322 return (frame && frame->LocalFrameRoot() == ToCoreFrame(LocalRoot())) 322 return (frame && frame->LocalFrameRoot() == ToCoreFrame(LocalRoot()))
323 ? frame 323 ? frame
324 : nullptr; 324 : nullptr;
325 } 325 }
326 326
327 LocalFrame* WebFrameWidgetBase::FocusedLocalFrameAvailableForIme() const {
328 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
329 }
330
327 } // namespace blink 331 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698