summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/dom
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-09-06 23:49:12 +0100
committerBen Murdoch <benm@google.com>2011-09-06 23:49:12 +0100
commit5dd0312de6141c88a66182f62629dad237b630f2 (patch)
tree56fceb50f95d02759a1f62a3af33d1e5ae209121 /Source/WebCore/dom
parent8ad3ab0e47f0d5039e89c1873c178f538ec1b0df (diff)
downloadexternal_webkit-5dd0312de6141c88a66182f62629dad237b630f2.zip
external_webkit-5dd0312de6141c88a66182f62629dad237b630f2.tar.gz
external_webkit-5dd0312de6141c88a66182f62629dad237b630f2.tar.bz2
Fix logic error in Android style version calculation.
We need to update the style version on a width or height change, and also detect a transition from display:none to display:something (and vice versa) in which case WebKit will pass the display:none style as a null pointer. Bug: 5137070 Change-Id: I82fa3fbe990cfc4c733a2f4fed8be37f11e44ba4
Diffstat (limited to 'Source/WebCore/dom')
-rw-r--r--Source/WebCore/dom/Element.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp
index eef2419..64d3eed 100644
--- a/Source/WebCore/dom/Element.cpp
+++ b/Source/WebCore/dom/Element.cpp
@@ -1072,11 +1072,15 @@ bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderS
#ifdef ANDROID_STYLE_VERSION
static bool displayDiff(const RenderStyle* s1, const RenderStyle* s2)
{
- if (!s1 || !s2)
+ if (!s1 && !s2)
return false;
+ else if ((!s1 && s2) || (s1 && !s2))
+ return true;
+
return s1->display() != s2->display()
|| s1->left() != s2->left() || s1->top() != s2->top()
- || s1->right() != s2->right() || s1->bottom() != s2->bottom();
+ || s1->right() != s2->right() || s1->bottom() != s2->bottom()
+ || s1->width() != s2->width() || s1->height() != s2->height();
}
#endif