Граф коммитов

1683 Коммитов

Автор SHA1 Сообщение Дата
Adam Brouwers-Harries a26eafe5c3 Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-24 15:18:12 +00:00
Narcis Beleuzu 948c7279ee Backed out changeset 714aaf6484fb (bug 1421651) for causing Bug 1860719. CLOSED TREE 2023-10-24 17:31:02 +03:00
Adam Brouwers-Harries 4cdf967b4e Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-23 13:55:50 +00:00
Emilio Cobos Álvarez 813ca5b3b9 Bug 1855763 - Automatic fixes to avoid using prefixed transforms in tests. r=layout-reviewers,jfkthame
Using the script in comment 5, excluding third-party directories.

Differential Revision: https://phabricator.services.mozilla.com/D189760
2023-10-02 12:36:17 +00:00
Timothy Nikkel d4712d5e3e Bug 1837960. Remove array of all nsViewManagers. r=emilio
The only thing it's used for is calling will paint on a document tree. To iterate every viewmanager looking for those in one document tree is a bit silly, we can just walk the view tree. Since there are only 3 types of views (root views, popup views for menupopupframes, and subdocument frame views (and their inner view)) we don't have to walk many pointers: menupopupframes are controlled by chrome code and are limited, and the other two types of views correspond to the number of view managers in the tree (one view manager per document).

Differential Revision: https://phabricator.services.mozilla.com/D180677
2023-06-22 09:38:27 +00:00
Emilio Cobos Álvarez 7fd5088695 Bug 1824986 - Use element more in popup manager code. r=mstange
We know these are elements, take advantage of that.

Depends on D173836

Differential Revision: https://phabricator.services.mozilla.com/D173837
2023-03-28 14:33:19 +00:00
Emilio Cobos Álvarez 87568139b1 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
2023-02-06 12:28:47 +00:00
Makoto Kato a81830ccdb 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
2023-02-06 04:51:26 +00:00
Emilio Cobos Álvarez 2e7a582438 Bug 1813960 - Move nsContainerFrame::SyncWindowProperties to PresShell. r=smaug
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
2023-02-02 13:37:02 +00:00
Emilio Cobos Álvarez 61b953b167 Bug 1813148 - Don't return already_AddRefed in nsPresContext::GetRootWidget. r=dholbert
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
2023-01-27 19:50:59 +00:00
Emilio Cobos Álvarez 46dd8a0d40 Bug 1811487 - Clean-up popup hide / rollup APIs. r=cmartin,stransky
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
2023-01-24 15:43:49 +00:00
Emilio Cobos Álvarez 4fa60b3b58 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
2023-01-24 11:24:48 +00:00
Emilio Cobos Álvarez 9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
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
2023-01-23 23:58:41 +00:00
Iulian Moraru a713f3dd73 Backed out changeset f9a25f51a254 (bug 1811487) for causing bc failures related to PanelMultiView. CLOSED TREE 2023-01-23 21:11:43 +02:00
Emilio Cobos Álvarez e8d9ad8d88 Bug 1811487 - Clean-up popup hide / rollup APIs. r=cmartin
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
2023-01-23 16:15:00 +00:00
Butkovits Atila 8ee1c95687 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)
2023-01-23 16:18:50 +02:00
Emilio Cobos Álvarez 5c3fc07c2e Bug 1811487 - Clean-up popup hide / rollup APIs. r=cmartin
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
2023-01-23 11:58:25 +00:00
Botond Ballo 68c71a503c 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
2022-11-29 01:52:03 +00:00
Emilio Cobos Álvarez 2827a17b6f Bug 1800992 - Invalidate frame in nsView::WindowResized. r=tnikkel
If all goes well this should also fix bug 1784760...

