Commit d042d23a authored by Danyao Wang's avatar Danyao Wang Committed by Commit Bot

[Nav Experiment] Only create pending item for main frame decidePolicy.

|webView:decidePolicyForNavigationAction| is called on subresources
load as well. Pending item and context should not be updated in this
case, otherwise it causes the incorrect CL to be displayed.

Bug: 865893, 866379
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Icd721c8044b32cb5088631812ffe2de3c95c9c1b
Reviewed-on: https://chromium-review.googlesource.com/1152112Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578637}
parent 308dd0a4
...@@ -4205,6 +4205,7 @@ registerLoadRequestForURL:(const GURL&)requestURL ...@@ -4205,6 +4205,7 @@ registerLoadRequestForURL:(const GURL&)requestURL
[self updatePendingNavigationInfoFromNavigationAction:action]; [self updatePendingNavigationInfoFromNavigationAction:action];
if (web::GetWebClient()->IsSlimNavigationManagerEnabled() && if (web::GetWebClient()->IsSlimNavigationManagerEnabled() &&
action.targetFrame.mainFrame &&
action.navigationType == WKNavigationTypeBackForward) { action.navigationType == WKNavigationTypeBackForward) {
// WKBackForwardList would have already been updated for back/forward // WKBackForwardList would have already been updated for back/forward
// navigation. Create the pending item here to match. // navigation. Create the pending item here to match.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment