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

79 Коммитов

Автор SHA1 Сообщение Дата
Olli Pettay 6c11c7aad1 Bug 1710687, null check mDocShell before using it, r=peterv
The patch is based on code inspection. SizeShell may run scripts
https://searchfox.org/mozilla-central/rev/cecdac0aa5733fee515a166b6e31e38cc58abf32/xpfe/appshell/AppWindow.cpp#1180,1182

The patch is very conservative. It keeps returning success code in the cases where it would return such without the patch and only
adds null check right before accessing mDocShell. mDebuting value stays false after the method call.

Differential Revision: https://phabricator.services.mozilla.com/D115249
2021-05-25 12:25:41 +00:00
Edgar Chen 20a141de1f Bug 1706316 - Part 2: Remove nsIBaseWindow::setFocus; r=hsivonen
Depends on D112739

Differential Revision: https://phabricator.services.mozilla.com/D112740
2021-05-10 20:05:12 +00:00
Csoregi Natalia f20340f115 Backed out changeset 49744f943e16 (bug 1682136) for putting browser window partially behind left and top taskbars on older Windows versions (bug 1705504). 2021-04-18 11:32:17 +03:00
Doug Thayer 23378a0226 Bug 1704853 - Disable skeleton UI on non-default density r=emalysz
This is a little more than we need to disable it, but I figure we'll want to
support different UI densities in the skeleton UI long term.

Differential Revision: https://phabricator.services.mozilla.com/D111906
2021-04-15 22:58:19 +00:00
Csoregi Natalia 1d1158f8b5 Backed out changeset 95865502de4b (bug 1704853) for causing bustage on AppWindow.cpp. CLOSED TREE 2021-04-16 01:47:57 +03:00
Doug Thayer c632b8a57d Bug 1704853 - Disable skeleton UI on non-default density r=emalysz
This is a little more than we need to disable it, but I figure we'll want to
support different UI densities in the skeleton UI long term.

Differential Revision: https://phabricator.services.mozilla.com/D111906
2021-04-15 22:10:43 +00:00
Masatoshi Kimura c6dccb4a09 Bug 1682136 - Allow slop when the window position is persistent and it has no parent. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109708
2021-03-29 21:41:07 +00:00
harry 036ded43ac Bug 1699506 - Part 1 - Add a NSTitlebarAccessoryViewController to ToolbarWindow to track when the titlebar is shown in fullscreen. r=mac-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D106846
2021-03-18 20:20:39 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Markus Stange 3866ebf163 Bug 1691213 - DeCOMtaminate nsINativeMenuService and rename it to mozilla::widget::NativeMenuSupport. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D104311
2021-02-11 19:43:58 +00:00
Emma Malysz 3e25955d29 Bug 1689437, respect bookmarks.toolbars.bookmarks pref values to display bookmarks toolbar in skeleton UI r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D103358
2021-02-02 20:32:51 +00:00
Doug Thayer bfdaa1612c Bug 1686301 - Report errors in skeleton UI via telemetry r=mconley,emalysz
This is, for the most part, just a large refactor of the skeleton UI stuff to
support coarse-grained error reporting via telemetry. There are a few slight
changes in how we handle some errors. For example, if CreateWindow fails, we
will now bail out and report the failure. The flow for the happy path, however,
should remain unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D102098
2021-01-26 16:10:20 +00:00
Emma Malysz 471404aa23 Bug 1686374, adjust margins if bookmarks toolbar is shown r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D101647
2021-01-22 20:59:21 +00:00
Mike Conley 43cabec511 Bug 1568133 - Wait to load MacOS app menu until l10n is ready. r=mstange
Original patch by Brendan Dahl <bdahl@mozilla.com>.

The change to nsCocoaWindow appears to be necessary because the nsMenuBarX
only seems to get created _after_ nsCocoaWindow::paintMenubarForWindow runs
for the created window, which is too late to Paint the native menu bar, but
also happens before nsCocoaWindow::sendToplevelActivateEvents runs, which
is too early for the nsCocoaWindow::SetMenuBar code's check for
toplevelActiveState on the WindowDelegate to return true.

So instead of checking for the toplevelActiveState, we now check if the
window for the newly created nsMenuBarX is the main window, and if so,
then we Paint it.

Differential Revision: https://phabricator.services.mozilla.com/D46202
2021-01-18 18:25:51 +00:00
Emma Malysz 3fa05e5db6 Bug 1671603: display skeleton ui elements in correct position when RTL is enabled r=dthayer
Stores the value of intl.uidirection in the registry

Differential Revision: https://phabricator.services.mozilla.com/D99559
2020-12-22 17:22:07 +00:00
Emma Malysz 3f3b02f520 Bug 1677185, update margins in skeleton UI if menubar is shown r=dthayer
The menubar is permanently shown if autohide is false. If that is the case, we
insert space above the tab and ensure the tab does not have a left margin.
It's height can change, so we store the height in our registry.

Differential Revision: https://phabricator.services.mozilla.com/D97195
2020-12-10 20:29:03 +00:00
Simon Giesecke e06a2d56fc Bug 1680269 - Fix build when building without MOZ_GECKO_PROFILER. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D99063
2020-12-09 08:58:06 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Henri Sivonen 96ae695458 Bug 1618386 - Add action ids to filter out stale active browsing context updates. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94969
2020-11-16 19:16:20 +00:00
Emma Malysz 21991a311d Bug 1670957, add placeholder rectangles for toolbarbuttons and display in skeleton UI r=dthayer,smaug,Gijs
If a searchbar is present, draw that similar to a urlbar.
This also changes how we store the urlbar, as we know will use our custom struct
to cleanly store the width and height.

Differential Revision: https://phabricator.services.mozilla.com/D95029
2020-11-10 16:48:10 +00:00
Doug Thayer 30478629cf Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 19:04:02 +00:00
Butkovits Atila 304bfab038 Backed out 2 changesets (bug 1666874, bug 1665455) for causing bustage on PreXULSkeletonUI.cpp. CLOSED TREE
Backed out changeset 967c4cf56fd2 (bug 1666874)
Backed out changeset e46238e6aabf (bug 1665455)
2020-10-29 16:57:35 +02:00
Doug Thayer 38c0351ae3 Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 14:09:54 +00:00
Emma Malysz 7529feec30 Bug 1665460: save urlbar position to registry and display in skeleton UI r=dthayer,smaug
If the urlbar is zoomed (defined by attribute breakout-extend), then we
scale it down to the unfocused coordinate values.

Differential Revision: https://phabricator.services.mozilla.com/D92303
2020-10-27 15:53:38 +00:00
Edgar Chen 2a18e0fc77 Bug 1667081 - Part 3: Remove windowLowered in nsIFocusManager; r=hsivonen
And make nsFocusManager::WindowLowered just returning void given all caller
doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91289
2020-09-29 07:21:34 +00:00
Edgar Chen 6bf9a2e159 Bug 1667081 - Part 2: Remove windowRaised in nsIFocusManager; r=hsivonen
And make nsFocusManager::WindowRaised just returning void given all caller
doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91288
2020-09-29 07:21:22 +00:00
Bogdan Tara 8f6c53bdf5 Backed out 9 changesets (bug 1667081) for assertion failure on nsFocusManager CLOSED TREE
Backed out changeset 156ab3eba505 (bug 1667081)
Backed out changeset 2e37f347082c (bug 1667081)
Backed out changeset 8f59cef879ae (bug 1667081)
Backed out changeset 1298ff140218 (bug 1667081)
Backed out changeset 91342c822425 (bug 1667081)
Backed out changeset aafb1878c590 (bug 1667081)
Backed out changeset 2252e975f0d7 (bug 1667081)
Backed out changeset c3bac5f407d2 (bug 1667081)
Backed out changeset b1e6e81396ae (bug 1667081)
2020-09-28 20:02:52 +03:00
Edgar Chen 0a849192c3 Bug 1667081 - Part 3: Remove windowLowered in nsIFocusManager; r=hsivonen
This patch also does following changes,
- Assert aWindow instead of early return given all caller passes a non-null window.
- Make it returning void given all caller doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91289
2020-09-28 14:04:37 +00:00
Edgar Chen a60331bed5 Bug 1667081 - Part 2: Remove windowRaised in nsIFocusManager; r=hsivonen
This patch also does following changes,
- Assert aWindow instead of early return given all caller passes a non-null window.
- Make it returning void given all caller doesn't actaully check the return value.

Differential Revision: https://phabricator.services.mozilla.com/D91288
2020-09-28 14:04:25 +00:00
Doug Thayer acd22d7041 Bug 1665453 - Rename EarlyBlankWindow to PreXULSkeletonUI r=agashlin
This is just a more correct name for what's going on.

Differential Revision: https://phabricator.services.mozilla.com/D91004
2020-09-24 14:25:56 +00:00
Doug Thayer cb7d215459 Bug 1665456 - Ensure window focus received for skele UI window r=mhowell
Because we create our initial window much earlier, we do not receive the
initial activation and focus messages in the same way. Accordingly, we
need to refocus the window once everything is properly set up to handle
it.

Regarding testing, the intent is that this will be covered by existing
tests, since this is not intended to be a behavioral change for window
focus. It is not covered by tests currently only because the skele UI
is disabled by default.

