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

2589 Коммитов

Автор 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
Edgar Chen 45da1c12ad Bug 1706316 - Part 1: Remove nsIEmbeddingSiteWindow::setFocus; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D112739
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
Neil Deakin 54687b47ef Bug 1701668, remove nsIWebBrowserChrome3 interface, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110103
2021-04-06 18:52:47 +00:00
Neil Deakin 54284e502d Bug 1701668, remove shouldLoadURI and shouldLoadURIInThisProcess methods now that all implementers return true, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110101
2021-04-06 18:52:46 +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
Agi Sferro 111343732d Bug 1694481 - Remove unused code from exthandler/android. r=droeh,esawin
Differential Revision: https://phabricator.services.mozilla.com/D106182
2021-03-10 22:43:08 +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
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +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
Andrew McCreight 9cc98c8bf5 Bug 1539948, part 2 - Make nsIWebNavigation and nsIWindowlessBrowser builtinclass. r=nika,Gijs
These two interfaces contain nostdcall methods, so they should be marked
builtinclass.

There is a JS implementation of nsIWebNavigation in RemoteWebNavigation,
but it appears to never be passed into C++, so it doesn't need to be
made into a "real" implementation of nsIWebNavigation that can be passed
through XPConnect.

Differential Revision: https://phabricator.services.mozilla.com/D98862
2020-12-09 02:40:14 +00:00
Razvan Maries 35ccea0325 Backed out 3 changesets (bug 1539948) for build bustages on nsISocketTransport.h. CLOSED TREE
Backed out changeset 81bed88d0adf (bug 1539948)
Backed out changeset 8bf24bdf431f (bug 1539948)
Backed out changeset ef4e49b3701d (bug 1539948)
2020-12-09 02:47:52 +02:00
Andrew McCreight a7c299978d Bug 1539948, part 2 - Make nsIWebNavigation and nsIWindowlessBrowser builtinclass. r=nika,Gijs
These two interfaces contain nostdcall methods, so they should be marked
builtinclass.

There is a JS implementation of nsIWebNavigation in RemoteWebNavigation,
but it appears to never be passed into C++, so it doesn't need to be
made into a "real" implementation of nsIWebNavigation that can be passed
through XPConnect.

Differential Revision: https://phabricator.services.mozilla.com/D98862
2020-12-08 21:22:31 +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
Nika Layzell 9ff27adca3 Bug 1671983 - Part 1: Remove now-unused process switching shouldLoadURI methods, r=annyG,geckoview-reviewers,snorp
These methods are no longer necessary, as all loads which can trigger process
switches now go through DocumentChannel.

The shouldLoadURI methods on nsIWebBrowserChrome3 are unfortunately still
necessary as they're used by the disabled-by-default "Single-Site Browser"
feature. In the future this may be possible to clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D94638
2020-11-12 18:00:53 +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
Razvan Maries 10425eddfc Backed out 7 changesets (bug 1658084, bug 1671983) for perma failures on browser_async_remove_tab.js and browser_e10s_chrome_process.js. CLOSED TREE
Backed out changeset 2e6309c1cdbd (bug 1658084)
Backed out changeset 99aafd9304ef (bug 1671983)
Backed out changeset 80280b85280a (bug 1671983)
Backed out changeset 008db2659002 (bug 1671983)
Backed out changeset 32bd45c7fe3a (bug 1671983)
Backed out changeset 56e227e6580c (bug 1671983)
Backed out changeset a404f809f79d (bug 1671983)
2020-11-04 04:23:47 +02:00
Nika Layzell b20d2f0f1b Bug 1671983 - Part 1: Remove now-unused process switching shouldLoadURI methods, r=annyG,geckoview-reviewers,snorp
These methods are no longer necessary, as all loads which can trigger process
switches now go through DocumentChannel.

The shouldLoadURI methods on nsIWebBrowserChrome3 are unfortunately still
necessary as they're used by the disabled-by-default "Single-Site Browser"
feature. In the future this may be possible to clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D94638
2020-11-04 00:55:23 +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
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +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