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

1196 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Emilio Cobos Álvarez 575ef5e7bd Bug 1775797 - Make resizers use frame-relative coordinates. r=TYLin
We no longer use the same code to resize windows and so (bug 1694061),
so keeping screen-relative coordinates is not really needed.

Instead, keep the size of the resized element around and do the math in
frame-relative coordinates, which is better behavior in presence of CSS
transforms.

Differential Revision: https://phabricator.services.mozilla.com/D150058
2022-06-28 08:33:06 +00:00
Andi-Bogdan Postelnicu a933f9df8f Bug 1519636 - Reformat recent changes to the Google coding style. r=marco
Updated with clang-format version 14.0.5 (taskcluster-YlgDNB2QSm-6a2LDw3kj6A)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D150093
2022-06-23 09:27:12 +00:00
Kris Maglione 27515a3d83 Bug 1770237: Part 17 - Rename mozJSComponentLoader to mozJSModuleLoader r=mccr8,decoder
Differential Revision: https://phabricator.services.mozilla.com/D148197
2022-06-22 20:31:37 +00:00
Emilio Cobos Álvarez 255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Emilio Cobos Álvarez 23b07c1867 Bug 1694061 - Simplify XULResizerElement by removing the window resizing path which is dead code. r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D105988
2022-06-07 09:38:23 +00:00
Mats Palmgren 6b2f046373 Bug 1590376 part 1 - Add a XULResizerElement and move all nsResizerFrame's event handling code there. r=ntim,smaug
I'm mostly moving the code verbatim, but I excluded a few bits
that handled resizers inside menu popup frames, e.g.
https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/layout/xul/nsResizerFrame.cpp#165-170
I don't think we need that functionallity anymore and it
simplifies the code to exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D105926
2022-06-07 09:30:01 +00:00
Butkovits Atila e3b4113a08 Backed out 4 changesets (bug 1694056, bug 1590376) for causing failures at test_resizer_ctrl_click.xhtml. CLOSED TREE
Backed out changeset 656906f99173 (bug 1590376)
Backed out changeset 15e9b4e9070c (bug 1694056)
Backed out changeset f137d6e73641 (bug 1590376)
Backed out changeset 00ed65f43cb2 (bug 1590376)
2022-06-07 02:12:40 +03:00
Emilio Cobos Álvarez 0ef907628c Bug 1590376 - Add missing include to un-bust non-unified builds.
MANUAL PUSH: Trivial fix CLOSED TREE
2022-06-06 23:24:22 +02:00
Mats Palmgren 17801441dd Bug 1590376 part 1 - Add a XULResizerElement and move all nsResizerFrame's event handling code there. r=ntim,smaug
I'm mostly moving the code verbatim, but I excluded a few bits
that handled resizers inside menu popup frames, e.g.
https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/layout/xul/nsResizerFrame.cpp#165-170
I don't think we need that functionallity anymore and it
simplifies the code to exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D105926
2022-06-06 20:00:45 +00:00
Kagami Sascha Rosylight 3d0e3d5413 Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148283
2022-06-05 20:55:00 +00:00
Masayuki Nakano 728f08af35 Bug 1680611 - part 8: Mark `nsFocusManager::Blur` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D147067
2022-05-26 04:37:20 +00:00
Kagami Sascha Rosylight 9d5386b0ce Bug 1769290 - Part 2: Apply mozilla-js-handle-rooted-typedef against dom/bindings r=edgar
Changes done by `./mach static-analysis check --checks="-*,mozilla-js-handle-rooted-typedef" --fix --header-filter=dom dom/bindings; ./mach clang-format --outgoing`.

Differential Revision: https://phabricator.services.mozilla.com/D146439
2022-05-18 08:43:09 +00:00
Andrew McCreight fa8bfd1245 Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D146457
2022-05-17 20:24:19 +00:00
Kagami Sascha Rosylight d0bdf18a0b Bug 1768189 - Part 46: Apply modernize-concat-nested-namespaces to dom/xslt/xpath/XPathResult.h ... r=andi
Depends on D145781

Differential Revision: https://phabricator.services.mozilla.com/D145782
2022-05-09 20:41:21 +00:00
Tooru Fujisawa 6ea9c3b12c Bug 1752209 - Put cahe type into the cache key in StartupCache/ScriptPreloader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D143576
2022-04-13 14:08:07 +00:00
Tooru Fujisawa 4de0e49a0d Bug 1752212 - Part 1: Pass loader type to PathifyURI. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D143574
2022-04-13 14:08:06 +00:00
criss 1d40b54278 Backed out 3 changesets (bug 1752209, bug 1752212) for causing build bustages on nsXULPrototypeCache.cpp. CLOSED TREE
Backed out changeset 8f10b666008a (bug 1752209)
Backed out changeset 557c428fb6bc (bug 1752212)
Backed out changeset e38fbd381ed3 (bug 1752212)
2022-04-13 16:09:50 +03:00
Tooru Fujisawa 1e3e102680 Bug 1752209 - Put cahe type into the cache key in StartupCache/ScriptPreloader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D143576
2022-04-13 11:41:11 +00:00
Tooru Fujisawa 7f252a9982 Bug 1752212 - Part 1: Pass loader type to PathifyURI. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D143574
2022-04-13 11:41:10 +00:00
Tooru Fujisawa 3d1f0dca19 Bug 1764231 - Remove unused JS version from nsXULPrototypeScript::Serialize. r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D143443
2022-04-12 21:25:21 +00:00
Emilio Cobos Álvarez 8edd7b11cf Bug 1762152 - Remove XULPopupElement.isAnchored. r=Gijs
On Wayland popup flipping and such is not Firefox's responsibility.

