iOS: SessionStorage not copied to new spawned tab
Reported by
joshua.g...@gmail.com,
Jan 16 2017
|
||||||||
Issue descriptionChrome Version (from "Settings > About Google Chrome"): 55.0.2883.79 Device Type: iPad Pro; iPhone 6S URLs (if applicable): http://output.jsbin.com/lanuvudeci Behavior in Safari (if applicable): Works as expected (the sessionStorage item copied to new tab) on iOS 10.2 (14C92). Also works as expected on Chrome for Mac v55.0.2883.95. Steps to reproduce: (1) Create a page that uses the sessionStorage API to set an item, as well as a link to itself that opens in a new tab (i.e. `a` tag with attribute `target="_blank"`) (2) Open the page, ensure the item is set, and click the link (3) Check that the sessionStorage item has been copied to the new tab Expected result: The sessionStorage item should be copied to the new tab, as per the HTML Living Standard section 11.2.2 (as of 2017-01-14): "When a new top-level browsing context is created by a script in an existing browsing context, or by the user following a link in an existing browsing context, or in some other way related to a specific Document, and the creation is not a new start for session storage, then the session storage area of the origin of that Document must be copied into the new browsing context when it is created. From that point on, however, the two session storage areas must be considered separate, not affecting each other in any way." [https://html.spec.whatwg.org/multipage/webstorage.html#the-sessionstorage-attribute] Actual result: The sessionStorage item is not copied to the new tab.
,
Jan 18 2017
eugenebut@ can you take a look?
,
Jan 18 2017
,
Jan 18 2017
Joshua, does it work in Firefox on iOS?
,
Jan 22 2017
Hi Eugene, sorry for the delay. I accidentally neglected to sign-in when creating the JSBin so the original has expired; I've re-posted here: http://output.jsbin.com/poyihin/1 I can confirm it works as expected on Firefox for iOS 6.0 (2), see attached.
,
Jan 23 2017
This works correctly in stock WKWebView app, but is broken in Chrome. This link click is recognized as an ExternalRequest click and handled w/o going through normal WKWebView callbacks. I doubt that we even need to have special handling for "ExternalRequest" in WKWebView. Rohit, do you think I can break something by removing "externalRequest" message handling from JS: https://cs.chromium.org/chromium/src/ios/web/web_state/js/resources/core.js?q=externalRequest&sq=package:chromium&l=561
,
Feb 2 2017
,
Feb 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/31501962d5fe6c4e6729a6f6aa14c96170bdb6ce commit 31501962d5fe6c4e6729a6f6aa14c96170bdb6ce Author: eugenebut <eugenebut@chromium.org> Date: Fri Feb 03 19:25:34 2017 EG test for sessionStorage sharing. Newly written test reproduces crbug.com/681434 and currently disabled because of this bug. BUG= 681434 Review-Url: https://codereview.chromium.org/2672893003 Cr-Commit-Position: refs/heads/master@{#448042} [modify] https://crrev.com/31501962d5fe6c4e6729a6f6aa14c96170bdb6ce/ios/chrome/browser/web/window_open_by_dom_egtest.mm [modify] https://crrev.com/31501962d5fe6c4e6729a6f6aa14c96170bdb6ce/ios/testing/data/http_server_files/window_open.html
,
Feb 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3652d80d4a010ce23b317bcadcf0f064c07c53e1 commit 3652d80d4a010ce23b317bcadcf0f064c07c53e1 Author: eugenebut <eugenebut@chromium.org> Date: Tue Feb 07 19:36:08 2017 Removed externalRequest code from CRWWebController. This code was needed for UIWebView-based app to support target="blank" links. WKWebView natively supports opening windows by DOM and old workaround was harmful, because it created child windows without piping them through WKWebView callbacks which breaks sessionStorage and cross-window scripting. Enabled testLinkWithBlankTargetSessionStorage. Disabled testBrowsingPreventDefaultWithLinkOpenedByJavascript because WKWebView does not open new windows after stopPropagation() call (crbug.com/688223). BUG= 681434 ,579697 Review-Url: https://codereview.chromium.org/2669303004 Cr-Commit-Position: refs/heads/master@{#448696} [modify] https://crrev.com/3652d80d4a010ce23b317bcadcf0f064c07c53e1/ios/chrome/browser/web/browsing_egtest.mm [modify] https://crrev.com/3652d80d4a010ce23b317bcadcf0f064c07c53e1/ios/chrome/browser/web/window_open_by_dom_egtest.mm [modify] https://crrev.com/3652d80d4a010ce23b317bcadcf0f064c07c53e1/ios/web/web_state/js/resources/core.js [modify] https://crrev.com/3652d80d4a010ce23b317bcadcf0f064c07c53e1/ios/web/web_state/ui/crw_web_controller.h [modify] https://crrev.com/3652d80d4a010ce23b317bcadcf0f064c07c53e1/ios/web/web_state/ui/crw_web_controller.mm
,
Feb 7 2017
,
Apr 17 2017
Verified on iPhone 7+ iOS 10.2.1, iPad Pro iOS 10.2.1 on build 58.0.3029.76 dev Below behavior seen. 1. Go to http://output.jsbin.com/lanuvudeci desktop site on phone https://drive.google.com/open?id=0B6GVWQnhaMClTnZydEhpZldTQWs 2.Go to http://output.jsbin.com/poyihin/1 https://drive.google.com/open?id=0B6GVWQnhaMClX1hXdENCNXNtN2M |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by joshua.g...@gmail.com
, Jan 16 2017