| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove packages that were moved to external repo
* Add workspace dependencies pointing to 2023-06-14 branch
* Fix servo-tidy.toml errors
* Update commit to include #31346
* Update commit to include servo/stylo#2
* Move css-properties.json lookup to target/doc/stylo
* Remove dependency on vendored mako in favour of pypi dependency
This also removes etc/ci/generate_workflow.py, which has been unused
since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f.
* Add temporary code to debug Windows test failures
* Fix failures on Windows due to custom target dir
* Update commit to include servo/stylo#3
* Fix license in tests/unit/style/build.rs
* Document how to build with local Stylo in Cargo.toml
|
| |
|
|
|
|
|
|
|
|
|
|
| |
an auto value
When the content having `content-visibility: auto` and the specific value for `contain-intrinsic-size` is slightly out of the viewport,
its computed value keeps changing.
This patch makes `content-visibilty: auto` forces `contain-intrinsic-size` to gain an auto value to solve this issue.
Differential Revision: https://phabricator.services.mozilla.com/D174583
|
|
|
|
|
|
|
|
| |
$ find servo -name '*.rs' | xargs rustup run nightly rustfmt
Depends on D179380
Differential Revision: https://phabricator.services.mozilla.com/D179381
|
|
|
|
|
|
| |
properties, and make font-synthesis into a shorthand
Differential Revision: https://phabricator.services.mozilla.com/D167480
|
| |
|
|
|
|
|
|
| |
Depends on D164554
Differential Revision: https://phabricator.services.mozilla.com/D164549
|
|
|
|
|
|
|
|
|
|
| |
The fix is calling set_outline_style so that we also reset the actual
outline width. Also clean-up surrounding code a little bit to be
marginally more efficient, and do the same change for border-*-style
(which was doing the right thing, but it's better to make sure both stay
in sync).
Differential Revision: https://phabricator.services.mozilla.com/D164554
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'container-type' and 'content-visibility' can trigger various kinds of
containment, but this was done via nsStyleDisplay::EffectiveContainment,
to avoid affecting the computed value of 'contain'.
This was fine except for style containment, which needs to set the flag
SELF_OR_ANCESTOR_HAS_CONTAIN_STYLE in order to really work, but this was
only done with 'contain: style'.
So this patch removes nsStyleDisplay::EffectiveContainment, and instead
uses two fields for containment: mContain and mEffectiveContainment.
This is somewhat analogous to mDisplay and mOriginalDisplay, though in
that case the computed value is the modified display.
Also fixes a typo in IsContainStyle() that made it return true for any
kind of containment, not just for style containment.
Differential Revision: https://phabricator.services.mozilla.com/D163779
|
|
|
|
|
|
|
|
| |
propagate them to their descendants
Low-hanging fruit optimization that enables short-circuit exit of container query lookups.
Differential Revision: https://phabricator.services.mozilla.com/D158056
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The directories changed:
* servo/components/selectors/
* servo/components/style/
* servo/components/style_derive/
* servo/ports/geckolib/
Per review request, disable rustfmt in `components_to_transform_3d_matrix()` to
preserve the format for a call to `Transform3D::new`.
My mozilla-central is at
https://hg.mozilla.org/mozilla-central/rev/d1ae84015c22f2034435b47194fdced878072035
My nightly rust is 1.66.0-nightly (8b705839c 2022-09-26).
Differential Revision: https://phabricator.services.mozilla.com/D158234
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
situations
This is a hack, sorta, similar to Chromium's:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_object.cc;l=356;drc=312b74e385e6aba98ab31fd911238c0dc16b396c
except at computed-value rather than used-value time, because it's both
simpler to reason about and prevents lying in the computed style.
This fixes the relevant test-case, and matches closer what Chromium does,
by not creating anonymous flex items for all elements inside the
line-clamp context.
The behavior change is covered by the test changes. I had to also fix a
couple pre-existing bugs that were caught by tests, now that the
line-clamped block is the -webkit-box-styled element rather than an anonymous
flex item (and thus now had padding).
Depends on D155180
Differential Revision: https://phabricator.services.mozilla.com/D155181
|
|
|
|
|
|
|
|
|
| |
In the past, mathvariant was cancelling the effect of legacy
fontstyle/fontweight attributes by resetting the font-style/font-weight
properties. These legacy attributes have been removed in bug 1783841,
so remove this hack from Stylo and add corresponding WPT test.
Differential Revision: https://phabricator.services.mozilla.com/D156174
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.
ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.
Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.
Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.
Differential Revision: https://phabricator.services.mozilla.com/D149508
|
|
|
|
|
|
|
|
|
| |
Now that cbindgen and rust support const generics, it seems more simple.
This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.
Differential Revision: https://phabricator.services.mozilla.com/D148847
|
|
|
|
| |
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
As per https://fullscreen.spec.whatwg.org/#new-stacking-layer:
If its specified display property is contents, it computes to block.
Differential Revision: https://phabricator.services.mozilla.com/D131585
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is generated by running `cargo +nightly fmt` under
`servo/components/style/` and `servo/ports/geckolib` against mozilla-central
https://hg.mozilla.org/mozilla-central/rev/b193f2e7a6a5d1f042c957ea4acd5c89bf210512
My nightly version is: 1.58.0-nightly (c9c4b5d72 2021-11-17)
Manually remove the redundant braces in author_styles.rs to fix a warning.
Differential Revision: https://phabricator.services.mozilla.com/D131556
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D127422
|
|
|
|
|
|
|
|
|
| |
value time
Trusting the display value in style_adjuster is wrong, as some elements
force a given kind of frame (like <details>).
Differential Revision: https://phabricator.services.mozilla.com/D119609
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D119579
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D111707
|
|
|
|
|
|
|
|
|
| |
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.
Differential Revision: https://phabricator.services.mozilla.com/D118011
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
list-style-type/list-style-image
Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those. Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).
When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.
We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons. Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome. We used to
ignore these for list-style-type:<string> too.)
Differential Revision: https://phabricator.services.mozilla.com/D111693
|
| |
|
| |
|
|
|
|
|
|
|
| |
The allocations in display_to_css_identifier show up in the profiles of
bug 1675628.
Differential Revision: https://phabricator.services.mozilla.com/D97856
|
|
|
|
|
|
|
|
| |
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog
Depends on D86392
Differential Revision: https://phabricator.services.mozilla.com/D86227
|
|
|
|
|
|
|
|
|
|
| |
Add -moz-inert and -moz-script-level to the set of internal properties
that aren't included in "all".
-moz-inert may need to be uncacheable in the future if we make it not
change the pointer-events computed value. Left a comment to that effect.
Differential Revision: https://phabricator.services.mozilla.com/D87115
|
|
|
|
|
|
|
| |
It was introduced in the overflow: clip work but this standalone
equivalent remained.
Differential Revision: https://phabricator.services.mozilla.com/D85778
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D73717
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D73716
|
|
|
|
|
|
| |
-moz-inert CSS property reflects inert subtrees concept and can be used to implement HTML:dialog element and HTML:inert attribute
Differential Revision: https://phabricator.services.mozilla.com/D81701
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D83429
|
|
|
|
|
|
| |
-webkit-appearance be aliases.
Differential Revision: https://phabricator.services.mozilla.com/D83428
|
|
|
|
|
|
|
|
| |
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).
Differential Revision: https://phabricator.services.mozilla.com/D79928
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This never worked, but it's more visible with the new form controls which have
more padding.
Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.
This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.
Differential Revision: https://phabricator.services.mozilla.com/D65271
|
|
|
|
|
|
|
|
|
|
| |
opacity: 0 subtree.
I think this should work for the animation throttling stuff.
Opacity works on the element tree, so I think this is sound.
Differential Revision: https://phabricator.services.mozilla.com/D64441
|
| |
|
|
|
|
|
|
|
| |
This is needed to make the root element not a containing block in presence of
filters or what not.
Differential Revision: https://phabricator.services.mozilla.com/D61167
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D61326
|
|
|
|
|
|
| |
suppression.
Differential Revision: https://phabricator.services.mozilla.com/D58351
|
|
|
|
|
|
|
| |
This matches the new servo layout engine too, and thus removes some #[cfg]
gunk. Just use `flow` since it doesn't simplify the layout code as much.
Differential Revision: https://phabricator.services.mozilla.com/D45973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I see atom dropping code generated in release builds for stuff like dropping the
"class" atom here:
https://searchfox.org/mozilla-central/rev/4df8821c1b824db5f40f381f48432f219d99ae36/servo/components/style/gecko/wrapper.rs#592
That is silly, and I hope making Atom be able to be used in const context will
help the compiler see that yeah, we're not doing anything interesting and the
atom shouldn't get dropped.
It also allows us to get rid of a few lazy_static!s, so we should do it anyway.
In order to accomplish this, compute the offset into gGkAtoms manually instead
of going through the static_atoms() array and then back to the byte offset.
Differential Revision: https://phabricator.services.mozilla.com/D55039
|
|
|
|
| |
Use the functions introduced in ee17eedf3a857f27ce2b6b775574a3a455df8aa3.
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D44412
|