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
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
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
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
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
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
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
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
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
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
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
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
- 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
- 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
- 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
- Add new function `nsCSSProps::RecomputeEnabledState()`
- Register callbacks to `RecomputeEnabledState` instead of using `BoolVarCache`
Differential Revision: https://phabricator.services.mozilla.com/D73356
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
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
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
(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
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
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
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
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