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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 270623007: Revert "HTML Imports: Fix yet another FOUC" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bad merge. Created 6 years, 7 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 | « LayoutTests/http/tests/ManualTests/fouc/resources/slow-green.cgi ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 5c412c674ed019f230ad475fbccdcba2dba638f4..7ded0203c9403dbf09b98107d843511280e6724e 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -603,7 +603,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
// Once an element has a renderer, we don't try to destroy it, since otherwise the renderer
// will vanish if a style recalc happens during loading.
- if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() && !element->renderer()) {
+ if (sharingBehavior == AllowStyleSharing && !document().styleEngine()->haveStylesheetsLoaded() && !element->renderer()) {
if (!s_styleNotYetAvailable) {
s_styleNotYetAvailable = RenderStyle::create().leakRef();
s_styleNotYetAvailable->setDisplay(NONE);
« no previous file with comments | « LayoutTests/http/tests/ManualTests/fouc/resources/slow-green.cgi ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698