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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 element = registrationContext()->createCustomTagElement(*this, qName); | 829 element = registrationContext()->createCustomTagElement(*this, qName); |
830 else | 830 else |
831 element = createElement(qName, false); | 831 element = createElement(qName, false); |
832 | 832 |
833 if (!typeExtension.isEmpty()) | 833 if (!typeExtension.isEmpty()) |
834 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element
.get(), typeExtension); | 834 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element
.get(), typeExtension); |
835 | 835 |
836 return element.release(); | 836 return element.release(); |
837 } | 837 } |
838 | 838 |
839 ScriptValue Document::registerElement(blink::ScriptState* scriptState, const Ato
micString& name, ExceptionState& exceptionState) | 839 ScriptValue Document::registerElement(ScriptState* scriptState, const AtomicStri
ng& name, ExceptionState& exceptionState) |
840 { | 840 { |
841 return registerElement(scriptState, name, Dictionary(), exceptionState); | 841 return registerElement(scriptState, name, Dictionary(), exceptionState); |
842 } | 842 } |
843 | 843 |
844 ScriptValue Document::registerElement(blink::ScriptState* scriptState, const Ato
micString& name, const Dictionary& options, ExceptionState& exceptionState, Cust
omElement::NameSet validNames) | 844 ScriptValue Document::registerElement(ScriptState* scriptState, const AtomicStri
ng& name, const Dictionary& options, ExceptionState& exceptionState, CustomEleme
nt::NameSet validNames) |
845 { | 845 { |
846 if (!registrationContext()) { | 846 if (!registrationContext()) { |
847 exceptionState.throwDOMException(NotSupportedError, "No element registra
tion context is available."); | 847 exceptionState.throwDOMException(NotSupportedError, "No element registra
tion context is available."); |
848 return ScriptValue(); | 848 return ScriptValue(); |
849 } | 849 } |
850 | 850 |
851 CustomElementConstructorBuilder constructorBuilder(scriptState, &options); | 851 CustomElementConstructorBuilder constructorBuilder(scriptState, &options); |
852 registrationContext()->registerElement(this, &constructorBuilder, name, vali
dNames, exceptionState); | 852 registrationContext()->registerElement(this, &constructorBuilder, name, vali
dNames, exceptionState); |
853 return constructorBuilder.bindingsReturnValue(); | 853 return constructorBuilder.bindingsReturnValue(); |
854 } | 854 } |
(...skipping 3493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4348 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; | 4348 String message = "We don't execute document.execCommand() this time, bec
ause it is called recursively."; |
4349 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); | 4349 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); |
4350 return false; | 4350 return false; |
4351 } | 4351 } |
4352 TemporaryChange<bool> executeScope(inExecCommand, true); | 4352 TemporaryChange<bool> executeScope(inExecCommand, true); |
4353 | 4353 |
4354 // Postpone DOM mutation events, which can execute scripts and change | 4354 // Postpone DOM mutation events, which can execute scripts and change |
4355 // DOM tree against implementation assumption. | 4355 // DOM tree against implementation assumption. |
4356 EventQueueScope eventQueueScope; | 4356 EventQueueScope eventQueueScope; |
4357 Editor::Command editorCommand = command(this, commandName, userInterface); | 4357 Editor::Command editorCommand = command(this, commandName, userInterface); |
4358 blink::Platform::current()->histogramSparse("WebCore.Document.execCommand",
editorCommand.idForHistogram()); | 4358 Platform::current()->histogramSparse("WebCore.Document.execCommand", editorC
ommand.idForHistogram()); |
4359 return editorCommand.execute(value); | 4359 return editorCommand.execute(value); |
4360 } | 4360 } |
4361 | 4361 |
4362 bool Document::queryCommandEnabled(const String& commandName) | 4362 bool Document::queryCommandEnabled(const String& commandName) |
4363 { | 4363 { |
4364 return command(this, commandName).isEnabled(); | 4364 return command(this, commandName).isEnabled(); |
4365 } | 4365 } |
4366 | 4366 |
4367 bool Document::queryCommandIndeterm(const String& commandName) | 4367 bool Document::queryCommandIndeterm(const String& commandName) |
4368 { | 4368 { |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5883 using namespace blink; | 5883 using namespace blink; |
5884 void showLiveDocumentInstances() | 5884 void showLiveDocumentInstances() |
5885 { | 5885 { |
5886 WeakDocumentSet& set = liveDocumentSet(); | 5886 WeakDocumentSet& set = liveDocumentSet(); |
5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5890 } | 5890 } |
5891 } | 5891 } |
5892 #endif | 5892 #endif |
OLD | NEW |