2011-05-25 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2011 20:32:37 +0000 (20:32 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2011 20:32:37 +0000 (20:32 +0000)
commitd15e6efb92d230c4d7f1993d26e8fdf1ece073e5
treede71b77c5b6ae4744c2bb4332bfd1b4d2b84e813
parent053223fc1dab84ab261bb81b7d296d50bc215951
2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by James Robinson.

        CSSStyleSelector should provide a way to obtain rules from non-author stylesheets
        https://bugs.webkit.org/show_bug.cgi?id=61454

        Replaced bool and enum arguments of styleRulesForElement and pseudoStyleRulesForElement
        by one enum, and provided a way to obtain rules from UA/user stylesheets.

        * css/CSSRule.h: Removed CSSRuleFilter.
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleRulesForElement): See above.
        (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Ditto.
        * css/CSSStyleSelector.h: Moved CSSRuleFilter here.
        * editing/markup.cpp:
        (WebCore::styleFromMatchedRulesForElement): Calls styleRulesForElement.
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getStylesForNode): Ditto.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::getMatchedCSSRules): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSRule.h
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/CSSStyleSelector.h
Source/WebCore/editing/markup.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/page/DOMWindow.cpp