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

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

Issue 2545023002: Clean up around FrameFetchContext (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 m_fetcher = m_frame->loader().documentLoader()->fetcher(); 499 m_fetcher = m_frame->loader().documentLoader()->fetcher();
500 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); 500 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this);
501 501
502 CustomElementRegistry* registry = 502 CustomElementRegistry* registry =
503 m_frame->localDOMWindow() 503 m_frame->localDOMWindow()
504 ? m_frame->localDOMWindow()->maybeCustomElements() 504 ? m_frame->localDOMWindow()->maybeCustomElements()
505 : nullptr; 505 : nullptr;
506 if (registry && m_registrationContext) 506 if (registry && m_registrationContext)
507 registry->entangle(m_registrationContext); 507 registry->entangle(m_registrationContext);
508 } else if (m_importsController) { 508 } else if (m_importsController) {
509 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr, this); 509 m_fetcher = FrameFetchContext::createFetcherFromDocument(this);
510 } else { 510 } else {
511 m_fetcher = ResourceFetcher::create(nullptr); 511 m_fetcher = ResourceFetcher::create(nullptr);
512 } 512 }
513 DCHECK(m_fetcher);
513 514
514 m_rootScrollerController = RootScrollerController::create(*this); 515 m_rootScrollerController = RootScrollerController::create(*this);
515 516
516 // We depend on the url getting immediately set in subframes, but we 517 // We depend on the url getting immediately set in subframes, but we
517 // also depend on the url NOT getting immediately set in opened windows. 518 // also depend on the url NOT getting immediately set in opened windows.
518 // See fast/dom/early-frame-url.html 519 // See fast/dom/early-frame-url.html
519 // and fast/dom/location-new-window-no-crash.html, respectively. 520 // and fast/dom/location-new-window-no-crash.html, respectively.
520 // FIXME: Can/should we unify this behavior? 521 // FIXME: Can/should we unify this behavior?
521 if (initializer.shouldSetURL()) 522 if (initializer.shouldSetURL())
522 setURL(initializer.url()); 523 setURL(initializer.url());
(...skipping 6020 matching lines...) Expand 10 before | Expand all | Expand 10 after
6543 } 6544 }
6544 6545
6545 void showLiveDocumentInstances() { 6546 void showLiveDocumentInstances() {
6546 WeakDocumentSet& set = liveDocumentSet(); 6547 WeakDocumentSet& set = liveDocumentSet();
6547 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6548 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6548 for (Document* document : set) 6549 for (Document* document : set)
6549 fprintf(stderr, "- Document %p URL: %s\n", document, 6550 fprintf(stderr, "- Document %p URL: %s\n", document,
6550 document->url().getString().utf8().data()); 6551 document->url().getString().utf8().data());
6551 } 6552 }
6552 #endif 6553 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698