[webkit-reviews] review granted: [Bug 103003] Re-virtualize CSSRule. : [Attachment 175561] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 21 19:03:21 PST 2012
Anders Carlsson <andersca at apple.com> has granted Andreas Kling
<akling at apple.com>'s request for review:
Bug 103003: Re-virtualize CSSRule.
https://bugs.webkit.org/show_bug.cgi?id=103003
Attachment 175561: Patch
https://bugs.webkit.org/attachment.cgi?id=175561&action=review
------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=175561&action=review
> Source/WebCore/css/StyleResolver.cpp:2573
> - if (cssRule->isImportRule())
> + if (cssRule->type() == CSSRule::IMPORT_RULE)
> collectCSSOMWrappers(wrapperMap,
static_cast<CSSImportRule*>(cssRule)->styleSheet());
> - else if (cssRule->isMediaRule())
> + else if (cssRule->type() == CSSRule::MEDIA_RULE)
> collectCSSOMWrappers(wrapperMap,
static_cast<CSSMediaRule*>(cssRule));
> #if ENABLE(CSS_REGIONS)
> - else if (cssRule->isRegionRule())
> + else if (cssRule->type() == CSSRule::WEBKIT_REGION_RULE)
> collectCSSOMWrappers(wrapperMap,
static_cast<WebKitCSSRegionRule*>(cssRule));
> #endif
> - else if (cssRule->isStyleRule()) {
> + else if (cssRule->type() == CSSRule::STYLE_RULE) {
> CSSStyleRule* cssStyleRule =
static_cast<CSSStyleRule*>(cssRule);
> wrapperMap.add(cssStyleRule->styleRule(), cssStyleRule);
> }
This looks like it should be a switch statement instead.
More information about the webkit-reviews
mailing list