ShareableElementData should use zero-length array for storage.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 21:30:17 +0000 (21:30 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 21:30:17 +0000 (21:30 +0000)
commit6c34f77f85ac22d598b72a6b8ba5f0753e83eaba
tree3dc75b82f478235e973ce70ff3c3492a077c731c
parentd9c4cc8b874bfea405e42c7a8f0c489458fda6c7
ShareableElementData should use zero-length array for storage.
<http://webkit.org/b/109959>

Reviewed by Anders Carlsson.

Use a zero-length Attribute array instead of always casting from void* to an array.
It was done this way originally because I didn't know we could sidestep the MSVC
build error with some #pragma hackery.

* dom/DocumentSharedObjectPool.cpp:
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
* dom/Element.cpp:
(WebCore::sizeForShareableElementDataWithAttributeCount):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::ShareableElementData::~ShareableElementData):
(WebCore::UniqueElementData::UniqueElementData):
* dom/Element.h:
(ShareableElementData):
(WebCore::ElementData::attributeItem):

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