aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/regen_atoms.py
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-218/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* style: Basic implementation of Custom Highlight APIJan-Niklas Jaeschke2023-11-061-0/+3
| | | | | | | | | | | | Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++. Added `::highlight(foo)` pseudo element to CSS engine. Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections. Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`. Differential Revision: https://phabricator.services.mozilla.com/D164203
* Standardize on Black for Python code in `mozilla-central`.Ricky Stewart2021-02-261-22/+58
| | | | | | | | | | | | | | | | | Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly. To produce this patch I did all of the following: 1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions. 2. Run ./mach lint --linter black --fix 3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks. 4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023). Differential Revision: https://phabricator.services.mozilla.com/D94045
* style: Convert GenerateServoCSSPropList.py to py3.Mike Hommey2020-04-161-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D70308
* style: Make Rust static atoms able to be used in const contexts.Emilio Cobos Álvarez2019-11-301-1/+1
| | | | | | | | | | | | | | | | | | 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
* style: Include anon boxes in CSSPseudoElementType, to remove ↵Emilio Cobos Álvarez2019-02-231-2/+9
| | | | | | | | | | | | | | ComputedStyle::mPseudoTag. This is more consistent with what the Rust bits of the style system do, and removes a pointer from ComputedStyle which is always nice. This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those. Can't wait for XUL trees to die. Differential Revision: https://phabricator.services.mozilla.com/D19002
* style: Document a few more macros.Emilio Cobos Álvarez2019-01-131-0/+1
|
* style: Use atom handles in favour of atom pointers in style system code.Cameron McCormack2019-01-111-63/+4
| | | | Differential Revision: https://phabricator.services.mozilla.com/D15078
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-2/+2
|
* style: Add an atom bit to know whether we're ascii lowercase.Emilio Cobos Álvarez2018-11-171-2/+2
| | | | | | | | | | | And thus massively speed up ascii-case-insensitive atom comparisons when both atoms are lowercase (which is the common case by far). This removes almost all the slow selector-matching in this page, and it seems an easier fix than storing the lowercased version of all class-names in quirks mode in elements and selectors... Differential Revision: https://phabricator.services.mozilla.com/D10945
* style: Rename nsStaticAtom subclasses.Nicholas Nethercote2018-10-191-3/+4
| | | | | | | | | | | | Specifically: - nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom - nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom The `nsI` prefix isn't necessary because these are no longer XPIDL types, and the `StaticAtom` suffix makes their meaning clearer. Bug: 1497734 Reviewed-by: heycam
* style: Make static atom pointers `constexpr`.Nicholas Nethercote2018-10-091-44/+24
| | | | | | | | | | | | | | | | | | | | | | | | | This saves one word per static atom, per process. The `nsGkAtoms` change is only a small part of this commit. In regen_atoms.py: - There is now only one link name per platform: nsGkAtoms::sAtoms[]. - But there is a new constant per atom, giving the index into nsGkAtoms::sAtoms[]. - And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using the index constant. - A couple of `*mut` pointers are now `*const`. Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are necessary to avoid link errors, presumably due to some template instantiation wrinkle. Bug: 1449787 Reviewed-by: froydnj,emilio
* style: Tweak regen_atoms.py.Nicholas Nethercote2018-10-091-34/+43
| | | | | | | | Specifically, give all the string templates the ''' form, and give them all `_TEMPLATE` suffixes. This requires slightly changing the newline handling. Bug: 1449787 Reviewed-by: emilio
* style: Generate static atom hash in StaticAtoms.py.Cameron McCormack2018-08-181-3/+6
| | | | Differential Revision: https://phabricator.services.mozilla.com/D3295
* style: Remove support for multiple static atom sources.Cameron McCormack2018-08-181-35/+24
| | | | Differential Revision: https://phabricator.services.mozilla.com/D3285
* style: Move CSS anonymous box atoms to nsGkAtoms.Cameron McCormack2018-08-181-28/+13
| | | | Differential Revision: https://phabricator.services.mozilla.com/D3284
* style: Move CSS pseudo-element atoms to nsGkAtoms.Cameron McCormack2018-08-181-19/+19
| | | | Differential Revision: https://phabricator.services.mozilla.com/D3283
* style: Define atom type in nsGkAtomList.h.Cameron McCormack2018-08-181-9/+11
| | | | Differential Revision: https://phabricator.services.mozilla.com/D3282
* style: autopep8Sylvestre Ledru2018-07-241-2/+2
| | | | | | Bug: 1468273 Reviewed-by: ted MozReview-Commit-ID: 8j8EU3E08GP
* style: Remove some uses of unused unsafe.Emilio Cobos Álvarez2017-11-151-5/+3
|
* Support multi lines declarations in the parsing of the Fx header filesSylvestre Ledru2017-10-271-7/+9
| | | | | | | | | For example, in dom/base/nsGkAtomList.h, we currently have: GK_ATOM(mouseWheel, "mouseWheel") // For discrete wheel events (e.g. not OSX magic mouse) but if we change to GK_ATOM(mouseWheel, "mouseWheel") // For discrete wheel events (e.g. not OSX magic mouse) The parser didn't handle the declaration
* Introduce nsStaticAtom.Nicholas Nethercote2017-10-271-6/+6
| | | | | | | It's a sub-class of nsAtom, useful for cases where you know you are dealing exclusively with static atoms. The nice thing about it is that you can use raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)
* Rename nsIAtom as nsAtom.Nicholas Nethercote2017-10-091-5/+5
| | | | | | Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of nsISupports. This means that nsAtom is now a better name for it than nsIAtom.
* Stylo's atom generation needs to deal with wrapper anon boxes.Boris Zbarsky2017-08-111-2/+3
|
* stylo: Fix PseudoElement::pseudo_type.Emilio Cobos Álvarez2017-07-181-5/+14
| | | | MozReview-Commit-ID: DH2Pv52ankl
* Skip parent-display-based display type fixup for all anonymous boxes.Xidorn Quan2017-07-141-1/+1
|
* Implement parsing of tree pseudo-elements.Xidorn Quan2017-07-121-0/+3
|
* Bug 1364412: Convert pseudo-elements to an enum. r=hiro,xidornEmilio Cobos Álvarez2017-05-161-0/+248