| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/dom/Document.h" | 29 #include "core/dom/Document.h" |
| 30 | 30 |
| 31 #include "bindings/core/v8/CustomElementConstructorBuilder.h" | 31 #include "bindings/core/v8/CustomElementConstructorBuilder.h" |
| 32 #include "bindings/core/v8/DOMDataStore.h" | 32 #include "bindings/core/v8/DOMDataStore.h" |
| 33 #include "bindings/core/v8/ExceptionMessages.h" | 33 #include "bindings/core/v8/ExceptionMessages.h" |
| 34 #include "bindings/core/v8/ExceptionState.h" | 34 #include "bindings/core/v8/ExceptionState.h" |
| 35 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 35 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 36 #include "bindings/core/v8/ScriptController.h" | 36 #include "bindings/core/v8/ScriptController.h" |
| 37 #include "bindings/core/v8/UnionTypesCore.h" | 37 #include "bindings/core/v8/UnionTypesCore.h" |
| 38 #include "bindings/core/v8/V8DOMWrapper.h" | 38 #include "bindings/core/v8/V8DOMWrapper.h" |
| 39 #include "bindings/core/v8/V8PerIsolateData.h" |
| 39 #include "bindings/core/v8/WindowProxy.h" | 40 #include "bindings/core/v8/WindowProxy.h" |
| 40 #include "core/HTMLElementFactory.h" | 41 #include "core/HTMLElementFactory.h" |
| 41 #include "core/HTMLNames.h" | 42 #include "core/HTMLNames.h" |
| 42 #include "core/SVGElementFactory.h" | 43 #include "core/SVGElementFactory.h" |
| 43 #include "core/SVGNames.h" | 44 #include "core/SVGNames.h" |
| 44 #include "core/XMLNSNames.h" | 45 #include "core/XMLNSNames.h" |
| 45 #include "core/XMLNames.h" | 46 #include "core/XMLNames.h" |
| 46 #include "core/animation/AnimationTimeline.h" | 47 #include "core/animation/AnimationTimeline.h" |
| 47 #include "core/animation/DocumentAnimations.h" | 48 #include "core/animation/DocumentAnimations.h" |
| 48 #include "core/css/CSSFontSelector.h" | 49 #include "core/css/CSSFontSelector.h" |
| (...skipping 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4508 setParsingState(FinishedParsing); | 4509 setParsingState(FinishedParsing); |
| 4509 | 4510 |
| 4510 // The microtask checkpoint or the loader's finishedParsing() method may inv
oke script that causes this object to | 4511 // The microtask checkpoint or the loader's finishedParsing() method may inv
oke script that causes this object to |
| 4511 // be dereferenced (when this document is in an iframe and the onload causes
the iframe's src to change). | 4512 // be dereferenced (when this document is in an iframe and the onload causes
the iframe's src to change). |
| 4512 // Keep it alive until we are done. | 4513 // Keep it alive until we are done. |
| 4513 RefPtrWillBeRawPtr<Document> protect(this); | 4514 RefPtrWillBeRawPtr<Document> protect(this); |
| 4514 | 4515 |
| 4515 // Ensure Custom Element callbacks are drained before DOMContentLoaded. | 4516 // Ensure Custom Element callbacks are drained before DOMContentLoaded. |
| 4516 // FIXME: Remove this ad-hoc checkpoint when DOMContentLoaded is dispatched
in a | 4517 // FIXME: Remove this ad-hoc checkpoint when DOMContentLoaded is dispatched
in a |
| 4517 // queued task, which will do a checkpoint anyway. https://crbug.com/425790 | 4518 // queued task, which will do a checkpoint anyway. https://crbug.com/425790 |
| 4518 Microtask::performCheckpoint(); | 4519 Microtask::performCheckpoint(V8PerIsolateData::mainThreadIsolate()); |
| 4519 | 4520 |
| 4520 if (RefPtrWillBeRawPtr<LocalFrame> frame = this->frame()) { | 4521 if (RefPtrWillBeRawPtr<LocalFrame> frame = this->frame()) { |
| 4521 // Don't update the layout tree if we haven't requested the main resourc
e yet to avoid | 4522 // Don't update the layout tree if we haven't requested the main resourc
e yet to avoid |
| 4522 // adding extra latency. Note that the first layout tree update can be e
xpensive since it | 4523 // adding extra latency. Note that the first layout tree update can be e
xpensive since it |
| 4523 // triggers the parsing of the default stylesheets which are compiled-in
. | 4524 // triggers the parsing of the default stylesheets which are compiled-in
. |
| 4524 const bool mainResourceWasAlreadyRequested = frame->loader().stateMachin
e()->committedFirstRealDocumentLoad(); | 4525 const bool mainResourceWasAlreadyRequested = frame->loader().stateMachin
e()->committedFirstRealDocumentLoad(); |
| 4525 | 4526 |
| 4526 // FrameLoader::finishedParsing() might end up calling Document::implici
tClose() if all | 4527 // FrameLoader::finishedParsing() might end up calling Document::implici
tClose() if all |
| 4527 // resource loads are complete. HTMLObjectElements can start loading the
ir resources from | 4528 // resource loads are complete. HTMLObjectElements can start loading the
ir resources from |
| 4528 // post attach callbacks triggered by recalcStyle(). This means if we p
arse out an <object> | 4529 // post attach callbacks triggered by recalcStyle(). This means if we p
arse out an <object> |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5687 #ifndef NDEBUG | 5688 #ifndef NDEBUG |
| 5688 using namespace blink; | 5689 using namespace blink; |
| 5689 void showLiveDocumentInstances() | 5690 void showLiveDocumentInstances() |
| 5690 { | 5691 { |
| 5691 WeakDocumentSet& set = liveDocumentSet(); | 5692 WeakDocumentSet& set = liveDocumentSet(); |
| 5692 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5693 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5693 for (Document* document : set) | 5694 for (Document* document : set) |
| 5694 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5695 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5695 } | 5696 } |
| 5696 #endif | 5697 #endif |
| OLD | NEW |