25 #include "config.h" |
25 #include "config.h" |
26 #include "RenderObject.h" |
26 #include "RenderObject.h" |
27 |
27 |
28 #include "AXObjectCache.h" |
28 #include "AXObjectCache.h" |
29 #include "AffineTransform.h" |
29 #include "AffineTransform.h" |
30 #include "cssstyleselector.h" |
30 #include "CSSStyleSelector.h" |
31 #include "CachedImage.h" |
31 #include "CachedImage.h" |
32 #include "Chrome.h" |
32 #include "Chrome.h" |
33 #include "Document.h" |
33 #include "Document.h" |
34 #include "Element.h" |
34 #include "Element.h" |
35 #include "EventHandler.h" |
35 #include "EventHandler.h" |
2140 return; |
2140 return; |
2141 |
2141 |
2142 bool affectsParentBlock = false; |
2142 bool affectsParentBlock = false; |
2143 RenderStyle::Diff d = RenderStyle::Equal; |
2143 RenderStyle::Diff d = RenderStyle::Equal; |
2144 if (m_style) { |
2144 if (m_style) { |
2145 d = m_style->diff(style); |
|
2146 |
|
2147 // If our z-index changes value or our visibility changes, |
2145 // If our z-index changes value or our visibility changes, |
2148 // we need to dirty our stacking context's z-order list. |
2146 // we need to dirty our stacking context's z-order list. |
2149 if (style) { |
2147 if (style) { |
|
2148 d = m_style->diff(style); |
2150 if (m_style->visibility() != style->visibility() || |
2149 if (m_style->visibility() != style->visibility() || |
2151 m_style->zIndex() != style->zIndex() || |
2150 m_style->zIndex() != style->zIndex() || |
2152 m_style->hasAutoZIndex() != style->hasAutoZIndex()) |
2151 m_style->hasAutoZIndex() != style->hasAutoZIndex()) |
2153 document()->setDashboardRegionsDirty(true); |
2152 document()->setDashboardRegionsDirty(true); |
2154 |
2153 |
2172 repaint(); |
2171 repaint(); |
2173 } |
2172 } |
2174 } |
2173 } |
2175 } |
2174 } |
2176 #if PLATFORM(SYMBIAN) |
2175 #if PLATFORM(SYMBIAN) |
2177 if (m_style->visibility() != style->visibility()) { |
2176 if (m_style->visibility() == HIDDEN && |
2178 document()->page()->chrome()->setElementVisibilityChanged(style->visibility() == VISIBLE); |
2177 style->visibility() == VISIBLE) { |
2179 } |
2178 document()->page()->chrome()->setElementVisibilityChanged(true); |
2180 |
2179 } |
2181 if (style->position() != StaticPosition) { |
2180 else if (style->position() != StaticPosition) { |
2182 |
2181 |
2183 if (style->left() != m_style->left() || |
2182 if (style->left() != m_style->left() || |
2184 style->right() != m_style->right() || |
2183 style->right() != m_style->right() || |
2185 style->top() != m_style->top() || |
2184 style->top() != m_style->top() || |
2186 style->bottom() != m_style->bottom()) { |
2185 style->bottom() != m_style->bottom()) { |
2187 |
2186 |
2188 document()->page()->chrome()->setElementVisibilityChanged(true); |
2187 document()->page()->chrome()->setElementVisibilityChanged(true); |
2189 } |
2188 } |
2190 } |
2189 } |
|
2190 else { |
|
2191 bool curr_style_hidden = (m_style->width().isFixed() && m_style->width().value() <= 0) || |
|
2192 (m_style->height().isFixed() && m_style->height().value() <= 0); |
|
2193 bool new_style_hidden = (style->width().isFixed() && style->width().value() <= 0) || |
|
2194 (style->height().isFixed() && style->height().value() <= 0); |
|
2195 |
|
2196 if (curr_style_hidden && !new_style_hidden) { |
|
2197 document()->page()->chrome()->setElementVisibilityChanged(true); |
|
2198 } |
|
2199 } |
|
2200 |
2191 #endif |
2201 #endif |
2192 } |
2202 } |
2193 // If we have no layer(), just treat a RepaintLayer hint as a normal Repaint. |
2203 // If we have no layer(), just treat a RepaintLayer hint as a normal Repaint. |
2194 if (d == RenderStyle::RepaintLayer && !hasLayer()) |
2204 if (d == RenderStyle::RepaintLayer && !hasLayer()) |
2195 d = RenderStyle::Repaint; |
2205 d = RenderStyle::Repaint; |