Commit d54a0d68 authored by Takeshi Yoshino's avatar Takeshi Yoshino Committed by Commit Bot

Clean up HTMLImportsController.cpp

- Remove an unused include
- Access root_ directly than via Root()

Bug: 
Change-Id: I2b9abe974dd7c3bcfc4921a1bd86833dc0b2efe4
Reviewed-on: https://chromium-review.googlesource.com/586212
Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org>
Reviewed-by: default avatarTakayoshi Kochi <kochi@chromium.org>
Reviewed-by: default avatarHayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490972}
parent f3553bbf
......@@ -31,7 +31,6 @@
#include "core/html/imports/HTMLImportsController.h"
#include "core/dom/Document.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/UseCounter.h"
#include "core/html/imports/HTMLImportChild.h"
#include "core/html/imports/HTMLImportChildClient.h"
......@@ -76,7 +75,7 @@ HTMLImportChild* HTMLImportsController::CreateChild(
? HTMLImport::kSync
: HTMLImport::kAsync;
if (mode == HTMLImport::kAsync) {
UseCounter::Count(Root()->GetDocument(),
UseCounter::Count(root_->GetDocument(),
WebFeature::kHTMLImportsAsyncAttribute);
}
......@@ -84,7 +83,7 @@ HTMLImportChild* HTMLImportsController::CreateChild(
child->SetClient(client);
parent->AppendImport(child);
loader->AddImport(child);
return Root()->Add(child);
return root_->Add(child);
}
HTMLImportChild* HTMLImportsController::Load(HTMLImport* parent,
......@@ -94,10 +93,10 @@ HTMLImportChild* HTMLImportsController::Load(HTMLImport* parent,
DCHECK(!url.IsEmpty());
DCHECK(url.IsValid());
DCHECK(parent == Root() || ToHTMLImportChild(parent)->Loader()->IsFirstImport(
DCHECK(parent == root_ || ToHTMLImportChild(parent)->Loader()->IsFirstImport(
ToHTMLImportChild(parent)));
if (HTMLImportChild* child_to_share_with = Root()->Find(url)) {
if (HTMLImportChild* child_to_share_with = root_->Find(url)) {
HTMLImportLoader* loader = child_to_share_with->Loader();
DCHECK(loader);
HTMLImportChild* child = CreateChild(url, loader, parent, client);
......@@ -123,7 +122,7 @@ HTMLImportChild* HTMLImportsController::Load(HTMLImport* parent,
}
Document* HTMLImportsController::Master() const {
return Root() ? Root()->GetDocument() : nullptr;
return root_ ? root_->GetDocument() : nullptr;
}
bool HTMLImportsController::ShouldBlockScriptExecution(
......@@ -131,7 +130,7 @@ bool HTMLImportsController::ShouldBlockScriptExecution(
DCHECK_EQ(document.ImportsController(), this);
if (HTMLImportLoader* loader = LoaderFor(document))
return loader->ShouldBlockScriptExecution();
return Root()->GetState().ShouldBlockScriptExecution();
return root_->GetState().ShouldBlockScriptExecution();
}
HTMLImportLoader* HTMLImportsController::CreateLoader() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment