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

Unified Diff: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 1 month 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: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
diff --git a/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp b/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
index 25d018ab7cce351774e0e189430d9449afebb142..a3ecc480ecf3b497e3699a773c92f3e1fc4688c3 100644
--- a/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
+++ b/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
@@ -138,7 +138,11 @@ static bool ruleAdditionMightRequireDocumentStyleRecalc(StyleRuleBase* rule)
void StyleSheetInvalidationAnalysis::analyzeStyleSheet(StyleSheetContents* styleSheetContents)
{
- ASSERT(!styleSheetContents->isLoading());
+ // Updating the style on the shadow DOM for image fallback content can bring us here when imports
+ // are still getting loaded in the main document. Just need to exit early as we will return here
+ // when the imports finish loading.
+ if (styleSheetContents->isLoading())
+ return;
// See if all rules on the sheet are scoped to some specific ids or classes.
// Then test if we actually have any of those in the tree at the moment.

Powered by Google App Engine
This is Rietveld 408576698