Commit Graph
902 Commits
Author SHA1 Message Date
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
Emilio Cobos Álvarez 39b71d4c0c Bug 2021942 - Make handling of font-face and counter-style descriptors similar to handling of properties. r=firefox-style-system-reviewers,webidl,smaug,dshin
They share some of that code already various lookup stuff in nsCSSProps and so
on. This reuses a very similar approach for these two.

Differential Revision: https://phabricator.services.mozilla.com/D286731
2026-03-10 22:09:23 +00:00
Nika Layzell d60e6dc1b1 Bug 2016521 - Part 14: Stop using nsStaticCaseInsensitiveNameTable in nsCSSProps, r=emilio,firefox-style-system-reviewers
This helper used a raw PLDHashTable under the hood. When looking at the code, I
noticed that it would probably be faster/simpler if we just skipped the
hashtable entirely and did a chain of if/else statements, as there are so few
options.

Differential Revision: https://phabricator.services.mozilla.com/D283164
2026-02-18 02:14:19 +00:00
serge-sans-paille 1eab662631 Bug 2010520 - Use .inc extension for X macro files in layout/ r=firefox-style-system-reviewers,layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D279133
2026-01-17 20:49:47 +00:00
Jan Varga bd0770a104 Bug 1998365 - Switch NonCustomCSSPropertyId to uint16_t; r=emilio,firefox-style-system-reviewers
This patch changes NonCustomCSSPropertyId to use uint16_t as its underlying
type, matching the Rust representation.

Because the enum is now unsigned, the UNKNOWN sentinel can no longer be -1.
Keeping UNKNOWN as 0 would shift all property ids and complicate existing
mappings, so UNKNOWN is moved to the end of the enum instead.

The patch also updates the IPC serialization logic. Previously it assumed that
_COUNT covered almost every property, but over time additional entries (such
as aliases) were added after _COUNT and the IPC handling was not updated. This
patch corrects the serialization so that all variants of the enum are covered,
in line with the original intent of bug 783835.

No behavior changes intended beyond fixing the serialization gap.

Differential Revision: https://phabricator.services.mozilla.com/D271566
2025-11-14 09:50:09 +00:00
Jan Varga b314d21751 Bug 1998365 - Rename nsCSSPropertyID to NonCustomCSSPropertyId and normalize ID naming; r=emilio,firefox-style-system-reviewers,layout-reviewers
nsCSSPropertyID only enumerates non custom properties, but the name suggests
otherwise. (eCSSPropertyExtra_variable only signals a custom property and does
not carry the custom name.) This mismatch has been confusing and also blocks
renaming AnimatedPropertyID to CSSPropertyId.

This patch renames nsCSSPropertyID to NonCustomCSSPropertyId to make the non
custom scope explicit. It also normalizes identifier naming (aPropID ->
aPropId, mID -> mId, etc.) for consistency.

No behavior changes intended.

Potential follow-ups:
- Move the enum to the mozilla namespace.
- Convert the enum to an enum class.
- Rename nsCSSPropertyIDSet.

