Since nsIFrame::GetStyleData and nsStyleContext::GetStyleData never return null, the only way nsComputedDOMStyle::GetStyleData can return null is if we fail to resolve a style context. So the right thing to do is to resolve that up front if we'll need it, bail if that fails, and skip all the null-checks.
Created attachment 249519 [details] [diff] [review] Same as diff -w The interesting changes are in GetStyleData and GetPropertyCSSValue. The rest is basically null-check removal and ensuing code simplification.
Created attachment 249741 [details] [diff] [review] Updated to tip
Created attachment 249742 [details] [diff] [review] Same as diff -w
Created attachment 249979 [details] [diff] [review] Patch that I checked in
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.