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

Unified Diff: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp

Issue 2511663002: Revert "Reland of Remove EventSender from HTMLStyleElement" (Closed)
Patch Set: Sync only 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698