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

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: Fix getSVGDocument to return SVGDocument 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 3686 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
Erik Dahlström (inactive) 2014/01/24 10:30:37 Do we know how much content would break if we remo
Inactive 2014/01/24 14:02:00 I advised Rob to add a UseCounter for this one to
3708 {
3709 if (!isSVGDocument()) {
3710 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, 0 ));
3711 return 0;
3712 }
3713 // Legacy SVGDocument behavior.
3714 return createEvent("undefined", exceptionState);
arv (Not doing code reviews) 2014/01/24 14:46:52 Crazy, but OK.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698