Once we've decided the final popup position because the compositor told
us, we move the popup to a fixed position, and internally the popup
becomes unanchored.

Using this boolean to make decisions after the initial popuppositioned
event is wrong, so avoid exposing it to JS.

Differential Revision: https://phabricator.services.mozilla.com/D142679
2022-04-04 13:29:30 +00:00
Emilio Cobos Álvarez dd020d602a Bug 1760342 - Remove :-moz-lwtheme-{brighttext,darktext}. r=dao,Gijs
They are just convenience for :root[lwthemetextcolor="light"] (and dark,
respectively), but they generally shouldn't be used for dark mode
theming. In the past it was the only way to do it but now we have
prefers-color-scheme.

While at it, change lwthemetextcolor to be "lwtheme-brighttext" for
consistency with similar code we have for popups etc, and move it to
_setDarkModeAttributes.

While at it, remove layout.css.moz-lwtheme.content.enabled (which is
false always, we unshipped these from content successfully).

Differential Revision: https://phabricator.services.mozilla.com/D141593
2022-03-25 14:58:59 +00:00
Emilio Cobos Álvarez 957e1363f5 Bug 1756323 - Cleanup mouse event coord code. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D139234
2022-02-21 11:53:02 +00:00
Emilio Cobos Álvarez 6ab8201db0 Bug 1755315 - Add more convenient accessors for widget screen to chrome code. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D138662
2022-02-17 16:22:58 +00:00
Peter Van der Beken 39ce6f48c0 Bug 1749935 - Remove empty nsIContentSink::WillBuildModel/DidBuildModel implementations. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135845
2022-02-14 13:03:46 +00:00
Peter Van der Beken 8573e064a2 Bug 1749935 - Mark nsIParser::WillResume(Impl) as infallible. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135836
2022-02-14 13:03:43 +00:00
Emilio Cobos Álvarez 6fb72d4a3f Bug 1754579 - Don't keep so much alive when returning DOMRects & co. r=smaug
We keep the parent alive for wrapping. It's unnecessary to keep alive
the individual element / range / etc. Pass the relevant global /
document.

Differential Revision: https://phabricator.services.mozilla.com/D138357
2022-02-10 00:38:45 +00:00
Emilio Cobos Álvarez dc4988bbd0 Bug 1729805 - Make async OpenMenu simpler/sound. r=NeilDeakin,mstange
There's only one caller of it and it's not sound: The runnable captures a
raw frame pointer etc. Instead, just do a dispatch to the main thread
and call OpenMenu there. This simplifies the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D131082
2022-01-25 21:40:22 +00:00
Emilio Cobos Álvarez d95d7abddc Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Relevant calls are here:

  https://searchfox.org/mozilla-central/rev/21a9b72545da06681db97c4b3a2a6be761f4aae5/toolkit/content/widgets/button.js#42-68

This makes sure to set the FLAG_BYKEY properly if needed, instead of passing
down raw flags to nsFocusManager. Clean up a bit while at it.

Let me know if you want a test for this, but we have tests for programmatic
focus and :focus-visible already, so my gut feeling is that testing this
particular XUL-specific change is not super-worth-it...

Differential Revision: https://phabricator.services.mozilla.com/D133690
2021-12-23 18:34:05 +00:00
Kagami Sascha Rosylight ba04f10435 Bug 1539884 - Part 22: Mark nsXULElement::ClickWithInputSource as CAN_RUN_SCRIPT r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134354
2021-12-23 16:27:20 +00:00
Kagami Sascha Rosylight 429a324f31 Bug 1539884 - Part 21: Mark nsIDOMXULCommandDispatcher::updateCommands as can_run_script r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134353
2021-12-23 16:27:20 +00:00
Noemi Erli 70d14084ab Backed out changeset 93b9da069dde (bug 1735076) for causing failures in browser_searchbar_openpopup.js CLOSED TREE 2021-12-21 21:53:42 +02:00
Emilio Cobos Álvarez 4a513d4585 Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Relevant calls are here:

  https://searchfox.org/mozilla-central/rev/21a9b72545da06681db97c4b3a2a6be761f4aae5/toolkit/content/widgets/button.js#42-68

This makes sure to set the FLAG_BYKEY properly if needed, instead of passing
down raw flags to nsFocusManager. Clean up a bit while at it.

Let me know if you want a test for this, but we have tests for programmatic
focus and :focus-visible already, so my gut feeling is that testing this
particular XUL-specific change is not super-worth-it...