Differential Revision: https://phabricator.services.mozilla.com/D162773
2022-11-23 06:45:41 +00:00
Emilio Cobos Álvarez f32093456d Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
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
2022-09-01 10:54:24 +00:00
Emilio Cobos Álvarez fb6380190c Bug 1786525 - Don't update untransformed anchor rect when moved by move-to-rect. r=stransky
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
2022-08-30 09:30:27 +00:00
Sandor Molnar 9d7f9853a2 Backed out changeset bb1d2a4a5570 (bug 1786525) for causing build bustages in xpfe/appshell/AppWindow.cpp CLOSED TREE 2022-08-30 01:26:00 +03:00
Emilio Cobos Álvarez cf74fba975 Bug 1786525 - Don't update untransformed anchor rect when moved by move-to-rect. r=stransky
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
2022-08-29 21:47:34 +00:00
Cristian Tuns 24652e5425 Backed out changeset e29b0fbf77f1 (bug 1786513) for causing mochitest failures on /browser_unified_extensions.js CLOSED TREE 2022-08-26 11:11:46 -04:00
Emilio Cobos Álvarez 7c34c8de9a Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
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
2022-08-26 12:58:12 +00:00
Nika Layzell 8f236832ff 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
2022-06-29 15:01:51 +00:00
Emilio Cobos Álvarez b44d1c0376 Bug 1772432 - Clean up nsWidgetInitData. r=stransky
Use inline initializers, remove dead code, use consistent naming.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D148209
2022-06-03 09:41:39 +00:00
Emilio Cobos Álvarez c818031a2d Bug 1737044 - Include pointer and frame in nsWindow logging. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129160
2021-10-21 14:02:30 +00:00
stransky 1ceca373dc Bug 1736377 [Linux] Remove mIsTopLevel as it's always true, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D128749
2021-10-18 18:43:30 +00:00
Jeff Muizelaar f76f41feb4 Bug 1736236 - Remove obsolete LayerManager.h. r=gfx-reviewers,lsalzman
This adds a bunch of #include "WindowRenderer.h" in places
that were getting it implicitly before.

Differential Revision: https://phabricator.services.mozilla.com/D128687
2021-10-17 23:00:47 +00:00
Nicolas Silva cb6ac0df62 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
2021-10-05 12:54:39 +00:00
Daniel Holbert 01428ac83b 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
2021-10-01 22:12:13 +00:00
Daniel Holbert 582d90dd75 Bug 1733465 part 5: Store nsView::mDirtyRegion in a UniquePtr rather than a raw pointer. r=tnikkel
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
2021-10-01 20:38:11 +00:00
Daniel Holbert 1d08981c37 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
2021-10-01 20:38:10 +00:00
Daniel Holbert ed93bd5007 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
2021-10-01 20:38:09 +00:00
Daniel Holbert bfb72ec419 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
2021-10-01 20:38:09 +00:00
Sandor Molnar 325902a5b7 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)
2021-10-01 19:13:59 +03:00
Daniel Holbert cf5b13f1b0 Bug 1733465 part 5: Store nsView::mDirtyRegion in a UniquePtr rather than a raw pointer. r=tnikkel
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
2021-10-01 14:37:07 +00:00
Daniel Holbert cc225890bf 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
2021-10-01 14:37:06 +00:00
Daniel Holbert 5b203843bc 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
2021-10-01 14:37:05 +00:00
Daniel Holbert f086f76b08 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
2021-10-01 14:37:05 +00:00
Matt Woodrow 2572ff38a4 Bug 1725267 - Split Paint entry points to make them easier to understand. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125800
2021-09-22 03:36:52 +00:00
Matt Woodrow 74122b5d9d Bug 1725267 - Remove PresShell::Composite. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125797
2021-09-22 03:36:50 +00:00
Matt Woodrow 9773c606a4 Bug 1725267 - Remove unused region from PresShell::Paint. r=tnikkel
PaintFrame only uses the input region if !WidgetLayers, which Paint always passes.

Differential Revision: https://phabricator.services.mozilla.com/D125795
2021-09-22 03:36:50 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Gijs Kruitbosch d90c0bb57f Bug 1724718 - skip some XUL-y tests on android, r=emilio,agi
Depends on D122663

Differential Revision: https://phabricator.services.mozilla.com/D122664
2021-08-19 12:13:01 +00:00
Matt Woodrow 4b6db2ad05 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-08-05 06:48:34 +00:00
Matt Woodrow 9b81728dc2 Bug 1722258 - Split out fallible composite-only path of PresShell::Paint. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120919
2021-08-05 06:48:33 +00:00
Mike Hommey 03223f9ea4 Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi
Differential Revision: https://phabricator.services.mozilla.com/D121066
2021-07-29 23:38:31 +00:00
Csoregi Natalia bc4c680c8d Backed out 3 changesets (bug 1722258) for causing Bug 1722935. a=backout
Backed out changeset cf8a1175abd1 (bug 1722258)
Backed out changeset 41176d476eb7 (bug 1722258)
Backed out changeset 4149d596d03d (bug 1722258)
2021-07-29 20:19:48 +03:00