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

Unified Diff: sky/engine/core/dom/Document.cpp

Issue 774953002: Always Reconstruct when stylesheets change. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/DocumentStyleSheetCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 3c261e3ddcc52a0f5eea43560ef21fd2d5541502..07f7220096114a7fde825cd76268166a933a1dd9 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -1592,13 +1592,13 @@ void Document::updateBaseURL()
void Document::didLoadAllImports()
{
if (!importLoader())
- styleResolverMayHaveChanged();
+ styleResolverChanged();
didLoadAllScriptBlockingResources();
}
void Document::didRemoveAllPendingStylesheet()
{
- styleResolverMayHaveChanged();
+ styleResolverChanged();
// Only imports on master documents can trigger rendering.
if (HTMLImportLoader* import = importLoader())
@@ -1709,14 +1709,14 @@ void Document::notifyResizeForViewportUnits()
setNeedsStyleRecalcForViewportUnits();
}
-void Document::styleResolverChanged(StyleResolverUpdateMode updateMode)
+void Document::styleResolverChanged()
{
// styleResolverChanged() can be invoked during Document destruction.
// We just skip that case.
if (!m_styleEngine)
return;
- m_styleEngine->resolverChanged(updateMode);
+ m_styleEngine->resolverChanged();
if (didLayoutWithPendingStylesheets()) {
// We need to manually repaint because we avoid doing all repaints in layout or style
@@ -1729,11 +1729,6 @@ void Document::styleResolverChanged(StyleResolverUpdateMode updateMode)
}
}
-void Document::styleResolverMayHaveChanged()
-{
- styleResolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : AnalyzedStyleUpdate);
-}
-
void Document::setHoverNode(PassRefPtr<Node> newHoverNode)
{
m_hoverNode = newHoverNode;
@@ -2720,24 +2715,24 @@ DocumentLifecycleNotifier& Document::lifecycleNotifier()
return static_cast<DocumentLifecycleNotifier&>(LifecycleContext<Document>::lifecycleNotifier());
}
-void Document::removedStyleSheet(StyleSheet* sheet, StyleResolverUpdateMode updateMode)
+void Document::removedStyleSheet(StyleSheet* sheet)
{
// If we're in document teardown, then we don't need this notification of our sheet's removal.
// styleResolverChanged() is needed even when the document is inactive so that
// imported docuements (which is inactive) notifies the change to the master document.
if (isActive())
styleEngine()->modifiedStyleSheet(sheet);
- styleResolverChanged(updateMode);
+ styleResolverChanged();
}
-void Document::modifiedStyleSheet(StyleSheet* sheet, StyleResolverUpdateMode updateMode)
+void Document::modifiedStyleSheet(StyleSheet* sheet)
{
// If we're in document teardown, then we don't need this notification of our sheet's removal.
// styleResolverChanged() is needed even when the document is inactive so that
// imported docuements (which is inactive) notifies the change to the master document.
if (isActive())
styleEngine()->modifiedStyleSheet(sheet);
- styleResolverChanged(updateMode);
+ styleResolverChanged();
}
Element* Document::activeElement() const
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/DocumentStyleSheetCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698