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 3928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3939 { | 3939 { |
3940 DCHECK(!eventFactories().contains(eventFactory.get())); | 3940 DCHECK(!eventFactories().contains(eventFactory.get())); |
3941 eventFactories().add(std::move(eventFactory)); | 3941 eventFactories().add(std::move(eventFactory)); |
3942 } | 3942 } |
3943 | 3943 |
3944 Event* Document::createEvent(ExecutionContext* executionContext, const String& e ventType, ExceptionState& exceptionState) | 3944 Event* Document::createEvent(ExecutionContext* executionContext, const String& e ventType, ExceptionState& exceptionState) |
3945 { | 3945 { |
3946 Event* event = nullptr; | 3946 Event* event = nullptr; |
3947 for (const auto& factory : eventFactories()) { | 3947 for (const auto& factory : eventFactories()) { |
3948 event = factory->create(executionContext, eventType); | 3948 event = factory->create(executionContext, eventType); |
3949 if (event) | 3949 if (event) { |
3950 event->unsetInitializedFlag(); | |
tkent
2016/05/02 00:19:27
This code implements what the specification says a
ramya.v
2016/05/02 05:31:44
Done.
| |
3950 return event; | 3951 return event; |
3952 } | |
3951 } | 3953 } |
3952 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); | 3954 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); |
3953 return nullptr; | 3955 return nullptr; |
3954 } | 3956 } |
3955 | 3957 |
3956 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) | 3958 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) |
3957 { | 3959 { |
3958 if (ContextFeatures::mutationEventsEnabled(this)) | 3960 if (ContextFeatures::mutationEventsEnabled(this)) |
3959 addListenerType(listenerType); | 3961 addListenerType(listenerType); |
3960 } | 3962 } |
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5905 #ifndef NDEBUG | 5907 #ifndef NDEBUG |
5906 using namespace blink; | 5908 using namespace blink; |
5907 void showLiveDocumentInstances() | 5909 void showLiveDocumentInstances() |
5908 { | 5910 { |
5909 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5911 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5910 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5912 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5911 for (Document* document : set) | 5913 for (Document* document : set) |
5912 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); | 5914 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); |
5913 } | 5915 } |
5914 #endif | 5916 #endif |
OLD | NEW |