fix(merge): 1057 undid 1056 :/ (#358)

This commit is contained in:
Pavel Feldman 2020-01-02 22:38:17 -08:00 committed by GitHub
parent ebd11fe380
commit 1776495b4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 12 deletions

View file

@ -1 +1 @@
1057 1058

View file

@ -608,10 +608,10 @@ index 0000000000000000000000000000000000000000..79edea03fed4e9be5da96e1275e182a4
+} +}
diff --git a/Source/JavaScriptCore/inspector/protocol/Emulation.json b/Source/JavaScriptCore/inspector/protocol/Emulation.json diff --git a/Source/JavaScriptCore/inspector/protocol/Emulation.json b/Source/JavaScriptCore/inspector/protocol/Emulation.json
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..ef5e1e4f164f441d433c1ad4d7faabf02dff970e index 0000000000000000000000000000000000000000..bcf863e4bba3b99f66e75dabfc4d8c1289cc2b78
--- /dev/null --- /dev/null
+++ b/Source/JavaScriptCore/inspector/protocol/Emulation.json +++ b/Source/JavaScriptCore/inspector/protocol/Emulation.json
@@ -0,0 +1,31 @@ @@ -0,0 +1,32 @@
+{ +{
+ "domain": "Emulation", + "domain": "Emulation",
+ "availability": ["web"], + "availability": ["web"],
@ -623,7 +623,8 @@ index 0000000000000000000000000000000000000000..ef5e1e4f164f441d433c1ad4d7faabf0
+ "parameters": [ + "parameters": [
+ { "name": "width", "type": "integer" }, + { "name": "width", "type": "integer" },
+ { "name": "height", "type": "integer" }, + { "name": "height", "type": "integer" },
+ { "name": "deviceScaleFactor", "type": "number" } + { "name": "deviceScaleFactor", "type": "number" },
+ { "name": "fixedLayout", "type": "boolean" }
+ ] + ]
+ }, + },
+ { + {
@ -5524,7 +5525,7 @@ index d7695088e7cfc4f638f157338754f9f157489749..fd0e1db93b4b6fc094ff47565ca19e83
std::unique_ptr<BackingStore> m_backingStore; std::unique_ptr<BackingStore> m_backingStore;
diff --git a/Source/WebKit/UIProcess/InspectorBrowserAgent.cpp b/Source/WebKit/UIProcess/InspectorBrowserAgent.cpp diff --git a/Source/WebKit/UIProcess/InspectorBrowserAgent.cpp b/Source/WebKit/UIProcess/InspectorBrowserAgent.cpp
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..2eed920f0c5c162875f431abb532379d896dd310 index 0000000000000000000000000000000000000000..60d53cf6af3faa6f484a0a1efa935c505492576b
--- /dev/null --- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorBrowserAgent.cpp +++ b/Source/WebKit/UIProcess/InspectorBrowserAgent.cpp
@@ -0,0 +1,333 @@ @@ -0,0 +1,333 @@
@ -5655,7 +5656,7 @@ index 0000000000000000000000000000000000000000..2eed920f0c5c162875f431abb532379d
+ RefPtr<WebPageProxy> page = m_client->createPage(errorString, sessionID); + RefPtr<WebPageProxy> page = m_client->createPage(errorString, sessionID);
+ if (page == nullptr) + if (page == nullptr)
+ return; + return;
+ page->setPermissionsForAutomation(m_permissions.get(browserContextID ? *browserContextID : String())); + page->setPermissionsForAutomation(m_permissions.get(browserContextID ? *browserContextID : ""));
+ *targetID = WebPageInspectorTarget::toTargetID(page->webPageID()); + *targetID = WebPageInspectorTarget::toTargetID(page->webPageID());
+} +}
+ +
@ -5781,7 +5782,7 @@ index 0000000000000000000000000000000000000000..2eed920f0c5c162875f431abb532379d
+ } + }
+ set.add(name); + set.add(name);
+ } + }
+ String key = browserContextID ? *browserContextID : String(); + String key = browserContextID ? *browserContextID : "";
+ auto it = m_permissions.add(key, Permissions()).iterator; + auto it = m_permissions.add(key, Permissions()).iterator;
+ it->value.set(origin, WTFMove(set)); + it->value.set(origin, WTFMove(set));
+ Vector<WebPageProxy*> pages; + Vector<WebPageProxy*> pages;
@ -6665,10 +6666,10 @@ index 78caedf0c0ce83675569502d150fcc44e5f9868c..a380d778c36fdd718dc506c28fee2349
} // namespace WebKit } // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..9d5245ec9f6708a41048e3c3d1663b99c0be7ba7 index 0000000000000000000000000000000000000000..58e69943a8978790fbe6fa0f478c64dd2895a551
--- /dev/null --- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp +++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
@@ -0,0 +1,62 @@ @@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license. +// Licensed under the MIT license.
+ +
@ -6704,9 +6705,10 @@ index 0000000000000000000000000000000000000000..9d5245ec9f6708a41048e3c3d1663b99
+{ +{
+} +}
+ +
+void WebPageInspectorEmulationAgent::setDeviceMetricsOverride(int width, int height, double deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&& callback) +void WebPageInspectorEmulationAgent::setDeviceMetricsOverride(int width, int height, double deviceScaleFactor, bool fixedlayout, Ref<SetDeviceMetricsOverrideCallback>&& callback)
+{ +{
+ m_page.setCustomDeviceScaleFactor(deviceScaleFactor); + m_page.setCustomDeviceScaleFactor(deviceScaleFactor);
+ m_page.setUseFixedLayout(fixedlayout);
+ platformSetSize(width, height, [callback = WTFMove(callback)](const String& error) { + platformSetSize(width, height, [callback = WTFMove(callback)](const String& error) {
+ if (error.isEmpty()) + if (error.isEmpty())
+ callback->sendSuccess(); + callback->sendSuccess();
@ -6733,7 +6735,7 @@ index 0000000000000000000000000000000000000000..9d5245ec9f6708a41048e3c3d1663b99
+} // namespace WebKit +} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..f519b0716798ac2f0682ad350592503057330f99 index 0000000000000000000000000000000000000000..71b6e3788c64ae07ef1aeba972dd859db3b2de54
--- /dev/null --- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h +++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
@ -6769,7 +6771,7 @@ index 0000000000000000000000000000000000000000..f519b0716798ac2f0682ad3505925030
+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override; + void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override; + void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
+ +
+ void setDeviceMetricsOverride(int width, int height, double deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&&) override; + void setDeviceMetricsOverride(int width, int height, double deviceScaleFactor, bool fixedlayout, Ref<SetDeviceMetricsOverrideCallback>&&) override;
+ void setJavaScriptEnabled(Inspector::ErrorString&, bool enabled) override; + void setJavaScriptEnabled(Inspector::ErrorString&, bool enabled) override;
+ void setAuthCredentials(Inspector::ErrorString&, const String*, const String*) override; + void setAuthCredentials(Inspector::ErrorString&, const String*, const String*) override;
+ +