[Webkit-unassigned] [Bug 89240] REGRESSION (r112923): getMatchedCSSRules always returning null for parentStyleSheet

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 19 16:51:06 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89240





--- Comment #3 from jmayhew at motorola.com  2012-06-19 16:51:04 PST ---
After a brief investigation it looks like changeset 112923 has quite a bit of refactoring in this area of CSS in webcore. I think this bug is just an artifact of that effort. 

In short, StyleResolver::sortAndTransferMatchedRules() calls 

    m_ruleList->rules().append(m_matchedRules[i]->rule()->createCSSOMWrapper()); 

and is not passing in the parent stylesheet. I think this call to createCSSOMWrapper should pass in the parent but I don't think it is available to the StyleResolver class. Fixing this will require making the parent sheet pointer available to the StyleResolver. This change should probably be done by the people heading the refactoring effort as it will depend on their new class design.

Also, StyleRule.h includes the following lines
    // FIXME: There shouldn't be any need for the null parent version.
    PassRefPtr<CSSRule> createCSSOMWrapper(CSSStyleSheet* parentSheet = 0) const;
    PassRefPtr<CSSRule> createCSSOMWrapper(CSSRule* parentRule) const;

I agree with the FIXME comment that there should be no default value for the parentSheet parameter. Is there ever a case where a rule should have a null parentSheet/parentRule? If this default value is removed, the resulting errors will indicate the areas that need to be addressed.

I hope that helps.

-- 
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