- Mar 28, 2023
-
-
Emilio Cobos Álvarez authored
We know these are elements, take advantage of that. Depends on D173836 Differential Revision: https://phabricator.services.mozilla.com/D173837
-
- Feb 06, 2023
-
-
Emilio Cobos Álvarez authored
Bug 1814239 - Expose Point/Size rounded-to-multiple helpers, and use them from MaybeRoundToDisplayPixels. r=tnikkel,gfx-reviewers,nical Turns out we already had code for this in NumericTools.h, so reuse it. I thought I was going to need this code somewhere else though I didn't end up needing it. While at it clean up unnecessary template params I noticed. Differential Revision: https://phabricator.services.mozilla.com/D168460
-
Makoto Kato authored
Bug 1812938 - Part 1. GetWidgetScreen returns Screen instead of nsIScreen. r=emilio,geckoview-reviewers,owlish `nsIWidget` isn't scriptable, so it is unnecessary to return `nsIScreen` for `GetWidgetScreen`. Differential Revision: https://phabricator.services.mozilla.com/D168029
-
- Feb 02, 2023
-
-
Emilio Cobos Álvarez authored
It's a more natural place for it to live, since it concerns only the root view. Clean up a bit while at it, and factor out the window size constraints, which we're going to use momentarily. Differential Revision: https://phabricator.services.mozilla.com/D168461
-
- Jan 27, 2023
-
-
Emilio Cobos Álvarez authored
Let the caller addref it if needed. I wrote this because I wanted to make some code dealing with it thread-safe, but I ended up writing a less sketchy solution. However I still think this is worth it. It seems this only returns an already_AddRefed because before it used to be an XPCOM-ish thing where the widget was returned as an out-param. For now it doesn't change behavior but there are some callers that would benefit from having less addref/release calls if they only need to read simple stuff from the widget. Differential Revision: https://phabricator.services.mozilla.com/D168141
-
- Jan 24, 2023
-
-
Emilio Cobos Álvarez authored
I'm about to extend them for bug 1811486, where I want to force in some cases the rolled up popups to hide synchronously. These APIs use a ton of boolean arguments that make them error prone, so refactor them a bit to use strongly typed enums and flags. Differential Revision: https://phabricator.services.mozilla.com/D167381
-
Emilio Cobos Álvarez authored
Bug 1798697 - Use outside rather than closest pixels for popup sizes, and don't clamp translucent popups. r=tnikkel Both are needed to make this look ok. Differential Revision: https://phabricator.services.mozilla.com/D167494
-
- Jan 23, 2023
-
-
Emilio Cobos Álvarez authored
Move it to the mozilla::widget namespace. Use enum classes for transparency, popup type, popup level, etc. Mostly automated with sed, but there were a few manual changes required as well in windows code because they relied on Atomic<TransparencyMode> working (which now doesn't because TransparencyMode is 1 byte instead of 4 bytes). Differential Revision: https://phabricator.services.mozilla.com/D167537
-
Iulian Moraru authored
Backed out changeset f9a25f51a254 (bug 1811487) for causing bc failures related to PanelMultiView. CLOSED TREE
-
Emilio Cobos Álvarez authored
I'm about to extend them for bug 1811486, where I want to force in some cases the rolled up popups to hide synchronously. These APIs use a ton of boolean arguments that make them error prone, so refactor them a bit to use strongly typed enums and flags. Differential Revision: https://phabricator.services.mozilla.com/D167381
-
Butkovits Atila authored
Backed out 2 changesets (bug 1811487) for causing failures at browser_PanelMultiView_keyboard.js. CLOSED TREE Backed out changeset 88c5316c2183 (bug 1811487) Backed out changeset 6350911c1c8d (bug 1811487)
-
Emilio Cobos Álvarez authored
I'm about to extend them for bug 1811486, where I want to force in some cases the rolled up popups to hide synchronously. These APIs use a ton of boolean arguments that make them error prone, so refactor them a bit to use strongly typed enums and flags. Differential Revision: https://phabricator.services.mozilla.com/D167381
-
- Nov 29, 2022
-
-
Botond Ballo authored
Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato Where appropriate, `#include "Layers.h"` is replaced with more specific inclusions. Differential Revision: https://phabricator.services.mozilla.com/D162934
-
- Nov 23, 2022
-
-
Emilio Cobos Álvarez authored
If all goes well this should also fix bug 1784760... Differential Revision: https://phabricator.services.mozilla.com/D162773
-
Emilio Cobos Álvarez authored
If all goes well this should also fix bug 1784760... Differential Revision: https://phabricator.services.mozilla.com/D162773
-
- Sep 01, 2022
-
-
Emilio Cobos Álvarez authored
Only GeckoMVMContext really needs the flush, to measure scrolled height afterwards. Do that explicitly. This shouldn't change behavior, for the most part; there was a preload test that relied on the flush when changing DPI to start a run really clean, but other than that this looks green on try. Should at best be neutral (just code clean-up), or be a performance improvement. In a follow-up, we can possibly remove the DelayedResize code from the view manager, though I need to think how to possibly coalesce the MVM reflows, so let's not do that yet. Differential Revision: https://phabricator.services.mozilla.com/D155385
-
- Aug 30, 2022
-
-
Emilio Cobos Álvarez authored
Otherwise, it changes the move-to-rect inputs, which can change the output as well, making us move the anchor all the way to the right. You could, I guess, consider this a mutter bug of sorts, because it feels weird that you pass it an anchor that has been a `move-to-rect` output and you get another rect as an output. But also, it's kinda silly that we're doing that to begin with, so avoid it by telling the popup frame whether it's been positioned / moved by move-to-rect (and keeping the anchor in that case). The reason this works on my setup without "Large text" is just dumb luck (the front-end computes a max-height for the panel that is small enough to fit on the screen). Differential Revision: https://phabricator.services.mozilla.com/D155406
-
- Aug 29, 2022
-
-
Sandor Molnar authored
Backed out changeset bb1d2a4a5570 (bug 1786525) for causing build bustages in xpfe/appshell/AppWindow.cpp CLOSED TREE
-
Emilio Cobos Álvarez authored
Otherwise, it changes the move-to-rect inputs, which can change the output as well, making us move the anchor all the way to the right. You could, I guess, consider this a mutter bug of sorts, because it feels weird that you pass it an anchor that has been a `move-to-rect` output and you get another rect as an output. But also, it's kinda silly that we're doing that to begin with, so avoid it by telling the popup frame whether it's been positioned / moved by move-to-rect (and keeping the anchor in that case). The reason this works on my setup without "Large text" is just dumb luck (the front-end computes a max-height for the panel that is small enough to fit on the screen). Differential Revision: https://phabricator.services.mozilla.com/D155406
-
- Aug 26, 2022
-
-
Cristian Tuns authored
Backed out changeset e29b0fbf77f1 (bug 1786513) for causing mochitest failures on /browser_unified_extensions.js CLOSED TREE
-
Emilio Cobos Álvarez authored
Only GeckoMVMContext really needs the flush, to measure scrolled height afterwards. Do that explicitly. This shouldn't change behavior, for the most part; there was a preload test that relied on the flush when changing DPI to start a run really clean, but other than that this looks green on try. Should at best be neutral (just code clean-up), or be a performance improvement. In a follow-up, we can possibly remove the DelayedResize code from the view manager, though I need to think how to possibly coalesce the MVM reflows, so let's not do that yet. Differential Revision: https://phabricator.services.mozilla.com/D155385
-
- Jun 29, 2022
-
-
Nika Layzell authored
Bug 1758115 - Part 2: Streamline locking, initialization and shutdown for TimelineConsumers, r=smaug The current implementation of TimelineConsumers contains some unnecessary complexity due to how it is initialized as a singleton, and the need for it to be initialized and used in a threadsafe way. This patch attempts to simplify it by making all members static, and removing the need to explicitly observe shutdown for cleanup. In addition, this approach avoids the risk of the type being accessed from off-main-thread during initialization or shutdown. Depends on D150442 Differential Revision: https://phabricator.services.mozilla.com/D150443
-
- Jun 03, 2022
-
-
Emilio Cobos Álvarez authored
Use inline initializers, remove dead code, use consistent naming. No behavior change. Differential Revision: https://phabricator.services.mozilla.com/D148209
-
- Oct 21, 2021
-
-
Emilio Cobos Álvarez authored
Differential Revision: https://phabricator.services.mozilla.com/D129160
-
- Oct 18, 2021
-
-
stransky authored
Differential Revision: https://phabricator.services.mozilla.com/D128749
-
- Oct 17, 2021
-
-
Jeff Muizelaar authored
This adds a bunch of #include "WindowRenderer.h" in places that were getting it implicitly before. Differential Revision: https://phabricator.services.mozilla.com/D128687
-
- Oct 05, 2021
-
-
Nicolas Silva authored
Bug 1690619 - Keep track of where the request to rendering something comes from. r=gfx-reviewers,mstange This patch adds plumbing to keep track of why we request frames to be rendered. This information is then displayed in gecko profile markers on the renderer thread as well as in profiler HUD counters (See "Render reasons" in profiler.rs). Differential Revision: https://phabricator.services.mozilla.com/D127274
-
- Oct 01, 2021
-
-
Daniel Holbert authored
Bug 1733701: Remove REQUIRES_UNIFIED_BUILD from view/moz.build, since it builds just fine in non-unified mode. r=tnikkel Differential Revision: https://phabricator.services.mozilla.com/D127328
-
Daniel Holbert authored
This lets us remove the last explicit 'delete' invocation from the /view subdirectory. Hooray! As part of this change, I'm also updating the getter for this member-var to return a reference instead of a pointer, since it's infallible. Differential Revision: https://phabricator.services.mozilla.com/D127187
-
Daniel Holbert authored
Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so that we don't have to manually delete it. r=tnikkel This removes an explicit 'delete', by letting the StaticAutoPtr type handle the deletion for us automatically and atomically when we clear its value. Benefits/justification: * This reduces the potential for double-free bugs. * This matches existing patterns elsewhere in our code (search for e.g. "StaticAutoPtr<nsTArray") * This reduces (by 1) the number of explicit `delete` calls that we need to consider, when auditing the codebase for potential memory safety issues. Differential Revision: https://phabricator.services.mozilla.com/D127185
-
Daniel Holbert authored
Bug 1733465 part 2: Modernize nsViewManager::GetRootWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel This patch shouldn't change behavior at all. This patch replaces a manual NS_ADDREF call with typesafe code that manages the reference count for us. This reduces repeated boilerplate code, in the implementation as well as the callsites. Differential Revision: https://phabricator.services.mozilla.com/D127179
-
Daniel Holbert authored
Bug 1733465 part 1: Store nsViewManager::mRootViewManager in a RefPtr instead of manually managing its reference count. r=tnikkel This patch is just a refactoring which shouldn't change behavior. Before this patch, mRootViewManager is a bit of an odd hybrid in terms of its ownership semantics. If it's pointing to `this`, then it's not an owning reference (i.e. we don't AddRef or Release it), vs. if it's pointing to some other instance, then it *is* an owning reference (i.e. we *do* AddRef and Release it). After this patch, we change things such that it's unconditionally an owning reference, with a null value having special meaning. In particular: (a) Now, we'll store it in a RefPtr and let that manage the reference counting. (b) Now, we'll never explicitly assign it to 'this'; instead, we set it to null and we interpret a null value as an indication that 'this' is the root. Fortunately, this variable doesn't have many direct usages, so this slight change in meaning/invariatnts doesn't require very much code to be updated. This variable is mostly used via the infallible RootViewManager() getter. This patch updates that getter in accordance with the new contract, and the callers don't need to worry about this change. Differential Revision: https://phabricator.services.mozilla.com/D127178
-
Sandor Molnar authored
Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE Backed out changeset 4c5b28b66740 (bug 1733465) Backed out changeset 3db0452b185c (bug 1733465) Backed out changeset d7460c9c6acb (bug 1733465) Backed out changeset 3cee3f595e45 (bug 1733465) Backed out changeset 267d5fc92f12 (bug 1733465)
-
Daniel Holbert authored
This lets us remove the last explicit 'delete' invocation from the /view subdirectory. Hooray! As part of this change, I updated the getter for this member-var to return a "const UniquePtr&" instead of a raw pointer, per this recommendation in UniquePtr.h: https://searchfox.org/mozilla-central/rev/7539ad54ddc720a0553efd07ca681b9a409f9887/mfbt/UniquePtr.h#171-173 (Fortunately the getter only has two callers, so they were easy to fix.) I also changed the name of the getter to drop "Get", per our convention that getters can hint at infallibility by the absence of "Get". Depends on D127185 Differential Revision: https://phabricator.services.mozilla.com/D127187
-
Daniel Holbert authored
Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so that we don't have to manually delete it. r=tnikkel This removes an explicit 'delete', by letting the StaticAutoPtr type handle the deletion for us automatically and atomically when we clear its value. Benefits/justification: * This reduces the potential for double-free bugs. * This matches existing patterns elsewhere in our code (search for e.g. "StaticAutoPtr<nsTArray") * This reduces (by 1) the number of explicit `delete` calls that we need to consider, when auditing the codebase for potential memory safety issues. Depends on D127180 Differential Revision: https://phabricator.services.mozilla.com/D127185
-
Daniel Holbert authored
Bug 1733465 part 2: Modernize nsViewManager::GetWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel This patch shouldn't change behavior at all. This patch replaces a manual NS_ADDREF call with typesafe code that manages the reference count for us. This reduces repeated boilerplate code, in the implementation as well as the callsites. Differential Revision: https://phabricator.services.mozilla.com/D127179
-
Daniel Holbert authored
Bug 1733465 part 1: Store nsViewManager::mRootViewManager in a RefPtr instead of manually managing its reference count. r=tnikkel This patch is just a refactoring which shouldn't change behavior. Before this patch, mRootViewManager is a bit of an odd hybrid in terms of its ownership semantics. If it's pointing to `this`, then it's not an owning reference (i.e. we don't AddRef or Release it), vs. if it's pointing to some other instance, then it *is* an owning reference (i.e. we *do* AddRef and Release it). After this patch, we change things such that it's unconditionally an owning reference, with a null value having special meaning. In particular: (a) Now, we'll store it in a RefPtr and let that manage the reference counting. (b) Now, we'll never explicitly assign it to 'this'; instead, we set it to null and we interpret a null value as an indication that 'this' is the root. Fortunately, this variable doesn't have many direct usages, so this slight change in meaning/invariatnts doesn't require very much code to be updated. This variable is mostly used via the infallible RootViewManager() getter. This patch updates that getter in accordance with the new contract, and the callers don't need to worry about this change. Differential Revision: https://phabricator.services.mozilla.com/D127178
-
- Sep 22, 2021
-
-
Matt Woodrow authored
Differential Revision: https://phabricator.services.mozilla.com/D125800
-
Matt Woodrow authored
Differential Revision: https://phabricator.services.mozilla.com/D125797
-
Matt Woodrow authored
PaintFrame only uses the input region if !WidgetLayers, which Paint always passes. Differential Revision: https://phabricator.services.mozilla.com/D125795
-