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

1217 Коммитов

Автор SHA1 Сообщение Дата
David Shin c507c766c3 Bug 1918463: Fix `inset` auto-completion. r=firefox-style-system-reviewers,emilio
Prevent `anchor()`'s inner keywords from suggested, and make the suggestion of
`anchor()` only if the relevant pref is flipped.

Differential Revision: https://phabricator.services.mozilla.com/D222018
2024-09-12 19:18:27 +00:00
Boris Chiou 7c3a0ab05d Bug 1911216 - Part 1: Add CSS selector parsing support for view transition pseudo-elements. r=layout-reviewers,firefox-style-system-reviewers,emilio,devtools-reviewers,nchevobbe
This adds the pasring support for:
1. `::view-transition`
2. `::view-transition-group(name)`
3. `::view-transition-image-pair(name)`
4. `::view-transition-old(name)`
5. `::view-transition-new(name)`

The `name` here is a `<custom-ident>` or `*`.

Differential Revision: https://phabricator.services.mozilla.com/D219713
2024-09-03 19:29:32 +00:00
David Shin 604c5a7898 Bug 1909346: Implement `CSSPositionTryRule` interface. r=firefox-style-system-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217627
2024-08-16 13:14:04 +00:00
Norisz Fay f156dee704 Backed out 5 changesets (bug 1900233, bug 1911353, bug 1909346) for causing mochitest failures on test_property_syntax_errors.html CLOSED TREE
Backed out changeset e19f73882313 (bug 1911353)
Backed out changeset da10b514e301 (bug 1900233)
Backed out changeset a806c12d47f9 (bug 1909346)
Backed out changeset 46695f2f204a (bug 1909346)
Backed out changeset 82856fd84c5a (bug 1900233)
2024-08-15 04:58:45 +03:00
David Shin aa3062dc34 Bug 1909346: Implement `CSSPositionTryRule` interface. r=firefox-style-system-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217627
2024-08-14 23:26:13 +00:00
Nicolas Chevobbe dda5cbcadf Bug 1911619 - [devtools] InspectorUtils.valueMatchesSyntax should always return true for CSS-wide keywords. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D218604
2024-08-07 12:04:58 +00:00
Narcis Beleuzu 58825dea6d Backed out 5 changesets (bug 1909346, bug 1911353, bug 1900233) for Bp bustages on ServoStyleSet.cpp . CLOSED TREE
Backed out changeset f6e3cddaa98e (bug 1911353)
Backed out changeset d8ec18178fed (bug 1900233)
Backed out changeset f6e45aa1a0f9 (bug 1909346)
Backed out changeset 7903b612930c (bug 1909346)
Backed out changeset c400d8d1a91f (bug 1900233)
2024-08-06 21:34:13 +03:00
David Shin b3b50c0377 Bug 1909346: Implement `CSSPositionTryRule` interface. r=firefox-style-system-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217627
2024-08-06 16:59:27 +00:00
Boris Chiou 257ab87c78 Bug 1905035 - Make sure we build the bloom filter with the ancestors when resolving the starting-style for Insepctor. r=firefox-style-system-reviewers,nchevobbe,layout-reviewers,emilio
Otherwise, we may fast-reject the descendant/child selectors.

Differential Revision: https://phabricator.services.mozilla.com/D216130
2024-07-11 18:13:16 +00:00
Nicolas Chevobbe 2e3e77edb3 Bug 1905569 - [devtools] Add InspectorUtils.getCSSRegisteredProperty. r=emilio.
In some cases, DevTools might want to get the property definition of a given registered property,
so we're adding a new InspectorUtils method for this.
It returns null when there is no registered property matching the passed name.
A test is added to ensure this behaves as expected.

