Implement StyleRule copying
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 21:56:48 +0000 (21:56 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 21:56:48 +0000 (21:56 +0000)
commit685685de07c73fad6f1ca4c12e9ebd1bfeda3e47
tree2dc841e7d23f986e463e400c41d5291f95c8d0c2
parentc16a8febab32d4ad7a4b1674aa4909a85e19ee82
Implement StyleRule copying
https://bugs.webkit.org/show_bug.cgi?id=84752

Reviewed by Andreas Kling.

We'll need this for copy-on-write when style sheet data is shared between documents.

Implement copy() and copy constructor for style rules their children as needed.

The code is not yet used.

* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore):
* css/CSSSelectorList.h:
(CSSSelectorList):
* css/MediaList.h:
(WebCore::MediaQuerySet::copy):
(MediaQuerySet):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
(WebCore):
* css/MediaQuery.h:
(MediaQuery):
(WebCore::MediaQuery::copy):
* css/MediaQueryExp.h:
(WebCore::MediaQueryExp::copy):
(MediaQueryExp):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::StylePropertySet):
(WebCore):
(WebCore::StylePropertySet::copy):
* css/StylePropertySet.h:

    Make this copy parse mode too. As a result ElementAttributeData no longer needs to set it explicitly after copying.

(StylePropertySet):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::copy):
(WebCore):
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRulePage::StyleRulePage):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleBlock::StyleRuleBlock):
(WebCore::StyleRuleMedia::StyleRuleMedia):
(WebCore::StyleRuleRegion::StyleRuleRegion):
* css/StyleRule.h:
(StyleRuleBase):
(WebCore::StyleRuleBase::StyleRuleBase):
(WebCore::StyleRule::copy):
(StyleRule):
(WebCore::StyleRuleFontFace::copy):
(StyleRuleFontFace):
(WebCore::StyleRulePage::copy):
(StyleRulePage):
(StyleRuleBlock):
(WebCore::StyleRuleMedia::copy):
(StyleRuleMedia):
(WebCore::StyleRuleRegion::copy):
(StyleRuleRegion):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore):
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
* css/WebKitCSSKeyframesRule.h:
(WebCore):
(WebCore::StyleRuleKeyframes::copy):
(StyleRuleKeyframes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSSelectorList.cpp
Source/WebCore/css/CSSSelectorList.h
Source/WebCore/css/MediaList.cpp
Source/WebCore/css/MediaList.h
Source/WebCore/css/MediaQuery.cpp
Source/WebCore/css/MediaQuery.h
Source/WebCore/css/MediaQueryExp.h
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StylePropertySet.h
Source/WebCore/css/StyleRule.cpp
Source/WebCore/css/StyleRule.h
Source/WebCore/css/WebKitCSSKeyframesRule.cpp
Source/WebCore/css/WebKitCSSKeyframesRule.h
Source/WebCore/dom/ElementAttributeData.cpp