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

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 196833005: Don't call Chrome::print() if there is a provisional DocumentLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 972
973 void DOMWindow::print() 973 void DOMWindow::print()
974 { 974 {
975 if (!m_frame) 975 if (!m_frame)
976 return; 976 return;
977 977
978 FrameHost* host = m_frame->host(); 978 FrameHost* host = m_frame->host();
979 if (!host) 979 if (!host)
980 return; 980 return;
981 981
982 if (m_frame->loader().documentLoader()->isLoading()) { 982 if (m_frame->loader().provisionalDocumentLoader() || m_frame->loader().docum entLoader()->isLoading()) {
983 m_shouldPrintWhenFinishedLoading = true; 983 m_shouldPrintWhenFinishedLoading = true;
984 return; 984 return;
985 } 985 }
986 m_shouldPrintWhenFinishedLoading = false; 986 m_shouldPrintWhenFinishedLoading = false;
987 host->chrome().print(m_frame); 987 host->chrome().print(m_frame);
988 } 988 }
989 989
990 void DOMWindow::stop() 990 void DOMWindow::stop()
991 { 991 {
992 if (!m_frame) 992 if (!m_frame)
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier()); 1860 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier());
1861 } 1861 }
1862 1862
1863 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() 1863 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
1864 { 1864 {
1865 return DOMWindowLifecycleNotifier::create(this); 1865 return DOMWindowLifecycleNotifier::create(this);
1866 } 1866 }
1867 1867
1868 1868
1869 } // namespace WebCore 1869 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698