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 3686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3697 PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState) | 3697 PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState) |
3698 { | 3698 { |
3699 RefPtr<Event> event = EventFactory::create(eventType); | 3699 RefPtr<Event> event = EventFactory::create(eventType); |
3700 if (event) | 3700 if (event) |
3701 return event.release(); | 3701 return event.release(); |
3702 | 3702 |
3703 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); | 3703 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); |
3704 return 0; | 3704 return 0; |
3705 } | 3705 } |
3706 | 3706 |
3707 PassRefPtr<Event> Document::createEvent(ExceptionState& exceptionState) | |
3708 { | |
Inactive
2014/01/24 00:23:47
Maybe we should add a UseCounter for this because
| |
3709 if (!isSVGDocument()) { | |
3710 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0 )); | |
3711 return 0; | |
3712 } | |
3713 // Legacy SVGDocument behavior. | |
3714 return createEvent("undefined", exceptionState); | |
3715 } | |
3716 | |
3707 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) | 3717 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) |
3708 { | 3718 { |
3709 if (ContextFeatures::mutationEventsEnabled(this)) | 3719 if (ContextFeatures::mutationEventsEnabled(this)) |
3710 addListenerType(listenerType); | 3720 addListenerType(listenerType); |
3711 } | 3721 } |
3712 | 3722 |
3713 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) | 3723 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) |
3714 { | 3724 { |
3715 if (eventType == EventTypeNames::DOMSubtreeModified) { | 3725 if (eventType == EventTypeNames::DOMSubtreeModified) { |
3716 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent); | 3726 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent); |
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5355 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) | 5365 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) |
5356 return false; | 5366 return false; |
5357 if (Frame* focusedFrame = page->focusController().focusedFrame()) { | 5367 if (Frame* focusedFrame = page->focusController().focusedFrame()) { |
5358 if (focusedFrame->tree().isDescendantOf(frame())) | 5368 if (focusedFrame->tree().isDescendantOf(frame())) |
5359 return true; | 5369 return true; |
5360 } | 5370 } |
5361 return false; | 5371 return false; |
5362 } | 5372 } |
5363 | 5373 |
5364 } // namespace WebCore | 5374 } // namespace WebCore |
OLD | NEW |