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

Issue 2734843004: 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/pending/branch-heads/2987
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/2734843004 . Cr-Commit-Position: refs/branch-heads/2987@{#779} Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943} Committed: https://chromium.googlesource.com/chromium/src/+/c3abab806f8c5229858939f767511d2c5dec9641

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-07 05:07:02 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
c3abab806f8c5229858939f767511d2c5dec9641.

Powered by Google App Engine
This is Rietveld 408576698