Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)

Created:
3 years, 10 months ago by Nate Chapin
Modified:
3 years, 8 months ago
Reviewers:
kinuko, Mike West, yhirano
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, eae+blinkwatch, kinuko+watch, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move HistoryItem handling to DocumentLoader Currently, FrameLoader stores 2 HistoryItems: m_provisionalItem and m_currentItem. m_currentItem corresponds to the current committed Document/DocumentLoader, while m_provisionalItem corresponds to the provisional DocumentLoader if and only if the provisional navigation is back/forward. Instead, have each DocumentLoader store its associated HistoryItem: initialized at navigation start for back/forward navigations, and at commit time for all others. Move a bunch of commit-time history logic that doesn't need to interact with FrameLoader over to DocumentLoader. BUG= Review-Url: https://codereview.chromium.org/2710983003 Cr-Commit-Position: refs/heads/master@{#461142} Committed: https://chromium.googlesource.com/chromium/src/+/f3bd4b3364770b777839da74c479b0ae9a063cb3

Patch Set 1 #

Patch Set 2 : compile fix #

Patch Set 3 : Move loadFailed() #

Patch Set 4 : Move loadFailed() #

Patch Set 5 : Move loadFailed() #

Patch Set 6 : Move loadFailed() #

Patch Set 7 : Fix browser_tests? #

Patch Set 8 : Fix browser_tests? #

Patch Set 9 : Don't pass around previousHistoryItem - fewer HistoryCommitType special cases #

Patch Set 10 : Don't pass around previousHistoryItem - fewer HistoryCommitType special cases #

Patch Set 11 : Don't pass around previousHistoryItem - fewer HistoryCommitType special cases #

Patch Set 12 : Don't pass around previousHistoryItem - fewer HistoryCommitType special cases #

Patch Set 13 : Don't pass around previousHistoryItem - fewer HistoryCommitType special cases #

Patch Set 14 : Experiment to fix DCHECKing tests #

Total comments: 32

Patch Set 15 : Address yhirano's comments #

Total comments: 4

Patch Set 16 : Address kinuko's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -364 lines) Patch
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/History.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +23 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 chunks +158 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +8 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 27 chunks +66 lines, -220 lines 0 comments Download
M third_party/WebKit/Source/core/loader/HistoryItem.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/HistoryItem.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/ContextMenuClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +20 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +19 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +25 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +44 lines, -28 lines 0 comments Download

Messages

Total messages: 97 (85 generated)
Nate Chapin
https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (left): https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/dom/Document.cpp#oldcode1636 third_party/WebKit/Source/core/dom/Document.cpp:1636: m_frame->loader().currentItem()->isCurrentDocument(this)) This is the sole use of isCurrentDocument(), and ...
3 years, 9 months ago (2017-03-27 21:02:02 UTC) #73
Mike West
I've read through it once, and I think it looks good overall. I need to ...
3 years, 8 months ago (2017-03-28 14:36:09 UTC) #74
Nate Chapin
On 2017/03/28 14:36:09, Mike West wrote: > I've read through it once, and I think ...
3 years, 8 months ago (2017-03-28 16:35:51 UTC) #75
Mike West
I'm good with this, LGTM. Thanks for the helpful comments along the way!
3 years, 8 months ago (2017-03-29 08:36:20 UTC) #76
yhirano
https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/frame/History.cpp File third_party/WebKit/Source/core/frame/History.cpp (right): https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/frame/History.cpp#newcode81 third_party/WebKit/Source/core/frame/History.cpp:81: frame()->loader().documentLoader()->historyItem()) { Can |frame()->loader().documentLoader()| be null? Ditto below. https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/loader/DocumentLoader.cpp ...
3 years, 8 months ago (2017-03-29 09:38:13 UTC) #77
Nate Chapin
https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/frame/History.cpp File third_party/WebKit/Source/core/frame/History.cpp (right): https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/frame/History.cpp#newcode81 third_party/WebKit/Source/core/frame/History.cpp:81: frame()->loader().documentLoader()->historyItem()) { On 2017/03/29 09:38:13, yhirano wrote: > Can ...
3 years, 8 months ago (2017-03-29 18:23:06 UTC) #80
kinuko
(Wanted to learn the code around back/forward a bit more so trying to read this ...
3 years, 8 months ago (2017-03-30 05:05:00 UTC) #84
yhirano
lgtm
3 years, 8 months ago (2017-03-30 11:03:18 UTC) #85
Nate Chapin
https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2710983003/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1748 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1748: bool replaceCurrentItem = loadType == FrameLoadTypeReplaceCurrentItem && On 2017/03/30 ...
3 years, 8 months ago (2017-03-30 20:13:56 UTC) #88
kinuko
Thanks! lgtm > https://codereview.chromium.org/2710983003/diff/280001/third_party/WebKit/Source/core/loader/DocumentLoader.h#newcode261 > third_party/WebKit/Source/core/loader/DocumentLoader.h:261: enum class > HistoryNavigationType { DifferentDocument, Fragment, HistoryApi }; ...
3 years, 8 months ago (2017-03-31 00:14:55 UTC) #91
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2710983003/300001
3 years, 8 months ago (2017-03-31 16:15:54 UTC) #94
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 16:24:47 UTC) #97
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/f3bd4b3364770b777839da74c479...

Powered by Google App Engine
This is Rietveld 408576698