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

Unified Diff: sky/engine/core/css/resolver/StyleResolver.cpp

Issue 846183002: Remove tracking of pending sheets. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/css/resolver/StyleResolver.h ('k') | sky/engine/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/StyleResolver.cpp
diff --git a/sky/engine/core/css/resolver/StyleResolver.cpp b/sky/engine/core/css/resolver/StyleResolver.cpp
index 8cfc226f4cbc9d71a2cfc11e81b6cc3fc5368ffd..0372b347fd2ef70147df43557bdc7ca014fafe0c 100644
--- a/sky/engine/core/css/resolver/StyleResolver.cpp
+++ b/sky/engine/core/css/resolver/StyleResolver.cpp
@@ -131,19 +131,6 @@ StyleResolver::StyleResolver(Document& document)
}
}
-void StyleResolver::lazyAppendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyleSheet> >& styleSheets)
-{
- unsigned size = styleSheets.size();
- for (unsigned i = firstNew; i < size; ++i)
- m_pendingStyleSheets.add(styleSheets[i].get());
-}
-
-void StyleResolver::removePendingAuthorStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& styleSheets)
-{
- for (unsigned i = 0; i < styleSheets.size(); ++i)
- m_pendingStyleSheets.remove(styleSheets[i].get());
-}
-
void StyleResolver::appendCSSStyleSheet(CSSStyleSheet* cssSheet)
{
ASSERT(cssSheet);
@@ -177,30 +164,6 @@ void StyleResolver::appendCSSStyleSheet(CSSStyleSheet* cssSheet)
}
}
-void StyleResolver::appendPendingAuthorStyleSheets()
-{
- for (ListHashSet<RawPtr<CSSStyleSheet>, 16>::iterator it = m_pendingStyleSheets.begin(); it != m_pendingStyleSheets.end(); ++it)
- appendCSSStyleSheet(*it);
-
- m_pendingStyleSheets.clear();
- finishAppendAuthorStyleSheets();
-}
-
-void StyleResolver::appendAuthorStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& styleSheets)
-{
- // This handles sheets added to the end of the stylesheet list only. In other cases the style resolver
- // needs to be reconstructed. To handle insertions too the rule order numbers would need to be updated.
- unsigned size = styleSheets.size();
- for (unsigned i = 0; i < size; ++i)
- appendCSSStyleSheet(styleSheets[i].get());
-}
-
-void StyleResolver::finishAppendAuthorStyleSheets()
-{
- if (document().renderView() && document().renderView()->style())
- document().renderView()->style()->font().update(document().styleEngine()->fontSelector());
-}
-
void StyleResolver::addToStyleSharingList(Element& element)
{
// Never add elements to the style sharing list if we're not in a recalcStyle,
@@ -291,7 +254,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
{
ASSERT(document().frame());
ASSERT(document().settings());
- ASSERT(!hasPendingAuthorStyleSheets());
didAccess();
@@ -356,7 +318,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* element, const
{
ASSERT(document().frame());
ASSERT(document().settings());
- ASSERT(!hasPendingAuthorStyleSheets());
if (element == document().documentElement())
document().setDirectionSetOnDocumentElement(false);
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.h ('k') | sky/engine/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698