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

Side by Side Diff: Source/core/page/FocusController.cpp

Issue 184103030: Plumb changes to the focused frame to WebFramelient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix crash Created 6 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 | « Source/core/page/ChromeClient.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 oldFrame->selection().setFocused(false); 249 oldFrame->selection().setFocused(false);
250 oldFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::blur) ); 250 oldFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::blur) );
251 } 251 }
252 252
253 if (newFrame && newFrame->view() && isFocused()) { 253 if (newFrame && newFrame->view() && isFocused()) {
254 newFrame->selection().setFocused(true); 254 newFrame->selection().setFocused(true);
255 newFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::focus )); 255 newFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::focus ));
256 } 256 }
257 257
258 m_isChangingFocusedFrame = false; 258 m_isChangingFocusedFrame = false;
259
260 m_page->chrome().client().focusedFrameChanged(newFrame.get());
259 } 261 }
260 262
261 LocalFrame* FocusController::focusedOrMainFrame() const 263 LocalFrame* FocusController::focusedOrMainFrame() const
262 { 264 {
263 if (LocalFrame* frame = focusedFrame()) 265 if (LocalFrame* frame = focusedFrame())
264 return frame; 266 return frame;
265 return m_page->mainFrame(); 267 return m_page->mainFrame();
266 } 268 }
267 269
268 void FocusController::setFocused(bool focused) 270 void FocusController::setFocused(bool focused)
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */); 904 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */);
903 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type, container); 905 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type, container);
904 if (container && container->isDocumentNode()) 906 if (container && container->isDocumentNode())
905 toDocument(container)->updateLayoutIgnorePendingStylesheets(); 907 toDocument(container)->updateLayoutIgnorePendingStylesheets();
906 } while (!consumed && container); 908 } while (!consumed && container);
907 909
908 return consumed; 910 return consumed;
909 } 911 }
910 912
911 } // namespace WebCore 913 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698