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

82567 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 2808903c63 Bug 1882790 - Use a custom ReplaceSeparators function in place of nsString::ReplaceChar during bidi resolution. r=layout-reviewers,emilio
In nsBidiPresUtils::ResolveParagraph, we replace any block or segment separators
with space characters before bidi resolution. The use of nsString::ReplaceChar
here can appear in profiles, so it seems worth having a custom accelerated version
to handle the fixed set of separator codes. My local testing indicates this runs
between 5 and 10 times faster than the general-purpose function that has to
iterate over the provided set of characters at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D203125
2024-03-05 11:40:28 +00:00
Jonathan Kew f5a63a0408 Bug 1882790 - Cleanup and optimize BidiLineData handling. r=layout-reviewers,emilio
We don't need to explicitly drop bidi-control frames from the original list in BidiLineData,
and make the corresponding updates to the Levels and IndexMap arrays; instead, we can just
skip over them when building the VisualFrames array.

Also, in nsBidiPresUtils::ReorderFrames we don't need a BidiLineData at all if there's only
a single frame on the line; we can just call RepositionFrame directly.

Differential Revision: https://phabricator.services.mozilla.com/D203124
2024-03-05 11:40:27 +00:00
Norisz Fay 81649157bf Backed out 2 changesets (bug 1882790) for causing build bustage on nsBidiPresUtils.cpp CLOSED TREE
Backed out changeset ccd673b111a7 (bug 1882790)
Backed out changeset 6e0be8c8b999 (bug 1882790)
2024-03-05 13:26:56 +02:00
Jonathan Kew bf0cabbac6 Bug 1882790 - Use a custom ReplaceSeparators function in place of nsString::ReplaceChar during bidi resolution. r=layout-reviewers,emilio
In nsBidiPresUtils::ResolveParagraph, we replace any block or segment separators
with space characters before bidi resolution. The use of nsString::ReplaceChar
here can appear in profiles, so it seems worth having a custom accelerated version
to handle the fixed set of separator codes. My local testing indicates this runs
between 5 and 10 times faster than the general-purpose function that has to
iterate over the provided set of characters at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D203125
2024-03-05 10:56:12 +00:00
Jonathan Kew f36f93cf6d Bug 1882790 - Cleanup and optimize BidiLineData handling. r=layout-reviewers,emilio
We don't need to explicitly drop bidi-control frames from the original list in BidiLineData,
and make the corresponding updates to the Levels and IndexMap arrays; instead, we can just
skip over them when building the VisualFrames array.

Also, in nsBidiPresUtils::ReorderFrames we don't need a BidiLineData at all if there's only
a single frame on the line; we can just call RepositionFrame directly.

Differential Revision: https://phabricator.services.mozilla.com/D203124
2024-03-05 10:56:12 +00:00
Otto Länd de3c998b95 Bug 1882964: apply code formatting via Lando
# ignore-this-changeset
2024-03-05 08:39:03 +00:00
Nicolas Chevobbe 01949043ec Bug 1882964 - Add InspectorUtils.getRuleBodyTextOffsets. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D203233
2024-03-05 08:36:23 +00:00
Ting-Yu Lin 5d27842b5d Bug 1881495 part 1: Add ShrinkWrap flag for grid items that are self-aligned (not stretched) in MeasuringReflow(). r=dholbert
Bug 1350037 Part 3 [1] removed the code in ReflowInput that adds `ShrinkWrap`
flag self-aligned grid items, to prevent the table-caption from getting aligned
behavior, but it accidentally broke self-aligned behavior for other types of
frames that are grid items.

We actually already check if we need to add `ShrinkWrap` in grid item's final
reflow [2], but we were missing the same logic in `MeasuringReflow()`. This
patch adds that.

[1] https://hg.mozilla.org/mozilla-central/rev/6e8085865f74
[2] https://searchfox.org/mozilla-central/rev/202c48686136360a23b73a49b611a19e64f3e1b8/layout/generic/nsGridContainerFrame.cpp#7651,7657

Differential Revision: https://phabricator.services.mozilla.com/D203514
2024-03-05 00:50:31 +00:00
Mike Hommey df6f213e87 Bug 1883513 - Add iOS as a style platform. r=emilio
The case matches that of mozilla::widget::OperatingSystem.

