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

23650 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 071c722cc0 Bug 1861259 part 3: Coalesce redundant array-index checks in nsRefreshDriver. r=tnikkel
This patch doesn't change behavior; it just removes some redundant checks.

(Note that the tight-scoping around nsAutoMicroTask/ReduceAnimations is
important for the RAII object to be torn down at the intended time; but it
doesn't need its own if-check.)

Depends on D191909

Differential Revision: https://phabricator.services.mozilla.com/D191911
2023-10-25 23:50:05 +00:00
Daniel Holbert 98398d6c56 Bug 1861259 part 2: Unroll the observer-array-loop in nsRefreshDriver::Tick. r=tnikkel
This patch doesn't change behavior.

This is a bit gross, but it helps us make better use of the backtrace to figure
out what's going on in a given crash report.

Differential Revision: https://phabricator.services.mozilla.com/D191909
2023-10-25 23:50:04 +00:00
Daniel Holbert 640f2e283d Bug 1861259 part 1: Refactor out a helper function for loop body in nsRefreshDriver::Tick. r=tnikkel
This doesn't affect behavior; it's just a pure refactoring, moving code from
being inline to being in a helper function.

Differential Revision: https://phabricator.services.mozilla.com/D191908
2023-10-25 23:50:04 +00:00
Timothy Nikkel a958e79ad1 Bug 1860474. A few small optimizations to DisplayPortUtils::MaybeCreateDisplayPort. r=hiro
These are small but they do show up in sp3 profiles.

IsPaintingToWindow is always true, so just assert it.

HaveScrollableDisplayPort is a simple pointer check, whereas AsyncPanZoomEnabled needs to jump several pointers (and WantAsyncScroll is slower yet), so change the order.

HasNonMinimalNonZeroDisplayPort is not needed unless we are inside that if, so don't call it outside the if.

Differential Revision: https://phabricator.services.mozilla.com/D191599
2023-10-25 22:39:18 +00:00
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
Emilio Cobos Álvarez f792f9d5ca Bug 1787008 - More consistently keep listener alive in test_color_scheme_browser.xhtml. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D191665
2023-10-23 21:22:12 +00:00
Olli Pettay fa8f7f9a3f Bug 1844755 - Consider to not create ServoStyleSet for data documents, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D191485
2023-10-23 16:10:41 +00: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
Natalia Csoregi 5d923d9fcc Backed out changeset f1426851ae30 (bug 1844755) for causing failures on test_printpreview.xhtml. CLOSED TREE 2023-10-23 13:44:53 +03:00
Olli Pettay 0931ed2ba7 Bug 1844755 - Consider to not create ServoStyleSet for data documents, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D191485
2023-10-23 09:42:42 +00:00
Daniel Holbert ffe9173bb8 Bug 1860191 part 2: Implement some more callbacks on test_color_scheme_browser.xhtml's progress listener, as additional diagnostics. r=emilio
This is just extending our existing progress-listener object that we use
functionally in the test, to implement a few more of the nsIWebProgressListener
callbacks so we can see if they're firing in some unforeseen way that can help
us identify why the test is intermittently timing out.

I'm just cribbing the full list of callbacks from
https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener.idl
without worrying too much about their applicability here.

Differential Revision: https://phabricator.services.mozilla.com/D191501
2023-10-20 14:03:45 +00:00
Daniel Holbert c2d9bf74e4 Bug 1860191 part 1: Add some logging to test_color_scheme_browser.xhtml. r=emilio
This is to help orient ourselves when reviewing logs when this test
intermittently times out.

Differential Revision: https://phabricator.services.mozilla.com/D191500
2023-10-20 14:03:44 +00:00
Emilio Cobos Álvarez 7514a5b786 Bug 1859945 - Restore old content-inaccessible-about:blank behavior. r=nika
While not perfect, as you noted, it's probably good enough. It's also a
bit safer, probably.

Differential Revision: https://phabricator.services.mozilla.com/D191413
2023-10-20 09:10:56 +00:00
Boris Chiou f57dc3a741 Bug 1855756 - Fix the edge cases when the angle is 0deg (or 90deg) for ray(). r=hiro
It looks like our formula doesn't work well for 0deg and 90deg because
it's not a triangle when theta is 0deg or 90deg. So we handle them
separately.

Differential Revision: https://phabricator.services.mozilla.com/D191495
2023-10-20 03:41:10 +00:00
Emilio Cobos Álvarez 09b9053f91 Bug 1787008 - Keep listener alive until its promise resolves. r=nika
See comment 74. This feels quite a footgun :/

Differential Revision: https://phabricator.services.mozilla.com/D191225
2023-10-17 18:20:43 +00:00
David Shin faa0e1c8ea Bug 1858720: Prevent :has over-invalidation with sibling DOM mutations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190817
2023-10-17 13:17:31 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Anna Yeddi 730541e629 Bug 1854521 - Disable a11y_check for a non-user-facing crashtest in Core Layout Engine. r=dholbert
This isn't content we're showing to any users; it's essentially a crashtest (written as a browser-chrome test), trying to set up a set of conditions that used to trigger a crash.

Thus, we are excluding this click event from accessibility checks and removing the `fail-if` annotation that was added before the investigation by the bug 1854520.

Differential Revision: https://phabricator.services.mozilla.com/D190362
2023-10-13 17:32:22 +00:00
Tom Marble 0cb91fe33e Bug 1855300 - convert .ini manifests to .toml: batch 11 remaining **/mochitest.ini r=jmaher,geckoview-reviewers,extension-reviewers,valentin,credential-management-reviewers,cookie-reviewers,sgalich,m_kato,robwu
Differential Revision: https://phabricator.services.mozilla.com/D190515
2023-10-13 02:32:24 +00:00
Sean Feng 3b1fb987c9 Bug 1856497 - Allow user input events to bypass the delay handling check if this is a non-visible document r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D190133
2023-10-12 16:38:17 +00:00
Sean Feng a8185359ae Bug 1856514 - Make sure nsRefreshDriver will tick enough times for user input handling r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D190108
2023-10-11 19:39:37 +00:00
Emilio Cobos Álvarez 56346e9adf Bug 1857915 - Remove about:PreferenceStyleSheet. r=morgan,devtools-reviewers,nchevobbe
These days, after bug 1853323, about:PreferenceStyleSheet is basically
just an empty sheet for most users. For the ones that isn't, it's either
slightly or completely broken (see below).

If we were to implement this today, we'd do it with privileged env()
variables or media queries, and add a bunch of tests for different
combinations, but I don't think it's worth the effort:

 * There's no UI for any of these prefs.

 * There are no tests for any of these prefs.

 * browser.display.focus_ring_or_anything is not great, it's better
   replaced by browser.display.show_focus_rings, which actually makes
   the :focus-visible pseudo-class work. Otherwise the native controls
   may show no rings even though this pref is set.

 * for browser.display.focus_ring_style = 0, the color used
   (-moz-mac-focusring) is not implemented in any non-macOS platform.

 * The ::-moz-focus-inner rules are completely useless nowadays, because
   ::-moz-focus-inner only works on the windows native theme (which
   isn't used on content).

 * The focus colors are not color-scheme aware.

So given those, and that if you want the specific current behavior,
these are trivially implementable as a web extension (by using a user
stylesheet), I think we should just remove this code altogether.

Differential Revision: https://phabricator.services.mozilla.com/D190464
2023-10-11 17:47:50 +00:00
Olli Pettay aba6665fc1 Bug 1857618 - Ensure normal tasks get enough time to run, so try to avoid triggering RefreshDriver too often, r=bas
Based on testing we can simplify the current setup and also ensure that we don't trigger a RefreshDriver tick too soon
(so that we don't get two ticks when we expect only one).
This gets us even closer to Chrome's raf handling.

Differential Revision: https://phabricator.services.mozilla.com/D190361
2023-10-10 22:45:47 +00:00
Boris Chiou 192403f967 Bug 1852323 - Part 2: Fix the mapping of StyleGeometryBox for mask-clip. r=emilio
Also, drop `nsLayoutUtils::ComputeGeometryBox()` and avoid doing mapping
in `ComputeHTMLReferenceRect()` and `ComputeSVGReferenceRect()`. The
caller should handle it properly because each property uses its own mapping
between CSS box and SVG box.

Note:
1. mask-clip-3.html is copied from mask-clip-1.html but just replace
   css boxes with svg boxes.
2. mask-clip-4.html is copied from mask-clip-2.html but just replace
   svg boxed with css boxes.

Differential Revision: https://phabricator.services.mozilla.com/D188316
2023-10-10 22:00:32 +00:00
Boris Chiou 5213031e3e Bug 1852323 - Part 1: Update the mapping of geometry box for clip-path. r=emilio
It seems mask-origin/mask-clip/clip-path use different mapping for
geometry-box. We should specialize each one. In this patch, we focus on
clip-path.

Differential Revision: https://phabricator.services.mozilla.com/D188146
2023-10-10 22:00:32 +00:00
Emilio Cobos Álvarez 59a514abdf Bug 1857455 - Deal with BrowsingContext not being yet attached in nsSubDocumentFrame::Init. r=hsivonen
For initial about:blank, nsSubDocumentFrame::Init might not have an
extant browsing context yet. Some code did deal with that properly
(MaybeUpdateEmbeddedColorScheme for example), but some other didn't.

Consistently propagate data to our browsing context after ShowViewer to
fix this.

Differential Revision: https://phabricator.services.mozilla.com/D190275
2023-10-10 12:56:30 +00:00
Emilio Cobos Álvarez 25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Masayuki Nakano b8f3f296ed Bug 1844723 - Make `CreateMouseOrPointerWidgetEvent()` set `mButton` to "not pressed" value and compute `mButtons` if the source event has not been dispatched yet r=edgar,dom-core
`CreateMouseOrPointerWidgetEvent()` is designed to create `mouseenter`,
`mouseover`, `mouseout`, `mouseleave`, `pointerenter`, `pointerover`,
`pointerout` and `pointerleave` from a source event.

They are not button state change events, but the source event may be so.

According to the WPTs ([1], [2]) and the fact that the other browsers pass the
tests, the button state of pointer events of synthesizing events should be
synchronized with what the web apps notified (i.e., previous state of the
source event) if and only if the input source supports hover state and the
source event which changes a button state has not been dispatched into the DOM
yet.

1. https://searchfox.org/mozilla-central/rev/08d53deb2cf587e68d1825082c955e8a1926be73/testing/web-platform/tests/pointerevents/pointerevent_attributes_hoverable_pointers.html#44,51,60,63
2. https://searchfox.org/mozilla-central/rev/08d53deb2cf587e68d1825082c955e8a1926be73/testing/web-platform/tests/pointerevents/pointerevent_attributes_nohover_pointers.html#17,45,47,51

Differential Revision: https://phabricator.services.mozilla.com/D187644
2023-10-10 07:33:05 +00:00
Boris Chiou d451ebbc07 Bug 1856471 - Ignore min-x and min-y when computing view-box (so we return origin box). r=dholbert
Per https://github.com/web-platform-tests/interop/issues/509, we update
the coordinate to match the spec, i.e. When the viewBox includes non-zero min-x
or min-y offsets, this origin box does not actually correspond to the visible
region rectangle defined by the viewBox.
https://drafts.csswg.org/css-box-3/#valdef-box-view-box

Also simplify mask-clip-2.html and mask-origin-3.html so that their
viewBox is anchored at the origin so it is the same as the origin box.

Differential Revision: https://phabricator.services.mozilla.com/D190325
2023-10-10 06:26:51 +00:00
Daniel Holbert e9f553e2e2 Bug 1857561: Make nsRefreshDriver::Tick gracefully bail if a resize observer destroys the PresContext. r=surkov,emilio
Note, I'm deleting the null-check from UpdateIntersectionObservations, since
I'm essentially hoisting it up one level (and I don't think there's anything
that could null out mPresContext in the intervening code).

Differential Revision: https://phabricator.services.mozilla.com/D190367
2023-10-09 18:49:39 +00:00
Anna Yeddi 54f6e43836 Bug 1854520 - Temporarily fail-if one Tier 2 a11y_checks for Core Layout Engine. r=dholbert
We are working on [enabling Tier 2 a11y-checks to ensure our products have basic accessibility built-in (bug 1692110)](https://bugzilla.mozilla.org/show_bug.cgi?id=1692110) and before that, we need to prepare the existing code base. While we triage and investigate existent tests that would fail once the a11y-checks are enabled in the CI, we are going to fail-if the failing tests altogether and then handle each one of them individually.

This task is to add `fail-if` condition of the failing tests while we continue investigation into the reasons these tests failed and to be able to backtrack these tests once they're resolved.

Related bugs:
- Disabling tests: meta bug 1848402
- Investigation and remediation for components with disabled tests: meta bugs 1848394 and 1854227, component-specific bug 1854521
- Explore capturing click events for a11y_checks: bug 1692110

Depends on D188919

Differential Revision: https://phabricator.services.mozilla.com/D188920
2023-10-09 18:20:17 +00:00
Timothy Nikkel 4851fb1e33 Bug 1857906. Remove some unused code in layout/base/TouchManager.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190457
2023-10-09 12:38:19 +00:00
Narcis Beleuzu 6f32ce5f0d Backed out changeset 6b6cddb5477c (bug 1857906) for bustages on TouchManager.cpp . CLOSED TREE 2023-10-09 15:30:07 +03:00
Timothy Nikkel e1c000ce71 Bug 1857906. Remove some unused code in layout/base/TouchManager.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190457
2023-10-09 12:10:52 +00:00
Cristian Tuns 6b9650b822 Backed out 30 changesets (bug 1854447, bug 1855491, bug 1854646, bug 1854520, bug 1854528, bug 1854506, bug 1854502, bug 1854443, bug 1854538, bug 1854525, bug 1854660, bug 1854514, bug 1854460, bug 1854625, bug 1854228, bug 1854517, bug 1854533, bug 1692110, bug 1854636, bug 1849021, bug 1854512, bug 1854522, bug 1854509, bug 1854452, bug 1854536, bug 1854531) for causing multiple tier 2 failures on a11y-checks. CLOSED TREE
Backed out changeset 5714b7239b70 (bug 1849021)
Backed out changeset 91e5d7de3484 (bug 1849021)
Backed out changeset cc3142b909f6 (bug 1854660)
Backed out changeset 76d2a8ae9c19 (bug 1854646)
Backed out changeset 36460a147684 (bug 1854636)
Backed out changeset c7529a962a8c (bug 1854625)
Backed out changeset 791f9b03ea96 (bug 1854538)
Backed out changeset bd3f3cb434a5 (bug 1854536)
Backed out changeset 16f4f5bdcaa7 (bug 1855491)
Backed out changeset 6258bab20196 (bug 1854533)
Backed out changeset 29dca16eee2e (bug 1854531)
Backed out changeset 3a69d2c3f562 (bug 1854528)
Backed out changeset 0c63a9ea8b34 (bug 1854525)
Backed out changeset 5795bb6187a5 (bug 1854522)
Backed out changeset 7d4a123a432f (bug 1854520)
Backed out changeset ec95287bd702 (bug 1854517)
Backed out changeset 9914c1481f0d (bug 1854514)
Backed out changeset 25d85e656905 (bug 1854512)
Backed out changeset 828657f2ab73 (bug 1854509)
Backed out changeset 9d8b2e14c375 (bug 1854506)
Backed out changeset 1b3ee1e46e12 (bug 1854502)
Backed out changeset 37c2ec0851dc (bug 1854460)
Backed out changeset c2a60a8fc2d3 (bug 1854452)
Backed out changeset 744a163f2bd1 (bug 1854447)
Backed out changeset 1a9629dae7d5 (bug 1854443)
Backed out changeset c3d5c1ba2a84 (bug 1854228)
Backed out changeset dcd05518b004 (bug 1692110)
Backed out changeset 1c65a4cb618c (bug 1692110)
Backed out changeset 603b891147bd (bug 1692110)
Backed out changeset 53e2fac79d84 (bug 1692110)
2023-10-07 14:43:05 -04:00
Anna Yeddi c31fc00d5f Bug 1854520 - Temporarily disable one Tier 2 a11y_checks for Core Layout Engine. r=dholbert
We are working on [enabling Tier 2 a11y-checks to ensure our products have basic accessibility built-in (bug 1692110)](https://bugzilla.mozilla.org/show_bug.cgi?id=1692110) and before that, we need to prepare the existing code base. While we triage and investigate existent tests that would fail once the a11y-checks are enabled in the CI, we are going to skip the failing tests altogether and then handle each one of them individually.

This task is to skip with `fail-if` condition of the failing tests while we continue investigation into the reasons these tests failed and to be able to backtrack these tests once they're resolved.

Related bugs:
- Disabling tests: meta bug 1848402
- Investigation and remediation for components with disabled tests: meta bugs 1848394 and 1854227, component-specific bug 1854521
- Explore capturing click events for a11y_checks: bug 1692110

Differential Revision: https://phabricator.services.mozilla.com/D188920
2023-10-06 18:11:35 +00:00
Robert Longson a21d68d939 Bug 1402013 - stop calculating position for SVG elements that aren't governed by the CSS box model r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190222
2023-10-06 12:04:14 +00:00
Olli Pettay 455b5d83ea Bug 1856545 - Try to utilize idle time more, r=farre
We can go through quite a few more timers these days, since timers are stored now in an array and iterating through that is fast.
Also, relying on timer value for another thread or low priority timers does prevent idle tasks to run in some cases, and now that more timers
are iterated through, that behavior can be tweaked.

For RefreshDriver this is taking the simple approach and just let idle tasks to run if RefreshDriver isn't ticking. We do start RefreshDriverTimer pretty
much always when something in DOM or layout is changing.

Differential Revision: https://phabricator.services.mozilla.com/D189909
2023-10-06 11:04:04 +00:00
Cristina Horotan 3d0b07f5a3 Backed out changeset 5873383c36e2 (bug 1856545) for causing talos max run time exceeded failures. CLOSED TREE 2023-10-06 04:07:39 +03:00
Olli Pettay 95f99516d4 Bug 1856545 - Try to utilize idle time more, r=farre
We can go through quite a few more timers these days, since timers are stored now in an array and iterating through that is fast.
Also, relying on timer value for another thread or low priority timers does prevent idle tasks to run in some cases, and now that more timers
are iterated through, that behavior can be tweaked.

For RefreshDriver this is taking the simple approach and just let idle tasks to run if RefreshDriver isn't ticking. We do start RefreshDriverTimer pretty
much always when something in DOM or layout is changing.

Differential Revision: https://phabricator.services.mozilla.com/D189909
2023-10-05 18:10:30 +00:00
Emilio Cobos Álvarez 3f9391b5f2 Bug 1857115 - Add a couple null-checks. r=surkov
Resize observers might have disconnected the refresh driver.

Differential Revision: https://phabricator.services.mozilla.com/D190165
2023-10-05 17:14:07 +00:00
Emilio Cobos Álvarez 4f153f57ec Bug 1856374 - Add a pref to stop forcing details elements to be blocks. r=TYLin
This is probably something we want to move towards, so it doesn't hurt
adding a pref to allow people to experiment with it.

Differential Revision: https://phabricator.services.mozilla.com/D189919
2023-10-05 16:59:33 +00:00
Emilio Cobos Álvarez 432004fe4e Bug 1857073 - Remove ResizeObserverController. r=surkov,smaug
These days it's just a very thin wrapper over an nsTArray of
ResizeObservers. We also schedule notifications for resize observations
for the whole BrowsingContext tree at once, so there's no point on
individually keep track of them.

Differential Revision: https://phabricator.services.mozilla.com/D190113
2023-10-05 12:11:56 +00:00
Hiroyuki Ikezoe 0f97319b31 Bug 1781007 - Skip calling RestrictToRootDisplayPort in the case where the scroll container has empty displayport margins. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D189323
2023-10-05 06:38:55 +00:00
Emilio Cobos Álvarez 50daad8922 Bug 1817122 - Make AsyncEventDispatcher(Event) take ownership of the event. r=smaug,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D190059
2023-10-04 19:37:39 +00:00
Robert Longson c25d6d1667 Bug 1856213 - remove some queryinterface calls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D190022
2023-10-04 10:41:41 +00:00
Cristina Horotan 29ea4ce56e Backed out changeset 413c83e8ccda (bug 1781007) for causing mochitest failures at test_group_checkerboarding.html. CLOSED TREE 2023-10-04 08:39:46 +03:00