| 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 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2890 if (m_frame) | 2890 if (m_frame) |
| 2891 m_frame->eventHandler()->addPendingFrameBeforeUnloadEventCount(); | 2891 m_frame->eventHandler()->addPendingFrameBeforeUnloadEventCount(); |
| 2892 } | 2892 } |
| 2893 | 2893 |
| 2894 void Document::removePendingFrameBeforeUnloadEventCount() | 2894 void Document::removePendingFrameBeforeUnloadEventCount() |
| 2895 { | 2895 { |
| 2896 if (m_frame) | 2896 if (m_frame) |
| 2897 m_frame->eventHandler()->removePendingFrameBeforeUnloadEventCount(); | 2897 m_frame->eventHandler()->removePendingFrameBeforeUnloadEventCount(); |
| 2898 } | 2898 } |
| 2899 | 2899 |
| 2900 bool Document::hasUnloadEventListener() | |
| 2901 { | |
| 2902 return (hasWindowEventListener(eventNames().unloadEvent) || | |
| 2903 hasWindowEventListener(eventNames().beforeunloadEvent)); | |
| 2904 } | |
| 2905 | |
| 2906 PassRefPtr<EventListener> Document::createEventListener(const String& functionNa
me, const String& code, Node* node) | 2900 PassRefPtr<EventListener> Document::createEventListener(const String& functionNa
me, const String& code, Node* node) |
| 2907 { | 2901 { |
| 2908 Frame* frm = frame(); | 2902 Frame* frm = frame(); |
| 2909 if (!frm || !frm->script()->isEnabled()) | 2903 if (!frm || !frm->script()->isEnabled()) |
| 2910 return 0; | 2904 return 0; |
| 2911 | 2905 |
| 2912 #if ENABLE(SVG) | 2906 #if ENABLE(SVG) |
| 2913 if (node ? node->isSVGElement() : isSVGDocument()) | 2907 if (node ? node->isSVGElement() : isSVGDocument()) |
| 2914 return frm->script()->createSVGEventHandler(functionName, code, node); | 2908 return frm->script()->createSVGEventHandler(functionName, code, node); |
| 2915 #endif | 2909 #endif |
| (...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4483 !m_haveExplicitlyDisabledDNSPrefetch) { | 4477 !m_haveExplicitlyDisabledDNSPrefetch) { |
| 4484 m_isDNSPrefetchEnabled = true; | 4478 m_isDNSPrefetchEnabled = true; |
| 4485 return; | 4479 return; |
| 4486 } | 4480 } |
| 4487 | 4481 |
| 4488 m_isDNSPrefetchEnabled = false; | 4482 m_isDNSPrefetchEnabled = false; |
| 4489 m_haveExplicitlyDisabledDNSPrefetch = true; | 4483 m_haveExplicitlyDisabledDNSPrefetch = true; |
| 4490 } | 4484 } |
| 4491 | 4485 |
| 4492 } // namespace WebCore | 4486 } // namespace WebCore |
| OLD | NEW |