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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2200613002: The HTML parser synchronously creates custom elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate redundant TODOs. Created 4 years, 4 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #include "core/dom/StaticNodeList.h" 100 #include "core/dom/StaticNodeList.h"
101 #include "core/dom/StyleChangeReason.h" 101 #include "core/dom/StyleChangeReason.h"
102 #include "core/dom/StyleEngine.h" 102 #include "core/dom/StyleEngine.h"
103 #include "core/dom/TaskRunnerHelper.h" 103 #include "core/dom/TaskRunnerHelper.h"
104 #include "core/dom/TouchList.h" 104 #include "core/dom/TouchList.h"
105 #include "core/dom/TransformSource.h" 105 #include "core/dom/TransformSource.h"
106 #include "core/dom/TreeWalker.h" 106 #include "core/dom/TreeWalker.h"
107 #include "core/dom/VisitedLinkState.h" 107 #include "core/dom/VisitedLinkState.h"
108 #include "core/dom/XMLDocument.h" 108 #include "core/dom/XMLDocument.h"
109 #include "core/dom/custom/CustomElement.h" 109 #include "core/dom/custom/CustomElement.h"
110 #include "core/dom/custom/CustomElementsRegistry.h"
110 #include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h" 111 #include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h"
111 #include "core/dom/custom/V0CustomElementRegistrationContext.h" 112 #include "core/dom/custom/V0CustomElementRegistrationContext.h"
112 #include "core/dom/shadow/ElementShadow.h" 113 #include "core/dom/shadow/ElementShadow.h"
113 #include "core/dom/shadow/FlatTreeTraversal.h" 114 #include "core/dom/shadow/FlatTreeTraversal.h"
114 #include "core/dom/shadow/ShadowRoot.h" 115 #include "core/dom/shadow/ShadowRoot.h"
115 #include "core/editing/DragCaretController.h" 116 #include "core/editing/DragCaretController.h"
116 #include "core/editing/EditingUtilities.h" 117 #include "core/editing/EditingUtilities.h"
117 #include "core/editing/Editor.h" 118 #include "core/editing/Editor.h"
118 #include "core/editing/FrameSelection.h" 119 #include "core/editing/FrameSelection.h"
119 #include "core/editing/InputMethodController.h" 120 #include "core/editing/InputMethodController.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 , m_hasViewportUnits(false) 454 , m_hasViewportUnits(false)
454 , m_parserSyncPolicy(AllowAsynchronousParsing) 455 , m_parserSyncPolicy(AllowAsynchronousParsing)
455 , m_nodeCount(0) 456 , m_nodeCount(0)
456 { 457 {
457 if (m_frame) { 458 if (m_frame) {
458 DCHECK(m_frame->page()); 459 DCHECK(m_frame->page());
459 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); 460 provideContextFeaturesToDocumentFrom(*this, *m_frame->page());
460 461
461 m_fetcher = m_frame->loader().documentLoader()->fetcher(); 462 m_fetcher = m_frame->loader().documentLoader()->fetcher();
462 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); 463 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this);
464
465 CustomElementsRegistry* registry = m_frame->localDOMWindow()
466 ? m_frame->localDOMWindow()->maybeCustomElements()
467 : nullptr;
468 if (registry && m_registrationContext)
469 registry->entangle(m_registrationContext);
463 } else if (m_importsController) { 470 } else if (m_importsController) {
464 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr, this); 471 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr, this);
465 } else { 472 } else {
466 m_fetcher = ResourceFetcher::create(nullptr); 473 m_fetcher = ResourceFetcher::create(nullptr);
467 } 474 }
468 475
469 m_rootScrollerController = RootScrollerController::create(*this); 476 m_rootScrollerController = RootScrollerController::create(*this);
470 477
471 // We depend on the url getting immediately set in subframes, but we 478 // We depend on the url getting immediately set in subframes, but we
472 // also depend on the url NOT getting immediately set in opened windows. 479 // also depend on the url NOT getting immediately set in opened windows.
(...skipping 5558 matching lines...) Expand 10 before | Expand all | Expand 10 after
6031 } 6038 }
6032 6039
6033 void showLiveDocumentInstances() 6040 void showLiveDocumentInstances()
6034 { 6041 {
6035 WeakDocumentSet& set = liveDocumentSet(); 6042 WeakDocumentSet& set = liveDocumentSet();
6036 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6043 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6037 for (Document* document : set) 6044 for (Document* document : set)
6038 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6045 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6039 } 6046 }
6040 #endif 6047 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698