Reviewed by Hyatt.
[WebKit-https.git] / WebCore / css / cssstyleselector.cpp
index 96ebf0c5d4003389e4ac2a603c6ef3c50e99bd10..c22f6ca103ad8ac23f95a3a6e3b9015c4108373e 100644 (file)
@@ -686,7 +686,7 @@ RenderStyle* CSSStyleSelector::locateSharedStyle()
 
 RenderStyle* CSSStyleSelector::styleForElement(Element* e, RenderStyle* defaultParent, bool allowSharing)
 {
-    if (!e->document()->haveStylesheetsLoaded()) {
+    if (allowSharing && !e->document()->haveStylesheetsLoaded()) {
         if (!styleNotYetAvailable) {
             styleNotYetAvailable = ::new RenderStyle();
             styleNotYetAvailable->setDisplay(NONE);