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

80956 Коммитов

Автор SHA1 Сообщение Дата
Boris Chiou 64846883fe Bug 1840601 - Enable preferences in layout/style/test/mochitest.ini for motion path. r=hiro
Enable the necessary preferences for motion path.

Differential Revision: https://phabricator.services.mozilla.com/D182239
2023-06-27 22:19:44 +00:00
Ting-Yu Lin eced876a19 Bug 1839775 - Use marionette action instead of HTMLElement.tap() in AccessibleCaret tests. r=webdriver-reviewers,whimboo
HTMLElement.tap() is going to be removed in bug 1792529.

This patch doesn't change the behavior.

Differential Revision: https://phabricator.services.mozilla.com/D181814
2023-06-27 22:11:34 +00:00
Emilio Cobos Álvarez 3d3511bf24 Bug 1840476 - [css-properties-values-api] Custom property registration plumbing. r=zrhoffman,firefox-style-system-reviewers,webidl,saschanaz
This implements script registration and some basic validity checks so
that we start keeping track of custom properties in the CascadeData and
in script.

Differential Revision: https://phabricator.services.mozilla.com/D182110
2023-06-27 09:48:51 +00:00
Emilio Cobos Álvarez a398815dad Bug 1839950 - CSSStyleDeclaration.getPropertyValue doesn't throw. r=peterv
We fixed nsComputedDOMStyle ages ago.

Differential Revision: https://phabricator.services.mozilla.com/D181944
2023-06-27 08:21:46 +00:00
Masayuki Nakano 23a18fdd2a Bug 831008 - Make `EventListenerManager` assert when a legacy DOM mutation event listener is added in either chrome documents, native anonymous subtrees or the system event groups r=smaug
The legacy DOM mutation events shouldn't be used even in content and must not be
used in chrome.

This patch makes it crash if legacy mutation event listener is:
* added to a node in a chrome document
* added to a node in a native anonymous subtree
* added to the system event group
* implemented by C++

This causes some crash tests and chrome tests.  Therefore, this patch modifies
them to use `MutationObserver` instead or removes them if it's impossible to
rewrite with `MutationObserver`.

Note that if I prevent to dispatch mutation events in some/all of the cases,
that causes performance regression in Speedometer3.  Therefore, this patch
does not touch `EventDispatcher`.

Differential Revision: https://phabricator.services.mozilla.com/D181828
2023-06-27 04:20:17 +00:00
Norisz Fay 07a91b8c6a Backed out 2 changesets (bug 1838829) for causing perma mochitest failure with dom/websocket/tests being skipped CLOSED TREE
Backed out changeset 19a5d4f1850a (bug 1838829)
Backed out changeset 97cd8a256954 (bug 1838829)
2023-06-27 02:52:52 +03:00
Boris Chiou 3523b747c5 Bug 1598156 - Part 8: Support Compositor animations for all basic shapes. r=emilio,hiro
This patch sends the information of border-radius to the compositor as
well, so we can use it if offset-path uses coord-box only.

Note:
We repaint the frame if border-radius property gets changed, and rebuild
the display item. In this case, we resend the transaction of compositor
animation as well. Therefore, we don't have to block the compositor animations
if they depends on border-radius (i.e. use coord-box only).

We may need a better way to check what should we pass to the compositor,
for motion path, in Bug 1838977.

Differential Revision: https://phabricator.services.mozilla.com/D179631
2023-06-26 23:23:55 +00:00
Boris Chiou 4bec0b7d55 Bug 1598156 - Part 7: Support <coord-box> without any function. r=emilio
I tweak css/motion/offset-path-coord-box-001.html a little bit to
avoid decimals in the reference file.

For offset-path-coord-box-002.html and offset-path-coord-box-003.html,
I make the border width larger so it'd be clear to see the difference.
Also the original reference files are not correct because they always use
border-box, so I also fix them to use the correct box.

Also, rename offset-path-geometry-box.html as offset-path-coord-box-004.html,
because there is no "geometry-box" in the spec. We are using "coord-box"
now.

Differential Revision: https://phabricator.services.mozilla.com/D181317
2023-06-26 23:23:55 +00:00
Boris Chiou 99508a94f6 Bug 1598156 - Part 6: Build path for basic shapes. r=emilio
Basically, the fuzzy happens because the direction angle in circle(),
ellipse(), and inset() can not be equal to the degree perfectly (due to
the arc drawing implementation and the anti-alias around the element),
so we need some tolerance.

And drop offset-path-shape(-ref).html because it has been removed from
the upstream repo.

