<!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>[170368] trunk/Source/WebKit/mac</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/170368">170368</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-06-24 10:17:27 -0700 (Tue, 24 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove unused history visit code from WebHistoryItem
https://bugs.webkit.org/show_bug.cgi?id=134201
Reviewed by Sam Weinig.
* History/HistoryPropertyList.h:
* History/HistoryPropertyList.mm:
(HistoryPropertyListWriter::HistoryPropertyListWriter):
(HistoryPropertyListWriter::writeHistoryItem):
* History/WebHistory.mm:
(-[WebHistoryPrivate visitedURL:withTitle:]):
(-[WebHistoryPrivate addItem:discardDuplicate:]):
(-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
(-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]): Deleted.
(-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]): Deleted.
* History/WebHistoryInternal.h:
* History/WebHistoryItem.mm:
(-[WebHistoryItem copyWithZone:]):
(-[WebHistoryItem initFromDictionaryRepresentation:]):
(-[WebHistoryItem _visitedWithTitle:]):
(-[WebHistoryItem setVisitCount:]): Deleted.
(-[WebHistoryItem _mergeAutoCompleteHints:]): Deleted.
(-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]): Deleted.
(-[WebHistoryItem _recordInitialVisit]): Deleted.
(timeToDay): Deleted.
(-[WebHistoryItem _padDailyCountsForNewVisit:]): Deleted.
(-[WebHistoryItem _collapseDailyVisitsToWeekly]): Deleted.
(-[WebHistoryItem _recordVisitAtTime:increaseVisitCount:]): Deleted.
(-[WebHistoryItem _setLastVisitedTimeInterval:]): Deleted.
* History/WebHistoryItemInternal.h:
* History/WebHistoryItemPrivate.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacHistoryHistoryPropertyListh">trunk/Source/WebKit/mac/History/HistoryPropertyList.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryHistoryPropertyListmm">trunk/Source/WebKit/mac/History/HistoryPropertyList.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistorymm">trunk/Source/WebKit/mac/History/WebHistory.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryInternalh">trunk/Source/WebKit/mac/History/WebHistoryInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemmm">trunk/Source/WebKit/mac/History/WebHistoryItem.mm</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemInternalh">trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemPrivateh">trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-06-23 Anders Carlsson <andersca@apple.com>
+
+ Remove unused history visit code from WebHistoryItem
+ https://bugs.webkit.org/show_bug.cgi?id=134201
+
+ Reviewed by Sam Weinig.
+
+ * History/HistoryPropertyList.h:
+ * History/HistoryPropertyList.mm:
+ (HistoryPropertyListWriter::HistoryPropertyListWriter):
+ (HistoryPropertyListWriter::writeHistoryItem):
+ * History/WebHistory.mm:
+ (-[WebHistoryPrivate visitedURL:withTitle:]):
+ (-[WebHistoryPrivate addItem:discardDuplicate:]):
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
+ (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]): Deleted.
+ (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]): Deleted.
+ * History/WebHistoryInternal.h:
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem copyWithZone:]):
+ (-[WebHistoryItem initFromDictionaryRepresentation:]):
+ (-[WebHistoryItem _visitedWithTitle:]):
+ (-[WebHistoryItem setVisitCount:]): Deleted.
+ (-[WebHistoryItem _mergeAutoCompleteHints:]): Deleted.
+ (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]): Deleted.
+ (-[WebHistoryItem _recordInitialVisit]): Deleted.
+ (timeToDay): Deleted.
+ (-[WebHistoryItem _padDailyCountsForNewVisit:]): Deleted.
+ (-[WebHistoryItem _collapseDailyVisitsToWeekly]): Deleted.
+ (-[WebHistoryItem _recordVisitAtTime:increaseVisitCount:]): Deleted.
+ (-[WebHistoryItem _setLastVisitedTimeInterval:]): Deleted.
+ * History/WebHistoryItemInternal.h:
+ * History/WebHistoryItemPrivate.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::updateGlobalHistory):
+
</ins><span class="cx"> 2014-06-24 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r170235): Remove incorrect ifdef guard
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryHistoryPropertyListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/HistoryPropertyList.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/HistoryPropertyList.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/HistoryPropertyList.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -47,16 +47,12 @@
</span><span class="cx"> virtual void writeObjects(BinaryPropertyListObjectStream&);
</span><span class="cx"> virtual UInt8* buffer(size_t);
</span><span class="cx">
</span><del>- const String m_dailyVisitCountsKey;
</del><span class="cx"> const String m_displayTitleKey;
</span><span class="cx"> const String m_lastVisitWasFailureKey;
</span><del>- const String m_lastVisitWasHTTPNonGetKey;
</del><span class="cx"> const String m_lastVisitedDateKey;
</span><span class="cx"> const String m_redirectURLsKey;
</span><span class="cx"> const String m_titleKey;
</span><span class="cx"> const String m_urlKey;
</span><del>- const String m_visitCountKey;
- const String m_weeklyVisitCountsKey;
</del><span class="cx">
</span><span class="cx"> UInt8* m_buffer;
</span><span class="cx"> size_t m_bufferSize;
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryHistoryPropertyListmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/HistoryPropertyList.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/HistoryPropertyList.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/HistoryPropertyList.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -34,16 +34,12 @@
</span><span class="cx"> static const int currentFileVersion = 1;
</span><span class="cx">
</span><span class="cx"> HistoryPropertyListWriter::HistoryPropertyListWriter()
</span><del>- : m_dailyVisitCountsKey("D")
- , m_displayTitleKey("displayTitle")
</del><ins>+ : m_displayTitleKey("displayTitle")
</ins><span class="cx"> , m_lastVisitWasFailureKey("lastVisitWasFailure")
</span><del>- , m_lastVisitWasHTTPNonGetKey("lastVisitWasHTTPNonGet")
</del><span class="cx"> , m_lastVisitedDateKey("lastVisitedDate")
</span><span class="cx"> , m_redirectURLsKey("redirectURLs")
</span><span class="cx"> , m_titleKey("title")
</span><span class="cx"> , m_urlKey("")
</span><del>- , m_visitCountKey("visitCount")
- , m_weeklyVisitCountsKey("W")
</del><span class="cx"> , m_buffer(0)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -94,10 +90,7 @@
</span><span class="cx"> const String& title = item->title();
</span><span class="cx"> const String& displayTitle = item->alternateTitle();
</span><span class="cx"> double lastVisitedDate = webHistoryItem->_private->_lastVisitedTime;
</span><del>- int visitCount = webHistoryItem->_private->_visitCount;
</del><span class="cx"> Vector<String>* redirectURLs = item->redirectURLs();
</span><del>- const Vector<int>& dailyVisitCounts = webHistoryItem->_private->_dailyVisitCounts;
- const Vector<int>& weeklyVisitCounts = webHistoryItem->_private->_weeklyVisitCounts;
</del><span class="cx">
</span><span class="cx"> // keys
</span><span class="cx"> stream.writeString(m_urlKey);
</span><span class="lines">@@ -107,18 +100,10 @@
</span><span class="cx"> stream.writeString(m_displayTitleKey);
</span><span class="cx"> if (lastVisitedDate)
</span><span class="cx"> stream.writeString(m_lastVisitedDateKey);
</span><del>- if (visitCount)
- stream.writeString(m_visitCountKey);
</del><span class="cx"> if (item->lastVisitWasFailure())
</span><span class="cx"> stream.writeString(m_lastVisitWasFailureKey);
</span><del>- if (webHistoryItem->_private->_lastVisitWasHTTPNonGet)
- stream.writeString(m_lastVisitWasHTTPNonGetKey);
</del><span class="cx"> if (redirectURLs)
</span><span class="cx"> stream.writeString(m_redirectURLsKey);
</span><del>- if (!dailyVisitCounts.isEmpty())
- stream.writeString(m_dailyVisitCountsKey);
- if (!weeklyVisitCounts.isEmpty())
- stream.writeString(m_weeklyVisitCountsKey);
</del><span class="cx">
</span><span class="cx"> // values
</span><span class="cx"> stream.writeUniqueString(item->urlString());
</span><span class="lines">@@ -131,14 +116,8 @@
</span><span class="cx"> snprintf(buffer, sizeof(buffer), "%.1lf", lastVisitedDate);
</span><span class="cx"> stream.writeUniqueString(buffer);
</span><span class="cx"> }
</span><del>- if (visitCount)
- stream.writeInteger(visitCount);
</del><span class="cx"> if (item->lastVisitWasFailure())
</span><span class="cx"> stream.writeBooleanTrue();
</span><del>- if (webHistoryItem->_private->_lastVisitWasHTTPNonGet) {
- ASSERT(item->urlString().startsWith("http:", false) || item->urlString().startsWith("https:", false));
- stream.writeBooleanTrue();
- }
</del><span class="cx"> if (redirectURLs) {
</span><span class="cx"> size_t redirectArrayStart = stream.writeArrayStart();
</span><span class="cx"> size_t size = redirectURLs->size();
</span><span class="lines">@@ -147,10 +126,6 @@
</span><span class="cx"> stream.writeUniqueString(redirectURLs->at(i));
</span><span class="cx"> stream.writeArrayEnd(redirectArrayStart);
</span><span class="cx"> }
</span><del>- if (size_t size = dailyVisitCounts.size())
- stream.writeIntegerArray(dailyVisitCounts.data(), size);
- if (size_t size = weeklyVisitCounts.size())
- stream.writeIntegerArray(weeklyVisitCounts.data(), size);
</del><span class="cx">
</span><span class="cx"> stream.writeDictionaryEnd(itemDictionaryStart);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistorymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistory.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistory.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistory.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> int ageInDaysLimit;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount;
</del><ins>+- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title;
</ins><span class="cx">
</span><span class="cx"> - (BOOL)addItem:(WebHistoryItem *)entry discardDuplicate:(BOOL)discardDuplicate;
</span><span class="cx"> - (void)addItems:(NSArray *)newEntries;
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount
</del><ins>+- (WebHistoryItem *)visitedURL:(NSURL *)url withTitle:(NSString *)title
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(url);
</span><span class="cx"> ASSERT(title);
</span><span class="lines">@@ -318,11 +318,10 @@
</span><span class="cx"> BOOL itemWasInDateCaches = [self removeItemFromDateCaches:entry];
</span><span class="cx"> ASSERT_UNUSED(itemWasInDateCaches, itemWasInDateCaches);
</span><span class="cx">
</span><del>- [entry _visitedWithTitle:title increaseVisitCount:increaseVisitCount];
</del><ins>+ [entry _visitedWithTitle:title];
</ins><span class="cx"> } else {
</span><span class="cx"> LOG(History, "Adding new global history entry for %@", url);
</span><span class="cx"> entry = [[WebHistoryItem alloc] initWithURLString:URLString title:title lastVisitedTimeInterval:[NSDate timeIntervalSinceReferenceDate]];
</span><del>- [entry _recordInitialVisit];
</del><span class="cx"> [_entriesByURL setObject:entry forKey:URLString];
</span><span class="cx"> [entry release];
</span><span class="cx"> }
</span><span class="lines">@@ -349,10 +348,6 @@
</span><span class="cx"> // until we're done with oldEntry.
</span><span class="cx"> [oldEntry retain];
</span><span class="cx"> [self removeItemForURLString:URLString];
</span><del>-
- // If we already have an item with this URL, we need to merge info that drives the
- // URL autocomplete heuristics from that item into the new one.
- [entry _mergeAutoCompleteHints:oldEntry];
</del><span class="cx"> [oldEntry release];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -369,10 +364,6 @@
</span><span class="cx"> // until we're done with oldEntry.
</span><span class="cx"> [otherEntry retain];
</span><span class="cx"> [self removeItemForURLString:URLString];
</span><del>-
- // If we already have an item with this URL, we need to merge info that drives the
- // URL autocomplete heuristics from that item into the new one.
- [entry _mergeAutoCompleteHints:otherEntry];
</del><span class="cx"> [otherEntry release];
</span><span class="cx">
</span><span class="cx"> [self addItemToDateCaches:entry];
</span><span class="lines">@@ -930,16 +921,13 @@
</span><span class="cx">
</span><span class="cx"> @implementation WebHistory (WebInternal)
</span><span class="cx">
</span><del>-- (void)_visitedURL:(NSURL *)url withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure increaseVisitCount:(BOOL)increaseVisitCount
</del><ins>+- (void)_visitedURL:(NSURL *)url withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure
</ins><span class="cx"> {
</span><del>- WebHistoryItem *entry = [_historyPrivate visitedURL:url withTitle:title increaseVisitCount:increaseVisitCount];
</del><ins>+ WebHistoryItem *entry = [_historyPrivate visitedURL:url withTitle:title];
</ins><span class="cx">
</span><span class="cx"> HistoryItem* item = core(entry);
</span><span class="cx"> item->setLastVisitWasFailure(wasFailure);
</span><span class="cx">
</span><del>- if ([method length])
- entry->_private->_lastVisitWasHTTPNonGet = [method caseInsensitiveCompare:@"GET"] && (![[url scheme] caseInsensitiveCompare:@"http"] || ![[url scheme] caseInsensitiveCompare:@"https"]);
-
</del><span class="cx"> item->setRedirectURLs(nullptr);
</span><span class="cx">
</span><span class="cx"> NSArray *entries = [[NSArray alloc] initWithObjects:entry, nil];
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryInternal.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryInternal.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryInternal.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -33,6 +33,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @interface WebHistory (WebInternal)
</span><del>-- (void)_visitedURL:(NSURL *)URL withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure increaseVisitCount:(BOOL)increaseVisitCount;
</del><ins>+- (void)_visitedURL:(NSURL *)URL withTitle:(NSString *)title method:(NSString *)method wasFailure:(BOOL)wasFailure;
</ins><span class="cx"> - (void)_addVisitedLinksToPageGroup:(WebCore::PageGroup&)group;
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItem.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItem.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryItem.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -79,15 +79,11 @@
</span><span class="cx"> // Private keys used in the WebHistoryItem's dictionary representation.
</span><span class="cx"> // see 3245793 for explanation of "lastVisitedDate"
</span><span class="cx"> static NSString *lastVisitedTimeIntervalKey = @"lastVisitedDate";
</span><del>-static NSString *visitCountKey = @"visitCount";
</del><span class="cx"> static NSString *titleKey = @"title";
</span><span class="cx"> static NSString *childrenKey = @"children";
</span><span class="cx"> static NSString *displayTitleKey = @"displayTitle";
</span><span class="cx"> static NSString *lastVisitWasFailureKey = @"lastVisitWasFailure";
</span><del>-static NSString *lastVisitWasHTTPNonGetKey = @"lastVisitWasHTTPNonGet";
</del><span class="cx"> static NSString *redirectURLsKey = @"redirectURLs";
</span><del>-static NSString *dailyVisitCountKey = @"D"; // short key to save space
-static NSString *weeklyVisitCountKey = @"W"; // short key to save space
</del><span class="cx">
</span><span class="cx"> // Notification strings.
</span><span class="cx"> NSString *WebHistoryItemChangedNotification = @"WebHistoryItemChangedNotification";
</span><span class="lines">@@ -177,12 +173,7 @@
</span><span class="cx"> WebHistoryItem *copy = [[[self class] alloc] initWithWebCoreHistoryItem:core(_private)->copy()];
</span><span class="cx">
</span><span class="cx"> copy->_private->_lastVisitedTime = _private->_lastVisitedTime;
</span><del>- copy->_private->_visitCount = _private->_visitCount;
- copy->_private->_dailyVisitCounts = _private->_dailyVisitCounts;
- copy->_private->_weeklyVisitCounts = _private->_weeklyVisitCounts;
</del><span class="cx">
</span><del>- copy->_private->_lastVisitWasHTTPNonGet = _private->_lastVisitWasHTTPNonGet;
-
</del><span class="cx"> historyItemWrappers().set(core(copy->_private), copy);
</span><span class="cx">
</span><span class="cx"> return copy;
</span><span class="lines">@@ -347,27 +338,11 @@
</span><span class="cx"> core(_private)->setTitle(title);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)setVisitCount:(int)count
-{
- _private->_visitCount = count;
-}
-
</del><span class="cx"> - (void)setViewState:(id)statePList
</span><span class="cx"> {
</span><span class="cx"> core(_private)->setViewState(statePList);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_mergeAutoCompleteHints:(WebHistoryItem *)otherItem
-{
- ASSERT_ARG(otherItem, otherItem);
-
- // FIXME: this is broken - we should be merging the daily counts
- // somehow. but this is to support API that's not really used in
- // practice so leave it broken for now.
- if (otherItem != self)
- _private->_visitCount += otherItem->_private->_visitCount;
-}
-
</del><span class="cx"> - (id)initFromDictionaryRepresentation:(NSDictionary *)dict
</span><span class="cx"> {
</span><span class="cx"> ASSERT_MAIN_THREAD();
</span><span class="lines">@@ -391,23 +366,9 @@
</span><span class="cx"> core(_private)->setOriginalURLString(newURLString);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- int visitCount = [dict _webkit_intForKey:visitCountKey];
-
- // Can't trust data on disk, and we've had at least one report of this (<rdar://6572300>).
- if (visitCount < 0) {
- LOG_ERROR("visit count for history item \"%@\" is negative (%d), will be reset to 1", URLString, visitCount);
- visitCount = 1;
- }
- _private->_visitCount = visitCount;
-
</del><span class="cx"> if ([dict _webkit_boolForKey:lastVisitWasFailureKey])
</span><span class="cx"> core(_private)->setLastVisitWasFailure(true);
</span><span class="cx">
</span><del>- BOOL lastVisitWasHTTPNonGet = [dict _webkit_boolForKey:lastVisitWasHTTPNonGetKey];
- NSString *tempURLString = [URLString lowercaseString];
- if (lastVisitWasHTTPNonGet && ([tempURLString hasPrefix:@"http:"] || [tempURLString hasPrefix:@"https:"]))
- _private->_lastVisitWasHTTPNonGet = lastVisitWasHTTPNonGet;
-
</del><span class="cx"> if (NSArray *redirectURLs = [dict _webkit_arrayForKey:redirectURLsKey]) {
</span><span class="cx"> NSUInteger size = [redirectURLs count];
</span><span class="cx"> auto redirectURLsVector = std::make_unique<Vector<String>>(size);
</span><span class="lines">@@ -416,22 +377,6 @@
</span><span class="cx"> core(_private)->setRedirectURLs(std::move(redirectURLsVector));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- NSArray *dailyCounts = [dict _webkit_arrayForKey:dailyVisitCountKey];
- NSArray *weeklyCounts = [dict _webkit_arrayForKey:weeklyVisitCountKey];
- if (dailyCounts || weeklyCounts) {
- Vector<int> coreDailyCounts([dailyCounts count]);
- Vector<int> coreWeeklyCounts([weeklyCounts count]);
-
- // Daily and weekly counts < 0 are errors in the data read from disk, so reset to 0.
- for (size_t i = 0; i < coreDailyCounts.size(); ++i)
- coreDailyCounts[i] = std::max([[dailyCounts _webkit_numberAtIndex:i] intValue], 0);
- for (size_t i = 0; i < coreWeeklyCounts.size(); ++i)
- coreWeeklyCounts[i] = std::max([[weeklyCounts _webkit_numberAtIndex:i] intValue], 0);
-
- _private->_dailyVisitCounts = std::move(coreDailyCounts);
- _private->_weeklyVisitCounts = std::move(coreWeeklyCounts);
- }
-
</del><span class="cx"> NSArray *childDicts = [dict objectForKey:childrenKey];
</span><span class="cx"> if (childDicts) {
</span><span class="cx"> for (int i = [childDicts count] - 1; i >= 0; i--) {
</span><span class="lines">@@ -473,72 +418,12 @@
</span><span class="cx"> return core(_private)->scrollPoint();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_visitedWithTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount
</del><ins>+- (void)_visitedWithTitle:(NSString *)title
</ins><span class="cx"> {
</span><span class="cx"> core(_private)->setTitle(title);
</span><del>-
- [self _recordVisitAtTime:[NSDate timeIntervalSinceReferenceDate] increaseVisitCount:increaseVisitCount];
</del><ins>+ _private->_lastVisitedTime = [NSDate timeIntervalSinceReferenceDate];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_recordInitialVisit
-{
- ASSERT(!_private->_visitCount);
- [self _recordVisitAtTime:_private->_lastVisitedTime increaseVisitCount:YES];
-}
-
-static inline int timeToDay(double time)
-{
- return static_cast<int>(ceil(time / secondsPerDay));
-}
-
-- (void)_padDailyCountsForNewVisit:(NSTimeInterval)time
-{
- if (_private->_dailyVisitCounts.isEmpty())
- _private->_dailyVisitCounts.insert(0, _private->_visitCount);
-
- int daysElapsed = timeToDay(time) - timeToDay(_private->_lastVisitedTime);
-
- if (daysElapsed < 0)
- daysElapsed = 0;
-
- Vector<int, 32> padding;
- padding.fill(0, daysElapsed);
-
- _private->_dailyVisitCounts.insertVector(0, padding);
-}
-
-static const size_t daysPerWeek = 7;
-static const size_t maxDailyCounts = 2 * daysPerWeek - 1;
-static const size_t maxWeeklyCounts = 5;
-
-- (void)_collapseDailyVisitsToWeekly
-{
- while (_private->_dailyVisitCounts.size() > maxDailyCounts) {
- int oldestWeekTotal = 0;
- for (size_t i = 0; i < daysPerWeek; i++)
- oldestWeekTotal += _private->_dailyVisitCounts[_private->_dailyVisitCounts.size() - daysPerWeek + i];
- _private->_dailyVisitCounts.shrink(_private->_dailyVisitCounts.size() - daysPerWeek);
- _private->_weeklyVisitCounts.insert(0, oldestWeekTotal);
- }
-
- if (_private->_weeklyVisitCounts.size() > maxWeeklyCounts)
- _private->_weeklyVisitCounts.shrink(maxWeeklyCounts);
-}
-
-- (void)_recordVisitAtTime:(NSTimeInterval)time increaseVisitCount:(BOOL)increaseVisitCount
-{
- [self _padDailyCountsForNewVisit:time];
-
- _private->_lastVisitedTime = time;
-
- if (increaseVisitCount) {
- ++_private->_visitCount;
- ++_private->_dailyVisitCounts[0];
- }
-
- [self _collapseDailyVisitsToWeekly];
-}
-
</del><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @implementation WebHistoryItem (WebPrivate)
</span><span class="lines">@@ -548,14 +433,6 @@
</span><span class="cx"> return [self initWithURLString:[URL _web_originalDataAsString] title:title lastVisitedTimeInterval:0];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// This should not be called directly for WebHistoryItems that are already included
-// in WebHistory. Use -[WebHistory setLastVisitedTimeInterval:forItem:] instead.
-- (void)_setLastVisitedTimeInterval:(NSTimeInterval)time
-{
- if (_private->_lastVisitedTime != time)
- [self _recordVisitAtTime:time increaseVisitCount:YES];
-}
-
</del><span class="cx"> // FIXME: The only iOS difference here should be whether YES or NO is passed to dictionaryRepresentationIncludingChildren:
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> - (NSDictionary *)dictionaryRepresentation
</span><span class="lines">@@ -584,14 +461,8 @@
</span><span class="cx"> [dict setObject:[NSString stringWithFormat:@"%.1lf", _private->_lastVisitedTime]
</span><span class="cx"> forKey:lastVisitedTimeIntervalKey];
</span><span class="cx"> }
</span><del>- if (_private->_visitCount)
- [dict setObject:[NSNumber numberWithInt:_private->_visitCount] forKey:visitCountKey];
</del><span class="cx"> if (coreItem->lastVisitWasFailure())
</span><span class="cx"> [dict setObject:[NSNumber numberWithBool:YES] forKey:lastVisitWasFailureKey];
</span><del>- if (_private->_lastVisitWasHTTPNonGet) {
- ASSERT(coreItem->urlString().startsWith("http:", false) || coreItem->urlString().startsWith("https:", false));
- [dict setObject:[NSNumber numberWithBool:YES] forKey:lastVisitWasHTTPNonGetKey];
- }
</del><span class="cx"> if (Vector<String>* redirectURLs = coreItem->redirectURLs()) {
</span><span class="cx"> size_t size = redirectURLs->size();
</span><span class="cx"> ASSERT(size);
</span><span class="lines">@@ -602,24 +473,6 @@
</span><span class="cx"> [result release];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const Vector<int>& dailyVisitCounts = _private->_dailyVisitCounts;
- if (dailyVisitCounts.size()) {
- NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:13];
- for (size_t i = 0; i < dailyVisitCounts.size(); ++i)
- [array addObject:[NSNumber numberWithInt:dailyVisitCounts[i]]];
- [dict setObject:array forKey:dailyVisitCountKey];
- [array release];
- }
-
- const Vector<int>& weeklyVisitCounts = _private->_weeklyVisitCounts;
- if (weeklyVisitCounts.size()) {
- NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:5];
- for (size_t i = 0; i < weeklyVisitCounts.size(); ++i)
- [array addObject:[NSNumber numberWithInt:weeklyVisitCounts[i]]];
- [dict setObject:array forKey:weeklyVisitCountKey];
- [array release];
- }
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> if (includesChildren && coreItem->children().size()) {
</span><span class="cx"> #else
</span><span class="lines">@@ -668,12 +521,6 @@
</span><span class="cx"> return core(_private)->isTargetItem();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (int)visitCount
-{
- ASSERT_MAIN_THREAD();
- return _private->_visitCount;
-}
-
</del><span class="cx"> - (NSString *)RSSFeedReferrer
</span><span class="cx"> {
</span><span class="cx"> return nsStringNilIfEmpty(core(_private)->referrer());
</span><span class="lines">@@ -741,16 +588,6 @@
</span><span class="cx"> return core(_private)->lastVisitWasFailure();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_setLastVisitWasFailure:(BOOL)failure
-{
- core(_private)->setLastVisitWasFailure(failure);
-}
-
-- (BOOL)_lastVisitWasHTTPNonGet
-{
- return _private->_lastVisitWasHTTPNonGet;
-}
-
</del><span class="cx"> - (NSArray *)_redirectURLs
</span><span class="cx"> {
</span><span class="cx"> Vector<String>* redirectURLs = core(_private)->redirectURLs();
</span><span class="lines">@@ -765,18 +602,6 @@
</span><span class="cx"> return [result autorelease];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (size_t)_getDailyVisitCounts:(const int**)counts
-{
- *counts = _private->_dailyVisitCounts.data();
- return _private->_dailyVisitCounts.size();
-}
-
-- (size_t)_getWeeklyVisitCounts:(const int**)counts
-{
- *counts = _private->_weeklyVisitCounts.data();
- return _private->_weeklyVisitCounts.size();
-}
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> - (void)_setScale:(float)scale isInitial:(BOOL)aFlag
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -49,10 +49,8 @@
</span><span class="cx"> - (id)initFromDictionaryRepresentation:(NSDictionary *)dict;
</span><span class="cx"> - (id)initWithWebCoreHistoryItem:(PassRefPtr<WebCore::HistoryItem>)item;
</span><span class="cx">
</span><del>-- (void)_mergeAutoCompleteHints:(WebHistoryItem *)otherItem;
</del><span class="cx"> - (void)setTitle:(NSString *)title;
</span><del>-- (void)_visitedWithTitle:(NSString *)title increaseVisitCount:(BOOL)increaseVisitCount;
-- (void)_recordInitialVisit;
</del><ins>+- (void)_visitedWithTitle:(NSString *)title;
</ins><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="lines">@@ -65,10 +63,5 @@
</span><span class="cx"> RefPtr<WebCore::HistoryItem> _historyItem;
</span><span class="cx">
</span><span class="cx"> NSTimeInterval _lastVisitedTime;
</span><del>- int _visitCount;
- Vector<int> _dailyVisitCounts;
- Vector<int> _weeklyVisitCounts;
-
- bool _lastVisitWasHTTPNonGet;
</del><span class="cx"> }
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/History/WebHistoryItemPrivate.h        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -49,12 +49,8 @@
</span><span class="cx"> - (id)initWithURL:(NSURL *)URL title:(NSString *)title;
</span><span class="cx">
</span><span class="cx"> - (NSURL *)URL;
</span><del>-- (int)visitCount;
</del><span class="cx"> - (BOOL)lastVisitWasFailure;
</span><del>-- (void)_setLastVisitWasFailure:(BOOL)failure;
</del><span class="cx">
</span><del>-- (BOOL)_lastVisitWasHTTPNonGet;
-
</del><span class="cx"> - (NSString *)RSSFeedReferrer;
</span><span class="cx"> - (void)setRSSFeedReferrer:(NSString *)referrer;
</span><span class="cx">
</span><span class="lines">@@ -69,17 +65,11 @@
</span><span class="cx"> - (NSDictionary *)dictionaryRepresentationIncludingChildren:(BOOL)includesChildren;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-// This should not be called directly for WebHistoryItems that are already included
-// in WebHistory. Use -[WebHistory setLastVisitedTimeInterval:forItem:] instead.
-- (void)_setLastVisitedTimeInterval:(NSTimeInterval)time;
</del><span class="cx"> // Transient properties may be of any ObjC type. They are intended to be used to store state per back/forward list entry.
</span><span class="cx"> // The properties will not be persisted; when the history item is removed, the properties will be lost.
</span><span class="cx"> - (id)_transientPropertyForKey:(NSString *)key;
</span><span class="cx"> - (void)_setTransientProperty:(id)property forKey:(NSString *)key;
</span><span class="cx">
</span><del>-- (size_t)_getDailyVisitCounts:(const int**)counts;
-- (size_t)_getWeeklyVisitCounts:(const int**)counts;
-
</del><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> - (void)_setScale:(float)scale isInitial:(BOOL)aFlag;
</span><span class="cx"> - (float)_scale;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (170367 => 170368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-06-24 17:05:09 UTC (rev 170367)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-06-24 17:17:27 UTC (rev 170368)
</span><span class="lines">@@ -1017,11 +1017,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- [[WebHistory optionalSharedHistory] _visitedURL:loader->urlForHistory()
- withTitle:loader->title().string()
- method:loader->originalRequestCopy().httpMethod()
- wasFailure:loader->urlForHistoryReflectsFailure()
- increaseVisitCount:!loader->clientRedirectSourceForHistory()]; // Do not increase visit count due to navigations that were not initiated by the user directly, avoiding growth from programmatic reloads.
</del><ins>+ [[WebHistory optionalSharedHistory] _visitedURL:loader->urlForHistory() withTitle:loader->title().string() method:loader->originalRequestCopy().httpMethod() wasFailure:loader->urlForHistoryReflectsFailure()];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
</span></span></pre>
</div>
</div>
</body>
</html>