Differential Revision: https://phabricator.services.mozilla.com/D203531
2024-03-04 23:48:42 +00:00
Gregory Pappas 3ea20569e6 Bug 1881845 - Remove nsContentCID.h r=smaug,media-playback-reviewers,karlt
All of these components have been converted to static registration, making this
file unneeded.

Differential Revision: https://phabricator.services.mozilla.com/D202633
2024-03-04 23:41:05 +00:00
Emilio Cobos Álvarez 4d9dae1a6b Bug 1883518 - Remove a bunch of unused ServoBindings.toml entries. r=firefox-style-system-reviewers,boris
This was done using bindgen's "emit_diagnostics" feature, which shows
unused allowlist entries.

Enabling it by default would need extra dependencies so for now don't.

Differential Revision: https://phabricator.services.mozilla.com/D203533
2024-03-04 22:58:55 +00:00
Boris Chiou c24d2947b3 Bug 1870200 - Break the cyclic dependency if any of the desendants uses non-scaling-stroke. r=emilio
While we are computing the transform-box:stroke-box, for CSS Transforms or
Motion path Transforms, we have to avoid the cyclic dependency not only
for the SVG geometry frame itself, but also for the desendants of
the SVG container frame. Therefore, we just compute its fill-box (i.e.
make |getStroke| be false).

https://github.com/w3c/csswg-drafts/issues/9640

Differential Revision: https://phabricator.services.mozilla.com/D203184
2024-03-04 20:46:05 +00:00
Frédéric Wang a6a7ef0ceb Bug 1882817 - Convert reftest for stretchy equal sign to an internal WPT. r=emilio
This is a mismatch reftest introduced in bug 854339 to verify it is
possible to horizontally stretch the equal sign using unicode-based
glyph assembly such as the ones described in [1]. This is non-normative,
so keep it as an internal test for now.

[1] https://w3c.github.io/mathml-core/#unicode-based-glyph-assemblies

Differential Revision: https://phabricator.services.mozilla.com/D203426
2024-03-04 16:28:37 +00:00
Frédéric Wang 1f168cc71c Bug 1882817 - Export stretchy-largeop-* reftests as WPT testharness.js tests. r=emilio
These tests verify operator stretching for various stretchy or largeop
operators, by checking the `BoundingClientRect` of `<mo>` operators.
This is equivalent to existing more exhaustive checks that are done in
WPT, the difference is that here they are only relying on the fonts
pre-installed on the system. So export these tests assuming they are
checking some basic support with the default math font. Gecko is able
to use scale transforms to emulate operator stretching, so it always
pass the tests even when the system does not provide good math fonts.

Additionally, these tests are written as reftests, but are really only
doing some JavaScript checks, so rewrite them as testharness.js tests.

Differential Revision: https://phabricator.services.mozilla.com/D203399
2024-03-04 16:28:37 +00:00
Frédéric Wang 9a2c041981 Bug 1882817 - Export a crashtest for bigotimes to WPT. r=emilio
This case was included in a reftest in order to exercise an assertion
related to the direction passed for operator stretching but no visual
are JS checks are actually performed on it. So export it in its own
separate crash test instead.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1092053#c9

Differential Revision: https://phabricator.services.mozilla.com/D203394
2024-03-04 16:28:36 +00:00
Frédéric Wang 263be9ea85 Bug 1882817 - Export mo-glyph-size.html to WPT. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D203392
2024-03-04 16:28:36 +00:00
Ting-Yu Lin a591467fd5 Bug 1879770 Part 2 - Add a helper to query intrinsic scrollbar-gutter size for subgrid. r=emilio
See https://bugzilla.mozilla.org/show_bug.cgi?id=1879770#c2 for an analysis.

Differential Revision: https://phabricator.services.mozilla.com/D201893
2024-03-04 14:30:23 +00:00
Ting-Yu Lin c5790fed3f Bug 1879770 Part 1 - Mark IntrinsicScrollbarGutterSizeAtInlineEdges() const. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D201892
2024-03-04 14:30:22 +00:00
Timothy Nikkel cee91c666b Bug 1882544. Give layout/reftests/bugs/1878294-1.html a bit more time to detect a finished test. r=layout-reviewers,emilio
I checked that this still reliably reproduces the original bug with the original patch backed out.