Differential Revision: https://phabricator.services.mozilla.com/D179630
2023-06-26 23:23:55 +00:00
Boris Chiou 48208132f5 Bug 1598156 - Part 5: Add some helper functions to check the type of StyleOffsetPath. r=emilio
The data structure of StyleOffsetPath is complicated, so adding some
useful functions to simplify the code.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D181316
2023-06-26 23:23:55 +00:00
Boris Chiou 98a5a2b1f0 Bug 1598156 - Part 4: Rename ComputeRayOrigin as ComputePosition. r=emilio
I'd like to reuse it to compute the center position for circle() and
ellipse(), so use a better function name.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D181315
2023-06-26 23:23:54 +00:00
Boris Chiou dfd2e54386 Bug 1598156 - Part 3: Remove RayReferenceData. r=emilio
I'd like to reuse the data in RayReferenceData for all basic shapes,
so unpack RayReferenceData and drop this struct.

Also, use `nsPoint` for the current position and use `nsRect` for coord-box
because we use these types (i.e. app units) in ShapeUtils.

Besides, remove the usage of Maybe from nsStyleTransformMatrix.h and
just accept the pointer of ResolvedMotionPathData to avoid including
the entire header.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D181008
2023-06-26 23:23:54 +00:00
Boris Chiou 664864016f Bug 1598156 - Part 2: Rename Path as Shape in OffsetPathData. r=emilio
Because we'd like to use it for all basic shapes.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D181314
2023-06-26 23:23:54 +00:00
Boris Chiou dba9f9063b Bug 1598156 - Part 1: Factor out the building of gfx::path into separate functions. r=emilio
So we can reuse them to draw basic shapes for offset-path.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D179629
2023-06-26 23:23:54 +00:00
Emilio Cobos Álvarez 19b74cd4e3 Bug 1839945 - [css-nesting] Properly restrict nested rules. r=zrhoffman
As per https://drafts.csswg.org/css-nesting/#conditionals only some
rules are allowed inside style rules.

Differential Revision: https://phabricator.services.mozilla.com/D181798
2023-06-26 20:36:12 +00:00
Kershaw Chang 75c68b6864 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-26 14:22:14 +00:00
Dan Robertson 60dcb01863 Bug 1825681 - Allow smooth scrolls for XUL scrollbox. r=botond
Allow smooth scrolls for elements in the browser chrome if
toolkit.scrollbox.smoothScroll is set. This should be used instead of
the value of general.smoothScroll.

Differential Revision: https://phabricator.services.mozilla.com/D181662
2023-06-26 12:48:12 +00:00
Jonathan Kew 429b3f5f17 Bug 1840195 - Don't try to treat the first character in an SVGTextFrame as a cluster extender, even if it's a combining char. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D181941
2023-06-26 08:41:13 +00:00
Tom Schuster a0e70b744b Bug 1838415 - Introduce RFPTargets for all CSS media features. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181247
2023-06-26 07:17:39 +00:00
Tom Schuster 04d571f1de Bug 1838415 - Introduce RFPTarget::DOMStyleOsxFontSmoothing. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181245
2023-06-26 07:17:39 +00:00
Tom Schuster ea9dd64c2b Bug 1838415 - Introduce RFPTarget::UseStandinsForNativeColors. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181241
2023-06-26 07:17:39 +00:00
Tom Schuster 14d55c325c Bug 1838415 - Introduce RFPTarget::FontVisibilityBaseSystem + LangPack. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181235
2023-06-26 07:17:38 +00:00
Nicolas Chevobbe cbd07d9a84 Bug 1840076 - Set layout.css.nesting.enabled to true for layout/inspector/tests. r=emilio.
Since nesting is only enabled on Nightly at the moment,
a couple tests using nesting were failing on beta simulation.

Taking this as an opportunity to sort tests in ini file

Differential Revision: https://phabricator.services.mozilla.com/D181886
2023-06-24 08:17:06 +00:00
Razvan Cojocaru ebe5d60c5d Bug 1838107 - Use strongly-typed coordinates in the BaseMargin constructor. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D180835
2023-06-23 20:24:53 +00:00
Ting-Yu Lin 3b6ddbc184 Bug 1839944 - Rename two cached baseline variables in nsFlexContainerFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D181826
2023-06-23 17:40:42 +00:00
Daniel Holbert d4231da538 Bug 1834663 part 3: Make FlexItems join the opposite BaselineSharingGroup on their FlexLine, if their block-flow direction is opposite to the flex container's corresponding LogicalAxis. r=TYLin
The idea behind this change is for flex items with swapped block-flow direction
to end up in swapped baseline-sharing groups on the flex container's FlexLine.

