Bug 20367

Summary: CSSRuleSet::addRulesFromSheet uses the wrong object for fontFaceRule?
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, hyatt, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch, testcase, changelog eric: review+

Simon Fraser (smfr)
Reported 2008-08-12 18:04:56 PDT
CSSRuleSet::addRulesFromSheet seems to use the wrong object when casting to a fontFaceRule. Maybe patch: addRule(rule, s); } else if (childItem->isFontFaceRule() && styleSelector) { // Add this font face to our set. - const CSSFontFaceRule* fontFaceRule = static_cast<CSSFontFaceRule*>(item); + const CSSFontFaceRule* fontFaceRule = static_cast<CSSFontFaceRule*>(childItem); styleSelector->fontSelector()->addFontFaceRule(fontFaceRule); } else if (childItem->isKeyframesRule() && styleSelector) { // Add this keyframe rule to our set.
Attachments
Patch, testcase, changelog (3.19 KB, patch)
2008-08-13 17:44 PDT, Simon Fraser (smfr)
eric: review+
mitz
Comment 1 2008-08-12 23:37:40 PDT
Yup. Just add a test case (it's easy to make one, and it instantly crashes a debug build) etc.
Simon Fraser (smfr)
Comment 2 2008-08-13 17:44:49 PDT
Created attachment 22783 [details] Patch, testcase, changelog
Eric Seidel (no email)
Comment 3 2008-08-13 20:24:02 PDT
Comment on attachment 22783 [details] Patch, testcase, changelog Thanks!
Simon Fraser (smfr)
Comment 4 2008-08-14 16:04:54 PDT
Committed r35760 M WebCore/ChangeLog M WebCore/css/CSSStyleSelector.cpp A LayoutTests/platform/mac/fast/css/font-face-in-media-rule-expected.txt M LayoutTests/ChangeLog A LayoutTests/fast/css/font-face-in-media-rule.html r35760 = 50954e56fb2e2204e506513419f556cf0dc8a1fc (trunk)
Note You need to log in before you can comment on or make changes to this bug.