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

Issue 2763793003: Use targetFrame to decide whether to allow load in static html view. (Closed)

Created:
3 years, 9 months ago by kkhorimoto
Modified:
3 years, 9 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3029
Project:
chromium
Visibility:
Public.

Description

Use targetFrame to decide whether to allow load in static html view. StaticHtmlViewController intercepts attempted main frame navigations and performs the load using the UrlLoader protocol. Currently, navigations are ignored unless their reported sourceFrame is the main frame. However, this has the mistaken behavior of intercepting loads that are initiated by the main frame, but are intended for a subframe. Additionally, the current implementation will not intercept navigations triggered by JavaScript (e.g. setting window.location to a new URL), as these are reported as having a nil sourceFrame, but the main frame as the targetFrame. Since the same-origin policy is enforced by WebKit before WKWebView navigation callbacks can occur, we can assume that an navigation with the main frame as the targetFrame are valid and should be intercepted. BUG=695262 Review-Url: https://codereview.chromium.org/2728243002 Cr-Commit-Position: refs/heads/master@{#454723} (cherry picked from commit 0f799230c0f27e3e8882868f46d9d5cefe9c8c6d) Review-Url: https://codereview.chromium.org/2763793003 . Cr-Commit-Position: refs/branch-heads/3029@{#336} Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471} Committed: https://chromium.googlesource.com/chromium/src/+/042bf70b4c3a621423770ab3ff4750537e4a0356

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M ios/chrome/browser/ui/static_content/static_html_view_controller.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
kkhorimoto
3 years, 9 months ago (2017-03-21 18:32:41 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
042bf70b4c3a621423770ab3ff4750537e4a0356.

Powered by Google App Engine
This is Rietveld 408576698