Differential Revision: https://phabricator.services.mozilla.com/D203087
2024-03-04 07:05:56 +00:00
Frédéric Wang 19891da370 Bug 1882817 - Export some mmultiscripts reftests to WPT. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D203290
2024-03-03 20:52:04 +00:00
Frédéric Wang e04856f1b8 Bug 1882817 - Export remaining internal semantics reftests to WPT. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D203239
2024-03-03 20:52:04 +00:00
Frédéric Wang 63fd6cb673 Bug 1882817 - Export remaining internal mstyle reftests to WPT. r=emilio
These mstyle reftests verify that attributes on the mstyle element
have no effect and this is handled by existing WPT test
`legacy-mstyle-attributes.html`. So we just add the missing cases:

- mstyle-2.xhtml: This was removed from `reftest.list` by mistake in
  D185270. `mspace` attributes are already covered, we add tests
  for the `mpadded` attributes.

- `mstyle-3.xhtml`: most `mo` attributes are covered, we add the
  missing case of the `form` attribute. Also tweak the test for the
  `accent` attribute to avoid potential clash with `mover@accent`.

- `mstyle-4.xhtml`: These are tests for accent/accentunder
   attributes on the mover/munder/munderover. Export them.

We also reword the note to stop saying we don't test mpadded or
accent/accentunder attributes on the munderover family of elements.

Differential Revision: https://phabricator.services.mozilla.com/D203151
2024-03-03 20:52:03 +00:00
Frédéric Wang 5bdd7918e3 Bug 1882817 - Move remaining mpadded reftests to internal WPT tests. r=emilio
These tests use pseudo-units, which are not part of MathML Core.

Differential Revision: https://phabricator.services.mozilla.com/D203139
2024-03-03 20:52:03 +00:00
Dave Townsend cd02013a7c Bug 1864896: Autofix unused function arguments (layout). r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D202971
2024-03-02 15:26:01 +00:00
Frédéric Wang 37de9ca93a Bug 1882978 - Convert MathML mirror-op tests to WPT. r=emilio
These tests were introduced in bug 208309 and verify mirroring of some
basic operators in RTL mode, which Gecko implements in various ways
(Unicode character-level mirroring, RTLM glyph-level mirroring, scale
transform). This is currently not really defined in MathML Core so for
now keep them as internal WPT tests.

All tests but `mirror-op-1.html` uses a mismatch test approach: just
verify that the operator in RTL mode does render the same as the
operator in LTR mode. `mirror-op-1.html` is a match tests relying on
a `scaleX` transform to emulate mirroring, but that's not quite
reliable and it has many fuzzy annotations. So instead, we split it
into multiple mismatch tests similar to the other ones. This is a
weaker comparison but more reliable.

Differential Revision: https://phabricator.services.mozilla.com/D203244
2024-03-02 11:20:44 +00:00
Peter Van der Beken 62bdf442eb Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-02 07:50:25 +00:00
Peter Van der Beken 2b747df80a Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-02 07:50:19 +00:00
Peter Van der Beken 9c8d00b7fb Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-02 07:50:19 +00:00
Emilio Cobos Álvarez 176b0896a7 Bug 1882709 - Add a reftest for this bug. r=morgan
Depends on D203253

Differential Revision: https://phabricator.services.mozilla.com/D203254
2024-03-01 23:18:33 +00:00
Emilio Cobos Álvarez d76bce50ae Bug 1882709 - Backplate only if there is visible text on the line. r=morgan
Depends on D203252

Differential Revision: https://phabricator.services.mozilla.com/D203253
2024-03-01 23:18:33 +00:00
Robert Longson b77620a825 Bug 1882921 - Set mPaintingShadows to false in NotifySelectionBackgroundNeedsFill r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D203242
2024-03-01 16:09:25 +00:00
Daniel Holbert e668aee977 Bug 1882921: Initialize SVGTextDrawPathCallbacks:mPaintingShadows to false. r=longsonr,jfkthame
While we're there: also pull mColor's initialization out of the init list,
since it's the other member that's unconditionally initialized to a constant
value; and initialize it to 0 using the easier-to-interpret NS_RGBA macro
for setting nscolor values.

