Stronger ElementData pointer typing.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 01:07:01 +0000 (01:07 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 01:07:01 +0000 (01:07 +0000)
commit0cb328cfd28fc49e339579c9e88a4e0d20a048d2
tree1dbd553fd9dc3e72666e305548f7413b2cc85694
parent5ffb905c0185fd94dc462b0cf1a50178ba49dea5
Stronger ElementData pointer typing.
<http://webkit.org/b/109752>

Reviewed by Antti Koivisto.

Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
where possible. Moved some methods from base class into leaf classes that don't make sense
for both classes.

* dom/DocumentSharedObjectPool.cpp:
(WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
(ShareableElementDataCacheEntry):
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
* dom/DocumentSharedObjectPool.h:
(DocumentSharedObjectPool):
* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::cloneAttributesFromElement):
(WebCore::Element::createUniqueElementData):
(WebCore::ShareableElementData::createWithAttributes):
(WebCore::UniqueElementData::create):
(WebCore::ElementData::makeUniqueCopy):
(WebCore::UniqueElementData::makeShareableCopy):
* dom/Element.h:
(ElementData):
(ShareableElementData):
(UniqueElementData):
(Element):
(WebCore::Element::ensureUniqueElementData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentSharedObjectPool.cpp
Source/WebCore/dom/DocumentSharedObjectPool.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/StyledElement.cpp