Differential Revision: https://phabricator.services.mozilla.com/D271443
2025-11-12 06:11:29 +00:00
serge-sans-paille c3b06ff4b4 Bug 1997165 - Remove unused mfbt inclusion in layout/** r=emilio,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,dshin,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D270577
2025-10-29 22:18:06 +00:00
serge-sans-paille 1667ec582b Bug 1995723 - Remove unused inclusion of mozilla/ArrayUtils.h r=necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,canaltinova,bytesized,alwu,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D269573
2025-10-23 07:30:37 +00:00
Emilio Cobos Álvarez 5689509619 Bug 1991662 - Remove overflow-clip-box. r=layout-reviewers,devtools-reviewers,nchevobbe,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D266801
2025-09-30 20:16:11 +00:00
Timothy Nikkel cb937b30e0 Bug 1936080. In fuzzing builds don't force enable overflow-clip-box, it can still be pref enabled though. r=layout-reviewers,firefox-style-system-reviewers,emilio
We never plan to enable this pref and only intend to use this property in UA sheets and enabling the pref has known issues that aren't worth the time to fix.

Differential Revision: https://phabricator.services.mozilla.com/D260803
2025-08-19 10:15:17 +00:00
Andrew Osmond 9264708f8d Bug 1980282 - Batch gfxVar updates during fallback and hardware video changes. r=jnicol,alwu
When we update gfxVars, if we create gfxVarsCollectUpdates on the stack,
we can consolidate those updates into a single notification and IPC
message per process. This will save on churn, particularly for the media
processes, which may want to monitor multiple gfxVars for changes
affecting hardware video decoding/encoding.

This also moves the CodecSupportInfo from a gfxVar into a member of
GfxInfoBase since that is the only place that needs access to it. This
avoids bouncing back a gfxVar update back to all of the child processes
after a codec support update from each of them.

Differential Revision: https://phabricator.services.mozilla.com/D259335
2025-08-01 21:18:48 +00:00
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
serge-sans-paille 262f78c07f Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc a5eb905bf4 Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille 07101ac24d Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc 004e704b22 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille 2c916d4973 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Gregory Pappas 05f1f71aeb Bug 1872784 - Remove layout.css.font-display.enabled pref r=jfkthame,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D197558
2024-01-09 20:44:39 +00:00
Emilio Cobos Álvarez 6f603fd4cf Bug 1846745 - Miscellaneous clean-ups to nsCSSProps. r=boris
Fixes various clang-tidy warnings and makes initialization a bit more
straight-forward.

Depends on D185154

Differential Revision: https://phabricator.services.mozilla.com/D185155
2023-08-03 08:58:07 +00:00
Andrew Osmond 080736c9e9 Bug 1785366 - Blocklist backdrop filter on some Ivy/Sandybridge Intel Windows drivers. r=jrmuizel,emilio
Backdrop filter crashes newer Intel drivers on Windows. This patch adds
support to the blocklist infrastructure for backdrop filter, and hooks
this up with the CSS property table.

Differential Revision: https://phabricator.services.mozilla.com/D154950
2022-08-18 12:29:20 +00:00
Marian-Vasile Laza d04951bc32 Backed out changeset 49c7536f01db (bug 1785366) for causing xpcshell failures on test_css-properties-db.js. CLOSED TREE 2022-08-18 07:41:44 +03:00
Andrew Osmond 08596e1684 Bug 1785366 - Blocklist backdrop filter on some Ivy/Sandybridge Intel Windows drivers. r=jrmuizel,emilio
Backdrop filter crashes newer Intel drivers on Windows. This patch adds
support to the blocklist infrastructure for backdrop filter, and hooks
this up with the CSS property table.

Differential Revision: https://phabricator.services.mozilla.com/D154950
2022-08-18 03:21:27 +00:00
Emily McDonough 98790b2457 Bug 1779496 - Make more of nsCSSProps constexpr r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151768
2022-07-15 03:12:37 +00:00
Emilio Cobos Álvarez f2b24d64e9 Bug 1777982 - Propagate flags from original property to aliases. r=AlaskanEmily
Even we don't have internal aliases right now (and that seems a bit
silly) we do have pref-gated aliases. An alias ID passed to IsEnabled
with the wrong EnabledState would misbehave, assert, and crash.

Though we don't have such callers in the tree because InspectorUtils
passes only arguments that make us not look at the flags, it seems more
reliable this way.

Differential Revision: https://phabricator.services.mozilla.com/D151594
2022-07-12 22:22:17 +00:00
Daniel Holbert 1b756676df Bug 1733727 part 3: Use StaticAutoPtr to manage lifetime of various "gFoo" static global variables in layout. r=jfkthame
This patch doesn't change any user-observable behavior.

StaticAutoPtr lets us remove a handful of explicit 'delete' statements, by
making deletion happen automatically when these variables are cleared.

Differential Revision: https://phabricator.services.mozilla.com/D127337
2021-10-02 18:59:11 +00:00
Emilio Cobos Álvarez 5e056e1520 Bug 1729894 - Now that WR is everyhwere, enable backdrop-filter on early-beta / nightly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D125054
2021-09-15 11:33:29 +00:00
Marian-Vasile Laza cad9da4b08 Backed out changeset 80c0c730e1aa (bug 1729894) for causing mochitest failures on browser_styleeditor_autocomplete.js. CLOSED TREE 2021-09-13 23:00:00 +03:00
Emilio Cobos Álvarez 4e5526d4ec Bug 1729894 - Now that WR is everyhwere, enable backdrop-filter on early-beta / nightly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D125054
2021-09-13 18:22:42 +00:00
Adam Bruce b28c794e81 Bug 1713527 - Removed else after return in nsCSSProps::GetStringValue. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D119764
2021-07-14 09:11:31 +00:00
Simon Giesecke c7a36b5d58 Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke 95c38cc6b8 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Emilio Cobos Álvarez f71bd1be5b Bug 1670778 - Enable all CSS properties unconditionally in fuzzing builds. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D93259
2020-10-12 22:58:47 +00:00
Simon Giesecke a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Erik Nordin 9ed5ce1c55 Bug 1637437 - Recompute backdrop-filter only when WebRender changes r=jrmuizel
- Add a gfxVarReceiver for nsCSSProps.
  - Recompute backdrop-filter state when notifying receivers for WebRender.
  - Remove NS_NewRunableFunction calls when we know we're on main thread.
  - Add assertion that recompute enabled state is called from main thread.

Differential Revision: https://phabricator.services.mozilla.com/D74975
2020-05-27 19:53:05 +00:00
Erik Nordin d47e565c8b Bug 1635584 - Make BackdropFilter's Availability Depend on WebRender r=emilio
- Enable BackdropFilter pref by default
  - Add function IsBackdropFilterAavailable()
  - Use IsBackdropFilterAvailable for relevant WebIDL instead of pref
  - Add test for BackdropFilter availability

Differential Revision: https://phabricator.services.mozilla.com/D73967
2020-05-08 05:54:26 +00:00
Razvan Maries 9a76962e8d Backed out 2 changesets (bug 1635584) for build bustages. CLOSED TREE
Backed out changeset 059ed60f23bf (bug 1635584)
Backed out changeset 876b8f443cca (bug 1635584)
2020-05-08 00:47:31 +03:00
Erik Nordin 99c40723fe Bug 1635584 - Make BackdropFilter's Availability Depend on WebRender r=emilio
- Enable BackdropFilter pref by default
  - Add function IsBackdropFilterAavailable()
  - Use IsBackdropFilterAvailable for relevant WebIDL instead of pref
  - Add test for BackdropFilter availability

Differential Revision: https://phabricator.services.mozilla.com/D73967
2020-05-06 23:47:06 +00:00
Erik Nordin 81fc1444ec Bug 1633863 - Remove nsCSSProps Dependency on BoolVarCache r=emilio,KrisWright
- Add new function `nsCSSProps::RecomputeEnabledState()`
- Register callbacks to `RecomputeEnabledState` instead of using `BoolVarCache`

Differential Revision: https://phabricator.services.mozilla.com/D73356
2020-05-04 06:01:49 +00:00
Emilio Cobos Álvarez 543f59c8cb Bug 1617472 - Remove nsCSSKeywords and related infrastructure. r=heycam
Seeya

Depends on D63795

Differential Revision: https://phabricator.services.mozilla.com/D63796
2020-02-24 13:30:48 +00:00
Emilio Cobos Álvarez 1c16c2e882 Bug 1617472 - Remove kTextDecorationStyleKTable. r=heycam
In a somewhat easy way. There are better ways to do this (moving
text-decoration-style to be a proper cbindgen enum class or such), but this
does the job for now.

Depends on D63794

Differential Revision: https://phabricator.services.mozilla.com/D63795
2020-02-24 13:30:46 +00:00
Emilio Cobos Álvarez 4bc4d56e7a Bug 1617472 - Remove kTextAlignKTable. r=heycam
Depends on D63793

Differential Revision: https://phabricator.services.mozilla.com/D63794
2020-02-24 13:30:44 +00:00
Emilio Cobos Álvarez 9850f6ee73 Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

Differential Revision: https://phabricator.services.mozilla.com/D63793
2020-02-24 13:32:57 +00:00
Emilio Cobos Álvarez 5f19da8f36 Bug 1617472 - Remove kFontSmoothingKTable. r=heycam
Use the more general mechanism to get a property value. We can't just remove
the getter because of the resist-fingerprinting check, but...

Depends on D63791

Differential Revision: https://phabricator.services.mozilla.com/D63792
2020-02-24 13:29:45 +00:00
Emilio Cobos Álvarez a4a384fffd Bug 1611711 - Remove kCursorKTable. r=jwatt
(And while at it, format the end of the other keyword tables so that
cleanup_ktables.py works).

It seems `Window.setCursor` is only used once in our code, maybe
we should remove it...

Differential Revision: https://phabricator.services.mozilla.com/D61090
2020-01-26 20:17:41 +00:00
Emilio Cobos Álvarez 19dea3309c Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

Differential Revision: https://phabricator.services.mozilla.com/D58687
2020-01-08 01:21:30 +00:00
Emilio Cobos Álvarez 4847c60fa0 Bug 1449861 - Use UTF8String for some CSSOM APIs. r=bzbarsky
In particular, the ones where we transcode unconditionally atm (property names
and such).

There are others like cssText getters and setters which are a bit harder,
because I either need to rewrite all our serialization code to work with UTF8
(which is fine, but a lot of work), or teach webidl to have a setter that takes
UTF8String as input but returns DOMString as output (which is at best hacky).

Differential Revision: https://phabricator.services.mozilla.com/D58631
2020-01-04 10:36:49 +00:00
Emilio Cobos Álvarez 7d768db48f Bug 1578661 - Remove old CSS use counters. r=boris
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.

Differential Revision: https://phabricator.services.mozilla.com/D44695
2019-09-19 00:20:35 +00:00
Cosmin Sabou 185fe7202f Backed out 10 changesets (bug 1578661) for linting failures on layout/style/ServoCSSPropList.py. CLOSED TREE
Backed out changeset b1b5393b1099 (bug 1578661)
Backed out changeset b87eebb0cf6e (bug 1578661)
Backed out changeset 6ba2ee45f26e (bug 1578661)
Backed out changeset 4a1d45160d60 (bug 1578661)
Backed out changeset 7a5687bebc02 (bug 1578661)
Backed out changeset 33c306c9020a (bug 1578661)
Backed out changeset 89d7e6fb24b0 (bug 1578661)
Backed out changeset 42c4943e569b (bug 1578661)
Backed out changeset 88d988a80de1 (bug 1578661)
Backed out changeset 78c90f9e9eee (bug 1578661)
2019-09-19 01:50:03 +03:00
Emilio Cobos Álvarez 93c17a7cff Bug 1578661 - Remove old CSS use counters. r=boris
We only have two counters enabled, just for testing, and they just count from
the SVG mapped attribute code. That's not great, and they mostly complicate the
next few patches.

Differential Revision: https://phabricator.services.mozilla.com/D44695
2019-09-18 15:15:19 +00:00
Andreea Pavel aed9d3d16a Backed out 10 changesets (bug 1578661) for lints failure at ServoCSSPropList.cpp on a CLOSED TREE
Backed out changeset ed3c619100e7 (bug 1578661)
Backed out changeset 027514a2eaf6 (bug 1578661)
Backed out changeset f2e228282b20 (bug 1578661)
Backed out changeset 67c36136dce7 (bug 1578661)
Backed out changeset 2280b27cc130 (bug 1578661)
Backed out changeset 445d13a2c452 (bug 1578661)
Backed out changeset 89caaa850049 (bug 1578661)
Backed out changeset 2f8be5db1786 (bug 1578661)
Backed out changeset 51a015a9a0f8 (bug 1578661)
Backed out changeset ad8e1f27a600 (bug 1578661)
2019-09-18 18:09:30 +03:00