Chromium Code Reviews
DescriptionUse 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 #
Messages
Total messages: 2 (1 generated)
|
|||||||||||||||||||