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

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

Issue 1049513003: Add error dispatch events to SVGStyleElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Nits Created 5 years, 9 months 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
Index: Source/core/html/HTMLStyleElement.cpp
diff --git a/Source/core/html/HTMLStyleElement.cpp b/Source/core/html/HTMLStyleElement.cpp
index 2d6b0366b2c7dfb82f4dc3a313d291c0a170a04d..d9250beb92c1b1bdf3fa6527c5077f1fe32062e1 100644
--- a/Source/core/html/HTMLStyleElement.cpp
+++ b/Source/core/html/HTMLStyleElement.cpp
@@ -143,9 +143,10 @@ void HTMLStyleElement::dispatchPendingEvent(StyleEventSender* eventSender)
void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetErrorStatus errorStatus)
{
- if (m_firedLoad)
+ bool isLoadEvent = errorStatus == NoErrorLoadingSubresource;
+ if (m_firedLoad && isLoadEvent)
return;
- m_loadedSheet = (errorStatus == NoErrorLoadingSubresource);
+ m_loadedSheet = isLoadEvent;
styleLoadEventSender().dispatchEventSoon(this);
m_firedLoad = true;
}

Powered by Google App Engine
This is Rietveld 408576698