Changeset 207300 in webkit
- Timestamp:
- Oct 13, 2016 12:15:23 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r207299 r207300 1 2016-10-13 Anders Carlsson <andersca@apple.com> 2 3 Get rid of the HistoryItemVector typedef 4 https://bugs.webkit.org/show_bug.cgi?id=163398 5 6 Reviewed by Beth Dakin. 7 8 Expand the HistoryitemVector typedef instead to make it more clear what types we are dealing with. 9 10 * history/BackForwardList.cpp: 11 (WebCore::BackForwardList::backListWithLimit): 12 (WebCore::BackForwardList::forwardListWithLimit): 13 (WebCore::BackForwardList::entries): 14 * history/BackForwardList.h: 15 * history/HistoryItem.cpp: 16 (WebCore::HistoryItem::children): 17 * history/HistoryItem.h: 18 * loader/HistoryController.cpp: 19 (WebCore::HistoryController::currentFramesMatchItem): 20 1 21 2016-10-13 Antoine Quint <graouts@apple.com> 2 22 -
trunk/Source/WebCore/history/BackForwardList.cpp
r194496 r207300 137 137 } 138 138 139 void BackForwardList::backListWithLimit(int limit, HistoryItemVector& list)139 void BackForwardList::backListWithLimit(int limit, Vector<Ref<HistoryItem>>& list) 140 140 { 141 141 list.clear(); … … 147 147 } 148 148 149 void BackForwardList::forwardListWithLimit(int limit, HistoryItemVector& list)149 void BackForwardList::forwardListWithLimit(int limit, Vector<Ref<HistoryItem>>& list) 150 150 { 151 151 ASSERT(limit > -1); … … 221 221 } 222 222 223 HistoryItemVector& BackForwardList::entries()223 Vector<Ref<HistoryItem>>& BackForwardList::entries() 224 224 { 225 225 return m_entries; -
trunk/Source/WebCore/history/BackForwardList.h
r197563 r207300 37 37 class Page; 38 38 39 typedef Vector<Ref<HistoryItem>> HistoryItemVector;40 39 typedef HashSet<RefPtr<HistoryItem>> HistoryItemHashSet; 41 40 … … 57 56 HistoryItem* itemAtIndex(int) override; 58 57 59 WEBCORE_EXPORT void backListWithLimit(int, HistoryItemVector&);60 WEBCORE_EXPORT void forwardListWithLimit(int, HistoryItemVector&);58 WEBCORE_EXPORT void backListWithLimit(int, Vector<Ref<HistoryItem>>&); 59 WEBCORE_EXPORT void forwardListWithLimit(int, Vector<Ref<HistoryItem>>&); 61 60 62 61 WEBCORE_EXPORT int capacity(); … … 72 71 73 72 WEBCORE_EXPORT void removeItem(HistoryItem*); 74 WEBCORE_EXPORT HistoryItemVector& entries();73 WEBCORE_EXPORT Vector<Ref<HistoryItem>>& entries(); 75 74 76 75 #if PLATFORM(IOS) … … 85 84 86 85 Page* m_page; 87 HistoryItemVectorm_entries;86 Vector<Ref<HistoryItem>> m_entries; 88 87 HistoryItemHashSet m_entryHash; 89 88 unsigned m_current; -
trunk/Source/WebCore/history/HistoryItem.cpp
r199233 r207300 369 369 } 370 370 371 const HistoryItemVector& HistoryItem::children() const371 const Vector<Ref<HistoryItem>>& HistoryItem::children() const 372 372 { 373 373 return m_children; -
trunk/Source/WebCore/history/HistoryItem.h
r206976 r207300 57 57 enum class PruningReason; 58 58 59 typedef Vector<Ref<HistoryItem>> HistoryItemVector;60 61 59 WEBCORE_EXPORT extern void (*notifyHistoryItemChanged)(HistoryItem*); 62 60 … … 144 142 WEBCORE_EXPORT HistoryItem* childItemWithTarget(const String&); 145 143 HistoryItem* childItemWithDocumentSequenceNumber(long long number); 146 WEBCORE_EXPORT const HistoryItemVector& children() const;144 WEBCORE_EXPORT const Vector<Ref<HistoryItem>>& children() const; 147 145 WEBCORE_EXPORT bool hasChildren() const; 148 146 void clearChildren(); … … 234 232 ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy { ShouldOpenExternalURLsPolicy::ShouldNotAllow }; 235 233 236 HistoryItemVectorm_children;234 Vector<Ref<HistoryItem>> m_children; 237 235 238 236 bool m_lastVisitWasFailure; -
trunk/Source/WebCore/loader/HistoryController.cpp
r205818 r207300 787 787 return false; 788 788 789 const HistoryItemVector& childItems = item->children();789 const auto& childItems = item->children(); 790 790 if (childItems.size() != m_frame.tree().childCount()) 791 791 return false; -
trunk/Source/WebKit/mac/ChangeLog
r207279 r207300 1 2016-10-13 Anders Carlsson <andersca@apple.com> 2 3 Get rid of the HistoryItemVector typedef 4 https://bugs.webkit.org/show_bug.cgi?id=163398 5 6 Reviewed by Beth Dakin. 7 8 Expand the HistoryitemVector typedef instead to make it more clear what types we are dealing with. 9 10 * History/WebBackForwardList.mm: 11 (-[WebBackForwardList dictionaryRepresentation]): 12 (vectorToNSArray): 13 (-[WebBackForwardList backListWithLimit:]): 14 (-[WebBackForwardList forwardListWithLimit:]): 15 (-[WebBackForwardList description]): 16 * History/WebHistoryItem.mm: 17 (-[WebHistoryItem description]): 18 1 19 2016-10-12 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/mac/History/WebBackForwardList.mm
r204466 r207300 161 161 BackForwardList *coreBFList = core(self); 162 162 163 HistoryItemVector& historyItems = coreBFList->entries();163 auto& historyItems = coreBFList->entries(); 164 164 unsigned size = historyItems.size(); 165 165 NSMutableArray *entriesArray = [[NSMutableArray alloc] initWithCapacity:size]; … … 233 233 } 234 234 235 static NSArray* vectorToNSArray( HistoryItemVector& list)235 static NSArray* vectorToNSArray(Vector<Ref<HistoryItem>>& list) 236 236 { 237 237 unsigned size = list.size(); … … 257 257 - (NSArray *)backListWithLimit:(int)limit 258 258 { 259 HistoryItemVectorlist;259 Vector<Ref<HistoryItem>> list; 260 260 core(self)->backListWithLimit(limit, list); 261 261 NSArray *result = vectorToNSArray(list); … … 272 272 - (NSArray *)forwardListWithLimit:(int)limit 273 273 { 274 HistoryItemVectorlist;274 Vector<Ref<HistoryItem>> list; 275 275 core(self)->forwardListWithLimit(limit, list); 276 276 NSArray *result = vectorToNSArray(list); … … 306 306 307 307 BackForwardList* backForwardList = core(self); 308 HistoryItemVector& entries = backForwardList->entries();308 auto& entries = backForwardList->entries(); 309 309 310 310 unsigned size = entries.size(); -
trunk/Source/WebKit/mac/History/WebHistoryItem.mm
r198289 r207300 236 236 237 237 if (coreItem->children().size()) { 238 const HistoryItemVector& children = coreItem->children();238 const auto& children = coreItem->children(); 239 239 int currPos = [result length]; 240 240 unsigned size = children.size(); … … 457 457 if (coreItem->children().size()) { 458 458 #endif 459 const HistoryItemVector& children = coreItem->children();459 const auto& children = coreItem->children(); 460 460 NSMutableArray *childDicts = [NSMutableArray arrayWithCapacity:children.size()]; 461 461 … … 511 511 - (NSArray *)children 512 512 { 513 const HistoryItemVector& children = core(_private)->children();513 const auto& children = core(_private)->children(); 514 514 if (!children.size()) 515 515 return nil; -
trunk/Source/WebKit/win/ChangeLog
r207231 r207300 1 2016-10-13 Anders Carlsson <andersca@apple.com> 2 3 Get rid of the HistoryItemVector typedef 4 https://bugs.webkit.org/show_bug.cgi?id=163398 5 6 Reviewed by Beth Dakin. 7 8 Expand the HistoryitemVector typedef instead to make it more clear what types we are dealing with. 9 10 * WebBackForwardList.cpp: 11 (WebBackForwardList::backListWithLimit): 12 (WebBackForwardList::forwardListWithLimit): 13 * WebHistoryItem.cpp: 14 (WebHistoryItem::children): 15 1 16 2016-10-12 Brent Fulgham <bfulgham@apple.com> 2 17 -
trunk/Source/WebKit/win/WebBackForwardList.cpp
r188662 r207300 195 195 __deref_inout_opt IWebHistoryItem** list) 196 196 { 197 HistoryItemVectorhistoryItemVector;197 Vector<Ref<HistoryItem>> historyItemVector; 198 198 m_backForwardList->backListWithLimit(limit, historyItemVector); 199 199 … … 212 212 __deref_inout_opt IWebHistoryItem** list) 213 213 { 214 HistoryItemVectorhistoryItemVector;214 Vector<Ref<HistoryItem>> historyItemVector; 215 215 m_backForwardList->forwardListWithLimit(limit, historyItemVector); 216 216 -
trunk/Source/WebKit/win/WebHistoryItem.cpp
r194496 r207300 290 290 *outChildren = 0; 291 291 292 const HistoryItemVector& coreChildren = m_historyItem->children();292 const auto& coreChildren = m_historyItem->children(); 293 293 if (coreChildren.isEmpty()) 294 294 return S_OK;
Note: See TracChangeset
for help on using the changeset viewer.