Depends on D90467

Differential Revision: https://phabricator.services.mozilla.com/D90607
2020-09-18 16:40:30 +00:00
Doug Thayer fa7b10106a Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-09-15 14:50:19 +00:00
Dorel Luca 634b687351 Backed out 4 changesets (bug 1656526) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset 24648c48a49c (bug 1656526)
Backed out changeset 472b724994eb (bug 1656526)
Backed out changeset 6fbb7e7ac121 (bug 1656526)
Backed out changeset 88ff36a4bcfb (bug 1656526)
2020-09-11 23:17:23 +03:00
Doug Thayer efe700e222 Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-09-11 14:12:00 +00:00
Razvan Maries 6742cf83d7 Backed out 2 changesets (bug 1656526) for build bustages on EarlyBlankWindow.cpp. CLOSED TREE
Backed out changeset b6d3b254ae8c (bug 1656526)
Backed out changeset abdc9c22078c (bug 1656526)
2020-08-18 19:10:37 +03:00
Doug Thayer b5e46bb95c Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-08-18 15:31:28 +00:00
Edgar Chen 86341ec4ef Bug 1653214 - Part 2: Remove nsIBaseWindow::Create; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83767
2020-07-16 20:42:20 +00:00
Edgar Chen beeae4cb08 Bug 1653214 - Part 1: Merge implementations of nsDocShell::Create into nsDocShell::InitWindow; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83766
2020-07-16 20:42:02 +00:00
Edgar Chen 992cce2a73 Bug 1653124 - Use nsDocShell directly in AppWindow; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83714
2020-07-16 20:41:45 +00:00
Xidorn Quan f62edc3be9 Bug 1350875 part 6 - Wait for window resize for one frame after window goes fullscreen. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D68682
2020-07-15 12:21:45 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Gijs Kruitbosch f5a71f797d Bug 1644212 - reintroduce an attribute to limit which windows allow full screen, r=xidorn,haik
Differential Revision: https://phabricator.services.mozilla.com/D79109
2020-06-15 15:51:48 +00:00
Kashav Madan 2b8ca16f35 Bug 1557407 - Replace DispatchTrustedEvent with DispatchEventOnlyToChrome for various chrome-only events, r=smaug
Adds an |aChromeOnlyDispatch| flag to DispatchCustomEvent to decide whether
to call DispatchTrustEvent or DispatchEventOnlyToChrome.

The following chrome-only events are dispatched with DispatchCustomEvent and now
make use of the flag:

- DOMWindowClose
- fullscreen / willenterfullscreen / willexitfullscreen
- occlusionstatechange
- resolutionchange
- XULAlertClose

and the following were previously dispatched with DispatchTrustedEvent and now
use DispatchEventOnlyToChrome:

- MozBeforeInitialXULLayout
- MozMouseScrollFailed / MozMouseScrollTransactionTimeout
- MozPaintWait / MozPaintWaitFinished
- MozPerformDelayedBlur
- all events fired by APZCCallbackHelper::NotifyMozMouseScrollEvent

Differential Revision: https://phabricator.services.mozilla.com/D76723
2020-06-01 17:11:48 +00:00
Xidorn Quan 7a3b759abb Bug 1276537 part 2 - Remove nsIWidget::SetShowsFullScreenButton. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D74555
2020-05-15 06:19:14 +00:00
Nika Layzell 4f3a5448c4 Bug 1580565 - Part 3: Simplify API for creating independent BCs, r=farre
There were previously a number of different APIs for creating BrowsingContext
instances. This simplifies them into two major cases: "CreateDetached", which
allows for creating BrowsingContexts which are related to other
BrowsingContexts, and "CreateIndependent" which creates new, fully unrelated,
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D71237
2020-04-24 18:33:01 +00:00
Narcis Beleuzu fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
Nika Layzell 989454dc24 Bug 1580565 - Part 3: Simplify API for creating independent BCs, r=farre
There were previously a number of different APIs for creating BrowsingContext
instances. This simplifies them into two major cases: "CreateDetached", which
allows for creating BrowsingContexts which are related to other
BrowsingContexts, and "CreateIndependent" which creates new, fully unrelated,
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D71237
2020-04-23 21:52:44 +00:00
Narcis Beleuzu 40e3519c0b Backed out changeset 83d45c7359ac (bug 924456) for assertion failure: nsContentUtils::IsSafeToRunScript() . CLOSED TREE 2020-04-23 23:05:05 +03:00
Michael Kaply b494157695 Bug 924456 - Ensure that MozAfterPaint events are not fired before the window is completely visible. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D10957
2020-04-21 20:27:13 +00:00