Differential Revision: https://phabricator.services.mozilla.com/D215317
2024-07-01 13:35:27 +00:00
Nicolas Chevobbe f114f4f423 Bug 1899107 - [devtools] Display light-dark function in autocomplete. r=layout-reviewers,emilio.
Differential Revision: https://phabricator.services.mozilla.com/D211716
2024-06-05 13:53:08 +00:00
Boris Chiou 6203ad286b Bug 1893409 - Make getCSSStyleRules() work for starting style as well. r=layout-reviewers,firefox-style-system-reviewers,nchevobbe,emilio
Update the API, `nspectorUtils.getCSSStyleRules`. Add one extra
argument so the user can choose whether we should return the starting
style, for a given element, at this moment.

Differential Revision: https://phabricator.services.mozilla.com/D209318
2024-06-04 03:15:00 +00:00
Nicolas Chevobbe 08e9a99b4c Bug 1899533 - [devtools] Add InspectorUtils method to validate a value against a given syntax. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D211975
2024-06-03 19:53:00 +00:00
Ting-Yu Lin 58991f71c0 Bug 1896516 Part 9 - Remove nsIScrollableFrame usages under dom/. r=layout-reviewers,emilio
Also, in EventStateManager, convert `ComputeScrollTarget()` and
`ComputeScrollTargetAndMayAdjustWheelEvent()` to return `ScrollContainerFrame*`
so that we can drop more unnecessarily `do_QueryFrame`.

Due to removing `nsIScrollableFrame` forward declaration in DOM headers, we have
to add `nsIScrollableFrame` forward declaration temporarily in
nsMenuPopupFrame.h to make this patch compile, but we'll remove it once we
remove `nsIScrollableFrame` under layout/.

Differential Revision: https://phabricator.services.mozilla.com/D211496
2024-05-30 06:32:21 +00:00
Sebastian Hengst ccb101be8f Backed out 15 changesets (bug 1896516) for causing scrolling crashes on macOS. a=backout
Backed out changeset fd6904338812 (bug 1896516)
Backed out changeset 2977ff81a23e (bug 1896516)
Backed out changeset c8a6b0e526d6 (bug 1896516)
Backed out changeset 3c06f22da72b (bug 1896516)
Backed out changeset f63b0c4335fe (bug 1896516)
Backed out changeset 6f7ab8adfa6e (bug 1896516)
Backed out changeset 997c9249dbed (bug 1896516)
Backed out changeset c964fccd5180 (bug 1896516)
Backed out changeset 7b481b747b7a (bug 1896516)
Backed out changeset 42e1bbe0ecb6 (bug 1896516)
Backed out changeset 717dac08b607 (bug 1896516)
Backed out changeset 2f0817331dbe (bug 1896516)
Backed out changeset b765169a7a8f (bug 1896516)
Backed out changeset a2d37b98273c (bug 1896516)
Backed out changeset ea9ecb543e66 (bug 1896516)
2024-05-29 11:22:52 +02:00
Emilio Cobos Álvarez a660c3ba45 Bug 1899103 - Add InspectorUtils.isUsedColorSchemeDark. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D211718
2024-05-28 13:16:52 +00:00
Ting-Yu Lin f1d8716c3b Bug 1896516 Part 9 - Remove nsIScrollableFrame usages under dom/. r=layout-reviewers,emilio
Also, in EventStateManager, convert `ComputeScrollTarget()` and
`ComputeScrollTargetAndMayAdjustWheelEvent()` to return `ScrollContainerFrame*`
so that we can drop more unnecessarily `do_QueryFrame`.

Due to removing `nsIScrollableFrame` forward declaration in DOM headers, we have
to add `nsIScrollableFrame` forward declaration temporarily in
nsMenuPopupFrame.h to make this patch compile, but we'll remove it once we
remove `nsIScrollableFrame` under layout/.

Differential Revision: https://phabricator.services.mozilla.com/D211496
2024-05-28 04:46:20 +00:00
Daniel Holbert 65bdc0fc6f Bug 1896711 part 1: Use MakeRefPtr to reduce boilerplate, in layout/{build,inspector,mathml}. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D210387
2024-05-15 07:29:19 +00:00
Nicolas Chevobbe 09fec812c0 Bug 1893923 - [devtools] Add ChromeOnly CSSStyleRule::querySelectorAll. r=layout-reviewers,emilio.
For the selector highlighter, we were retrieving the desugared selector of each
displayed rule, and using the selector text in querySelectorAll to retrieve the
elements matching the rule.
This can be very expensive, especially for deeply nested rule, for a feature that
might not even be used.
This patch is adding a method which takes a root node, and will return the
elements inside the root node that match the rule's selectors.
We're only exposing the method that existed in glue.rs to get the SelectorList
of a given Rule, and call `Servo_SelectorList_QueryAll` with it to get our NodeList.