Differential Revision: https://phabricator.services.mozilla.com/D203214
2024-03-01 16:09:25 +00:00
Natalia Csoregi 8c2521e9d5 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken 763356e4fb Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-01 14:31:15 +00:00
Peter Van der Beken f295b0c979 Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-01 14:31:09 +00:00
Peter Van der Beken 8d1c9ad39c Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-01 14:31:09 +00:00
Dimi 75b985ac56 Bug 1755033 - P2. Use the same text color for `autofill` and `-moz-autofill-preview` r=credential-management-reviewers,emilio,sgalich
UX suggests to use the same text color for autofill and autofill
preview.

Differential Revision: https://phabricator.services.mozilla.com/D203098
2024-03-01 14:01:19 +00:00
Dimi e652edfc5d Bug 1755033 - P1. Make user agent autofill styles more important r=credential-management-reviewers,emilio,issammani
Both Chrome and Safari override the sites autofill style.
Given that its crucial for users to be able to clearly see what Firefox autofills for
them, after discussing with UX, we decide also do the same.

Differential Revision: https://phabricator.services.mozilla.com/D202410
2024-03-01 14:01:19 +00:00
Mike Hommey ed49604ca7 Bug 1882942 - Add missing header for size_t. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D203219
2024-03-01 09:30:02 +00:00
Cristian Tuns 6bc0f370cc Backed out 2 changesets (bug 1755033) for causing mochitest failures in test_formautofill_preview_highlight.html CLOSED TREE
Backed out changeset 4fde36e8266a (bug 1755033)
Backed out changeset 5e26aac6ca16 (bug 1755033)
2024-02-29 13:09:49 -05:00
Frédéric Wang 8d75a376ce Bug 1882144 - Remove layout.css.math-style.enabled and layout.css.math-depth.enabled prefs. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D202940
2024-02-29 16:37:40 +00:00
Dimi 60b1f620b3 Bug 1755033 - P2. Use the same text color for `autofill` and `-moz-autofill-preview` r=credential-management-reviewers,emilio,sgalich
UX suggests to use the same text color for autofill and autofill
preview.

Differential Revision: https://phabricator.services.mozilla.com/D203098
2024-02-29 15:09:34 +00:00
Dimi f1fb7e54ee Bug 1755033 - P1. Make user agent autofill styles more important r=credential-management-reviewers,emilio,issammani
Both Chrome and Safari override the sites autofill style.
Given that its crucial for users to be able to clearly see what Firefox autofills for
them, after discussing with UX, we decide also do the same.

Differential Revision: https://phabricator.services.mozilla.com/D202410
2024-02-29 15:09:34 +00:00
Emilio Cobos Álvarez 4a69d8b600 Bug 1362907 - Avoid differences in menulist button position on android on a reftest.
This is better than skipping it which is what the test does for other
similar elements.

MANUAL PUSH: Trivial orange fix CLOSED TREE
2024-02-29 17:59:45 +02:00
Emilio Cobos Álvarez 73c13e1687 Bug 1362907 - Fix a couple crashtests.
<select> doesn't allow first-line, which was causing some non-fatal
asserts.

The annotated crashtest overflows a bSize but it gets handled safely by
nsLineLayout.

MANUAL PUSH: Trivial orange fix CLOSED TREE
2024-02-29 14:16:40 +01:00
Emilio Cobos Álvarez fb89acd3b5 Bug 1362907 - Make select use nsHTMLButtonControlFrame for layout. r=jfkthame,dholbert
This simplifies our combobox code a bit more:

 * Reflow() is only needed to compute the label isize.
 * Frame construction uses a setup more similar to <input type=file> to
   get the right frame tree, removing a bunch of special code.
 * Lots of special code removed all over the place.