Differential Revision: https://phabricator.services.mozilla.com/D133690
2021-12-21 18:22:30 +00:00
Kagami Sascha Rosylight d99a294a3b Bug 1539884 - Part 20: Mark XULBroadcastManager::ExecuteOnBroadcastHandlerFor as CAN_RUN_SCRIPT r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134111
2021-12-17 13:27:53 +00:00
Butkovits Atila b2c1e9bbef Backed out changeset de1608e5f69b (bug 1735076) for causing failures at browser_searchbar_openpopup.js. CLOSED TREE 2021-12-14 07:29:46 +02:00
Emilio Cobos Álvarez d3e3f44322 Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Relevant calls are here:

  https://searchfox.org/mozilla-central/rev/21a9b72545da06681db97c4b3a2a6be761f4aae5/toolkit/content/widgets/button.js#42-68

This makes sure to set the FLAG_BYKEY properly if needed, instead of passing
down raw flags to nsFocusManager. Clean up a bit while at it.

Let me know if you want a test for this, but we have tests for programmatic
focus and :focus-visible already, so my gut feeling is that testing this
particular XUL-specific change is not super-worth-it...

Differential Revision: https://phabricator.services.mozilla.com/D133690
2021-12-14 00:24:22 +00:00
Tooru Fujisawa aa2665dace Bug 1734098 - Part 1: Use consistent function name for off-thread stencil API. r=nbp
Make the stencil-based off-thread API names follow the convention:
  * ...OffThread
  * Finish...OffThread
  * Cancel...OffThread

This patch stack adds more functions for module/decode, with the above naming
convention.

Differential Revision: https://phabricator.services.mozilla.com/D133042
2021-12-10 04:28:25 +00:00
Iulian Moraru 777ce42897 Backed out 17 changesets (bug 1744178, bug 1734098) for causing leaks. CLOSED TREE
Backed out changeset 08070838c7d2 (bug 1734098)
Backed out changeset cfdf7ed9a5a2 (bug 1734098)
Backed out changeset 02d7ca7fc45c (bug 1734098)
Backed out changeset 7b7c59fc644b (bug 1734098)
Backed out changeset 630055366dac (bug 1734098)
Backed out changeset da83b4571cf2 (bug 1734098)
Backed out changeset 323af9d3e0e1 (bug 1734098)
Backed out changeset cf458ad5345a (bug 1734098)
Backed out changeset a85846f79eb5 (bug 1734098)
Backed out changeset 0d07931e6bc8 (bug 1734098)
Backed out changeset ffd72fa3fc59 (bug 1734098)
Backed out changeset 3174f1ecfd03 (bug 1734098)
Backed out changeset cfb19671fd4e (bug 1734098)
Backed out changeset c3b9c8221059 (bug 1734098)
Backed out changeset 532328aedaaa (bug 1734098)
Backed out changeset 48aa5ca15135 (bug 1734098)
Backed out changeset 6ca5bceb693c (bug 1744178)
2021-12-09 23:36:34 +02:00
Tooru Fujisawa 1b6fc2f4b0 Bug 1734098 - Part 1: Use consistent function name for off-thread stencil API. r=nbp
Make the stencil-based off-thread API names follow the convention:
  * ...OffThread
  * Finish...OffThread
  * Cancel...OffThread

This patch stack adds more functions for module/decode, with the above naming
convention.

Differential Revision: https://phabricator.services.mozilla.com/D133042
2021-12-09 18:21:09 +00:00
Mike Hommey 8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
criss d68f0e9684 Backed out changeset 5c921d8e51bd (bug 1741089) for causing mochitest failures on test_bug557987.xhtml . CLOSED TREE 2021-11-16 18:27:45 +02:00
Emilio Cobos Álvarez 3cf56f8e1f Bug 1741089 - Make async OpenMenu simpler/sound. r=mstange
There's only one caller of it and it's not sound: The runnable captures a
raw frame pointer etc. Instead, just do a dispatch to the main thread
and call OpenMenu there. This simplifies the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D131082
2021-11-16 15:43:38 +00:00
somdatta 98b05fd89a Bug 1586014- Factor out RecompileScriptEventListeners r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129974
2021-11-04 18:24:58 +00:00
Masayuki Nakano 4341d6fb0c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve `nsINode` or its concrete classes from `EventTarget` r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
Tooru Fujisawa c30ad11d7f Bug 1726498 - Add JS::DecodeOptions. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D128345
2021-10-21 21:48:48 +00:00
Tooru Fujisawa 342914cc80 Bug 1732923 - Part 1: Remove options parameter from JS::EncodeStencil. r=tcampbell
Depends on D120201

Differential Revision: https://phabricator.services.mozilla.com/D128342
2021-10-21 00:14:21 +00:00
Tooru Fujisawa caecc321f6 Bug 1728953 - Remove unused flag from nsXULPrototypeCache. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D126321
2021-10-19 02:46:50 +00:00
Tooru Fujisawa 0792d1689a Bug 1720619 - Part 2: Add JS::InstantiateOptions. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D120201
2021-10-18 17:08:06 +00:00