ShareableElementData should use zero-length array for storage.
[WebKit-https.git] / Source / WebCore / ChangeLog
index b16449b736743b6043e71bd0c2ae867665209fbc..f129a1bbec46776d899aeaa08906e5976ee11d80 100644 (file)
@@ -1,3 +1,25 @@
+2013-02-15  Andreas Kling  <akling@apple.com>
+
+        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):
+
 2013-02-14  Ojan Vafai  <ojan@chromium.org>
 
         Implement RenderGrid::computeIntrinsicLogicalWidths