Setting -webkit-filter: in :active selector causes failure to redraw
[WebKit-https.git] / Source / WebCore / rendering / style / RenderStyle.cpp
index c0b148c..6dcd815 100644 (file)
@@ -597,8 +597,7 @@ bool RenderStyle::changeRequiresLayout(const RenderStyle* other, unsigned& chang
     if ((visibility() == COLLAPSE) != (other->visibility() == COLLAPSE))
         return true;
 
-    if ((rareNonInheritedData->opacity == 1 && other->rareNonInheritedData->opacity < 1)
-        || (rareNonInheritedData->opacity < 1 && other->rareNonInheritedData->opacity == 1)) {
+    if (rareNonInheritedData->hasOpacity() != other->rareNonInheritedData->hasOpacity()) {
         // FIXME: We would like to use SimplifiedLayout here, but we can't quite do that yet.
         // We need to make sure SimplifiedLayout can operate correctly on RenderInlines (we will need
         // to add a selfNeedsSimplifiedLayout bit in order to not get confused and taint every line).
@@ -607,6 +606,11 @@ bool RenderStyle::changeRequiresLayout(const RenderStyle* other, unsigned& chang
         return true;
     }
 
+#if ENABLE(CSS_FILTERS)
+    if (rareNonInheritedData->hasFilters() != other->rareNonInheritedData->hasFilters())
+        return true;
+#endif
+
     const QuotesData* quotesDataA = rareInheritedData->quotes.get();
     const QuotesData* quotesDataB = other->rareInheritedData->quotes.get();
     if (!(quotesDataA == quotesDataB || (quotesDataA && quotesDataB && *quotesDataA == *quotesDataB)))