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}
Committed: https://chromium.googlesource.com/chromium/src/+/0f799230c0f27e3e8882868f46d9d5cefe9c8c6d
Patch Set 1 #Patch Set 2 : reparent branch #
Messages
Total messages: 12 (7 generated)
|
|||||||||||||||||||