| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 m_client->show(policy); | 134 m_client->show(policy); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool Chrome::canRunModal() const | 137 bool Chrome::canRunModal() const |
| 138 { | 138 { |
| 139 return m_client->canRunModal(); | 139 return m_client->canRunModal(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp
e dialog, const String& message) | 142 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp
e dialog, const String& message) |
| 143 { | 143 { |
| 144 for (LocalFrame* frame = page->mainFrame(); frame; frame = frame->tree().tra
verseNext()) { | 144 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverse
Next()) { |
| 145 Document::PageDismissalType dismissal = frame->document()->pageDismissal
EventBeingDispatched(); | 145 if (!frame->isLocalFrame()) |
| 146 continue; |
| 147 Document::PageDismissalType dismissal = toLocalFrame(frame)->document()-
>pageDismissalEventBeingDispatched(); |
| 146 if (dismissal != Document::NoDismissal) | 148 if (dismissal != Document::NoDismissal) |
| 147 return page->chrome().client().shouldRunModalDialogDuringPageDismiss
al(dialog, message, dismissal); | 149 return page->chrome().client().shouldRunModalDialogDuringPageDismiss
al(dialog, message, dismissal); |
| 148 } | 150 } |
| 149 return true; | 151 return true; |
| 150 } | 152 } |
| 151 | 153 |
| 152 bool Chrome::canRunModalNow() const | 154 bool Chrome::canRunModalNow() const |
| 153 { | 155 { |
| 154 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien
t::HTMLDialog, String()); | 156 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien
t::HTMLDialog, String()); |
| 155 } | 157 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 for (size_t i = 0; i < observers.size(); ++i) | 407 for (size_t i = 0; i < observers.size(); ++i) |
| 406 observers[i]->willOpenPopup(); | 408 observers[i]->willOpenPopup(); |
| 407 } | 409 } |
| 408 | 410 |
| 409 void Chrome::willBeDestroyed() | 411 void Chrome::willBeDestroyed() |
| 410 { | 412 { |
| 411 m_client->chromeDestroyed(); | 413 m_client->chromeDestroyed(); |
| 412 } | 414 } |
| 413 | 415 |
| 414 } // namespace WebCore | 416 } // namespace WebCore |
| OLD | NEW |