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

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

Issue 2611753003: Rename blink::Page's load deferral to suspension (Closed)
Patch Set: Created 3 years, 11 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 /* 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 inline void dispatchEventsOnWindowAndFocusedElement(Document* document, 359 inline void dispatchEventsOnWindowAndFocusedElement(Document* document,
360 bool focused) { 360 bool focused) {
361 DCHECK(document); 361 DCHECK(document);
362 // If we have a focused element we should dispatch blur on it before we blur 362 // If we have a focused element we should dispatch blur on it before we blur
363 // the window. If we have a focused element we should dispatch focus on it 363 // the window. If we have a focused element we should dispatch focus on it
364 // after we focus the window. https://bugs.webkit.org/show_bug.cgi?id=27105 364 // after we focus the window. https://bugs.webkit.org/show_bug.cgi?id=27105
365 365
366 // Do not fire events while modal dialogs are up. See 366 // Do not fire events while modal dialogs are up. See
367 // https://bugs.webkit.org/show_bug.cgi?id=33962 367 // https://bugs.webkit.org/show_bug.cgi?id=33962
368 if (Page* page = document->page()) { 368 if (Page* page = document->page()) {
369 if (page->defersLoading()) 369 if (page->suspended())
370 return; 370 return;
371 } 371 }
372 372
373 if (!focused && document->focusedElement()) { 373 if (!focused && document->focusedElement()) {
374 Element* focusedElement = document->focusedElement(); 374 Element* focusedElement = document->focusedElement();
375 focusedElement->setFocused(false); 375 focusedElement->setFocused(false);
376 dispatchBlurEvent(*document, *focusedElement); 376 dispatchBlurEvent(*document, *focusedElement);
377 } 377 }
378 378
379 if (LocalDOMWindow* window = document->domWindow()) 379 if (LocalDOMWindow* window = document->domWindow())
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 1391
1392 return consumed; 1392 return consumed;
1393 } 1393 }
1394 1394
1395 DEFINE_TRACE(FocusController) { 1395 DEFINE_TRACE(FocusController) {
1396 visitor->trace(m_page); 1396 visitor->trace(m_page);
1397 visitor->trace(m_focusedFrame); 1397 visitor->trace(m_focusedFrame);
1398 } 1398 }
1399 1399
1400 } // namespace blink 1400 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698