Source/WebKit: Fix build.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Jan 2014 21:32:59 +0000 (21:32 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Jan 2014 21:32:59 +0000 (21:32 +0000)
Make HistoryPropertyList an Objective-C++ class.

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac: Fix build.

Pass a WebHistoryItem to writeHistoryItem so we can extract _lastVisitWasHTTPNonGet from it.

* History/HistoryPropertyList.h:
* History/HistoryPropertyList.mm:
(HistoryPropertyListWriter::HistoryPropertyListWriter):
(HistoryPropertyListWriter::buffer):
(HistoryPropertyListWriter::releaseData):
(HistoryPropertyListWriter::writeObjects):
(HistoryPropertyListWriter::writeHistoryItem):
* History/WebHistory.mm:
(WebHistoryWriter::writeHistoryItems):
* History/WebHistoryItem.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162807 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/History/HistoryPropertyList.h
Source/WebKit/mac/History/HistoryPropertyList.mm [moved from Source/WebKit/mac/History/HistoryPropertyList.cpp with 93% similarity]
Source/WebKit/mac/History/WebHistory.mm
Source/WebKit/mac/History/WebHistoryItem.mm

index 3492748..86f056c 100644 (file)
@@ -1,3 +1,11 @@
+2014-01-26  Anders Carlsson  <andersca@apple.com>
+
+        Fix build.
+        
+        Make HistoryPropertyList an Objective-C++ class.
+
+        * WebKit.xcodeproj/project.pbxproj:
+
 2014-01-25  Alex Christensen  <achristensen@webkit.org>
 
         Unreviewed build fix for Win64.
index 8048f6d..93ead58 100644 (file)
@@ -29,7 +29,7 @@
                1A4DF5E50EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4DF5E30EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm */; };
                1A60519117502A5D00BC62F5 /* BinaryPropertyList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */; };
                1A60519217502A5D00BC62F5 /* BinaryPropertyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */; };
-               1A60519317502A5D00BC62F5 /* HistoryPropertyList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A60518F17502A5D00BC62F5 /* HistoryPropertyList.cpp */; };
+               1A60519317502A5D00BC62F5 /* HistoryPropertyList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A60518F17502A5D00BC62F5 /* HistoryPropertyList.mm */; };
                1A60519417502A5D00BC62F5 /* HistoryPropertyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A60519017502A5D00BC62F5 /* HistoryPropertyList.h */; };
                1A6A208D1886154600E50F5F /* WebProgressTrackerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A6A208B1886154600E50F5F /* WebProgressTrackerClient.mm */; };
                1A6A208E1886154600E50F5F /* WebProgressTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6A208C1886154600E50F5F /* WebProgressTrackerClient.h */; };
                1A4DF5E30EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebBaseNetscapePluginView.mm; sourceTree = "<group>"; };
                1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BinaryPropertyList.cpp; sourceTree = "<group>"; };
                1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BinaryPropertyList.h; sourceTree = "<group>"; };
-               1A60518F17502A5D00BC62F5 /* HistoryPropertyList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryPropertyList.cpp; sourceTree = "<group>"; };
+               1A60518F17502A5D00BC62F5 /* HistoryPropertyList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HistoryPropertyList.mm; sourceTree = "<group>"; };
                1A60519017502A5D00BC62F5 /* HistoryPropertyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryPropertyList.h; sourceTree = "<group>"; };
                1A6A208B1886154600E50F5F /* WebProgressTrackerClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProgressTrackerClient.mm; sourceTree = "<group>"; };
                1A6A208C1886154600E50F5F /* WebProgressTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProgressTrackerClient.h; sourceTree = "<group>"; };
                        children = (
                                1A60518D17502A5D00BC62F5 /* BinaryPropertyList.cpp */,
                                1A60518E17502A5D00BC62F5 /* BinaryPropertyList.h */,
-                               1A60518F17502A5D00BC62F5 /* HistoryPropertyList.cpp */,
+                               1A60518F17502A5D00BC62F5 /* HistoryPropertyList.mm */,
                                1A60519017502A5D00BC62F5 /* HistoryPropertyList.h */,
                                3944607D020F50ED0ECA1767 /* WebBackForwardList.h */,
                                3944607E020F50ED0ECA1767 /* WebBackForwardList.mm */,
                                939810FE0824BF01008DF038 /* CarbonWindowContentView.m in Sources */,
                                939810FF0824BF01008DF038 /* CarbonWindowFrame.m in Sources */,
                                B82958D4132707D0000D0E79 /* CorrectionPanel.mm in Sources */,
-                               1A60519317502A5D00BC62F5 /* HistoryPropertyList.cpp in Sources */,
+                               1A60519317502A5D00BC62F5 /* HistoryPropertyList.mm in Sources */,
                                939811000824BF01008DF038 /* HIViewAdapter.m in Sources */,
                                939811020824BF01008DF038 /* HIWebView.mm in Sources */,
                                1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */,
index 6bdbe4c..65b23ef 100644 (file)
@@ -1,5 +1,22 @@
 2014-01-26  Anders Carlsson  <andersca@apple.com>
 
