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

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

Issue 2239353002: Ignored title in shadow should cause StyleSheet.title = null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: 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 c8a3610e2611e74e7fa6731a83a17effb02f76b5..f989a925f3050392b98a21fe86cac27fe04e65f7 100644
--- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -60,7 +60,7 @@ HTMLStyleElement* HTMLStyleElement::create(Document& document, bool createdByPar
void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
{
- if (name == titleAttr && m_sheet) {
+ if (name == titleAttr && m_sheet && isInDocumentTree()) {
m_sheet->setTitle(value);
} else if (name == mediaAttr && isConnected() && document().isActive() && m_sheet) {
m_sheet->setMediaQueries(MediaQuerySet::create(value));
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698