The outcome of this is that all of the baseline-aligned flex items that are
using a baseline on their left edge will be aligned together (e.g. in the
"first" group), and all of the flex items with a baseline on their right edge
will be aligned together (e.g. in the "last" group), even if they may have
varying block-flow directions (vertical-lr vs. rl) and varying `align-self`
values.

This is rooted in the idea of baseline alignment preferences being "compatible"
as defined here:
https://drafts.csswg.org/css-align-3/#compatible-baseline-alignment-preferences

This makes us start passing a bunch of WPT tests; this patch removes the
corresponding .ini files for those tests that are now passing.

Differential Revision: https://phabricator.services.mozilla.com/D181824
2023-06-23 16:20:38 +00:00
Daniel Holbert dd5d16e75a Bug 1834663 part 2: Give the FlexItem class a method to return the BaselineSharingGroup that it participates in. r=TYLin
This patch doesn't affect behavior; it's just a refactoring to prepare for the
next patch in this series.

(As of this patch, the BaselineSharingGroup is always the same as the
'align-self' baseline selection, but the next patch will change that.)

Differential Revision: https://phabricator.services.mozilla.com/D181823
2023-06-23 16:20:38 +00:00
Jan-Niklas Jaeschke 7518e2e9bc Bug 1811823, part 2: Add correct prioritization for custom highlights. r=emilio
Due to the prioritization rules for custom highlights, it is not feasible to rely on cascading.
Instead, highlights need to be stacked by their priority (and order of insertion).
Text and background color of the highest-prioritized highlight which defines that property should be used.

Since highlights are implemented as special `Selection`s, the algorithm that determines the prevailing selection for a text frame needed to be adapted to instead return a list of selections.

Differential Revision: https://phabricator.services.mozilla.com/D181143
2023-06-23 15:22:44 +00:00
Jan-Niklas Jaeschke a4a9d51c57 Bug 1811823, part 1: Added `HighlightSelectionData` struct. r=emilio
The idea of this struct is to allow live data of a highlight selection to be passed into layout.
Layout needs highlight properties such as priority or type to resolve combinations of highlights correctly.

Differential Revision: https://phabricator.services.mozilla.com/D181142
2023-06-23 15:22:43 +00:00
Jonathan Kew 7d0978de1e Bug 1839614 - patch 2 - Move the browser.display.auto_quality_min_font_size pref into StaticPrefs. r=gfx-reviewers,lsalzman
No change in behavior here; this is to prepare for offscreen-canvas workers
to be able to access the pref (following patch).

Depends on D181636

Differential Revision: https://phabricator.services.mozilla.com/D181637
2023-06-23 15:12:19 +00:00
Peter Van der Beken b52a207bb0 Bug 1522052 - remove nsIDOMChromeWindow. r=dom-core,webdriver-reviewers,devtools-reviewers,whimboo,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34310
2023-06-23 14:21:05 +00:00
Emilio Cobos Álvarez 4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Botond Ballo a716f5be1d Bug 1835600 - Add scroll snap support to SmoothScrollAnimation. r=hiro
And also propagate the ScrollTriggeredByScript flag through it.

Differential Revision: https://phabricator.services.mozilla.com/D181421
2023-06-23 07:30:24 +00:00
Botond Ballo bf6116ce93 Bug 1835600 - Hand off absolute non-MSD smooth scrolls to APZ. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D181419
2023-06-23 07:30:23 +00:00
Nicolas Chevobbe 3666380cfa Bug 1839420 - [devtools] Add nested rule test case for CssRule#selectorMatchesElement. r=emilio.
Depends on D181741

Differential Revision: https://phabricator.services.mozilla.com/D181732
2023-06-23 05:07:33 +00:00
Ting-Yu Lin 3506acbb59 Bug 1792750 Part 3 - Fix flex container baselines with reverse axes. r=dholbert
This is the spec describing flex container baselines.
https://drafts.csswg.org/css-flexbox-1/#flex-baselines

* Separate the cache for last baseline in FlexItem. This is needed beacuse we set
  an item's first baseline via `SetAscent()` after reflowing it. Any query to last
  baseline via `ResolvedAscent(false)` will wrongly return the first baseline.

* We used to compute flex container baseline from the first item in
  ReflowChildren(). Now we consolidate all the logic computing flex container
  baseline in PopulateReflowOutput().

