Commit graph

20205 commits

Author SHA1 Message Date
Sandor Molnar
13c7e4a350 Backed out 14 changesets (bug 1719535) for causing mochitest failures in accessible/tests/browser/mac/browser_text_basics.js CLOSED TREE
Backed out changeset 338c2c8d91af (bug 1719535)
Backed out changeset 3fdb2e999aba (bug 1719535)
Backed out changeset 63b9d2064827 (bug 1719535)
Backed out changeset 09c216cdbbc8 (bug 1719535)
Backed out changeset 29977dc00fb3 (bug 1719535)
Backed out changeset d3f8850a343b (bug 1719535)
Backed out changeset 90f1f621031f (bug 1719535)
Backed out changeset 52ca9bdc5bd4 (bug 1719535)
Backed out changeset 94536f0d5a1f (bug 1719535)
Backed out changeset d615264f9f5f (bug 1719535)
Backed out changeset f16f9e583378 (bug 1719535)
Backed out changeset e1abdee07587 (bug 1719535)
Backed out changeset 45f9ad406428 (bug 1719535)
Backed out changeset caa2b8a731dc (bug 1719535)
2023-08-02 14:55:26 +03:00
Makoto Kato
b750a964b5 Bug 1719535 - Part 10.3. Update test results of layout with new segmenter. r=TYLin
Fixing tests for new segmenter rules.

Depends on D180775

