| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |   2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 
|   3  * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |   3  * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 
|   4  * |   4  * | 
|   5  * This library is free software; you can redistribute it and/or |   5  * This library is free software; you can redistribute it and/or | 
|   6  * modify it under the terms of the GNU Library General Public |   6  * modify it under the terms of the GNU Library General Public | 
|   7  * License as published by the Free Software Foundation; either |   7  * License as published by the Free Software Foundation; either | 
|   8  * version 2 of the License, or (at your option) any later version. |   8  * version 2 of the License, or (at your option) any later version. | 
|   9  * |   9  * | 
|  10  * This library is distributed in the hope that it will be useful, |  10  * This library is distributed in the hope that it will be useful, | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  42         if ((deferSelf || otherPage != page)) { |  42         if ((deferSelf || otherPage != page)) { | 
|  43             if (!otherPage->defersLoading()) { |  43             if (!otherPage->defersLoading()) { | 
|  44                 m_deferredFrames.append(otherPage->mainFrame()); |  44                 m_deferredFrames.append(otherPage->mainFrame()); | 
|  45  |  45  | 
|  46                 // Ensure that we notify the client if the initial empty documen
    t is accessed before showing anything |  46                 // Ensure that we notify the client if the initial empty documen
    t is accessed before showing anything | 
|  47                 // modal, to prevent spoofs while the modal window or sheet is v
    isible. |  47                 // modal, to prevent spoofs while the modal window or sheet is v
    isible. | 
|  48                 otherPage->mainFrame()->loader()->notifyIfInitialDocumentAccesse
    d(); |  48                 otherPage->mainFrame()->loader()->notifyIfInitialDocumentAccesse
    d(); | 
|  49  |  49  | 
|  50                 // This code is not logically part of load deferring, but we do 
    not want JS code executed beneath modal |  50                 // This code is not logically part of load deferring, but we do 
    not want JS code executed beneath modal | 
|  51                 // windows or sheets, which is exactly when PageGroupLoadDeferre
    r is used. |  51                 // windows or sheets, which is exactly when PageGroupLoadDeferre
    r is used. | 
|  52                 for (Frame* frame = otherPage->mainFrame(); frame; frame = frame
    ->tree()->traverseNext()) |  52                 for (Frame* frame = otherPage->mainFrame(); frame; frame = frame
    ->tree().traverseNext()) | 
|  53                     frame->document()->suspendScheduledTasks(); |  53                     frame->document()->suspendScheduledTasks(); | 
|  54             } |  54             } | 
|  55         } |  55         } | 
|  56     } |  56     } | 
|  57  |  57  | 
|  58     size_t count = m_deferredFrames.size(); |  58     size_t count = m_deferredFrames.size(); | 
|  59     for (size_t i = 0; i < count; ++i) |  59     for (size_t i = 0; i < count; ++i) | 
|  60         if (Page* page = m_deferredFrames[i]->page()) |  60         if (Page* page = m_deferredFrames[i]->page()) | 
|  61             page->setDefersLoading(true); |  61             page->setDefersLoading(true); | 
|  62 } |  62 } | 
|  63  |  63  | 
|  64 PageGroupLoadDeferrer::~PageGroupLoadDeferrer() |  64 PageGroupLoadDeferrer::~PageGroupLoadDeferrer() | 
|  65 { |  65 { | 
|  66     for (size_t i = 0; i < m_deferredFrames.size(); ++i) { |  66     for (size_t i = 0; i < m_deferredFrames.size(); ++i) { | 
|  67         if (Page* page = m_deferredFrames[i]->page()) { |  67         if (Page* page = m_deferredFrames[i]->page()) { | 
|  68             page->setDefersLoading(false); |  68             page->setDefersLoading(false); | 
|  69  |  69  | 
|  70             for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()-
    >traverseNext()) |  70             for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().
    traverseNext()) | 
|  71                 frame->document()->resumeScheduledTasks(); |  71                 frame->document()->resumeScheduledTasks(); | 
|  72         } |  72         } | 
|  73     } |  73     } | 
|  74 } |  74 } | 
|  75  |  75  | 
|  76  |  76  | 
|  77 } // namespace WebCore |  77 } // namespace WebCore | 
| OLD | NEW |