Commit aadd6347 authored by yoichio@chromium.org's avatar yoichio@chromium.org

[HTMLImport] Add an Usecounter for the case imported document has stylesheets.

BUG=523952

Review URL: https://codereview.chromium.org/1312733003

git-svn-id: svn://svn.chromium.org/blink/trunk@201301 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b585166f
......@@ -833,6 +833,7 @@ public:
CSSAnimationsStackedNeutralKeyframe = 937,
ReadingCheckedInClickHandler = 938,
FlexboxIntrinsicSizeAlgorithmIsDifferent = 939,
HTMLImportsHasStyleSheets = 940,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
......
......@@ -31,10 +31,12 @@
#include "config.h"
#include "core/html/imports/HTMLImportChild.h"
#include "core/css/StyleSheetList.h"
#include "core/dom/Document.h"
#include "core/dom/custom/CustomElement.h"
#include "core/dom/custom/CustomElementMicrotaskImportStep.h"
#include "core/dom/custom/CustomElementSyncMicrotaskQueue.h"
#include "core/frame/UseCounter.h"
#include "core/html/imports/HTMLImportChildClient.h"
#include "core/html/imports/HTMLImportLoader.h"
#include "core/html/imports/HTMLImportTreeRoot.h"
......@@ -88,6 +90,8 @@ void HTMLImportChild::didFinish()
void HTMLImportChild::didFinishLoading()
{
stateWillChange();
if (document() && document()->styleSheets()->length() > 0)
UseCounter::count(root()->document(), UseCounter::HTMLImportsHasStyleSheets);
CustomElement::didFinishLoadingImport(*(root()->document()));
}
......
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