Differential Revision: https://phabricator.services.mozilla.com/D167678
2023-08-02 10:32:57 +00:00
Tiaan Louw
6798545271 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-08-01 13:14:32 +00:00
Cristian Tuns
df732c7c7c Backed out changeset 9763c9244933 (bug 1846249) for causing build bustages in StyleColorInlines.h CLOSED TREE 2023-08-01 07:16:19 -04:00
Tiaan Louw
cfd3c0c4e5 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-08-01 10:35:38 +00:00
Iulian Moraru
9b86bfb258 Backed out changeset 2c6e9abd5c86 (bug 1846249) for causing build bustages on ServoStyleConsts.h. CLOSED TREE 2023-07-31 22:06:34 +03:00
Tiaan Louw
54b0405222 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-07-31 18:22:46 +00:00
Jan-Niklas Jaeschke
12f5099c54 Bug 1838262, part 3: Removed ServoStyleSet::ProbeHighlightPseudoElementStyle(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184709
2023-07-31 13:47:55 +00:00
Jan-Niklas Jaeschke
c84288a36d Bug 1838262, part 2: Implemented getComputedStyle() for custom highlight api. r=emilio
This patch introduces functional pseudo parameters, i.e. `::highlight(foo)`,
for `getComputedStyle()`. This required adapting the parse algorithm (`nsCSSPseudoElements::ParsePseudoElement()`) and forwarding the functional pseudo parameter into the style engine.

Differential Revision: https://phabricator.services.mozilla.com/D183773
2023-07-31 13:47:54 +00:00
Ting-Yu Lin
937281f2c4 Bug 1812485 - Fix flex container fragmentation for reversed axes. r=dholbert
When iterating flex line and flex item in ReflowChildren(), start from the
startmost line and startmost item with respect to the flex container's
writing-mode. This is equivalent to iterate the items in visual order, which is
necessary to compute the item's position correctly, because any shift to the
startmost line or startmost item can affect later ones.

Also, change a condition in `Reflow()` to `aReflowInput.IsInFragmentedContext()`
so that the necessary data can be updated when the flex container fragment is
reflowed in the last column. Otherwise, there will be "unexpected max block
size" assertions [1] while running `layout/generic/crashtests/1666592.html`.

[1] https://searchfox.org/mozilla-central/rev/e9b8c73771d0038214c69f17c5934ba8ae049799/layout/generic/nsFloatManager.cpp#111

Differential Revision: https://phabricator.services.mozilla.com/D183193
2023-07-26 17:23:58 +00:00
Emilio Cobos Álvarez
b5d6ad43a2 Bug 1844832 - Share document-independent struct allocations. r=boris
In bug 1844755, a bunch of the time is spent allocating initial values.

There used to be more document-dependent initial values before
bug 1834487, but now that's only about default-font and direction.

This improves the situation by sharing initial structs that don't depend
on the document.

Differential Revision: https://phabricator.services.mozilla.com/D184256
2023-07-26 09:16:26 +00:00
serge-sans-paille
bcc4d5e330 Bug 1845440 - Get rid of useless global constructor for kBidiLevelNone r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184550
2023-07-26 09:10:12 +00:00
Emilio Cobos Álvarez
7bf3b0e527 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-26 06:46:32 +00:00
Iulian Moraru
251fc5e9ee Backed out changeset a86390266ae9 (bug 1829016) for causing wr failures on content-visibility-085.html. 2023-07-26 04:01:42 +03:00
Iulian Moraru
0c0945174b Backed out changeset f3394bd0f554 (bug 1844195) for causing conflicts with another backout. 2023-07-26 04:00:57 +03:00
Emilio Cobos Álvarez
e56bda6fd8 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-25 21:14:39 +00:00
Morgan Rae Reschenberg
dc7d564db1 Bug 1837496: NotifyOfPossibleBoundsChange when display list changes are observed, instead of during reflow/in SetPosition r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D184275
2023-07-25 20:42:21 +00:00
Iulian Moraru
da43d00caa Backed out changeset 3a3f2d5937c4 (bug 1844195) for causing mass failures. CLOSED TREE 2023-07-25 23:07:30 +03:00
Emilio Cobos Álvarez
c70814ab25 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-25 18:40:30 +00:00
Cathie Chen
218332994f Bug 1829016 - The size of content-visibility auto does not refresh when its content changes, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183414
2023-07-25 16:45:10 +00:00
Jonathan Kew
28f4536791 Bug 1845203 - Remove assertion that is fragile in the face of coordinate overflow. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184462
2023-07-25 10:27:03 +00:00
Frederic Wang
9ad02dda76 Bug 1788637 - Remove MathML preferences scriptminsize_attribute and scriptsizemultiplier_attribute. r=emilio
This commit removes the runtime flags and related code for the
scriptminsize and scriptsizemultiplier, which have been disabled by
default for a while. The hardcoded default values
kMathMLDefaultScriptSizeMultiplier and kMathMLDefaultScriptMinSizePt
are still used in some places and are preserved for now.

Differential Revision: https://phabricator.services.mozilla.com/D157426
2023-07-24 10:02:24 +00:00
Andrew Osmond
94fef446bd Bug 1837070 - Ensure we flush OffscreenCanvas when the display list is recreated. r=lsalzman
When we recreate the display list, e.g. after tabbing away, we need to
ensure we flush the OffscreenCanvas because our resource handles will be
invalidated. This requires the OffscreenCanvasDisplayHelper to know
which OffscreenCanvas it belongs to, and a worker reference if necessary
to do the dispatching for the flush. Otherwise we would require the
canvas to be updated manually by the web application to repaint.

Differential Revision: https://phabricator.services.mozilla.com/D184324
2023-07-23 20:42:41 +00:00
Iulian Moraru
f37818eb24 Bug 1838577 - disable test_bug1566783.html on linux opt for frequent failures. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D184317
2023-07-23 17:59:53 +00:00
Robert Longson
cb04d5f4a1 Bug 1843945 - optimise SVGObserverUtils r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183802
2023-07-22 14:06:38 +00:00
Timothy Nikkel
5267cbd117 Bug 1843848. Record gfxCriticalNoteOnce if we have to insert a scroll frame after the fact. r=mstange
When fission is enabled we activate all scroll frames that can be activated, so it should not be possible to hit this code. Record this to validate that it is indeed not possible for this to happen.

Differential Revision: https://phabricator.services.mozilla.com/D183742
2023-07-21 01:29:47 +00:00
Jonathan Kew
e965e3e508 Bug 1843863 - Fix the rendering of RTL text in a text-combine-upright element. r=emilio
Basically, we need to account for the right-to-left-ness when setting the origin
for applying the scale factor.

Differential Revision: https://phabricator.services.mozilla.com/D183767
2023-07-17 21:58:29 +00:00
Jonathan Kew
be1289d750 Bug 1843608 - Correct the handling of IsTextCombined in nsTextFrame::GetPointFromIterator and GetCharacterRectsInRange. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183749
2023-07-17 21:37:51 +00:00
Cathie Chen
b2f8b4fa60 Bug 1816474 - Assertion failure: IsHiddenByContentVisibilityOfInFlowParentForLayout() in nsIFrame.cpp, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D182805
2023-07-17 14:46:10 +00:00
Frederic Wang
8343f88354 Bug 1821980: Align mathvariant implementation on MathML Core. r=emilio,jfkthame
In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395
2023-07-14 19:44:04 +00:00
Cristian Tuns
9f238811ed Backed out changeset db50582c2b9f (bug 1821980) for causing mochitest failures in browser_mathml.js CLOSED TREE 2023-07-14 13:49:13 -04:00
Frederic Wang
0a3179c31f Bug 1821980: Align mathvariant implementation on MathML Core. r=emilio,jfkthame
In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395
2023-07-14 15:53:34 +00:00
Iulian Moraru
68cbf5e276 Backed out changeset 6cceaca5e653 (bug 1821980) for causing multiple failures. CLOSED TREE 2023-07-14 15:41:31 +03:00
Frederic Wang
1e731ab03c Bug 1821980: Align mathvariant implementation on MathML Core. r=emilio,jfkthame
In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395
2023-07-14 10:52:59 +00:00
David Shin
e86d57ef18 Bug 1843086: Line participants use block start ascent, instead of not-yet stored baseline. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183432
2023-07-13 13:40:25 +00:00
Jonathan Kew
90a0aae39c Bug 1838250 - Avoid O(n^2) behavior in nsTextFrame::GetCharacterRectsInRange. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183382
2023-07-13 09:47:59 +00:00
Boris Chiou
3996efea15 Bug 1842277 - Compute <basic-shape-rect> to the equivalent inset() function. r=devtools-reviewers,emilio
Per spec
https://drafts.csswg.org/css-shapes-1/#basic-shape-computed-values, and
the spec issue, https://github.com/w3c/csswg-drafts/issues/9053,
all <basic-shape-rect> functions compute to the equivalent inset() function.
i.e.
`xywh(x y w h)` computes to
`inset(y calc(100% - x - w) calc(100% - y - h) x)`

The basic concept is to use `BasicShapeRect` as the specified value of
`<basic-shape-rect>`, i.e. inset()/xywh()/rect(), and its computed value is
the equivalent `InsetRect`, and so it becomes possible to interpolate among
these three functions.

Also, we can drop BuildXywhPath() and ComputeRect() because now there is
only inset() function when building gfx::Path.

Besides, tweak the test, offset-path-shape-xywh-003.html, because the original
test, `xywh(10% 10% 80% 80%)`, has to calculate `calc(100% - 10% - 80%)`.
Its result is `Percentage(0.099999964)` in Rust code, and then it makes us
compute an imprecision inset rect when building the gfx::path, which results in
a transform with the sub-pixel translation. So change it to
`xywh(10% 10% 90% 90%)` to avoid adding fuzzy tolerance.

Differential Revision: https://phabricator.services.mozilla.com/D183221
2023-07-12 20:16:47 +00:00
Rob Buis
1a5792f5ac Bug 1835813 - support contain-intrinsic-size: auto none r=Oriol,emilio,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D182462
2023-07-11 18:23:26 +00:00
Jonathan Watt
07bafd2423 Bug 1833244 p1. Create infrastructure to pass page dimensions to PrintTarget::BeginPage. r=dholbert,geckoview-reviewers,jonalmeida
OS print drivers/devices know nothing about page dimensions unless we tell
them. Previously, the physical page dimensions (including orientation) have
always been the same, so communicating their dimensions once at the start of
a print has been enough. In preparation for supporting different "physical"
page dimensions (in the immediate future only different page orientations) when
we save to PDF, we need to have the infrastructure to pass dimensions through
on a page-by-page basis. This patch adds that.

None of the PrintTarget subclasses do anything with this extra information yet,
but in a follow-up patch PrintTargetPDF will use this information to create
PDFs with mixed page orientations.

Differential Revision: https://phabricator.services.mozilla.com/D179423
2023-07-10 14:26:12 +00:00
Razvan Cojocaru
23aa72ebf6 Bug 1841478 - Use strongly-typed coordinates in the BaseSize constructor. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D182654
2023-07-10 02:59:01 +00:00
Emilio Cobos Álvarez
bd1b363ff9 Bug 1824886 - Rewrite AnonymousContent to use a shadow tree. r=smaug,TYLin,sfoster,devtools-reviewers,nchevobbe
Subtle things:

 * We now have shadow trees in NAC, inception! Only a couple lines of
   code in the style system had to be changed to match :host rules and
   so properly.

 * Had to make highlighters.css contentaccessible, because otherwise we
   can't load it from the shadow tree. I don't think it's a big deal.

 * I removed some of the code from highlighters.css that claimed that
   stuff inherited from the html element. That's just no longer true.

 * Had to switch from `setAttribute("style", ...)` to `.style = ...;`.
   This is needed because CSSOM from chrome code bypasses CSP (as
   AnonymousContent did), but setAttribute() doesn't, see bug 1424474.

Differential Revision: https://phabricator.services.mozilla.com/D173998
2023-07-09 11:34:05 +00:00
Razvan Cojocaru
74639ffcbe Bug 1842072 - Prevent IntCoordTyped's constructor from accepting non-integral parameters. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D182936
2023-07-08 07:45:44 +00:00
Boris Chiou
413be80cd8 Bug 1786160 - Support xywh() for clip-path. r=emilio
The fuzzy in the test happens on the round because we use the different way
to draw the round of clip-path (compared to border-radius property) in
the render backend, so there are some tiny differences.

Differential Revision: https://phabricator.services.mozilla.com/D182421
2023-07-07 18:12:41 +00:00
Boris Chiou
ddea7e5176 Bug 1786160 - Rename inset as rect in ShapeUtils. r=emilio
We would like to use these function for all rectangular shape, i.e.
inset()/xywh()/rect(). So rename them to avoid confusion.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D182422
2023-07-07 18:12:41 +00:00
Boris Chiou
39d4bd0f10 Bug 1786160 - Support xywh() in style. r=emilio
Also, add layout.css.basic-shape-xywh.enabled and enable it on Nightly

Differential Revision: https://phabricator.services.mozilla.com/D182419
2023-07-07 18:12:40 +00:00
Stanca Serban
15c8455338 Backed out changeset 1c835137f532 (bug 1824886) for causing multiple failures. CLOSED TREE 2023-07-06 02:11:59 +03:00
Emilio Cobos Álvarez
3338831b84 Bug 1824886 - Rewrite AnonymousContent to use a shadow tree. r=smaug,TYLin,sfoster,devtools-reviewers,nchevobbe
Subtle things:

 * We now have shadow trees in NAC, inception! Only a couple lines of
   code in the style system had to be changed to match :host rules and
   so properly.

 * Had to make highlighters.css contentaccessible, because otherwise we
   can't load it from the shadow tree. I don't think it's a big deal.

 * I removed some of the code from highlighters.css that claimed that
   stuff inherited from the html element. That's just no longer true.

 * Had to switch from `setAttribute("style", ...)` to `.style = ...;`.
   This is needed because CSSOM from chrome code bypasses CSP (as
   AnonymousContent did), but setAttribute() doesn't, see bug 1424474.

Differential Revision: https://phabricator.services.mozilla.com/D173998
2023-07-05 21:59:44 +00:00
Cosmin Sabou
fb92d5f42f Backed out 2 changesets (bug 1824886) for causing failures on browser_all_files_referenced.js. CLOSED TREE
Backed out changeset 650ef77d1c4d (bug 1824886)
Backed out changeset 1c835137f532 (bug 1824886)
2023-07-06 00:42:53 +03:00
Emilio Cobos Álvarez
454c0b932e Bug 1824886 - Rewrite AnonymousContent to use a shadow tree. r=smaug,TYLin,sfoster,devtools-reviewers,nchevobbe
Subtle things:

 * We now have shadow trees in NAC, inception! Only a couple lines of
   code in the style system had to be changed to match :host rules and
   so properly.

 * Had to make highlighters.css contentaccessible, because otherwise we
   can't load it from the shadow tree. I don't think it's a big deal.

 * I removed some of the code from highlighters.css that claimed that
   stuff inherited from the html element. That's just no longer true.

 * Had to switch from `setAttribute("style", ...)` to `.style = ...;`.
   This is needed because CSSOM from chrome code bypasses CSP (as
   AnonymousContent did), but setAttribute() doesn't, see bug 1424474.

Differential Revision: https://phabricator.services.mozilla.com/D173998
2023-07-05 18:21:31 +00:00
Iulian Moraru
33c0086ecb Backed out changeset e1b5dd2da037 (bug 1835813) for causing multiple failures. 2023-07-05 16:34:47 +03:00