Differential Revision: https://phabricator.services.mozilla.com/D181604
2023-06-23 00:39:46 +00:00
Ting-Yu Lin 9aee13d874 Bug 1792750 Part 2 - Pass FlexLayoutResult into PopulateReflowOutput(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D181603
2023-06-23 00:39:46 +00:00
Ting-Yu Lin f66247db06 Bug 1792750 Part 1 - Remove an obsolete comment for FlexLine::LastBaselineOffset(). r=dholbert
We've removed the ability to reverse flex container's axes internally in
bug 1639053.

Differential Revision: https://phabricator.services.mozilla.com/D181602
2023-06-23 00:39:46 +00:00
Emilio Cobos Álvarez ea0c4b6272 Bug 1839420 - Make CSSStyleRule.selectorMatchesElement use the desugared selector list. r=nchevobbe,firefox-style-system-reviewers,boris
Trivial enough. This makes the test in D181732 pass.

Differential Revision: https://phabricator.services.mozilla.com/D181741
2023-06-22 22:12:49 +00:00
Emily McDonough bae44588ff Bug 1838078 - Ensure page-rules respect layer order for styling r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D180733
2023-06-22 20:16:26 +00:00
Emilio Cobos Álvarez 7bddcf9e5a Bug 1839223 - Remove nsMappedAttributes. r=smaug
Instead, lazily schedule evaluation of them before styling, much like we
were doing for SVG.

A subtle tweak is that we only remain scheduled while in the document.
This allows us to use the "in document" bit plus the "mapped attributes
dirty" bit to know our scheduled status. It also prevents doing silly
work for disconnected elements, and having to do hashmap lookups on
adoption and node destruction.

Differential Revision: https://phabricator.services.mozilla.com/D181549
2023-06-22 17:22:03 +00:00
Cristian Tuns 6957543e5e Backed out changeset a3e55d5f9f13 (bug 1839223) for causing multiple failures in Document.cpp CLOSED TREE 2023-06-22 11:34:15 -04:00
Emilio Cobos Álvarez c3a1b1a608 Bug 1839223 - Move table cellpadding handling to HTMLTableElement. r=smaug
As per discussion.

Differential Revision: https://phabricator.services.mozilla.com/D181781
2023-06-22 14:45:14 +00:00
Emilio Cobos Álvarez 2c6de5f038 Bug 1839223 - Remove nsMappedAttributes. r=smaug
Instead, lazily schedule evaluation of them before styling, much like we
were doing for SVG.

A subtle tweak is that we only remain scheduled while in the document.
This allows us to use the "in document" bit plus the "mapped attributes
dirty" bit to know our scheduled status. It also prevents doing silly
work for disconnected elements, and having to do hashmap lookups on
adoption and node destruction.

Differential Revision: https://phabricator.services.mozilla.com/D181549
2023-06-22 14:31:16 +00:00
Emilio Cobos Álvarez 1ac45263e4 Bug 1839221 - Simplify rule to hide forms inside tables in html docs. r=jfkthame
While we're at it:

 * Hide :-moz-is-html from content. This is barely documented (a google
   search for that yields two pages mostly of our UA sheet) and unlikely
   to cause any compat impact (plus it's a one-liner to expose it if we
   needed to).

 * Make that only depend on the document state. It doesn't have any
   practical implications since we only use it on html.css which already
   has a default namespace.

 * Add some documentation on why are these pseudo-classes (rather than
   e.g., media queries).

Differential Revision: https://phabricator.services.mozilla.com/D181406
2023-06-22 11:31:44 +00:00
Tiaan Louw ce2ee22a42 Bug 1838600 - Implement the abs() function r=emilio
The abs() function resolves to the absolute value in calculations.

https://drafts.csswg.org/css-values-4/#sign-funcs

Differential Revision: https://phabricator.services.mozilla.com/D181060
2023-06-22 11:20:03 +00:00
Nicolas Chevobbe b1df5e55c3 Bug 1839638 - [devtools] Add InspectorUtils.parseStyleSheet test for nested rules. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D181645
2023-06-22 09:27:54 +00:00
Peter Van der Beken 36003fd793 Bug 1803752 - Make CSS2Properties getters and setters use a common generated implementation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181106
2023-06-22 08:12:07 +00:00
Hiroyuki Ikezoe c146abc3d5 Bug 1835712 - Add a new flag to InputAPZContext to indicate the state we didn't handle the event on the main-thread. r=botond
And use it to tell whether it's safe to inform the handled result to APZ.

Differential Revision: https://phabricator.services.mozilla.com/D180760
2023-06-22 03:01:44 +00:00
Norisz Fay e86f1fa0e9 Backed out 5 changesets (bug 1838829) for causing mochitest failures CLOSED TREE
Backed out changeset 693d34c8447d (bug 1838829)
Backed out changeset 903d9ff4afaa (bug 1838829)
Backed out changeset 5e51feff7467 (bug 1838829)
Backed out changeset e125be49d2a6 (bug 1838829)
Backed out changeset 1a8cf3c83dc4 (bug 1838829)
2023-06-22 03:37:07 +03:00