Modified: trunk/Source/WebKit/win/ChangeLog (162812 => 162813)
--- trunk/Source/WebKit/win/ChangeLog 2014-01-26 22:41:13 UTC (rev 162812)
+++ trunk/Source/WebKit/win/ChangeLog 2014-01-26 22:46:32 UTC (rev 162813)
@@ -1,5 +1,18 @@
2014-01-26 Anders Carlsson <[email protected]>
+ Another follow-up build fix.
+
+ * WebHistory.cpp:
+ (WebHistory::removeAllItems):
+ (WebHistory::orderedItemsLastVisitedOnDay):
+ * WebHistoryItem.cpp:
+ (WebHistoryItem::initFromDictionaryRepresentation):
+ (WebHistoryItem::dictionaryRepresentation):
+ (WebHistoryItem::visitCount):
+ (WebHistoryItem::setVisitCount):
+
+2014-01-26 Anders Carlsson <[email protected]>
+
Remove more history gunk.
* WebHistory.cpp:
Modified: trunk/Source/WebKit/win/WebHistory.cpp (162812 => 162813)
--- trunk/Source/WebKit/win/WebHistory.cpp 2014-01-26 22:41:13 UTC (rev 162812)
+++ trunk/Source/WebKit/win/WebHistory.cpp 2014-01-26 22:46:32 UTC (rev 162813)
@@ -315,9 +315,6 @@
HRESULT STDMETHODCALLTYPE WebHistory::removeAllItems( void)
{
- m_entriesByDate.clear();
- m_orderedLastVisitedDays = nullptr;
-
Vector<IWebHistoryItem*> itemsVector;
itemsVector.reserveInitialCapacity(m_entriesByURL.size());
for (auto it = m_entriesByURL.begin(); it != m_entriesByURL.end(); ++it)
@@ -339,35 +336,13 @@
return E_NOTIMPL;
}
+// FIXME: This function should be removed from the IWebHistory interface.
HRESULT STDMETHODCALLTYPE WebHistory::orderedItemsLastVisitedOnDay(
/* [out][in] */ int* count,
/* [in] */ IWebHistoryItem** items,
/* [in] */ DATE calendarDate)
{
- auto found = m_entriesByDate.find(dateKey(calendarDate));
- if (found == m_entriesByDate.end()) {
- *count = 0;
- return 0;
- }
-
- auto& entriesForDate = found->value;
- int newCount = entriesForDate.size();
-
- if (!items) {
- *count = newCount;
- return S_OK;
- }
-
- if (*count < newCount) {
- *count = newCount;
- return E_FAIL;
- }
-
- *count = newCount;
- for (int i = 0; i < newCount; ++i)
- entriesForDate[i].copyRefTo(&items[i]);
-
- return S_OK;
+ return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE WebHistory::allItems(
Modified: trunk/Source/WebKit/win/WebHistoryItem.cpp (162812 => 162813)
--- trunk/Source/WebKit/win/WebHistoryItem.cpp 2014-01-26 22:41:13 UTC (rev 162812)
+++ trunk/Source/WebKit/win/WebHistoryItem.cpp 2014-01-26 22:46:32 UTC (rev 162813)
@@ -143,44 +143,16 @@
if (weeklyCounts && CFGetTypeID(weeklyCounts) != CFArrayGetTypeID())
weeklyCounts = 0;
- std::auto_ptr<Vector<int> > dailyVector, weeklyVector;
- if (dailyCounts || weeklyCounts) {
- CFIndex dailySize = dailyCounts ? CFArrayGetCount(dailyCounts) : 0;
- CFIndex weeklySize = weeklyCounts ? CFArrayGetCount(weeklyCounts) : 0;
- dailyVector.reset(new Vector<int>(dailySize));
- weeklyVector.reset(new Vector<int>(weeklySize));
-
- // Daily and weekly counts < 0 are errors in the data read from disk, so reset to 0.
- for (CFIndex i = 0; i < dailySize; ++i) {
- CFNumberRef dailyCount = static_cast<CFNumberRef>(CFArrayGetValueAtIndex(dailyCounts, i));
- if (CFGetTypeID(dailyCount) == CFNumberGetTypeID())
- CFNumberGetValue(dailyCount, kCFNumberIntType, &(*dailyVector)[i]);
- if ((*dailyVector)[i] < 0)
- (*dailyVector)[i] = 0;
- }
- for (CFIndex i = 0; i < weeklySize; ++i) {
- CFNumberRef weeklyCount = static_cast<CFNumberRef>(CFArrayGetValueAtIndex(weeklyCounts, i));
- if (CFGetTypeID(weeklyCount) == CFNumberGetTypeID())
- CFNumberGetValue(weeklyCount, kCFNumberIntType, &(*weeklyVector)[i]);
- if ((*weeklyVector)[i] < 0)
- (*weeklyVector)[i] = 0;
- }
- }
-
historyItemWrappers().remove(m_historyItem.get());
m_historyItem = HistoryItem::create(urlStringRef, titleRef);
historyItemWrappers().set(m_historyItem.get(), this);
- m_historyItem->setVisitCount(visitedCount);
if (lastVisitWasFailure)
m_historyItem->setLastVisitWasFailure(true);
if (redirectURLsVector.get())
m_historyItem->setRedirectURLs(std::move(redirectURLsVector));
- if (dailyVector.get())
- m_historyItem->adoptVisitCounts(*dailyVector, *weeklyVector);
-
return S_OK;
}
@@ -197,9 +169,6 @@
values[keyCount++] = m_historyItem->urlString().createCFString().leakRef();
}
- keys[keyCount] = lastVisitedDateKey;
- values[keyCount++] = lastVisitedStringRef;
-
if (!m_historyItem->title().isEmpty()) {
keys[keyCount] = titleKey;
values[keyCount++] = m_historyItem->title().createCFString().leakRef();
@@ -229,36 +198,6 @@
values[keyCount++] = result;
}
- const Vector<int>& dailyVisitCount(m_historyItem->dailyVisitCounts());
- if (size_t size = dailyVisitCount.size()) {
- Vector<CFNumberRef, 13> numbers(size);
- for (size_t i = 0; i < size; ++i)
- numbers[i] = CFNumberCreate(0, kCFNumberIntType, &dailyVisitCount[i]);
-
- CFArrayRef result = CFArrayCreate(0, (const void**)numbers.data(), size, &kCFTypeArrayCallBacks);
-
- for (size_t i = 0; i < size; ++i)
- CFRelease(numbers[i]);
-
- keys[keyCount] = dailyVisitCountKey;
- values[keyCount++] = result;
- }
-
- const Vector<int>& weeklyVisitCount(m_historyItem->weeklyVisitCounts());
- if (size_t size = weeklyVisitCount.size()) {
- Vector<CFNumberRef, 5> numbers(size);
- for (size_t i = 0; i < size; ++i)
- numbers[i] = CFNumberCreate(0, kCFNumberIntType, &weeklyVisitCount[i]);
-
- CFArrayRef result = CFArrayCreate(0, (const void**)numbers.data(), size, &kCFTypeArrayCallBacks);
-
- for (size_t i = 0; i < size; ++i)
- CFRelease(numbers[i]);
-
- keys[keyCount] = weeklyVisitCountKey;
- values[keyCount++] = result;
- }
-
*dictionaryRef = CFDictionaryCreate(0, keys, values, keyCount, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
for (int i = 0; i < keyCount; ++i)
@@ -273,16 +212,17 @@
return S_OK;
}
+// FIXME: This function should be removed from the IWebHistoryItem interface.
HRESULT STDMETHODCALLTYPE WebHistoryItem::visitCount(int *count)
{
- *count = m_historyItem->visitCount();
- return S_OK;
+ return E_NOTIMPL;
}
+// FIXME: This function should be removed from the IWebHistoryItem interface.
HRESULT STDMETHODCALLTYPE WebHistoryItem::setVisitCount(int count)
{
- m_historyItem->setVisitCount(count);
- return S_OK;
+ return E_NOTIMPL;
+
}
// FIXME: This function should be removed from the IWebHistoryItem interface.