| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 #include "core/page/scrolling/ScrollingCoordinator.h" | 192 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 193 #include "core/svg/SVGDocumentExtensions.h" | 193 #include "core/svg/SVGDocumentExtensions.h" |
| 194 #include "core/svg/SVGTitleElement.h" | 194 #include "core/svg/SVGTitleElement.h" |
| 195 #include "core/svg/SVGUseElement.h" | 195 #include "core/svg/SVGUseElement.h" |
| 196 #include "core/timing/DOMWindowPerformance.h" | 196 #include "core/timing/DOMWindowPerformance.h" |
| 197 #include "core/timing/Performance.h" | 197 #include "core/timing/Performance.h" |
| 198 #include "core/workers/SharedWorkerRepositoryClient.h" | 198 #include "core/workers/SharedWorkerRepositoryClient.h" |
| 199 #include "core/xml/parser/XMLDocumentParser.h" | 199 #include "core/xml/parser/XMLDocumentParser.h" |
| 200 #include "platform/DateComponents.h" | 200 #include "platform/DateComponents.h" |
| 201 #include "platform/EventDispatchForbiddenScope.h" | 201 #include "platform/EventDispatchForbiddenScope.h" |
| 202 #include "platform/Histogram.h" |
| 202 #include "platform/Language.h" | 203 #include "platform/Language.h" |
| 203 #include "platform/LengthFunctions.h" | 204 #include "platform/LengthFunctions.h" |
| 204 #include "platform/Logging.h" | 205 #include "platform/Logging.h" |
| 205 #include "platform/PluginScriptForbiddenScope.h" | 206 #include "platform/PluginScriptForbiddenScope.h" |
| 206 #include "platform/RuntimeEnabledFeatures.h" | 207 #include "platform/RuntimeEnabledFeatures.h" |
| 207 #include "platform/ScriptForbiddenScope.h" | 208 #include "platform/ScriptForbiddenScope.h" |
| 208 #include "platform/TraceEvent.h" | 209 #include "platform/TraceEvent.h" |
| 209 #include "platform/network/ContentSecurityPolicyParsers.h" | 210 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 210 #include "platform/network/HTTPParsers.h" | 211 #include "platform/network/HTTPParsers.h" |
| 211 #include "platform/scheduler/CancellableTaskFactory.h" | 212 #include "platform/scheduler/CancellableTaskFactory.h" |
| (...skipping 4253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4465 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); | 4466 addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessage
Level, message)); |
| 4466 return false; | 4467 return false; |
| 4467 } | 4468 } |
| 4468 TemporaryChange<bool> executeScope(m_isRunningExecCommand, true); | 4469 TemporaryChange<bool> executeScope(m_isRunningExecCommand, true); |
| 4469 | 4470 |
| 4470 // Postpone DOM mutation events, which can execute scripts and change | 4471 // Postpone DOM mutation events, which can execute scripts and change |
| 4471 // DOM tree against implementation assumption. | 4472 // DOM tree against implementation assumption. |
| 4472 EventQueueScope eventQueueScope; | 4473 EventQueueScope eventQueueScope; |
| 4473 Editor::tidyUpHTMLStructure(*this); | 4474 Editor::tidyUpHTMLStructure(*this); |
| 4474 Editor::Command editorCommand = command(this, commandName); | 4475 Editor::Command editorCommand = command(this, commandName); |
| 4475 Platform::current()->histogramSparse("WebCore.Document.execCommand", editorC
ommand.idForHistogram()); | 4476 |
| 4477 DEFINE_STATIC_LOCAL(SparseHistogram, editorCommandHistogram, ("WebCore.Docum
ent.execCommand")); |
| 4478 editorCommandHistogram.sample(editorCommand.idForHistogram()); |
| 4476 return editorCommand.execute(value); | 4479 return editorCommand.execute(value); |
| 4477 } | 4480 } |
| 4478 | 4481 |
| 4479 bool Document::queryCommandEnabled(const String& commandName, ExceptionState& ex
ceptionState) | 4482 bool Document::queryCommandEnabled(const String& commandName, ExceptionState& ex
ceptionState) |
| 4480 { | 4483 { |
| 4481 if (!isHTMLDocument() && !isXHTMLDocument()) { | 4484 if (!isHTMLDocument() && !isXHTMLDocument()) { |
| 4482 exceptionState.throwDOMException(InvalidStateError, "queryCommandEnabled
is only supported on HTML documents."); | 4485 exceptionState.throwDOMException(InvalidStateError, "queryCommandEnabled
is only supported on HTML documents."); |
| 4483 return false; | 4486 return false; |
| 4484 } | 4487 } |
| 4485 | 4488 |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5940 #ifndef NDEBUG | 5943 #ifndef NDEBUG |
| 5941 using namespace blink; | 5944 using namespace blink; |
| 5942 void showLiveDocumentInstances() | 5945 void showLiveDocumentInstances() |
| 5943 { | 5946 { |
| 5944 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5947 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 5945 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5948 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5946 for (Document* document : set) | 5949 for (Document* document : set) |
| 5947 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5950 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5948 } | 5951 } |
| 5949 #endif | 5952 #endif |
| OLD | NEW |