fix(wkgtk): invoke resize callback when resize is a noop (#291)

This commit is contained in:
Pavel Feldman 2019-12-18 13:54:51 -08:00 committed by Yury Semikhatsky
parent 7750db97fe
commit 0d7701c730
2 changed files with 7 additions and 3 deletions

View File

@ -1 +1 @@
1044 1045

View File

@ -6845,10 +6845,10 @@ index 0000000000000000000000000000000000000000..37a5e7ad390607668ff3f7eb7dba25e4
+#endif // ENABLE(REMOTE_INSPECTOR) +#endif // ENABLE(REMOTE_INSPECTOR)
diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..e38a4ad3e2fc7a2eee4deb1bff65a4c7422064b2 index 0000000000000000000000000000000000000000..6e1b2ab05623f187a16eeed78601fa1207dec76f
--- /dev/null --- /dev/null
+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp +++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp
@@ -0,0 +1,43 @@ @@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license. +// Licensed under the MIT license.
+ +
@ -6874,6 +6874,10 @@ index 0000000000000000000000000000000000000000..e38a4ad3e2fc7a2eee4deb1bff65a4c7
+ } + }
+ GtkAllocation viewAllocation; + GtkAllocation viewAllocation;
+ gtk_widget_get_allocation(viewWidget, &viewAllocation); + gtk_widget_get_allocation(viewWidget, &viewAllocation);
+ if (viewAllocation.width == width && viewAllocation.height == height) {
+ callback(String());
+ return;
+ }
+ +
+ GtkAllocation windowAllocation; + GtkAllocation windowAllocation;
+ gtk_widget_get_allocation(window, &windowAllocation); + gtk_widget_get_allocation(window, &windowAllocation);