+        Fix build.
+
+        Pass a WebHistoryItem to writeHistoryItem so we can extract _lastVisitWasHTTPNonGet from it.
+
+        * History/HistoryPropertyList.h:
+        * History/HistoryPropertyList.mm:
+        (HistoryPropertyListWriter::HistoryPropertyListWriter):
+        (HistoryPropertyListWriter::buffer):
+        (HistoryPropertyListWriter::releaseData):
+        (HistoryPropertyListWriter::writeObjects):
+        (HistoryPropertyListWriter::writeHistoryItem):
+        * History/WebHistory.mm:
+        (WebHistoryWriter::writeHistoryItems):
+        * History/WebHistoryItem.mm:
+
+2014-01-26  Anders Carlsson  <andersca@apple.com>
+
         Move lastVisitWasHTTPNonGet out to WebHistoryItem
         https://bugs.webkit.org/show_bug.cgi?id=127657
 
index e2bf35a..c31767f 100644 (file)
@@ -30,9 +30,7 @@
 #include <wtf/RetainPtr.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebCore {
-class HistoryItem;
-}
+@class WebHistoryItem;
 
 class HistoryPropertyListWriter : public BinaryPropertyListWriter {
 public:
@@ -41,7 +39,7 @@ public:
 protected:
     HistoryPropertyListWriter();
 
-    void writeHistoryItem(BinaryPropertyListObjectStream&, WebCore::HistoryItem*);
+    void writeHistoryItem(BinaryPropertyListObjectStream&, WebHistoryItem *);
 
 private:
     virtual void writeHistoryItems(BinaryPropertyListObjectStream&) = 0;
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include "HistoryPropertyList.h"
+#import "HistoryPropertyList.h"
 
-#include <WebCore/HistoryItem.h>
-#include <wtf/StringExtras.h>
+#import "WebHistoryItemInternal.h"
+#import <WebCore/HistoryItem.h>
+#import <wtf/StringExtras.h>
 
 using namespace WebCore;
 
@@ -84,8 +85,10 @@ void HistoryPropertyListWriter::writeObjects(BinaryPropertyListObjectStream& str
     stream.writeDictionaryEnd(outerDictionaryStart);
 }
 
-void HistoryPropertyListWriter::writeHistoryItem(BinaryPropertyListObjectStream& stream, HistoryItem* item)
+void HistoryPropertyListWriter::writeHistoryItem(BinaryPropertyListObjectStream& stream, WebHistoryItem* webHistoryItem)
 {
+    HistoryItem* item = core(webHistoryItem);
+
     size_t itemDictionaryStart = stream.writeDictionaryStart();
 
     const String& title = item->title();
@@ -108,7 +111,7 @@ void HistoryPropertyListWriter::writeHistoryItem(BinaryPropertyListObjectStream&
         stream.writeString(m_visitCountKey);
     if (item->lastVisitWasFailure())
         stream.writeString(m_lastVisitWasFailureKey);
-    if (item->lastVisitWasHTTPNonGet())
+    if (webHistoryItem->_private->_lastVisitWasHTTPNonGet)
         stream.writeString(m_lastVisitWasHTTPNonGetKey);
     if (redirectURLs)
         stream.writeString(m_redirectURLsKey);
@@ -132,7 +135,7 @@ void HistoryPropertyListWriter::writeHistoryItem(BinaryPropertyListObjectStream&
         stream.writeInteger(visitCount);
     if (item->lastVisitWasFailure())
         stream.writeBooleanTrue();
-    if (item->lastVisitWasHTTPNonGet()) {
+    if (webHistoryItem->_private->_lastVisitWasHTTPNonGet) {
         ASSERT(item->urlString().startsWith("http:", false) || item->urlString().startsWith("https:", false));
         stream.writeBooleanTrue();
     }
index 57f1138..a5c0103 100644 (file)
@@ -970,6 +970,6 @@ void WebHistoryWriter::writeHistoryItems(BinaryPropertyListObjectStream& stream)
         NSArray *entries = m_entriesByDate->get(m_dateKeys[dateIndex]).get();
         NSUInteger entryCount = [entries count];
         for (NSUInteger entryIndex = 0; entryIndex < entryCount; ++entryIndex)
-            writeHistoryItem(stream, core([entries objectAtIndex:entryIndex]));
+            writeHistoryItem(stream, [entries objectAtIndex:entryIndex]);
     }
 }
index 542d009..88e4d35 100644 (file)
@@ -509,7 +509,7 @@ WebHistoryItem *kit(HistoryItem* item)
         [dict setObject:[NSNumber numberWithInt:coreItem->visitCount()] forKey:visitCountKey];
     if (coreItem->lastVisitWasFailure())
         [dict setObject:[NSNumber numberWithBool:YES] forKey:lastVisitWasFailureKey];
-    if (coreItem->lastVisitWasHTTPNonGet()) {
+    if (_private->_lastVisitWasHTTPNonGet) {
         ASSERT(coreItem->urlString().startsWith("http:", false) || coreItem->urlString().startsWith("https:", false));
         [dict setObject:[NSNumber numberWithBool:YES] forKey:lastVisitWasHTTPNonGetKey];
     }