 +
 +void WebPageInspectorEmulationAgent::setDeviceMetricsOverride(int width, int height, double deviceScaleFactor, bool fixedlayout, Ref<SetDeviceMetricsOverrideCallback>&& callback)
 +{
++#if PLATFORM(GTK)
++    // On gtk, fixed layout doesn't work with compositing enabled
++    // FIXME: This turns off compositing forever, even if fixedLayout is disabled.
++    if (fixedlayout) {
++        auto copy = m_page.preferences().copy();
++        copy->setAcceleratedCompositingEnabled(false);
++        m_page.setPreferences(copy);
++    }
++#endif
++
 +    m_page.setCustomDeviceScaleFactor(deviceScaleFactor);
 +    m_page.setUseFixedLayout(fixedlayout);
 +    platformSetSize(width, height, [callback = WTFMove(callback)](const String& error) {

     HashSet<WebResourceLoader*> m_loadersWithUploads;
 };
 
diff --git a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp
index a70f6fd52096a5dca901ea70a3755f14d6b4a0fd..f02e5c774a49d3e67860adb3b011531313eaf8d1 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp

 } // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..78815bc17978a23ca811ff99039b4fe86e6fb4a0
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
