summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/Element.cpp
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-11-24 14:50:46 -0500
committerCary Clark <cary@android.com>2010-11-24 14:50:46 -0500
commitae73a937b10d5a83ba2b9c062b26311827edfe6c (patch)
tree59ddf1d36b53c1f906733a103b30b79e3d29d8e2 /WebCore/dom/Element.cpp
parenteabb311cd2b57ff80b4cf632078cf078d789b563 (diff)
downloadexternal_webkit-ae73a937b10d5a83ba2b9c062b26311827edfe6c.zip
external_webkit-ae73a937b10d5a83ba2b9c062b26311827edfe6c.tar.gz
external_webkit-ae73a937b10d5a83ba2b9c062b26311827edfe6c.tar.bz2
use style ignoring pending style sheets
If the style is not yet computed, attempting to compute the style may blow up (e.g., the font points to zero and is dereferenced). The webkit way around this appears to be to ignore pending style sheets, even though six lines down from this change, the regular webkit makes the original styleForElement call. This does fix sfgate.com, so it's not a bad thing to do, and the real style change should retrigger this code path later on. bug:3194102 Change-Id: Ia558e3d49c94ed817d69d528b9e914f906f62a66
Diffstat (limited to 'WebCore/dom/Element.cpp')
-rw-r--r--WebCore/dom/Element.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index be74487..9afde07 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -973,7 +973,7 @@ void Element::recalcStyle(StyleChange change)
if ((change > NoChange || needsStyleRecalc())) {
#ifdef ANDROID_STYLE_VERSION
- RefPtr<RenderStyle> newStyle = document()->styleSelector()->styleForElement(this);
+ RefPtr<RenderStyle> newStyle = document()->styleForElementIgnoringPendingStylesheets(this);
if (displayDiff(currentStyle.get(), newStyle.get()))
document()->incStyleVersion();
#endif