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

Issue 2728243002: 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
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed), jam, darin-cc_chromium.org, marq+watch_chromium.org, noyau+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
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} Committed: https://chromium.googlesource.com/chromium/src/+/0f799230c0f27e3e8882868f46d9d5cefe9c8c6d

Patch Set 1 #

Patch Set 2 : reparent branch #

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: 12 (7 generated)
kkhorimoto
PTAL at this M57 RBS fix
3 years, 9 months ago (2017-03-03 23:51:14 UTC) #2
Eugene But (OOO till 7-30)
lgtm
3 years, 9 months ago (2017-03-04 00:02:21 UTC) #3
commit-bot: I haz the power
This CL has an open dependency (Issue 2731553003 Patch 1). Please resolve the dependency and ...
3 years, 9 months ago (2017-03-04 00:03:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2728243002/20001
3 years, 9 months ago (2017-03-04 00:16:24 UTC) #9
commit-bot: I haz the power
3 years, 9 months ago (2017-03-04 00:29:03 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/0f799230c0f27e3e8882868f46d9...

Powered by Google App Engine
This is Rietveld 408576698