| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2964 if (!m_domWindow) | 2964 if (!m_domWindow) |
| 2965 return true; | 2965 return true; |
| 2966 | 2966 |
| 2967 if (!body()) | 2967 if (!body()) |
| 2968 return true; | 2968 return true; |
| 2969 | 2969 |
| 2970 if (processingBeforeUnload()) | 2970 if (processingBeforeUnload()) |
| 2971 return false; | 2971 return false; |
| 2972 | 2972 |
| 2973 BeforeUnloadEvent* beforeUnloadEvent = BeforeUnloadEvent::create(); | 2973 BeforeUnloadEvent* beforeUnloadEvent = BeforeUnloadEvent::create(); |
| 2974 beforeUnloadEvent->initEvent(EventTypeNames::beforeunload, false, true); |
| 2974 m_loadEventProgress = BeforeUnloadEventInProgress; | 2975 m_loadEventProgress = BeforeUnloadEventInProgress; |
| 2975 m_domWindow->dispatchEvent(beforeUnloadEvent, this); | 2976 m_domWindow->dispatchEvent(beforeUnloadEvent, this); |
| 2976 m_loadEventProgress = BeforeUnloadEventCompleted; | 2977 m_loadEventProgress = BeforeUnloadEventCompleted; |
| 2977 if (!beforeUnloadEvent->defaultPrevented()) | 2978 if (!beforeUnloadEvent->defaultPrevented()) |
| 2978 defaultEventHandler(beforeUnloadEvent); | 2979 defaultEventHandler(beforeUnloadEvent); |
| 2979 if (!frame() || beforeUnloadEvent->returnValue().isNull()) | 2980 if (!frame() || beforeUnloadEvent->returnValue().isNull()) |
| 2980 return true; | 2981 return true; |
| 2981 | 2982 |
| 2982 if (didAllowNavigation) { | 2983 if (didAllowNavigation) { |
| 2983 addConsoleMessage(ConsoleMessage::create( | 2984 addConsoleMessage(ConsoleMessage::create( |
| (...skipping 3594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6578 } | 6579 } |
| 6579 | 6580 |
| 6580 void showLiveDocumentInstances() { | 6581 void showLiveDocumentInstances() { |
| 6581 WeakDocumentSet& set = liveDocumentSet(); | 6582 WeakDocumentSet& set = liveDocumentSet(); |
| 6582 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6583 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6583 for (blink::Document* document : set) | 6584 for (blink::Document* document : set) |
| 6584 fprintf(stderr, "- Document %p URL: %s\n", document, | 6585 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6585 document->url().getString().utf8().data()); | 6586 document->url().getString().utf8().data()); |
| 6586 } | 6587 } |
| 6587 #endif | 6588 #endif |
| OLD | NEW |