webengine/osswebengine/WebCore/rendering/RenderObject.cpp
branchRCL_3
changeset 49 919f36ff910f
parent 48 79859ed3eea9
--- a/webengine/osswebengine/WebCore/rendering/RenderObject.cpp	Tue Aug 31 16:17:46 2010 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderObject.cpp	Wed Sep 01 12:28:30 2010 +0100
@@ -27,7 +27,7 @@
 
 #include "AXObjectCache.h"
 #include "AffineTransform.h"
-#include "cssstyleselector.h"
+#include "CSSStyleSelector.h"
 #include "CachedImage.h"
 #include "Chrome.h"
 #include "Document.h"
@@ -2142,11 +2142,10 @@
     bool affectsParentBlock = false;
     RenderStyle::Diff d = RenderStyle::Equal;
     if (m_style) {
-        d = m_style->diff(style);
-
         // If our z-index changes value or our visibility changes,
         // we need to dirty our stacking context's z-order list.
         if (style) {
+            d = m_style->diff(style);
             if (m_style->visibility() != style->visibility() ||
                     m_style->zIndex() != style->zIndex() ||
                     m_style->hasAutoZIndex() != style->hasAutoZIndex()) 
@@ -2174,11 +2173,11 @@
                 }
             }
 #if PLATFORM(SYMBIAN)
-            if (m_style->visibility() != style->visibility()) {            
-                document()->page()->chrome()->setElementVisibilityChanged(style->visibility() == VISIBLE); 
-            }
-                        
-            if (style->position() != StaticPosition) {
+            if (m_style->visibility() == HIDDEN && 
+                style->visibility() == VISIBLE)  {            
+                document()->page()->chrome()->setElementVisibilityChanged(true); 
+            }       
+            else if (style->position() != StaticPosition) {
                 
                 if (style->left() != m_style->left() ||
                     style->right() != m_style->right() ||
@@ -2188,6 +2187,17 @@
                     document()->page()->chrome()->setElementVisibilityChanged(true);
                 }
             }
+            else {
+                bool curr_style_hidden = (m_style->width().isFixed() && m_style->width().value() <= 0) ||
+                                         (m_style->height().isFixed() && m_style->height().value() <= 0);
+                bool new_style_hidden = (style->width().isFixed() && style->width().value() <= 0) ||
+                                        (style->height().isFixed() && style->height().value() <= 0);
+             
+                if (curr_style_hidden && !new_style_hidden) {
+                    document()->page()->chrome()->setElementVisibilityChanged(true);
+                }
+            }
+            
 #endif
         }
         // If we have no layer(), just treat a RepaintLayer hint as a normal Repaint.