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

Issue 2777243004: Allow URL loading if WebState::GetView was not called. (Closed)

Created:
3 years, 8 months ago by Eugene But (OOO till 7-30)
Modified:
3 years, 8 months ago
Reviewers:
kkhorimoto, sdefresne
CC:
chromium-reviews, darin (slow to review), ios-reviews_chromium.org, viettrungluu+watch_chromium.org, ios-reviews+web_chromium.org, liaoyuke+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, huangml+watch_chromium.org, baxley+watch_chromium.org, qsr+mojo_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow URL loading if WebState::GetView was not called. Calling GetView should not be a requirement for loading a URL. After this CL all triggerPendingLoad calls in //ios/chrome should be unnecessary. BUG=705819, 616244

Patch Set 1 #

Total comments: 1

Patch Set 2 : N #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -38 lines) Patch
M components/dom_distiller/ios/distiller_page_ios.mm View 1 chunk +0 lines, -3 lines 0 comments Download
M ios/chrome/browser/tabs/tab.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/web/test/web_int_test.mm View 1 chunk +0 lines, -7 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 4 chunks +32 lines, -26 lines 0 comments Download
M ios/web/webui/web_ui_mojo_inttest.mm View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 12 (6 generated)
Eugene But (OOO till 7-30)
PTAL This should remove the need to call triggerPendingLoad in ios/chrome
3 years, 8 months ago (2017-03-28 22:57:23 UTC) #6
kkhorimoto
lgtm
3 years, 8 months ago (2017-03-29 00:40:02 UTC) #7
sdefresne
The tests are failing with the following error: [9996:1027:0328/174407.240400:6712194424084:FATAL:crw_web_controller.mm(4024)] Check failed: _webUsageEnabled. Tried to create ...
3 years, 8 months ago (2017-03-29 09:59:01 UTC) #8
sdefresne
On 2017/03/29 09:59:01, sdefresne wrote: > The tests are failing with the following error: > ...
3 years, 8 months ago (2017-03-29 10:22:21 UTC) #9
sdefresne
On 2017/03/29 10:22:21, sdefresne wrote: > On 2017/03/29 09:59:01, sdefresne wrote: > > The tests ...
3 years, 8 months ago (2017-03-29 10:23:43 UTC) #10
Eugene But (OOO till 7-30)
3 years, 8 months ago (2017-03-30 01:26:01 UTC) #11
On 2017/03/29 10:23:43, sdefresne wrote:
> On 2017/03/29 10:22:21, sdefresne wrote:
> > On 2017/03/29 09:59:01, sdefresne wrote:
> > > The tests are failing with the following error:
> > > 
> > >
> [9996:1027:0328/174407.240400:6712194424084:FATAL:crw_web_controller.mm(4024)]
> > > Check failed: _webUsageEnabled. Tried to create a web view while
suspended!
> > > 
> > > TabModel does start the load even if web usage is disabled. I guess it
> expect
> > > that the load will happens later when the web usage is enabled. I don't
> think
> > it
> > > should be the responsibility of Tab/TabModel to remember the load params
for
> > > later use when web is enabled.
> > > 
> > >
> >
>
https://codereview.chromium.org/2777243004/diff/1/ios/web/web_state/ui/crw_we...
> > > File ios/web/web_state/ui/crw_web_controller.mm (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/2777243004/diff/1/ios/web/web_state/ui/crw_we...
> > > ios/web/web_state/ui/crw_web_controller.mm:1845: // never displayed. Bail,
> and
> > > let the URL be loaded when the tab is shown.
> > > I think this comment is now incorrect (since the code does not "bail").
> Please
> > > update.
> > 
> > Looks like this will potentially also break ContextualSearchResultsView. If
> you
> > look at ContextualSearchResultsView -createTabForSearch:preloadEnabled:,
there
> > is a comment saying "Don't actually start the page load yet -- that happens
in
> > -loadTab". And the -loadTab method does create the view by calling
> > WebState::GetView() to force the load to start. Again, not sure how to fix
> this
> > (maybe the ContextualSearchResultsView can set web usage enabled to false
and
> > then later set it to true when it wants the page to load).
> 
> And PreloadController has a call to [tab view] with a comment "// Trigger the
> page to start loading.". This should probably be removed as part of this CL.
Sorry for sending without waiting for tests to complete. Turns out fixing this
harder than I thought as Chrome code already started making the assumptions that
LoadURL does not actually load anything. After we implemented non-modal
incognito "WebUsage" is almost never false (one case I can think of is during
cookies clearing, but in that case UI has modal spinner), so I thought that this
fix will be safe. Well, I guess for now we can workaround triggerPendingLoad
with WebView::GetView() call :(

Closing this CL as it requires to fix Contextual Search first (which is not
launched yet, and it's future is complicated).

Powered by Google App Engine
This is Rietveld 408576698