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

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

Issue 2526163002: Rename blink::Page's load deferral to suspension (Closed)
Patch Set: Created 4 years 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 inline void dispatchEventsOnWindowAndFocusedElement(Document* document, 339 inline void dispatchEventsOnWindowAndFocusedElement(Document* document,
340 bool focused) { 340 bool focused) {
341 DCHECK(document); 341 DCHECK(document);
342 // If we have a focused element we should dispatch blur on it before we blur 342 // If we have a focused element we should dispatch blur on it before we blur
343 // the window. If we have a focused element we should dispatch focus on it 343 // the window. If we have a focused element we should dispatch focus on it
344 // after we focus the window. https://bugs.webkit.org/show_bug.cgi?id=27105 344 // after we focus the window. https://bugs.webkit.org/show_bug.cgi?id=27105
345 345
346 // Do not fire events while modal dialogs are up. See 346 // Do not fire events while modal dialogs are up. See
347 // https://bugs.webkit.org/show_bug.cgi?id=33962 347 // https://bugs.webkit.org/show_bug.cgi?id=33962
348 if (Page* page = document->page()) { 348 if (Page* page = document->page()) {
349 if (page->defersLoading()) 349 if (page->suspended())
350 return; 350 return;
351 } 351 }
352 352
353 if (!focused && document->focusedElement()) { 353 if (!focused && document->focusedElement()) {
354 Element* focusedElement = document->focusedElement(); 354 Element* focusedElement = document->focusedElement();
355 focusedElement->setFocused(false); 355 focusedElement->setFocused(false);
356 dispatchBlurEvent(*document, *focusedElement); 356 dispatchBlurEvent(*document, *focusedElement);
357 } 357 }
358 358
359 if (LocalDOMWindow* window = document->domWindow()) 359 if (LocalDOMWindow* window = document->domWindow())
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 1411
1412 return consumed; 1412 return consumed;
1413 } 1413 }
1414 1414
1415 DEFINE_TRACE(FocusController) { 1415 DEFINE_TRACE(FocusController) {
1416 visitor->trace(m_page); 1416 visitor->trace(m_page);
1417 visitor->trace(m_focusedFrame); 1417 visitor->trace(m_focusedFrame);
1418 } 1418 }
1419 1419
1420 } // namespace blink 1420 } // 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