From ae73a937b10d5a83ba2b9c062b26311827edfe6c Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 24 Nov 2010 14:50:46 -0500 Subject: 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 --- WebCore/dom/Element.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'WebCore/dom/Element.cpp') 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 newStyle = document()->styleSelector()->styleForElement(this); + RefPtr newStyle = document()->styleForElementIgnoringPendingStylesheets(this); if (displayDiff(currentStyle.get(), newStyle.get())) document()->incStyleVersion(); #endif -- cgit v1.1