A test file is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D208363
2024-04-29 06:43:23 +00:00
Nicolas Chevobbe e6a3d588fb Bug 1887638 - [devtools] Expose CSS token value in InspectorCSSToken. r=emilio.
In some cases, it can be more useful to only get the token value than the whole
token text (e.g. for 'Function`, where the value is the function name, while
the text includes the opening parenthesis)
Refactor `test_lexer` to better test the tokens we get, including their value property.

Differential Revision: https://phabricator.services.mozilla.com/D207400
2024-04-15 17:14:43 +00:00
Nicolas Chevobbe f6bb5f8a6c Bug 1887638 - [devtools] Add InspectorCSSParser. r=emilio,devtools-reviewers,frontend-codestyle-reviewers,bomsy.
This new InspectorCSSParser makes use of the cssparser crate so DevTools end
up using the same code as the CSS engine.
At the moment, we can't get the token start and end offsets, so we create
a JS wrapper class to compute them in JS. This might be removed if we get
a way to retrieve utf16 position from the cssparser.
The existing lexer xpcshell test is modified so it can run against both js-based
and rust-based lexers.

Differential Revision: https://phabricator.services.mozilla.com/D202909
2024-04-15 17:14:42 +00:00
Nicolas Chevobbe e99d49e5e2 Bug 1890775 - [devtools] Fix get_byte_index_from_line_and_column line index computation. r=layout-reviewers,devtools-reviewers,emilio.
We were getting a line byte index for the
actual char matching the line we want, but
we actually need the index _after_ that
new line char.
A test case is added to cover this fix.

Differential Revision: https://phabricator.services.mozilla.com/D207156
2024-04-11 12:57:38 +00:00
Nicolas Chevobbe 8003c92d48 Bug 1882964 - [devtools] Turn getRuleBodyTextOffsets into getRuleBodyText for easier unicode chars handling. r=layout-reviewers,devtools-reviewers,emilio,ochameau.
`InspectorUtils.getRuleBodyTextOffset` was returning bytes position, and we
were using them directly in Javascript `substring`, which causes problem
with non-ascii chars.
Instead of returning offsets to compute the rule string, we directly return
the string from InspectorUtils which is easier to work with.

Differential Revision: https://phabricator.services.mozilla.com/D204523
2024-04-08 08:37:14 +00:00
Nicolas Chevobbe d6cde62e67 Bug 1882964 - [devtools] Add InspectorUtils.replaceBlockRuleBodyTextInStylesheet. r=layout-reviewers,devtools-reviewers,emilio,ochameau.
The next patch modifies `getRuleText` so it only returns the text, and no
longer the offset at which the rule starts.
The only consumer of the returned offset was in `StyleRuleActor#setRuleText`,
so we migrate this directly to a InspectorUtils method to avoid mixing JS string
indexes with Rust bytes position.

Differential Revision: https://phabricator.services.mozilla.com/D204522
2024-04-08 08:37:13 +00:00
Boris Chiou f28ff20558 Bug 1889496 - Part 2: Implement CSSStartingStyleRule interface. r=webidl,firefox-style-system-reviewers,layout-reviewers,emilio
Introduce CSSStartingStyleRule and add one extra parsing test for
@starting-style rule.

