RESOLVED FIXED 141009
Clean up / modernize PageCache class
https://bugs.webkit.org/show_bug.cgi?id=141009
Summary Clean up / modernize PageCache class
Chris Dumez
Reported 2015-01-28 13:39:25 PST
Clean up / modernize PageCache class a bit.
Attachments
Patch (63.77 KB, patch)
2015-01-28 16:33 PST, Chris Dumez
no flags
Patch (64.32 KB, patch)
2015-01-28 16:59 PST, Chris Dumez
no flags
Patch (64.30 KB, patch)
2015-01-28 17:20 PST, Chris Dumez
no flags
Patch (64.56 KB, patch)
2015-01-28 17:25 PST, Chris Dumez
no flags
Patch (65.54 KB, patch)
2015-01-28 22:12 PST, Chris Dumez
no flags
Patch (66.57 KB, patch)
2015-01-29 09:53 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-01-28 16:33:37 PST
Chris Dumez
Comment 2 2015-01-28 16:59:13 PST
Chris Dumez
Comment 3 2015-01-28 17:20:07 PST
Chris Dumez
Comment 4 2015-01-28 17:25:50 PST
Chris Dumez
Comment 5 2015-01-28 22:12:27 PST
Darin Adler
Comment 6 2015-01-29 00:10:19 PST
Comment on attachment 245609 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245609&action=review > Source/WebCore/history/BackForwardController.cpp:75 > - if (!item) > - return; > - > - m_page.goToItem(item, FrameLoadType::IndexedBackForward); > + if (item) > + m_page.goToItem(*item, FrameLoadType::IndexedBackForward); I like the early return style better. > Source/WebCore/history/BackForwardController.cpp:84 > - HistoryItem* item = backItem(); > - if (!item) > - return false; > - > - m_page.goToItem(item, FrameLoadType::Back); > - return true; > + if (HistoryItem* item = backItem()) { > + m_page.goToItem(*item, FrameLoadType::Back); > + return true; > + } > + return false; I like the early return style better. > Source/WebCore/history/BackForwardController.cpp:93 > - HistoryItem* item = forwardItem(); > - if (!item) > - return false; > - > - m_page.goToItem(item, FrameLoadType::Forward); > - return true; > + if (HistoryItem* item = forwardItem()) { > + m_page.goToItem(*item, FrameLoadType::Forward); > + return true; > + } > + return false; I like the early return style better. > Source/WebCore/history/PageCache.cpp:433 > - case PruningReason::ReachedCapacity: > + case PruningReason::ReachedMaxSize: > return DiagnosticLoggingKeys::prunedDueToCapacityReached(); Difference in terminology is a little annoying.
Chris Dumez
Comment 7 2015-01-29 09:53:15 PST
Chris Dumez
Comment 8 2015-01-29 09:54:21 PST
Comment on attachment 245609 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245609&action=review >> Source/WebCore/history/BackForwardController.cpp:75 >> + m_page.goToItem(*item, FrameLoadType::IndexedBackForward); > > I like the early return style better. Done. >> Source/WebCore/history/BackForwardController.cpp:84 >> + return false; > > I like the early return style better. Done. >> Source/WebCore/history/BackForwardController.cpp:93 >> + return false; > > I like the early return style better. Done. >> Source/WebCore/history/PageCache.cpp:433 >> return DiagnosticLoggingKeys::prunedDueToCapacityReached(); > > Difference in terminology is a little annoying. Done.
WebKit Commit Bot
Comment 9 2015-01-29 10:38:51 PST
Comment on attachment 245627 [details] Patch Clearing flags on attachment: 245627 Committed r179347: <http://trac.webkit.org/changeset/179347>
WebKit Commit Bot
Comment 10 2015-01-29 10:38:56 PST
All reviewed patches have been landed. Closing bug.
Tim Horton
Comment 11 2015-01-29 13:33:05 PST
Note You need to log in before you can comment on or make changes to this bug.