CSSOM rule wrappers always have a corresponding internal style object.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Oct 2014 04:38:19 +0000 (04:38 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Oct 2014 04:38:19 +0000 (04:38 +0000)
commitf2ba73a98f1f378b8e281a6475285f6ab9c34636
treef344dc376868625f9fd4a23a9e5d493f22d2d2f4
parentcef566b0fa5e36ada681c56cf2fcf422261afe6c
CSSOM rule wrappers always have a corresponding internal style object.
<https://webkit.org/b/137379>

Make the CSSOM rule wrapper classes use references & Ref instead of
raw pointers and RefPtr for pointing to the internal style rule.

Also changed the signature of reattach() to take a StyleRuleBase&
since it's never called with a null pointer.

Finally marked the rule classes final.

Reviewed by Geoffrey Garen.

* css/CSSCharsetRule.h:
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::CSSFontFaceRule):
(WebCore::CSSFontFaceRule::reattach):
* css/CSSFontFaceRule.h:
(WebCore::CSSFontFaceRule::create): Deleted.
* css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::CSSGroupingRule):
(WebCore::CSSGroupingRule::reattach):
* css/CSSGroupingRule.h:
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::CSSImportRule):
(WebCore::CSSImportRule::href):
(WebCore::CSSImportRule::media):
(WebCore::CSSImportRule::cssText):
(WebCore::CSSImportRule::styleSheet):
(WebCore::CSSImportRule::reattach):
* css/CSSImportRule.h:
(WebCore::CSSImportRule::create): Deleted.
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::CSSMediaRule):
(WebCore::CSSMediaRule::mediaQueries):
(WebCore::CSSMediaRule::reattach):
* css/CSSMediaRule.h:
(WebCore::CSSMediaRule::create): Deleted.
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::CSSPageRule):
(WebCore::CSSPageRule::reattach):
* css/CSSPageRule.h:
(WebCore::CSSPageRule::create): Deleted.
* css/CSSRule.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::CSSStyleRule):
(WebCore::CSSStyleRule::reattach):
* css/CSSStyleRule.h:
(WebCore::CSSStyleRule::create): Deleted.
(WebCore::CSSStyleRule::styleRule): Deleted.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
* css/CSSSupportsRule.cpp:
(WebCore::CSSSupportsRule::CSSSupportsRule):
(WebCore::CSSSupportsRule::conditionText):
* css/CSSSupportsRule.h:
(WebCore::CSSSupportsRule::create):
* css/CSSUnknownRule.h:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper):
* css/StyleRuleImport.h:
(WebCore::StyleRuleImport::mediaQueries):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
(WebCore::WebKitCSSKeyframeRule::reattach):
* css/WebKitCSSKeyframeRule.h:
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
(WebCore::WebKitCSSKeyframesRule::item):
(WebCore::WebKitCSSKeyframesRule::reattach):
* css/WebKitCSSKeyframesRule.h:
(WebCore::WebKitCSSKeyframesRule::create):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
(WebCore::WebKitCSSRegionRule::cssText):
* css/WebKitCSSRegionRule.h:
(WebCore::WebKitCSSRegionRule::create):
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::reattach):
* css/WebKitCSSViewportRule.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSCharsetRule.h
Source/WebCore/css/CSSFontFaceRule.cpp
Source/WebCore/css/CSSFontFaceRule.h
Source/WebCore/css/CSSGroupingRule.cpp
Source/WebCore/css/CSSGroupingRule.h
Source/WebCore/css/CSSImportRule.cpp
Source/WebCore/css/CSSImportRule.h
Source/WebCore/css/CSSMediaRule.cpp
Source/WebCore/css/CSSMediaRule.h
Source/WebCore/css/CSSPageRule.cpp
Source/WebCore/css/CSSPageRule.h
Source/WebCore/css/CSSRule.h
Source/WebCore/css/CSSStyleRule.cpp
Source/WebCore/css/CSSStyleRule.h
Source/WebCore/css/CSSStyleSheet.cpp
Source/WebCore/css/CSSSupportsRule.cpp
Source/WebCore/css/CSSSupportsRule.h
Source/WebCore/css/CSSUnknownRule.h
Source/WebCore/css/StyleRule.cpp
Source/WebCore/css/StyleRuleImport.h
Source/WebCore/css/WebKitCSSKeyframeRule.cpp
Source/WebCore/css/WebKitCSSKeyframeRule.h
Source/WebCore/css/WebKitCSSKeyframesRule.cpp
Source/WebCore/css/WebKitCSSKeyframesRule.h
Source/WebCore/css/WebKitCSSRegionRule.cpp
Source/WebCore/css/WebKitCSSRegionRule.h
Source/WebCore/css/WebKitCSSViewportRule.cpp
Source/WebCore/css/WebKitCSSViewportRule.h