Differential Revision: https://phabricator.services.mozilla.com/D206564
2024-04-05 21:03:07 +00:00
Cristian Tuns ec18448a53 Backed out 2 changesets (bug 1889496) for causing build bustages in RefPtr.h CLOSED TREE
Backed out changeset 7689f9c266fc (bug 1889496)
Backed out changeset abbbf327c4f1 (bug 1889496)
2024-04-04 19:15:49 -04:00
Boris Chiou 5c44bb5d97 Bug 1889496 - Part 2: Implement CSSStartingStyleRule interface. r=webidl,firefox-style-system-reviewers,layout-reviewers,emilio
Introduce CSSStartingStyleRule and add one extra parsing test for
@starting-style rule.

Differential Revision: https://phabricator.services.mozilla.com/D206564
2024-04-04 19:39:29 +00:00
Jan-Niklas Jaeschke 81f5e14057 Bug 1867939, part 4: Implemented the `::target-text` CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-04 14:39:32 +00:00
Stanca Serban c9bea63c35 Backed out 6 changesets (bug 1867939) for causing wpt failures in target-text-010.html. CLOSED TREE
Backed out changeset 44101c258e52 (bug 1867939)
Backed out changeset c53267e1b460 (bug 1867939)
Backed out changeset 0748839408e5 (bug 1867939)
Backed out changeset 38631fbd2f2f (bug 1867939)
Backed out changeset d77b9257c842 (bug 1867939)
Backed out changeset 0d269b891421 (bug 1867939)
2024-04-04 00:50:50 +03:00
Jan-Niklas Jaeschke e58875610d Bug 1867939, part 4: Implemented the `::target-text` CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-03 15:23:02 +00:00
Sandor Molnar 8340afd1fb Backed out 6 changesets (bug 1867939) for causing a top crash in nightly Bug 1889393 CLOSED TREE
Backed out changeset 2110f57e928c (bug 1867939)
Backed out changeset 51890598ecb4 (bug 1867939)
Backed out changeset 839bc1b11a2c (bug 1867939)
Backed out changeset bb88c4d09e82 (bug 1867939)
Backed out changeset 27c76e65cf58 (bug 1867939)
Backed out changeset c3e3c81f9ceb (bug 1867939)
2024-04-03 17:31:56 +03:00
Jan-Niklas Jaeschke 2ec51d7c56 Bug 1867939, part 4: Implemented the `::target-text` CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-02 13:44:25 +00:00
Cristian Tuns a1bb69acae Backed out 6 changesets (bug 1867939) for causing build bustages in Document.h CLOSED TREE
Backed out changeset 0853f9a7a06c (bug 1867939)
Backed out changeset 2279e6577c13 (bug 1867939)
Backed out changeset 1b3af4b6a27b (bug 1867939)
Backed out changeset 2fbe643ca483 (bug 1867939)
Backed out changeset 575873406614 (bug 1867939)
Backed out changeset 82f99c0210b0 (bug 1867939)
2024-04-02 09:15:46 -04:00
Jan-Niklas Jaeschke b764eaf1f8 Bug 1867939, part 4: Implemented the `::target-text` CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-02 11:43:21 +00:00
Nicolas Chevobbe 1282ede62b Bug 1886392 - [devtools] Show @property rules in StyleEditor at-rules sidebar. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D205195
2024-03-21 06:14:51 +00:00
David Shin 1e31a04af4 Bug 1882581: Implement `@scope` parsing. r=firefox-style-system-reviewers,saschanaz,emilio
Differential Revision: https://phabricator.services.mozilla.com/D203153
2024-03-19 13:36:48 +00:00
Boris Chiou b9d9282f7f Bug 1823463 - Support shape() for clip-path property in style. r=emilio
Implement the style part for shape(). Besides, update some issues in the
test file, e.g. avoid using viewport height so we get the fixed result
on different devices.

I will refactor `PathCommand` to let it be a specialization of
`GenericShapeCommand` in the following path.

