<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[158971] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/158971">158971</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2013-11-08 16:25:24 -0800 (Fri, 08 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Begin stubbing out a KeyedEncoder class in WebCore
https://bugs.webkit.org/show_bug.cgi?id=124079

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
Add symbol needed by WebCore.

* WebCore.xcodeproj/project.pbxproj:
Add new header file.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTree):
* history/HistoryItem.h:
Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.

* platform/KeyedCoding.h:
Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.

Source/WebKit2:

* Shared/KeyedEncoder.h: Removed.
* Shared/cf/KeyedCodingValueCF.cpp: Removed.
* Shared/cf/KeyedEncoder.cpp: Added.
Remove old keyed encoders.

(WebKit::createDictionary):
Helper function to create a mutable dictionary.
(WebKit::KeyedEncoder::KeyedEncoder):
Create the root dictionary.

(WebKit::KeyedEncoder::encodeUInt32):
Create a CFNumberRef and add it to the dictionary.

* Shared/cf/KeyedEncoder.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
Create a KeyedEncoder and encode the history tree.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorehistoryHistoryItemcpp">trunk/Source/WebCore/history/HistoryItem.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryHistoryItemh">trunk/Source/WebCore/history/HistoryItem.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp">trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformKeyedCodingh">trunk/Source/WebCore/platform/KeyedCoding.h</a></li>
<li><a href="#trunkSourceWebKit2SharedcfKeyedEncodercpp">trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedcfKeyedEncoderh">trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2SharedKeyedCodingValueh">trunk/Source/WebKit2/Shared/KeyedCodingValue.h</a></li>
<li><a href="#trunkSourceWebKit2SharedKeyedEncodercpp">trunk/Source/WebKit2/Shared/KeyedEncoder.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedKeyedEncoderh">trunk/Source/WebKit2/Shared/KeyedEncoder.h</a></li>
<li><a href="#trunkSourceWebKit2SharedcfKeyedCodingValueCFcpp">trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedcfKeyedCodingValueCFh">trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebCore/ChangeLog        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2013-11-08  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Begin stubbing out a KeyedEncoder class in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=124079
+
+        Reviewed by Sam Weinig.
+
+        * WebCore.exp.in:
+        Add symbol needed by WebCore.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        Add new header file.
+
+        * history/HistoryItem.cpp:
+        (WebCore::HistoryItem::encodeBackForwardTree):
+        * history/HistoryItem.h:
+        Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
+
+        * platform/KeyedCoding.h:
+        Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
+
</ins><span class="cx"> 2013-11-08  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebCore/WebCore.exp.in        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1425,6 +1425,7 @@
</span><span class="cx"> __ZNK7WebCore11HistoryItem20getTransientPropertyERKN3WTF6StringE
</span><span class="cx"> __ZNK7WebCore11HistoryItem20hasCachedPageExpiredEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem21encodeBackForwardTreeERN3WTF7EncoderE
</span><ins>+__ZNK7WebCore11HistoryItem21encodeBackForwardTreeERNS_12KeyedEncoderE
</ins><span class="cx"> __ZNK7WebCore11HistoryItem3urlEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem4copyEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem5titleEv
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -756,6 +756,7 @@
</span><span class="cx">                 1AD8F81C11CAB9E900E93E54 /* PlatformStrategies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */; };
</span><span class="cx">                 1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADA140E0E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp */; };
</span><span class="cx">                 1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                1AE00D59182DAC8D00087DD7 /* KeyedCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D57182DAC8D00087DD7 /* KeyedCoding.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1AE2AA1E0A1CDAB400B42B25 /* JSHTMLAreaElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE2AA0A0A1CDAB300B42B25 /* JSHTMLAreaElement.cpp */; };
</span><span class="cx">                 1AE2AA1F0A1CDAB400B42B25 /* JSHTMLAreaElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE2AA0B0A1CDAB300B42B25 /* JSHTMLAreaElement.h */; };
</span><span class="cx">                 1AE2AA200A1CDAB400B42B25 /* JSHTMLBaseFontElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE2AA0C0A1CDAB300B42B25 /* JSHTMLBaseFontElement.cpp */; };
</span><span class="lines">@@ -7331,6 +7332,7 @@
</span><span class="cx">                 1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformStrategies.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ADA140E0E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginMainThreadScheduler.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginMainThreadScheduler.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1AE00D57182DAC8D00087DD7 /* KeyedCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedCoding.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1AE2A9F00A1CDA5700B42B25 /* HTMLAreaElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLAreaElement.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE2A9F10A1CDA5700B42B25 /* HTMLBaseFontElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLBaseFontElement.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE2A9F20A1CDA5700B42B25 /* HTMLBodyElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLBodyElement.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -20049,11 +20051,9 @@
</span><span class="cx">                                 D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */,
</span><span class="cx">                                 D630E2AB149BF344005B2F93 /* HistogramSupport.h */,
</span><span class="cx">                                 BC3BC29B0E91AB0F00835588 /* HostWindow.h */,
</span><ins>+                                1AE00D57182DAC8D00087DD7 /* KeyedCoding.h */,
</ins><span class="cx">                                 521D46F711AEC9B100514613 /* KillRing.h */,
</span><span class="cx">                                 4306E4E514955543007F17AC /* KillRingNone.cpp */,
</span><del>-                                6593923509AE4346002C531F /* URL.cpp */,
-                                6593923609AE4346002C531F /* URL.h */,
-                                BCBD21AA0E417AD400A070F2 /* URLHash.h */,
</del><span class="cx">                                 E18772F0126E2629003DD586 /* Language.cpp */,
</span><span class="cx">                                 85EC9AF90A71A2C600EEEAED /* Language.h */,
</span><span class="cx">                                 141DC0471648348F00371E5A /* LayoutUnit.h */,
</span><span class="lines">@@ -20150,6 +20150,9 @@
</span><span class="cx">                                 93309EA1099EB78C0056E581 /* Timer.cpp */,
</span><span class="cx">                                 9305B24C098F1B6B00C28855 /* Timer.h */,
</span><span class="cx">                                 1419D2C40CEA6F6100FF507A /* TreeShared.h */,
</span><ins>+                                6593923509AE4346002C531F /* URL.cpp */,
+                                6593923609AE4346002C531F /* URL.h */,
+                                BCBD21AA0E417AD400A070F2 /* URLHash.h */,
</ins><span class="cx">                                 2E3BBF051162DA1100B9409A /* UUID.cpp */,
</span><span class="cx">                                 2E3BBF061162DA1100B9409A /* UUID.h */,
</span><span class="cx">                                 515788C01207852C00A37C4A /* VisitedLinkStrategy.h */,
</span><span class="lines">@@ -23442,6 +23445,7 @@
</span><span class="cx">                                 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
</span><span class="cx">                                 1C5FAED20DCFD90100D58F78 /* JSJavaScriptCallFrame.h in Headers */,
</span><span class="cx">                                 A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */,
</span><ins>+                                1AE00D59182DAC8D00087DD7 /* KeyedCoding.h in Headers */,
</ins><span class="cx">                                 935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */,
</span><span class="cx">                                 BCE1C43C0D9830D3003B02F2 /* JSLocation.h in Headers */,
</span><span class="cx">                                 FD23A12613F5FA5900F67001 /* JSMediaElementAudioSourceNode.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryHistoryItemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/HistoryItem.cpp (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/HistoryItem.cpp        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebCore/history/HistoryItem.cpp        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;CachedPage.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;IconDatabase.h&quot;
</span><ins>+#include &quot;KeyedCoding.h&quot;
</ins><span class="cx"> #include &quot;PageCache.h&quot;
</span><span class="cx"> #include &quot;ResourceRequest.h&quot;
</span><span class="cx"> #include &quot;SerializedScriptValue.h&quot;
</span><span class="lines">@@ -682,6 +683,13 @@
</span><span class="cx">     encodeBackForwardTreeNode(encoder);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HistoryItem::encodeBackForwardTree(KeyedEncoder&amp; encoder) const
+{
+    encoder.encodeUInt32(&quot;version&quot;, backForwardTreeEncodingVersion);
+
+    // FIXME: Encode the tree.
+}
+
</ins><span class="cx"> void HistoryItem::encodeBackForwardTreeNode(Encoder&amp; encoder) const
</span><span class="cx"> {
</span><span class="cx">     size_t size = m_children.size();
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryHistoryItemh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/HistoryItem.h (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/HistoryItem.h        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebCore/history/HistoryItem.h        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -50,8 +50,9 @@
</span><span class="cx"> class FormData;
</span><span class="cx"> class HistoryItem;
</span><span class="cx"> class Image;
</span><ins>+class KeyedEncoder;
+class ResourceRequest;
</ins><span class="cx"> class URL;
</span><del>-class ResourceRequest;
</del><span class="cx"> 
</span><span class="cx"> typedef Vector&lt;RefPtr&lt;HistoryItem&gt;&gt; HistoryItemVector;
</span><span class="cx"> 
</span><span class="lines">@@ -88,6 +89,7 @@
</span><span class="cx">     void reset();
</span><span class="cx">     
</span><span class="cx">     void encodeBackForwardTree(Encoder&amp;) const;
</span><ins>+    void encodeBackForwardTree(KeyedEncoder&amp;) const;
</ins><span class="cx">     static PassRefPtr&lt;HistoryItem&gt; decodeBackForwardTree(const String&amp; urlString, const String&amp; title, const String&amp; originalURLString, Decoder&amp;);
</span><span class="cx"> 
</span><span class="cx">     const String&amp; originalURLString() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformKeyedCodinghfromrev158969trunkSourceWebKit2SharedcfKeyedCodingValueCFh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/KeyedCoding.h (from rev 158969, trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.h) (0 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/KeyedCoding.h                                (rev 0)
+++ trunk/Source/WebCore/platform/KeyedCoding.h        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KeyedCoding_h
+#define KeyedCoding_h
+
+#include &lt;wtf/Forward.h&gt;
+
+namespace WebCore {
+
+class KeyedEncoder {
+protected:
+    virtual ~KeyedEncoder() { }
+
+public:
+    virtual void encodeUInt32(const String&amp; key, uint32_t) = 0;
+};
+
+} // namespace WebCore
+
+#endif // KeyedCoding_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/ChangeLog        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2013-11-08  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Begin stubbing out a KeyedEncoder class in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=124079
+
+        Reviewed by Sam Weinig.
+
+        * Shared/KeyedEncoder.h: Removed.
+        * Shared/cf/KeyedCodingValueCF.cpp: Removed.
+        * Shared/cf/KeyedEncoder.cpp: Added.
+        Remove old keyed encoders.
+
+        (WebKit::createDictionary):
+        Helper function to create a mutable dictionary.
+        (WebKit::KeyedEncoder::KeyedEncoder):
+        Create the root dictionary.
+
+        (WebKit::KeyedEncoder::encodeUInt32):
+        Create a CFNumberRef and add it to the dictionary.
+
+        * Shared/cf/KeyedEncoder.h: Added.
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new files.
+
+        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+        (WebKit::updateBackForwardItem):
+        Create a KeyedEncoder and encode the history tree.
+
</ins><span class="cx"> 2013-11-08  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedKeyedCodingValueh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/KeyedCodingValue.h (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/KeyedCodingValue.h        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/Shared/KeyedCodingValue.h        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KeyedCodingValue_h
-#define KeyedCodingValue_h
-
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebKit {
-
-struct KeyedCodingValue {
-    enum Type {
-        StringValue,
-        ObjectValue
-    };
-
-    Type type;
-    String string;
-    HashMap&lt;String, KeyedCodingValue&gt; object;
-};
-
-} // namespace WebKit
-
-#endif // KeyedCodingValue_h
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedKeyedEncodercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/KeyedEncoder.cpp (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/KeyedEncoder.cpp        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/Shared/KeyedEncoder.cpp        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;KeyedEncoder.h&quot;
-
-#include &quot;KeyedCodingValue.h&quot;
-#include &lt;wtf/text/StringHash.h&gt;
-
-namespace WebKit {
-
-KeyedEncoder::KeyedEncoder()
-    : m_currentObject(&amp;m_rootObject)
-{
-}
-
-KeyedEncoder::~KeyedEncoder()
-{
-    ASSERT(m_currentObject == &amp;m_rootObject);
-}
-
-void KeyedEncoder::encode(const String&amp; key, const String&amp; value)
-{
-    ASSERT(!m_currentObject-&gt;contains(key));
-
-    KeyedCodingValue keyedCodingValue;
-    keyedCodingValue.type = KeyedCodingValue::StringValue;
-    keyedCodingValue.string = value;
-
-    m_currentObject-&gt;set(key, std::move(keyedCodingValue));
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedKeyedEncoderh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/KeyedEncoder.h (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/KeyedEncoder.h        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/Shared/KeyedEncoder.h        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,70 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KeyedEncoder_h
-#define KeyedEncoder_h
-
-#include &lt;wtf/Forward.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-// FIXME: I believe this class can be moved to either WTF or WebCore
-// and replace the Encoder/Decoder classes there. Currently the Encoder/Decoder
-// classes are used to serialize history trees and using a keyed encoder would be
-// less fragile from a binary compatibility perspective.
-
-namespace WebKit {
-
-struct KeyedCodingValue;
-
-class KeyedEncoder {
-public:
-    KeyedEncoder();
-    ~KeyedEncoder();
-
-    void encode(const String&amp; key, const String&amp; value);
-
-private:
-#if 0
-    struct Value {
-        enum Type {
-            StringValue,
-            ObjectValue,
-        };
-
-        String string;
-        HashMap&lt;String, Value&gt; object;
-    };
-
-    HashMap&lt;String, Value&gt; root;
-#endif
-
-    HashMap&lt;String, KeyedCodingValue&gt; m_rootObject;
-    HashMap&lt;String, KeyedCodingValue&gt;* m_currentObject;
-};
-
-} // namespace WebKit
-
-#endif // KeyedEncoder_h
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedcfKeyedCodingValueCFcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.cpp (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.cpp        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.cpp        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;KeyedCodingValueCF.h&quot;
-
-namespace WebKit {
-
-static RetainPtr&lt;CFMutableDictionaryRef&gt; toCFDictionary(const HashMap&lt;String, KeyedCodingValue&gt;&amp; object)
-{
-    RetainPtr&lt;CFMutableDictionaryRef&gt; dictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, object.size(), &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
-
-    for (auto it = object.begin(), end = object.end(); it != end; ++it)
-        CFDictionarySetValue(dictionary.get(), it-&gt;key.createCFString().get(), toCFType(it-&gt;value).get());
-
-    return dictionary;
-}
-
-RetainPtr&lt;CFTypeRef&gt; toCFType(const KeyedCodingValue&amp; value)
-{
-    switch (value.type) {
-    case KeyedCodingValue::StringValue:
-        return value.string.createCFString();
-
-    case KeyedCodingValue::ObjectValue:
-        return toCFDictionary(value.object);
-    }
-
-    ASSERT_NOT_REACHED();
-    return nullptr;
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedcfKeyedCodingValueCFh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.h (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.h        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/Shared/cf/KeyedCodingValueCF.h        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KeyedCodingValueCF_h
-#define KeyedCodingValueCF_h
-
-#include &quot;KeyedCodingValue.h&quot;
-#include &lt;wtf/RetainPtr.h&gt;
-
-namespace WebKit {
-
-RetainPtr&lt;CFTypeRef&gt; toCFType(const KeyedCodingValue&amp;);
-
-} // namespace WebKit
-
-#endif // KeyedCodingValueCF_h
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedcfKeyedEncodercppfromrev158969trunkSourceWebKit2SharedKeyedEncodercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp (from rev 158969, trunk/Source/WebKit2/Shared/KeyedEncoder.cpp) (0 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;KeyedEncoder.h&quot;
+
+#include &lt;CoreFoundation/CoreFoundation.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+static RetainPtr&lt;CFMutableDictionaryRef&gt; createDictionary()
+{
+    return adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
+}
+
+KeyedEncoder::KeyedEncoder()
+    : m_rootDictionary(createDictionary())
+{
+}
+    
+KeyedEncoder::~KeyedEncoder()
+{
+}
+
+void KeyedEncoder::encodeUInt32(const String&amp; key, uint32_t value)
+{
+    RetainPtr&lt;CFNumberRef&gt; number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &amp;value));
+    CFDictionarySetValue(m_rootDictionary.get(), key.createCFString().get(), number.get());
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedcfKeyedEncoderhfromrev158969trunkSourceWebKit2SharedKeyedCodingValueh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h (from rev 158969, trunk/Source/WebKit2/Shared/KeyedCodingValue.h) (0 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KeyedEncoder_h
+#define KeyedEncoder_h
+
+#include &lt;WebCore/KeyedCoding.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
+namespace WebKit {
+
+class KeyedEncoder : public WebCore::KeyedEncoder {
+public:
+    KeyedEncoder();
+    ~KeyedEncoder();
+
+private:
+    virtual void encodeUInt32(const String&amp; key, uint32_t) OVERRIDE;
+
+    RetainPtr&lt;CFMutableDictionaryRef&gt; m_rootDictionary;
+};
+
+} // namespace WebKit
+
+#endif // KeyedEncoder_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -148,11 +148,6 @@
</span><span class="cx">                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A9C9912B821CD008FE984 /* NetscapePluginModuleMac.mm */; };
</span><span class="cx">                 1A4A9F3312B844E2008FE984 /* PluginQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4A9F3112B844E2008FE984 /* PluginQuirks.h */; };
</span><span class="cx">                 1A50DB66110A3D57000D3FE5 /* WebProcess.app in Copy Files */ = {isa = PBXBuildFile; fileRef = 1A50DB1E110A3BDC000D3FE5 /* WebProcess.app */; };
</span><del>-                1A588B30174AAC7100ACF472 /* KeyedEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A588B2E174AAC7100ACF472 /* KeyedEncoder.cpp */; };
-                1A588B31174AAC7100ACF472 /* KeyedEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A588B2F174AAC7100ACF472 /* KeyedEncoder.h */; };
-                1A588B33174AAE0B00ACF472 /* KeyedCodingValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A588B32174AAE0B00ACF472 /* KeyedCodingValue.h */; };
-                1A588B36174AB77000ACF472 /* KeyedCodingValueCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A588B34174AB77000ACF472 /* KeyedCodingValueCF.cpp */; };
-                1A588B37174AB77000ACF472 /* KeyedCodingValueCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A588B35174AB77000ACF472 /* KeyedCodingValueCF.h */; };
</del><span class="cx">                 1A594ABA112A1FB6009DE7C7 /* WebUIClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A594AB8112A1FB6009DE7C7 /* WebUIClient.cpp */; };
</span><span class="cx">                 1A594ABB112A1FB6009DE7C7 /* WebUIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */; };
</span><span class="cx">                 1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */; };
</span><span class="lines">@@ -269,6 +264,8 @@
</span><span class="cx">                 1AE00D4C182D6EB000087DD7 /* WKBrowsingContextHandle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */; };
</span><span class="cx">                 1AE00D4D182D6EB000087DD7 /* WKBrowsingContextHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */; };
</span><span class="cx">                 1AE00D4F182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */; };
</span><ins>+                1AE00D5C182DADE100087DD7 /* KeyedEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D5A182DADE100087DD7 /* KeyedEncoder.cpp */; };
+                1AE00D5D182DADE100087DD7 /* KeyedEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D5B182DADE100087DD7 /* KeyedEncoder.h */; };
</ins><span class="cx">                 1AE117F611DBB30900981615 /* ProcessLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE117F511DBB30900981615 /* ProcessLauncher.cpp */; };
</span><span class="cx">                 1AE4976811FF658E0048B464 /* NPJSObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE4976611FF658E0048B464 /* NPJSObject.h */; };
</span><span class="cx">                 1AE4976911FF658E0048B464 /* NPJSObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4976711FF658E0048B464 /* NPJSObject.cpp */; };
</span><span class="lines">@@ -1618,11 +1615,6 @@
</span><span class="cx">                 1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A4F976E100E7B6600637A18 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A50DB1E110A3BDC000D3FE5 /* WebProcess.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebProcess.app; sourceTree = BUILT_PRODUCTS_DIR; };
</span><del>-                1A588B2E174AAC7100ACF472 /* KeyedEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedEncoder.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1A588B2F174AAC7100ACF472 /* KeyedEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedEncoder.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1A588B32174AAE0B00ACF472 /* KeyedCodingValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedCodingValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1A588B34174AB77000ACF472 /* KeyedCodingValueCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedCodingValueCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1A588B35174AB77000ACF472 /* KeyedCodingValueCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedCodingValueCF.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1A594AB8112A1FB6009DE7C7 /* WebUIClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebUIClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUIClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCheckerState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1756,6 +1748,8 @@
</span><span class="cx">                 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBrowsingContextHandle.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandleInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1AE00D5A182DADE100087DD7 /* KeyedEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedEncoder.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AE00D5B182DADE100087DD7 /* KeyedEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedEncoder.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1AE117F511DBB30900981615 /* ProcessLauncher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessLauncher.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE4976611FF658E0048B464 /* NPJSObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPJSObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AE4976711FF658E0048B464 /* NPJSObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPJSObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3361,9 +3355,6 @@
</span><span class="cx">                                 BC64696E11DBE603006455B0 /* ImmutableArray.h */,
</span><span class="cx">                                 BCBCB0CC1215E33A00DE59CA /* ImmutableDictionary.cpp */,
</span><span class="cx">                                 BCBCB0CA1215E32100DE59CA /* ImmutableDictionary.h */,
</span><del>-                                1A588B32174AAE0B00ACF472 /* KeyedCodingValue.h */,
-                                1A588B2E174AAC7100ACF472 /* KeyedEncoder.cpp */,
-                                1A588B2F174AAC7100ACF472 /* KeyedEncoder.h */,
</del><span class="cx">                                 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */,
</span><span class="cx">                                 BCC8049D122F0D6B00103529 /* MutableArray.cpp */,
</span><span class="cx">                                 BCC8049E122F0D6B00103529 /* MutableArray.h */,
</span><span class="lines">@@ -3509,8 +3500,8 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */,
</span><span class="cx">                                 1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */,
</span><del>-                                1A588B34174AB77000ACF472 /* KeyedCodingValueCF.cpp */,
-                                1A588B35174AB77000ACF472 /* KeyedCodingValueCF.h */,
</del><ins>+                                1AE00D5A182DADE100087DD7 /* KeyedEncoder.cpp */,
+                                1AE00D5B182DADE100087DD7 /* KeyedEncoder.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = cf;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -5560,9 +5551,6 @@
</span><span class="cx">                                 BCB0B0DE12305A8C00B1341E /* InjectedBundleUserMessageCoders.h in Headers */,
</span><span class="cx">                                 1AE49A4911FFA8CE0048B464 /* JSNPMethod.h in Headers */,
</span><span class="cx">                                 1AE4987811FF7FAA0048B464 /* JSNPObject.h in Headers */,
</span><del>-                                1A588B33174AAE0B00ACF472 /* KeyedCodingValue.h in Headers */,
-                                1A588B37174AB77000ACF472 /* KeyedCodingValueCF.h in Headers */,
-                                1A588B31174AAC7100ACF472 /* KeyedEncoder.h in Headers */,
</del><span class="cx">                                 BCE0937814FB128C001138D9 /* LayerHostingContext.h in Headers */,
</span><span class="cx">                                 1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */,
</span><span class="cx">                                 1A186EEA12EF7618008E5F37 /* LayerTreeHost.h in Headers */,
</span><span class="lines">@@ -5926,6 +5914,7 @@
</span><span class="cx">                                 51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */,
</span><span class="cx">                                 BCC938E11180DE440085E5FE /* WKContextPrivate.h in Headers */,
</span><span class="cx">                                 9FB5F395169E6A80002C25BF /* WKContextPrivateMac.h in Headers */,
</span><ins>+                                1AE00D5D182DADE100087DD7 /* KeyedEncoder.h in Headers */,
</ins><span class="cx">                                 3309345B1315B9980097A7BC /* WKCookieManager.h in Headers */,
</span><span class="cx">                                 512F58FA12A88A5400629530 /* WKCredential.h in Headers */,
</span><span class="cx">                                 518ACF1112B015F800B04B83 /* WKCredentialTypes.h in Headers */,
</span><span class="lines">@@ -6860,8 +6849,6 @@
</span><span class="cx">                                 BC14DF78120B5B7900826C0C /* InjectedBundleScriptWorld.cpp in Sources */,
</span><span class="cx">                                 1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */,
</span><span class="cx">                                 1AE4987911FF7FAA0048B464 /* JSNPObject.cpp in Sources */,
</span><del>-                                1A588B36174AB77000ACF472 /* KeyedCodingValueCF.cpp in Sources */,
-                                1A588B30174AAC7100ACF472 /* KeyedEncoder.cpp in Sources */,
</del><span class="cx">                                 BCE0937714FB128C001138D9 /* LayerHostingContext.mm in Sources */,
</span><span class="cx">                                 1A92DC1312F8BAB90017AF65 /* LayerTreeContextMac.mm in Sources */,
</span><span class="cx">                                 1A186EEB12EF7618008E5F37 /* LayerTreeHost.cpp in Sources */,
</span><span class="lines">@@ -7166,6 +7153,7 @@
</span><span class="cx">                                 1A3E736211CC2659007BD539 /* WebPlatformStrategies.cpp in Sources */,
</span><span class="cx">                                 C0337DDD127A521C008FF4F4 /* WebPlatformTouchPoint.cpp in Sources */,
</span><span class="cx">                                 31D5929E166E060000E6BF02 /* WebPlugInClient.cpp in Sources */,
</span><ins>+                                1AE00D5C182DADE100087DD7 /* KeyedEncoder.cpp in Sources */,
</ins><span class="cx">                                 1AC8702E130B49A2002C1257 /* WebPluginSiteDataManager.cpp in Sources */,
</span><span class="cx">                                 BCB9F8AF1124E07700A137E0 /* WebPolicyClient.cpp in Sources */,
</span><span class="cx">                                 BC5744EF12638FB3006F0F12 /* WebPopupItem.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp (158970 => 158971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2013-11-09 00:18:33 UTC (rev 158970)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp        2013-11-09 00:25:24 UTC (rev 158971)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DataReference.h&quot;
</span><span class="cx"> #include &quot;EncoderAdapter.h&quot;
</span><ins>+#include &quot;KeyedEncoder.h&quot;
</ins><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> #include &quot;WebPage.h&quot;
</span><span class="cx"> #include &quot;WebPageProxyMessages.h&quot;
</span><span class="lines">@@ -83,6 +84,9 @@
</span><span class="cx"> 
</span><span class="cx"> static void updateBackForwardItem(uint64_t itemID, HistoryItem* item)
</span><span class="cx"> {
</span><ins>+    KeyedEncoder keyedEncoder;
+    item-&gt;encodeBackForwardTree(keyedEncoder);
+
</ins><span class="cx">     EncoderAdapter encoder;
</span><span class="cx">     item-&gt;encodeBackForwardTree(encoder);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>