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

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, 11 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
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 3689 matching lines...) Expand 10 before | Expand all | Expand 10 after
3700 PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState) 3700 PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState)
3701 { 3701 {
3702 RefPtr<Event> event = EventFactory::create(eventType); 3702 RefPtr<Event> event = EventFactory::create(eventType);
3703 if (event) 3703 if (event)
3704 return event.release(); 3704 return event.release();
3705 3705
3706 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); 3706 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid.");
3707 return 0; 3707 return 0;
3708 } 3708 }
3709 3709
3710 PassRefPtr<Event> Document::createEvent(ExceptionState& exceptionState)
3711 {
3712 if (!isSVGDocument()) {
Inactive 2014/01/27 15:48:55 The UseCounter should likely be at the beginning o
3713 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0 ));
3714 return 0;
3715 }
3716 // Legacy SVGDocument behavior.
3717 return createEvent("undefined", exceptionState);
3718 }
3719
3710 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType) 3720 void Document::addMutationEventListenerTypeIfEnabled(ListenerType listenerType)
3711 { 3721 {
3712 if (ContextFeatures::mutationEventsEnabled(this)) 3722 if (ContextFeatures::mutationEventsEnabled(this))
3713 addListenerType(listenerType); 3723 addListenerType(listenerType);
3714 } 3724 }
3715 3725
3716 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) 3726 void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
3717 { 3727 {
3718 if (eventType == EventTypeNames::DOMSubtreeModified) { 3728 if (eventType == EventTypeNames::DOMSubtreeModified) {
3719 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent); 3729 UseCounter::count(*this, UseCounter::DOMSubtreeModifiedEvent);
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
5364 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) 5374 if (!page->focusController().isActive() || !page->focusController().isFocuse d())
5365 return false; 5375 return false;
5366 if (Frame* focusedFrame = page->focusController().focusedFrame()) { 5376 if (Frame* focusedFrame = page->focusController().focusedFrame()) {
5367 if (focusedFrame->tree().isDescendantOf(frame())) 5377 if (focusedFrame->tree().isDescendantOf(frame()))
5368 return true; 5378 return true;
5369 } 5379 }
5370 return false; 5380 return false;
5371 } 5381 }
5372 5382
5373 } // namespace WebCore 5383 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698