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

Unified Diff: Source/WebCore/dom/DocumentStyleSheetCollection.cpp

Issue 11471034: Merge 136878 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 | « Source/WebCore/dom/DocumentStyleSheetCollection.h ('k') | Source/WebCore/testing/Internals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/DocumentStyleSheetCollection.cpp
===================================================================
--- Source/WebCore/dom/DocumentStyleSheetCollection.cpp (revision 136959)
+++ Source/WebCore/dom/DocumentStyleSheetCollection.cpp (working copy)
@@ -81,6 +81,8 @@
m_injectedAuthorStyleSheets[i]->clearOwnerNode();
for (unsigned i = 0; i < m_userStyleSheets.size(); ++i)
m_userStyleSheets[i]->clearOwnerNode();
+ for (unsigned i = 0; i < m_authorStyleSheets.size(); ++i)
+ m_authorStyleSheets[i]->clearOwnerNode();
}
void DocumentStyleSheetCollection::combineCSSFeatureFlags()
@@ -191,6 +193,13 @@
m_document->styleResolverChanged(DeferRecalcStyle);
}
+void DocumentStyleSheetCollection::addAuthorSheet(PassRefPtr<StyleSheetContents> authorSheet)
+{
+ ASSERT(!authorSheet->isUserStyleSheet());
+ m_authorStyleSheets.append(CSSStyleSheet::create(authorSheet, m_document));
+ m_document->styleResolverChanged(RecalcStyleImmediately);
+}
+
void DocumentStyleSheetCollection::addUserSheet(PassRefPtr<StyleSheetContents> userSheet)
{
ASSERT(userSheet->isUserStyleSheet());
@@ -456,6 +465,7 @@
Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets;
activeCSSStyleSheets.append(injectedAuthorStyleSheets());
+ activeCSSStyleSheets.append(documentAuthorStyleSheets());
collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, m_document);
filterEnabledCSSStyleSheets(activeCSSStyleSheets, activeStyleSheets);
@@ -494,6 +504,7 @@
info.addMember(m_injectedUserStyleSheets);
info.addMember(m_injectedAuthorStyleSheets);
info.addMember(m_userStyleSheets);
+ info.addMember(m_authorStyleSheets);
info.addMember(m_activeAuthorStyleSheets);
info.addMember(m_styleSheetsForStyleSheetList);
info.addMember(m_styleSheetCandidateNodes);
« no previous file with comments | « Source/WebCore/dom/DocumentStyleSheetCollection.h ('k') | Source/WebCore/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698