1
0
MozillaFirefox/mozilla-bmo1609538.patch
Wolfgang Rosenauer a9628fa6ae - Mozilla Firefox 74.0
* https://www.mozilla.org/en-US/firefox/74.0/releasenotes/
  MFSA 2020-08 (bsc#1166238)
  * CVE-2020-6805 (bmo#1610880)
    Use-after-free when removing data about origins
  * CVE-2020-6806 (bmo#1612308)
    BodyStream::OnInputStreamReady was missing protections against
    state confusion
  * CVE-2020-6807 (bmo#1614971)
    Use-after-free in cubeb during stream destruction
  * CVE-2020-6808 (bmo#1247968)
    URL Spoofing via javascript: URL
  * CVE-2020-6809 (bmo#1420296)
    Web Extensions with the all-urls permission could access local
    files
  * CVE-2020-6810 (bmo#1432856)
    Focusing a popup while in fullscreen could have obscured the
    fullscreen notification
  * CVE-2020-6811 (bmo#1607742)
    Devtools' 'Copy as cURL' feature did not fully escape
    website-controlled data, potentially leading to command injection
  * CVE-2019-20503 (bmo#1613765)
    Out of bounds reads in sctp_load_addresses_from_init
  * CVE-2020-6812 (bmo#1616661)
    The names of AirPods with personally identifiable information
    were exposed to websites with camera or microphone permission
  * CVE-2020-6813 (bmo#1605814)
    @import statements in CSS could bypass the Content Security
    Policy nonce feature
  * CVE-2020-6814 (bmo#1592078,bmo#1604847,bmo#1608256,bmo#1612636,

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=809
2020-03-12 19:14:24 +00:00

128 lines
4.9 KiB
Diff

diff --git a/widget/gtk/mozcontainer.h b/widget/gtk/mozcontainer.h
--- a/widget/gtk/mozcontainer.h
+++ b/widget/gtk/mozcontainer.h
@@ -82,6 +82,7 @@
int frame_callback_handler_surface_id;
gboolean opaque_region_needs_update;
gboolean opaque_region_subtract_corners;
+ gboolean opaque_region_fullscreen;
gboolean surface_position_needs_update;
gboolean surface_needs_clear;
gboolean ready_to_draw;
@@ -118,7 +119,8 @@
MozContainer* container, const std::function<void(void)>& initial_draw_cb);
wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
void moz_container_update_opaque_region(MozContainer* container,
- bool aSubtractCorners);
+ bool aSubtractCorners,
+ bool aFullScreen);
void moz_container_set_accelerated(MozContainer* container);
#endif
diff --git a/widget/gtk/mozcontainer.cpp b/widget/gtk/mozcontainer.cpp
--- a/widget/gtk/mozcontainer.cpp
+++ b/widget/gtk/mozcontainer.cpp
@@ -164,13 +164,15 @@
// wl_subsurface_set_position is actually property of parent surface
// which is effective when parent surface is commited.
- wl_surface* parent_surface =
- moz_gtk_widget_get_wl_surface(GTK_WIDGET(container));
- if (parent_surface) {
- wl_subsurface_set_position(container->subsurface, container->subsurface_dx,
- container->subsurface_dy);
- wl_surface_commit(parent_surface);
- container->surface_position_needs_update = false;
+ wl_subsurface_set_position(container->subsurface, container->subsurface_dx,
+ container->subsurface_dy);
+ container->surface_position_needs_update = false;
+
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
+ if (window) {
+ GdkRectangle rect = (GdkRectangle){0, 0, gdk_window_get_width(window),
+ gdk_window_get_height(window)};
+ gdk_window_invalidate_rect(window, &rect, false);
}
}
@@ -222,6 +224,7 @@
container->ready_to_draw = gfxPlatformGtk::GetPlatform()->IsX11Display();
container->opaque_region_needs_update = false;
container->opaque_region_subtract_corners = false;
+ container->opaque_region_fullscreen = false;
container->surface_needs_clear = true;
container->subsurface_dx = 0;
container->subsurface_dy = 0;
@@ -579,12 +582,17 @@
GtkAllocation allocation;
gtk_widget_get_allocation(GTK_WIDGET(container), &allocation);
- // Set region to mozcontainer which does not have any offset
- wl_region* region =
- CreateOpaqueRegionWayland(0, 0, allocation.width, allocation.height,
- container->opaque_region_subtract_corners);
- wl_surface_set_opaque_region(container->surface, region);
- wl_region_destroy(region);
+ // Set region to mozcontainer for normal state only
+ if (!container->opaque_region_fullscreen) {
+ wl_region* region =
+ CreateOpaqueRegionWayland(0, 0, allocation.width, allocation.height,
+ container->opaque_region_subtract_corners);
+ wl_surface_set_opaque_region(container->surface, region);
+ wl_region_destroy(region);
+ } else {
+ wl_surface_set_opaque_region(container->surface, nullptr);
+ }
+
container->opaque_region_needs_update = false;
}
@@ -677,9 +685,11 @@
}
void moz_container_update_opaque_region(MozContainer* container,
- bool aSubtractCorners) {
+ bool aSubtractCorners,
+ bool aFullScreen) {
container->opaque_region_needs_update = true;
container->opaque_region_subtract_corners = aSubtractCorners;
+ container->opaque_region_fullscreen = aFullScreen;
// When GL compositor / WebRender is used,
// moz_container_get_wl_egl_window() is called only once when window
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -4941,17 +4941,24 @@
return;
}
- wl_region* region =
- CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
- wl_surface_set_opaque_region(surface, region);
- wl_region_destroy(region);
-
+ // Set opaque region to toplevel window only in fullscreen mode.
+ bool fullScreen = mSizeState != nsSizeMode_Normal && !mIsTiled;
+ if (fullScreen) {
+ wl_region* region =
+ CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
+ wl_surface_set_opaque_region(surface, region);
+ wl_region_destroy(region);
+ } else {
+ wl_surface_set_opaque_region(surface, nullptr);
+ }
+
+ // TODO -> create a function for it
GdkWindow* window = gtk_widget_get_window(mShell);
if (window) {
gdk_window_invalidate_rect(window, &rect, false);
}
- moz_container_update_opaque_region(mContainer, aSubtractCorners);
+ moz_container_update_opaque_region(mContainer, aSubtractCorners, fullScreen);
}
#endif