| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "core/dom/DOMImplementation.h" | 72 #include "core/dom/DOMImplementation.h" |
| 73 #include "core/dom/DocumentFragment.h" | 73 #include "core/dom/DocumentFragment.h" |
| 74 #include "core/dom/DocumentParserTiming.h" | 74 #include "core/dom/DocumentParserTiming.h" |
| 75 #include "core/dom/DocumentType.h" | 75 #include "core/dom/DocumentType.h" |
| 76 #include "core/dom/Element.h" | 76 #include "core/dom/Element.h" |
| 77 #include "core/dom/ElementCreationOptions.h" | 77 #include "core/dom/ElementCreationOptions.h" |
| 78 #include "core/dom/ElementDataCache.h" | 78 #include "core/dom/ElementDataCache.h" |
| 79 #include "core/dom/ElementRegistrationOptions.h" | 79 #include "core/dom/ElementRegistrationOptions.h" |
| 80 #include "core/dom/ElementTraversal.h" | 80 #include "core/dom/ElementTraversal.h" |
| 81 #include "core/dom/ExceptionCode.h" | 81 #include "core/dom/ExceptionCode.h" |
| 82 #include "core/dom/ExecutionContextTask.h" | |
| 83 #include "core/dom/FrameRequestCallback.h" | 82 #include "core/dom/FrameRequestCallback.h" |
| 84 #include "core/dom/IntersectionObserverController.h" | 83 #include "core/dom/IntersectionObserverController.h" |
| 85 #include "core/dom/LayoutTreeBuilderTraversal.h" | 84 #include "core/dom/LayoutTreeBuilderTraversal.h" |
| 86 #include "core/dom/LiveNodeList.h" | 85 #include "core/dom/LiveNodeList.h" |
| 87 #include "core/dom/MutationObserver.h" | 86 #include "core/dom/MutationObserver.h" |
| 88 #include "core/dom/NodeChildRemovalTracker.h" | 87 #include "core/dom/NodeChildRemovalTracker.h" |
| 89 #include "core/dom/NodeComputedStyle.h" | 88 #include "core/dom/NodeComputedStyle.h" |
| 90 #include "core/dom/NodeFilter.h" | 89 #include "core/dom/NodeFilter.h" |
| 91 #include "core/dom/NodeIterator.h" | 90 #include "core/dom/NodeIterator.h" |
| 92 #include "core/dom/NodeRareData.h" | 91 #include "core/dom/NodeRareData.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 #include "core/page/scrolling/TopDocumentRootScrollerController.h" | 208 #include "core/page/scrolling/TopDocumentRootScrollerController.h" |
| 210 #include "core/probe/CoreProbes.h" | 209 #include "core/probe/CoreProbes.h" |
| 211 #include "core/svg/SVGDocumentExtensions.h" | 210 #include "core/svg/SVGDocumentExtensions.h" |
| 212 #include "core/svg/SVGScriptElement.h" | 211 #include "core/svg/SVGScriptElement.h" |
| 213 #include "core/svg/SVGTitleElement.h" | 212 #include "core/svg/SVGTitleElement.h" |
| 214 #include "core/svg/SVGUseElement.h" | 213 #include "core/svg/SVGUseElement.h" |
| 215 #include "core/timing/DOMWindowPerformance.h" | 214 #include "core/timing/DOMWindowPerformance.h" |
| 216 #include "core/timing/Performance.h" | 215 #include "core/timing/Performance.h" |
| 217 #include "core/workers/SharedWorkerRepositoryClient.h" | 216 #include "core/workers/SharedWorkerRepositoryClient.h" |
| 218 #include "core/xml/parser/XMLDocumentParser.h" | 217 #include "core/xml/parser/XMLDocumentParser.h" |
| 218 #include "platform/CrossThreadFunctional.h" |
| 219 #include "platform/DateComponents.h" | 219 #include "platform/DateComponents.h" |
| 220 #include "platform/EventDispatchForbiddenScope.h" | 220 #include "platform/EventDispatchForbiddenScope.h" |
| 221 #include "platform/Histogram.h" | 221 #include "platform/Histogram.h" |
| 222 #include "platform/InstanceCounters.h" | 222 #include "platform/InstanceCounters.h" |
| 223 #include "platform/Language.h" | 223 #include "platform/Language.h" |
| 224 #include "platform/LengthFunctions.h" | 224 #include "platform/LengthFunctions.h" |
| 225 #include "platform/PluginScriptForbiddenScope.h" | 225 #include "platform/PluginScriptForbiddenScope.h" |
| 226 #include "platform/RuntimeEnabledFeatures.h" | 226 #include "platform/RuntimeEnabledFeatures.h" |
| 227 #include "platform/ScriptForbiddenScope.h" | 227 #include "platform/ScriptForbiddenScope.h" |
| 228 #include "platform/WebFrameScheduler.h" | 228 #include "platform/WebFrameScheduler.h" |
| (...skipping 4396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4625 mojom::blink::SensitiveInputVisibilityServicePtr sensitive_input_service_ptr; | 4625 mojom::blink::SensitiveInputVisibilityServicePtr sensitive_input_service_ptr; |
| 4626 GetFrame()->GetInterfaceProvider()->GetInterface( | 4626 GetFrame()->GetInterfaceProvider()->GetInterface( |
| 4627 mojo::MakeRequest(&sensitive_input_service_ptr)); | 4627 mojo::MakeRequest(&sensitive_input_service_ptr)); |
| 4628 if (password_count_ > 0) { | 4628 if (password_count_ > 0) { |
| 4629 sensitive_input_service_ptr->PasswordFieldVisibleInInsecureContext(); | 4629 sensitive_input_service_ptr->PasswordFieldVisibleInInsecureContext(); |
| 4630 return; | 4630 return; |
| 4631 } | 4631 } |
| 4632 sensitive_input_service_ptr->AllPasswordFieldsInInsecureContextInvisible(); | 4632 sensitive_input_service_ptr->AllPasswordFieldsInInsecureContextInvisible(); |
| 4633 } | 4633 } |
| 4634 | 4634 |
| 4635 void Document::RunExecutionContextTask( | |
| 4636 std::unique_ptr<ExecutionContextTask> task, | |
| 4637 bool is_instrumented) { | |
| 4638 probe::AsyncTask async_task(this, task.get(), nullptr, is_instrumented); | |
| 4639 task->PerformTask(this); | |
| 4640 } | |
| 4641 | |
| 4642 void Document::RegisterEventFactory( | 4635 void Document::RegisterEventFactory( |
| 4643 std::unique_ptr<EventFactoryBase> event_factory) { | 4636 std::unique_ptr<EventFactoryBase> event_factory) { |
| 4644 DCHECK(!EventFactories().Contains(event_factory.get())); | 4637 DCHECK(!EventFactories().Contains(event_factory.get())); |
| 4645 EventFactories().insert(std::move(event_factory)); | 4638 EventFactories().insert(std::move(event_factory)); |
| 4646 } | 4639 } |
| 4647 | 4640 |
| 4648 Event* Document::createEvent(ScriptState* script_state, | 4641 Event* Document::createEvent(ScriptState* script_state, |
| 4649 const String& event_type, | 4642 const String& event_type, |
| 4650 ExceptionState& exception_state) { | 4643 ExceptionState& exception_state) { |
| 4651 Event* event = nullptr; | 4644 Event* event = nullptr; |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6038 line_number = parser->LineNumber().OneBasedInt(); | 6031 line_number = parser->LineNumber().OneBasedInt(); |
| 6039 } | 6032 } |
| 6040 console_message = ConsoleMessage::Create( | 6033 console_message = ConsoleMessage::Create( |
| 6041 console_message->Source(), console_message->Level(), | 6034 console_message->Source(), console_message->Level(), |
| 6042 console_message->Message(), | 6035 console_message->Message(), |
| 6043 SourceLocation::Create(Url().GetString(), line_number, 0, nullptr)); | 6036 SourceLocation::Create(Url().GetString(), line_number, 0, nullptr)); |
| 6044 } | 6037 } |
| 6045 frame_->Console().AddMessage(console_message); | 6038 frame_->Console().AddMessage(console_message); |
| 6046 } | 6039 } |
| 6047 | 6040 |
| 6048 void Document::PostTask(TaskType task_type, | |
| 6049 const WebTraceLocation& location, | |
| 6050 std::unique_ptr<ExecutionContextTask> task, | |
| 6051 const String& task_name_for_instrumentation) { | |
| 6052 if (!task_name_for_instrumentation.IsEmpty()) { | |
| 6053 probe::AsyncTaskScheduled(this, task_name_for_instrumentation, task.get()); | |
| 6054 } | |
| 6055 | |
| 6056 TaskRunnerHelper::Get(task_type, this) | |
| 6057 ->PostTask(location, | |
| 6058 CrossThreadBind(&Document::RunExecutionContextTask, | |
| 6059 WrapCrossThreadWeakPersistent(this), | |
| 6060 WTF::Passed(std::move(task)), | |
| 6061 !task_name_for_instrumentation.IsEmpty())); | |
| 6062 } | |
| 6063 | |
| 6064 void Document::TasksWereSuspended() { | 6041 void Document::TasksWereSuspended() { |
| 6065 GetScriptRunner()->Suspend(); | 6042 GetScriptRunner()->Suspend(); |
| 6066 | 6043 |
| 6067 if (parser_) | 6044 if (parser_) |
| 6068 parser_->SuspendScheduledTasks(); | 6045 parser_->SuspendScheduledTasks(); |
| 6069 if (scripted_animation_controller_) | 6046 if (scripted_animation_controller_) |
| 6070 scripted_animation_controller_->Suspend(); | 6047 scripted_animation_controller_->Suspend(); |
| 6071 } | 6048 } |
| 6072 | 6049 |
| 6073 void Document::TasksWereResumed() { | 6050 void Document::TasksWereResumed() { |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6842 } | 6819 } |
| 6843 | 6820 |
| 6844 void showLiveDocumentInstances() { | 6821 void showLiveDocumentInstances() { |
| 6845 WeakDocumentSet& set = liveDocumentSet(); | 6822 WeakDocumentSet& set = liveDocumentSet(); |
| 6846 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6823 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6847 for (blink::Document* document : set) | 6824 for (blink::Document* document : set) |
| 6848 fprintf(stderr, "- Document %p URL: %s\n", document, | 6825 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6849 document->Url().GetString().Utf8().data()); | 6826 document->Url().GetString().Utf8().data()); |
| 6850 } | 6827 } |
| 6851 #endif | 6828 #endif |
| OLD | NEW |