<rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages
[WebKit-https.git] / Source / WebCore / dom / NodeRenderingContext.cpp
index 69ec1bc68498467581746c236a4080c104bbc96b..155a366a4ab5c4fdedeccae275c5ae0079e0e548 100644 (file)
@@ -271,8 +271,14 @@ RenderObject* NodeRendererFactory::createRendererAndStyle()
         return 0;
 
     m_context.setStyle(node->styleForRenderer(m_context));
-    if (!node->rendererIsNeeded(m_context))
+    if (!node->rendererIsNeeded(m_context)) {
+        if (node->isElementNode()) {
+            Element* element = toElement(node);
+            if (m_context.style()->affectedByEmpty())
+                element->setStyleAffectedByEmpty();
+        }
         return 0;
+    }
 
     RenderObject* newRenderer = node->createRenderer(document->renderArena(), m_context.style());
     if (!newRenderer)