[Webkit-unassigned] [Bug 93203] Don't reuse cached stylesheet with failed or canceled resource loads
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Aug 5 13:45:57 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=93203
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #156568|review? |review+
Flag| |
--- Comment #13 from Simon Fraser (smfr) <simon.fraser at apple.com> 2012-08-05 13:45:52 PST ---
(From update of attachment 156568)
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list