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

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

Issue 1843693002: Introduce setNeedsActiveStyleUpdate for adding/removing stylesheets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('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/html/HTMLStyleElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
index a728781ed09cc0f7751c422b273c664fa8526c27..d17c0e07ed1b9d0da1db1b78bf6cb94e02436e07 100644
--- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -26,6 +26,7 @@
#include "core/HTMLNames.h"
#include "core/css/MediaList.h"
#include "core/dom/Document.h"
+#include "core/dom/StyleEngine.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/Event.h"
#include "core/events/EventSender.h"
@@ -68,7 +69,7 @@ void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicStr
m_sheet->setTitle(value);
} else if (name == mediaAttr && inDocument() && document().isActive() && m_sheet) {
m_sheet->setMediaQueries(MediaQuerySet::create(value));
- document().modifiedStyleSheet(m_sheet.get());
+ document().styleEngine().setNeedsActiveStyleUpdate(m_sheet.get(), FullStyleUpdate);
} else {
HTMLElement::parseAttribute(name, oldValue, value);
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698