Description
localStorage events are not passed between WebViews. To reproduce, run a JavaFX application with two WebView instances, open e.g. http://html5demos.com/storage-events or http://www.ellipsetours.com/Demos/storage/ in both instances, do something in one instance, and note that the other instance does not reflect your changes as it should.
The problem is, currently every WebCore::Page object is placed in a separate WebCore::PageGroup. As WebKit broadcasts every storage event within its source page group only, no WebCore::Page and, hence, WebView instance, can receive storage events from other instances.
The proposed solution is to put all WebCore::Page instances with the same userDataDirectory into the same page group, using the following method:
WebCore::Page::setGroupName(const String& name)
The canonicalized path to the userDataDirectory can become the name of the page group.
The problem is, currently every WebCore::Page object is placed in a separate WebCore::PageGroup. As WebKit broadcasts every storage event within its source page group only, no WebCore::Page and, hence, WebView instance, can receive storage events from other instances.
The proposed solution is to put all WebCore::Page instances with the same userDataDirectory into the same page group, using the following method:
WebCore::Page::setGroupName(const String& name)
The canonicalized path to the userDataDirectory can become the name of the page group.
Attachments
Issue Links
- relates to
-
JDK-8101833 Implement window.localStorage
- Resolved