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

Unified Diff: third_party/WebKit/Source/core/svg/SVGStyleElement.cpp

Issue 2095243002: Remove EventSender from SVGStyleElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include fix Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGStyleElement.h ('k') | 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/svg/SVGStyleElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp b/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
index 9b213c7192b3f935d19321331363e8bd98625fd3..cda15ee40eab5d3b585081dde5cd97c85d98745e 100644
--- a/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
@@ -24,17 +24,12 @@
#include "core/MediaTypeNames.h"
#include "core/css/CSSStyleSheet.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/events/Event.h"
#include "wtf/StdLibExtras.h"
namespace blink {
-static SVGStyleEventSender& styleErrorEventSender()
-{
- DEFINE_STATIC_LOCAL(SVGStyleEventSender, sharedErrorEventSender, (SVGStyleEventSender::create(EventTypeNames::error)));
- return sharedErrorEventSender;
-}
-
inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser)
: SVGElement(SVGNames::styleTag, document)
, StyleElement(&document, createdByParser)
@@ -146,12 +141,11 @@ void SVGStyleElement::childrenChanged(const ChildrenChange& change)
void SVGStyleElement::notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetErrorStatus errorStatus)
{
if (errorStatus != NoErrorLoadingSubresource)
- styleErrorEventSender().dispatchEventSoon(this);
+ TaskRunnerHelper::get(TaskType::DOMManipulation, &document())->postTask(BLINK_FROM_HERE, WTF::bind(&SVGStyleElement::dispatchPendingEvent, wrapPersistent(this)));
}
-void SVGStyleElement::dispatchPendingEvent(SVGStyleEventSender* eventSender)
+void SVGStyleElement::dispatchPendingEvent()
{
- ASSERT_UNUSED(eventSender, eventSender == &styleErrorEventSender());
dispatchEvent(Event::create(EventTypeNames::error));
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGStyleElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698