• Lukasz Anforowicz's avatar
    Fixup URLs passed through the public Android WebView API. · aec60579
    Lukasz Anforowicz authored
    This CL changes AwContents.loadUrl(LoadUrlParams), so that URLs passing
    through WebView APIs are fixed - partially restoring the behavior prior
    to r818969.
    
    Before r818969 (which landed in 88.0.4298.0), the URL passed to
    WebView.loadUrl (and postUrl, loadData, loadDataWithBaseURL) would get
    fixed via url_formatter::FixupURL when the //content layer was
    processing the navigation (e.g. from within WillHandleBrowserAboutURL or
    BrowserURLHandlerImpl::FixupURLBeforeRewrite - both of these callsites
    have been removed in r818969).  Such rewrite is not happening after
    r818969 - this is an accidental breaking change.  In
    https://crbug.com/1145717 we have some evidence that some apps have
    actually depended on fixing the URLs, although the evidence is not
    particularily strong and doesn't include the specific URLs that were
    getting fixed.
    
    Unlike before r818969, *all* URLs are fixed, *prior* to starting the
    navigation via the //content APIs - this introduces some small
    differences in behavior (e.g. javascript:42 would not be rewritten
    before this r818969, but would be rewritten to http://javascript:42/
    after the current CL), but these differences are small and the risk
    seems acceptable (e.g. javascript:42+42 would not be rewritten).
    
    Bug: 1145717
    Change-Id: I04f5ee54b3ee841cf54d0256e0eeca2e2f984e6f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2528804Reviewed-by: default avatarRichard Coles <torne@chromium.org>
    Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Commit-Queue: Peter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#827474}
    aec60579
BUILD.gn 40.2 KB