Implement encoding of arrays of objects
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Nov 2013 01:51:11 +0000 (01:51 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Nov 2013 01:51:11 +0000 (01:51 +0000)
commit29ce5510041884b4cee4c312ec6e4f6720961134
tree8e56108d4bfd092e1441f22549a93e161ecd1d2e
parentc07e42c1d03b6c7b1a8fdeaac3b5c3be2cba489a
Implement encoding of arrays of objects
https://bugs.webkit.org/show_bug.cgi?id=124091

Reviewed by Beth Dakin.

Source/WebCore:

* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTreeNode):
Encode the rest of the members.

* platform/KeyedCoding.h:
(WebCore::KeyedEncoder::encodeObjects):
Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.

Source/WebKit2:

Add a new array stack and push and pop from it accordingly.

* Shared/cf/KeyedEncoder.cpp:
(WebKit::KeyedEncoder::~KeyedEncoder):
(WebKit::KeyedEncoder::encodeBytes):
(WebKit::KeyedEncoder::encodeUInt32):
(WebKit::KeyedEncoder::encodeInt32):
(WebKit::KeyedEncoder::encodeInt64):
(WebKit::KeyedEncoder::encodeFloat):
(WebKit::KeyedEncoder::beginArray):
(WebKit::KeyedEncoder::beginArrayElement):
(WebKit::KeyedEncoder::endArrayElement):
(WebKit::KeyedEncoder::endArray):
* Shared/cf/KeyedEncoder.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/platform/KeyedCoding.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/cf/KeyedEncoder.cpp
Source/WebKit2/Shared/cf/KeyedEncoder.h
Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp