[webkit-reviews] review granted: [Bug 93203] Don't reuse cached stylesheet with failed or canceled resource loads : [Attachment 156568] update patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Aug 5 13:45:53 PDT 2012
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Antti Koivisto
<koivisto at iki.fi>'s request for review:
Bug 93203: Don't reuse cached stylesheet with failed or canceled resource loads
https://bugs.webkit.org/show_bug.cgi?id=93203
Attachment 156568: update patch
https://bugs.webkit.org/attachment.cgi?id=156568&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=156568&action=review
> Source/WebCore/css/CSSValue.cpp:140
> + if (isValueList())
> + return static_cast<const
CSSValueList*>(this)->hasFailedOrCanceledSubresources();
> + if (classType() == FontFaceSrcClass)
> + return static_cast<const
CSSFontFaceSrcValue*>(this)->hasFailedOrCanceledSubresources();
> + if (classType() == ImageClass)
> + return static_cast<const
CSSImageValue*>(this)->hasFailedOrCanceledSubresources();
> + if (classType() == CrossfadeClass)
> + return static_cast<const
CSSCrossfadeValue*>(this)->hasFailedOrCanceledSubresources();
> +#if ENABLE(CSS_IMAGE_SET)
> + if (classType() == ImageSetClass)
> + return static_cast<const
CSSImageSetValue*>(this)->hasFailedOrCanceledSubresources();
> +#endif
This would be one line if we used virtual functions :(
> Source/WebCore/css/StylePropertySet.cpp:901
> + if (propertyAt(i).value()->hasFailedOrCanceledSubresources())
Is this guaranteed to be non-null?
> Source/WebCore/css/StyleSheetContents.cpp:433
> + case StyleRuleBase::Style:
> + if (static_cast<const
StyleRule*>(rule)->properties()->hasFailedOrCanceledSubresources())
> + return true;
> + break;
> + case StyleRuleBase::FontFace:
> + if (static_cast<const
StyleRuleFontFace*>(rule)->properties()->hasFailedOrCanceledSubresources())
> + return true;
> + break;
> + case StyleRuleBase::Media:
> + if (childRulesHaveFailedOrCanceledSubresources(static_cast<const
StyleRuleMedia*>(rule)->childRules()))
> + return true;
> + break;
> + case StyleRuleBase::Region:
> + if (childRulesHaveFailedOrCanceledSubresources(static_cast<const
StyleRuleRegion*>(rule)->childRules()))
> + return true;
> + break;
We need casting functions like we have for renderers.
More information about the webkit-reviews
mailing list