Differential Revision: https://phabricator.services.mozilla.com/D202882
2024-03-18 21:20:28 +00:00
Natalia Csoregi 3db9556f81 Backed out 2 changesets (bug 1882581) for causing bustage on InspectorUtils.cpp. CLOSED TREE
Backed out changeset 9f390afd0df5 (bug 1882581)
Backed out changeset 4781bbc7324f (bug 1882581)
2024-03-19 05:38:08 +02:00
David Shin 0ed15605fb Bug 1882581: Implement `@scope` parsing. r=firefox-style-system-reviewers,saschanaz,emilio
Differential Revision: https://phabricator.services.mozilla.com/D203153
2024-03-18 18:31:18 +00:00
Nicolas Chevobbe d9bc1a76d3 Bug 1884072 - [devtools] Make `getStyleSheetRuleCountAndAtRules` faster. r=layout-reviewers,devtools-reviewers,emilio,ochameau.
We were returning the whole list of rules for a given stylesheet, and then
picking the at-rules we wanted in JS.
This patch make it so that the InspectorUtils method will only return the
at-rules we want directly, so we're building a smaller array of rule in the end.
Since `getStyleSheetRuleCountAndAtRules` also need to return the total number
of rules, this adds a simple `InspectorUtils.getStyleSheetRulesCount` method that
does that.

Differential Revision: https://phabricator.services.mozilla.com/D203878
2024-03-14 10:57:05 +00:00
Cristian Tuns 889993801c Backed out changeset ae42893523cc (bug 1884072) for causing dt failures in browser_resources_stylesheets.js CLOSED TREE 2024-03-13 08:55:09 -04:00
Nicolas Chevobbe 18cbc7bb3b Bug 1884072 - [devtools] Make `getStyleSheetRuleCountAndAtRules` faster. r=layout-reviewers,devtools-reviewers,emilio,ochameau.
We were returning the whole list of rules for a given stylesheet, and then
picking the at-rules we wanted in JS.
This patch make it so that the InspectorUtils method will only return the
at-rules we want directly, so we're building a smaller array of rule in the end.
Since `getStyleSheetRuleCountAndAtRules` also need to return the total number
of rules, this adds a simple `InspectorUtils.getStyleSheetRulesCount` method that
does that.

Differential Revision: https://phabricator.services.mozilla.com/D203878
2024-03-13 11:02:37 +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
Tiaan Louw 9bf53eeb62 Bug 1815186 - Add ColorTo to InspectorUtils to convert color to other color spaces. r=emilio,layout-reviewers,supply-chain-reviewers
This will allow calling InspectorUtils.ColorTo("red", "lab") and
receive {color: "lab(54.3 80.8 69.9)", components: [54.3, 80.8, 69.9, 1.0], adjusted: false}.

The adjusted value is always "false", because gamut checking and mapping
is not supported at the moment. See:
https://bugzilla.mozilla.org/show_bug.cgi?id=1823363

Depends on D192673

Differential Revision: https://phabricator.services.mozilla.com/D169942
2024-02-26 14:55:01 +00:00
Boris Chiou e40e3017a3 Bug 1805727 - Part 2: Add transition-behavior to transition shorthand in style. r=emilio
Per spec, we put `transition-behavior` last in `transition`.

https://drafts.csswg.org/css-transitions-2/#transition-shorthand-property

Differential Revision: https://phabricator.services.mozilla.com/D200409
2024-02-23 21:41:48 +00:00
Nicolas Chevobbe e5fbaa5d69 Bug 1247751 - [devtools] Add InspectorUtils.getRuleIndex. r=emilio,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D201383
2024-02-15 14:04:32 +00:00
Sandor Molnar 032ee988a6 Backed out changeset 0cf3688e2bcf (bug 1879286) for causing mochitest failures at layout/inspector/tests/test_getRegisteredCustomProperties.html CLOSED TREE 2024-02-08 18:49:48 +02:00
Nicolas Chevobbe 2e5692b983 Bug 1879286 - [devtools] Return registered propertly location in InspectorUtils::GetCSSRegisteredProperties. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D201059
2024-02-08 13:30:45 +00:00
Tiaan Louw dc70568658 Bug 1812629 - Remove more_color_4 pref r=emilio,layout-reviewers
Remove the pref that enables additional color-4 colors.

Differential Revision: https://phabricator.services.mozilla.com/D167957
2024-02-01 10:40:38 +00:00