browser(firefox): implement Page.bringToFront (#3051)
This commit is contained in:
parent
eb14c4711f
commit
726f636b5c
|
|
@ -1,2 +1,2 @@
|
||||||
1133
|
1134
|
||||||
Changed: yurys@chromium.org Mon Jul 20 14:11:12 PDT 2020
|
Changed: pavel.feldman@gmail.com Mon Jul 20 15:11:16 PDT 2020
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,10 @@ class PageHandler {
|
||||||
return await this._contentPage.send('setEmulatedMedia', options);
|
return await this._contentPage.send('setEmulatedMedia', options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async bringToFront(options) {
|
||||||
|
this._pageTarget._window.focus();
|
||||||
|
}
|
||||||
|
|
||||||
async setCacheDisabled(options) {
|
async setCacheDisabled(options) {
|
||||||
return await this._contentPage.send('setCacheDisabled', options);
|
return await this._contentPage.send('setCacheDisabled', options);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -654,6 +654,10 @@ const Page = {
|
||||||
viewportSize: t.Nullable(pageTypes.Size),
|
viewportSize: t.Nullable(pageTypes.Size),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'bringToFront': {
|
||||||
|
params: {
|
||||||
|
},
|
||||||
|
},
|
||||||
'setEmulatedMedia': {
|
'setEmulatedMedia': {
|
||||||
params: {
|
params: {
|
||||||
type: t.Optional(t.Enum(['screen', 'print', ''])),
|
type: t.Optional(t.Enum(['screen', 'print', ''])),
|
||||||
|
|
|
||||||
|
|
@ -651,6 +651,21 @@ index e268e2bbe8add1b43f6e4d6507cc7810d707a344..a34a7a292a02ea8d94042475a43ae3a0
|
||||||
|
|
||||||
dom::MediaCapabilities* MediaCapabilities();
|
dom::MediaCapabilities* MediaCapabilities();
|
||||||
dom::MediaSession* MediaSession();
|
dom::MediaSession* MediaSession();
|
||||||
|
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
|
||||||
|
index 7fd3b0069dfd8159818c0f80d0c1cee901ce074a..77f08fb399145302677d36003884e9d775cc4e44 100644
|
||||||
|
--- a/dom/base/nsFocusManager.cpp
|
||||||
|
+++ b/dom/base/nsFocusManager.cpp
|
||||||
|
@@ -2649,7 +2649,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (sTestMode) {
|
||||||
|
+ // In Playwright, we still want to execte the embedder functions
|
||||||
|
+ // to actually show / focus windows.
|
||||||
|
+ if (false && sTestMode) {
|
||||||
|
// In test mode, emulate raising the window. WindowRaised takes
|
||||||
|
// care of lowering the present active window. This happens in
|
||||||
|
// a separate runnable to avoid touching multiple windows in
|
||||||
diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp
|
diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp
|
||||||
index da9d56e843a2c762dc7d5527712cdd3d30418f7f..aa3d2d6022b60ac3a263c2d1df4eb12714d8e728 100644
|
index da9d56e843a2c762dc7d5527712cdd3d30418f7f..aa3d2d6022b60ac3a263c2d1df4eb12714d8e728 100644
|
||||||
--- a/dom/base/nsGlobalWindowOuter.cpp
|
--- a/dom/base/nsGlobalWindowOuter.cpp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue