| 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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 3838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3849 PassRefPtrWillBeRawPtr<Event> Document::createEvent(const String& eventType, Exc
eptionState& exceptionState) | 3849 PassRefPtrWillBeRawPtr<Event> Document::createEvent(const String& eventType, Exc
eptionState& exceptionState) |
| 3850 { | 3850 { |
| 3851 RefPtrWillBeRawPtr<Event> event = EventFactory::create(eventType); | 3851 RefPtrWillBeRawPtr<Event> event = EventFactory::create(eventType); |
| 3852 if (event) | 3852 if (event) |
| 3853 return event.release(); | 3853 return event.release(); |
| 3854 | 3854 |
| 3855 exceptionState.throwDOMException(NotSupportedError, "The provided event type
('" + eventType + "') is invalid."); | 3855 exceptionState.throwDOMException(NotSupportedError, "The provided event type
('" + eventType + "') is invalid."); |
| 3856 return nullptr; | 3856 return nullptr; |
| 3857 } | 3857 } |
| 3858 | 3858 |
| 3859 PassRefPtrWillBeRawPtr<Event> Document::createEvent(ExceptionState& exceptionSta
te) | |
| 3860 { | |
| 3861 if (!isSVGDocument()) { | |
| 3862 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0
)); | |
| 3863 return nullptr; | |
| 3864 } | |
| 3865 | |
| 3866 UseCounter::count(this, UseCounter::DocumentCreateEventOptionalArgument); | |
| 3867 // Legacy SVGDocument behavior. | |
| 3868 return createEvent("undefined", exceptionState); | |
| 3869 } | |
| 3870 | |
| 3871 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) | 3859 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) |
| 3872 { | 3860 { |
| 3873 if (ContextFeatures::mutationEventsEnabled(this)) | 3861 if (ContextFeatures::mutationEventsEnabled(this)) |
| 3874 addListenerType(listenerType); | 3862 addListenerType(listenerType); |
| 3875 } | 3863 } |
| 3876 | 3864 |
| 3877 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) | 3865 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) |
| 3878 { | 3866 { |
| 3879 if (eventType == EventTypeNames::DOMSubtreeModified) { | 3867 if (eventType == EventTypeNames::DOMSubtreeModified) { |
| 3880 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent); | 3868 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent); |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5673 visitor->trace(m_mediaQueryMatcher); | 5661 visitor->trace(m_mediaQueryMatcher); |
| 5674 visitor->trace(m_visibilityObservers); | 5662 visitor->trace(m_visibilityObservers); |
| 5675 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5663 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
| 5676 Supplementable<Document>::trace(visitor); | 5664 Supplementable<Document>::trace(visitor); |
| 5677 TreeScope::trace(visitor); | 5665 TreeScope::trace(visitor); |
| 5678 ContainerNode::trace(visitor); | 5666 ContainerNode::trace(visitor); |
| 5679 ExecutionContext::trace(visitor); | 5667 ExecutionContext::trace(visitor); |
| 5680 } | 5668 } |
| 5681 | 5669 |
| 5682 } // namespace WebCore | 5670 } // namespace WebCore |
| OLD | NEW |