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

Issue 1779363004: Store and use last base URL between DidStart / DidStopLoading (Closed)

Created:
4 years, 9 months ago by mnaganov (inactive)
Modified:
4 years, 9 months ago
Reviewers:
Ted C, boliu
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, android-webview-reviews_chromium.org, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Store and use last base URL between DidStart / DidStopLoading As it turns out that the committed entry may omit the base URL if there has been a javascript: URL navigation after LoadDataWithBaseURL. Thus we have to store the base url on DidStartLoading and use it in DidStopLoading / DidFinishLoad. We have to preserve the old hack with SetToBaseURLForDataURLIfNeeded because if the base URL is not valid, DidFinishLoad doesn't receive it from the renderer. This change is a short-term workaround. The correct solution is to pass a flag that the load was through LoadDataWithBaseURL via Blink, so base URL can be restored correctly within NavigationController. BUG=594001 Committed: https://crrev.com/ce1f4d009316d8f5f4c49b18e1bd94687d80c59d Cr-Commit-Position: refs/heads/master@{#381108}

Patch Set 1 #

Total comments: 1

Patch Set 2 : More WebView-specific solution #

Patch Set 3 : Fixed tests #

Total comments: 10

Patch Set 4 : Bo's comments addressed #

Patch Set 5 : Added comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -1 line) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
M content/browser/android/web_contents_observer_proxy.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/web_contents_observer_proxy.cc View 1 2 3 4 3 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 21 (10 generated)
mnaganov (inactive)
Hi Charlie, PTAL! clamy@ is OOO.
4 years, 9 months ago (2016-03-11 02:01:07 UTC) #3
Charlie Reis
https://codereview.chromium.org/1779363004/diff/1/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (right): https://codereview.chromium.org/1779363004/diff/1/content/browser/frame_host/navigation_controller_impl.cc#newcode1148 content/browser/frame_host/navigation_controller_impl.cc:1148: new_entry->SetBaseURLForDataURL(params.base_url); This seems too broad. We only use SetBaseURLForDataURL ...
4 years, 9 months ago (2016-03-11 23:32:09 UTC) #4
mnaganov (inactive)
Bo, I have managed to provide a workaround on the Android level, without touching NavigationController, ...
4 years, 9 months ago (2016-03-14 18:14:23 UTC) #8
boliu
I don't own the content code btw :) https://codereview.chromium.org/1779363004/diff/40001/android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java File android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java (right): https://codereview.chromium.org/1779363004/diff/40001/android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java#newcode377 android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java:377: // ...
4 years, 9 months ago (2016-03-14 18:34:04 UTC) #9
mnaganov (inactive)
I know you are not an owner, but you were definitely dealing with loadDataWithBaseURL before ...
4 years, 9 months ago (2016-03-14 20:10:57 UTC) #10
boliu
lgtm from my perspective https://codereview.chromium.org/1779363004/diff/40001/content/browser/android/web_contents_observer_proxy.cc File content/browser/android/web_contents_observer_proxy.cc (right): https://codereview.chromium.org/1779363004/diff/40001/content/browser/android/web_contents_observer_proxy.cc#newcode228 content/browser/android/web_contents_observer_proxy.cc:228: SetToBaseURLForDataURLIfNeeded(&url_string); On 2016/03/14 20:10:57, mnaganov ...
4 years, 9 months ago (2016-03-14 20:24:53 UTC) #11
mnaganov (inactive)
Thanks, Bo! Ted, can you please take a look? https://codereview.chromium.org/1779363004/diff/40001/content/browser/android/web_contents_observer_proxy.cc File content/browser/android/web_contents_observer_proxy.cc (right): https://codereview.chromium.org/1779363004/diff/40001/content/browser/android/web_contents_observer_proxy.cc#newcode228 content/browser/android/web_contents_observer_proxy.cc:228: ...
4 years, 9 months ago (2016-03-14 20:28:51 UTC) #13
Ted C
lgtm
4 years, 9 months ago (2016-03-14 20:49:32 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1779363004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1779363004/80001
4 years, 9 months ago (2016-03-14 22:15:38 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-14 23:25:03 UTC) #19
commit-bot: I haz the power
4 years, 9 months ago (2016-03-14 23:27:06 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ce1f4d009316d8f5f4c49b18e1bd94687d80c59d
Cr-Commit-Position: refs/heads/master@{#381108}

Powered by Google App Engine
This is Rietveld 408576698