Differential Revision: https://phabricator.services.mozilla.com/D203010
2024-02-29 11:15:52 +00:00
Frédéric Wang c592b5761b Bug 1880928 - Remove last remembered size observer, handle it in Document::DetermineProximityToViewportAndNotifyResizeObservers. r=emilio,layout-reviewers
The CSS Box Sizing specification indicates that last remembered sizes
are recorded "at the time that ResizeObserver events are determined and
delivered" [1].

In bug 1807253, we changed the implementation of when proximity to the
viewport of `content-visibility: auto` nodes are determined and of when
resize observations are broadcast, in order to align with the latest
version of the HTML specification [2]. We continue to use an internal
`Document::mLastRememberedSizeObserver` to update last remembered sizes
but it has been causing issues (e.g. bug 1867090 and bug 1880928) and
could be replaced by a direct update before broadcasting resize
observations.

This is what the current patch is doing. The elements currently observed
by `Document::mLastRememberedSizeObserver` are now stored on a
`Document::mElementsWithLastRememberedSize` hashset and a new function
`Document::UpdateLastRememberedSizes` is called before broadcasting
resize observations, and peforms the work of `LastRememberedSizeCallback`
and of `CalculateBoxSize` (with `aBox=Content_box`).

The only behavior change is in the `while(true)` loop from
`DetermineProximityToViewportAndNotifyResizeObservers`: at each step
we update the last remember sizes for elements of arbitrary depth, and
don't use these depths for calculating `shallowestTargetDepth`. This is
fine, since our `LastRememberedSizeCallback` only records current box
sizes without causing significant side effects (e.g. execution of
JavaScript code) that may require a relayout.

[1] https://drafts.csswg.org/css-sizing-4/#last-remembered
[2] https://html.spec.whatwg.org/#update-the-rendering

Differential Revision: https://phabricator.services.mozilla.com/D202571
2024-02-29 08:50:55 +00:00
Timothy Nikkel 64e0a7e0fd Bug 1872487. Create less WebRenderLayerScrollData. r=botond
In order to create less WebRenderLayerScrollData currently we use a deferred transform item

https://searchfox.org/mozilla-central/rev/593c49fa812ceb4be45fcea7c9e90d15f59edb70/gfx/layers/wr/StackingContextHelper.h#82

We don't need a WebRenderLayerScrollData for every transform because a lot of transforms don't contain any ASRs, so the created WebRenderLayerScrollData would be useless.

However this optimization can lead to us creating a lot more WebRenderLayerScrollData later if the transform does contain ASRs. For example, if there is a transform, and then inside that is a ASR, and inside the ASR is a lot of small transforms, we end up having to create a WebRenderLayerScrollData for every little transform which don't contain any ASRs. This is doing the opposite of what the optimization intended.

WebRenderLayerScrollData creation happens during the CreateWebRenderCommands phase, so the display list build phase is complete, and we can tell cheaply if a transform contains any ASRs during display list building. So we just record that and use that to inform our decision about when to defer the transform item or not.

This optimization drastically reduces the total number of WebRenderLayerScrollData that we create during a full run of speedometer3 (summing the number created each paint over every paint). In my testing it went from 12-13k to 2-3k. Mostly subtests fell into two buckets: a single digit number of WebRenderLayerScrollData to begin with and this patch didn't change that, and 100 WebRenderLayerScrollData down to single digits after this patch. So the savings are concentrated in a few subtests that hit the described behaviour above.

I compared a profile before and after this patch of 10 runs of speedometer3, this patch saved 100 samples/ms serializing WebRenderLayerScrollData, which was what I expected based on how long serialization took before the patch combined with how many WebRenderLayerScrollData we were avoiding. The whole run took about 100,000 samples/ms, so this should hopefully be good for about 0.1% improvment. There is also potential savings in other areas outside of serialization step but that was a little harder to measure.

Differential Revision: https://phabricator.services.mozilla.com/D197446
2024-02-29 06:46:45 +00:00
Gregory Pappas 1dfbfcfd07 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 21:29:39 +00:00
Gregory Pappas c17b2cb769 Bug 1878401 - part 6 - Update nsIFilePicker users in layout/ to pass BrowsingContext to init r=tnikkel
Depends on D200550

Differential Revision: https://phabricator.services.mozilla.com/D200551
2024-02-28 21:29:39 +00:00