| Index: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
|
| index c037066adc2f9b28cdf42d92ef91843f2e3554ed..30e7791b8f84847f0bab669b8617b3856d8bf645 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
|
| @@ -30,6 +30,8 @@
|
| #include "core/dom/TaskRunnerHelper.h"
|
| #include "core/dom/shadow/ShadowRoot.h"
|
| #include "core/events/Event.h"
|
| +#include "public/platform/Platform.h"
|
| +#include "public/platform/WebScheduler.h"
|
|
|
| namespace blink {
|
|
|
| @@ -107,9 +109,13 @@ const AtomicString& HTMLStyleElement::type() const {
|
| }
|
|
|
| void HTMLStyleElement::dispatchPendingEvent(
|
| - std::unique_ptr<IncrementLoadEventDelayCount>) {
|
| + std::unique_ptr<IncrementLoadEventDelayCount> count) {
|
| dispatchEvent(Event::create(m_loadedSheet ? EventTypeNames::load
|
| : EventTypeNames::error));
|
| +
|
| + count.reset();
|
| + if (document().frame())
|
| + document().frame()->loader().checkCompleted();
|
| }
|
|
|
| void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(
|
| @@ -119,6 +125,7 @@ void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(
|
| return;
|
| m_loadedSheet = isLoadEvent;
|
| TaskRunnerHelper::get(TaskType::DOMManipulation, &document())
|
| +
|
| ->postTask(
|
| BLINK_FROM_HERE,
|
| WTF::bind(
|
|
|