Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 146193003: Remove SVGDocument binding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3730 PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState) 3730 PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState)
3731 { 3731 {
3732 RefPtr<Event> event = EventFactory::create(eventType); 3732 RefPtr<Event> event = EventFactory::create(eventType);
3733 if (event) 3733 if (event)
3734 return event.release(); 3734 return event.release();
3735 3735
3736 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); 3736 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid.");
3737 return 0; 3737 return 0;
3738 } 3738 }
3739 3739
3740 PassRefPtr<Event> Document::createEvent(ExceptionState& exceptionState)
3741 {
3742 if (!isSVGDocument()) {
3743 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0 ));
3744 return 0;
3745 }
3746
3747 UseCounter::count(this, UseCounter::DocumentCreateEventOptionalArgument);
3748 // Legacy SVGDocument behavior.
3749 return createEvent("undefined", exceptionState);
3750 }
3751
3740 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) 3752 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType)
3741 { 3753 {
3742 if (ContextFeatures::mutationEventsEnabled(this)) 3754 if (ContextFeatures::mutationEventsEnabled(this))
3743 addListenerType(listenerType); 3755 addListenerType(listenerType);
3744 } 3756 }
3745 3757
3746 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) 3758 void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
3747 { 3759 {
3748 if (eventType == EventTypeNames::DOMSubtreeModified) { 3760 if (eventType == EventTypeNames::DOMSubtreeModified) {
3749 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent); 3761 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent);
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
5366 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) 5378 if (!page->focusController().isActive() || !page->focusController().isFocuse d())
5367 return false; 5379 return false;
5368 if (Frame* focusedFrame = page->focusController().focusedFrame()) { 5380 if (Frame* focusedFrame = page->focusController().focusedFrame()) {
5369 if (focusedFrame->tree().isDescendantOf(frame())) 5381 if (focusedFrame->tree().isDescendantOf(frame()))
5370 return true; 5382 return true;
5371 } 5383 }
5372 return false; 5384 return false;
5373 } 5385 }
5374 5386
5375 } // namespace WebCore 5387 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698