summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-09 22:56:04 -0500
committerGitHub <noreply@github.com>2021-02-09 22:56:04 -0500
commit166451b8f76224542b49c13cb27a258eb291f05e (patch)
tree071438b28a04b0478586272038ea343ad4cad319 /ext/fg/js/frontend.js
parent0f5fb804d03041b58813516721d897c4315dca8b (diff)
Improve popup window ownership (#1364)
* Update frameInformationGet to also return the tab ID * Add tabId to Frontend * Pass tabId/frameId to Display * Pass ownership information using setContent * Remove ownerFrameId for Popup classes * Use frameId instead of ownerFrameId for screenshotting * Use contentOrigin instead of owner * Update _invokeContentOrigin implementation
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index f02d5609..a62b06bf 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -28,6 +28,7 @@ class Frontend {
pageType,
popupFactory,
depth,
+ tabId,
frameId,
parentPopupId,
parentFrameId,
@@ -40,6 +41,7 @@ class Frontend {
this._pageType = pageType;
this._popupFactory = popupFactory;
this._depth = depth;
+ this._tabId = tabId;
this._frameId = frameId;
this._parentPopupId = parentPopupId;
this._parentFrameId = parentFrameId;
@@ -437,7 +439,6 @@ class Frontend {
return await this._popupFactory.getOrCreatePopup({
frameId: this._frameId,
- ownerFrameId: this._frameId,
depth: this._depth,
childrenSupported: this._childrenSupported
});
@@ -446,7 +447,6 @@ class Frontend {
async _getProxyPopup() {
return await this._popupFactory.getOrCreatePopup({
frameId: this._parentFrameId,
- ownerFrameId: this._frameId,
depth: this._depth,
parentPopupId: this._parentPopupId,
childrenSupported: this._childrenSupported
@@ -469,7 +469,6 @@ class Frontend {
const popup = await this._popupFactory.getOrCreatePopup({
frameId: targetFrameId,
- ownerFrameId: this._frameId,
id: popupId,
childrenSupported: this._childrenSupported
});
@@ -482,7 +481,6 @@ class Frontend {
async _getPopupWindow() {
return await this._popupFactory.getOrCreatePopup({
- ownerFrameId: this._frameId,
depth: this._depth,
popupWindow: true,
childrenSupported: this._childrenSupported
@@ -537,7 +535,11 @@ class Frontend {
documentTitle
},
content: {
- definitions
+ definitions,
+ contentOrigin: {
+ tabId: this._tabId,
+ frameId: this._frameId
+ }
}
};
if (textSource instanceof TextSourceElement && textSource.fullContent !== query) {