| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change splits the style and layout data in DOM nodes that is
populated by style and layout passes. This makes Servo's data design
more like Gecko's. This allows:
1. Removing the various `StyleAndLayout` data structures used by layout.
2. Removing the `GetStyleAndLayoutData` and
`GetStyleAndOpaqueLayoutData` traits. Accessing style and layout data
are now just functions on the `LayoutNode` and `ThreadSafeLayoutNode`
traits.
3. Styling now doesn't populate layout data. This is is postponed until
layout itself.
4. Allows the DOM wrappers to no longer have to be generic over the
layout data. This data was already stored using `std::any::Any` and
the new code just makes layout responsible for downcasting. Cleaning
up the generic type parameter in the DOM wrappers can happen in a
followup change.
The main benefit to all of this is that we should be able to remove
unsafe creation of `ServoLayoutNode` in layout and
`TrustedLayoutNodeAddress` entirely, because `ServoLayoutNode` will be
able to be passed directly from script to layout. In addition, this
removes one more abstraction layer from the layout DOM wrappers, making
the code a lot more understandable.
Note: This increases the measured size of DOM types, but the same data
is stored. It's simply that before that data was stored behind a heap
pointer.
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
| |
* remove extern crate
* Update components/script_plugins/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
| |
Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)
|
|
|
|
|
|
|
|
|
|
| |
There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and
one for Layout 2020. As part of cleaning up and simplifying the
wrappers, this change parameterizes them on the specific layout data
they contain. This allows them to be shared again. In addition, various
small cleanups are included.
Fixes #29691.
|
| |
|
|
|
|
| |
It now stores a NonNull<dyn Any>.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
|
|
|
|
|
| |
It still needs dependencies update to remove all the other bitflags
versions.
|
|
|
|
|
|
|
|
|
| |
This commit splits the style and layout data in two separate refcells.
These transmutes have been a source of trouble (for example on Android), and
they feel like a hack anyway.
Fixes #16982
|
| |
|
|
|
|
| |
style. r=emilio
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need this for Gecko, and it's hard to implement in that case because
there's nowhere obvious to put it (we don't plan to create TSDs for non-dirty
nodes, and non-dirty nodes can have dirty children which require the
children_to_process atomic). There are various solutions here, but punting is
the easiest.
We'll need to rethink this if/when we need to do a bottom-up traversal for
Gecko.
|
|
|
|
|
|
|
|
| |
of RefCell as a container.
This allows us to eliminate the unsafe borrows. \o/
MozReview-Commit-ID: 29hpGaWUFQz
|
| |
|
| |
|
|
|
|
|
| |
Types generated by `bitflags!` are now private by default. This PR marks them
`pub` where necessary.
|
|
|
|
| |
Use the SharedStyleContext instead.
|
|
|
|
| |
This commit also removes StylistWrapper and uses Arc::get_mut instead.
|
|
|
|
|
|
| |
Still need to implement the style invalidation.
Part of #9395
|
|
|
|
|
|
|
|
|
|
|
| |
This commit refactors the style crate to be completely independent of
the actual implementation and pseudo-elements supported.
This also adds a gecko backend which introduces parsing for the
anonymous box pseudo-elements[1], although there's still no way of
querying them.
https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.
There's still more to do to make the style system usable standalone, but
this is a good start.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
each iframe.
The old code that attempted to do this during layout wasn't able to work
for multiple reasons: it couldn't know where the iframe was going to be
on the page (because of nested iframes), and at the time it was building
the display list for a fragment it couldn't know where that fragment was
going to be in page coordinates.
This patch rewrites that code so that both the sizes and positions of
iframes are determined by the compositor. Layout layerizes all iframes
and marks the iframe layers with the appropriate pipeline and subpage
IDs so that the compositor can place them correctly. This approach is
similar in spirit to Gecko's `RefLayer` infrastructure. The logic that
determines when it is time to take the screenshot for reftests has been
significantly revamped to deal with this change in delegation of
responsibility.
Additionally, this code removes the infrastructure that sends layout
data back to the layout task to be destroyed, since it is now all
thread-safe and can be destroyed on the script task.
The failing tests now fail because of a pre-existing bug related to
intrinsic heights and borders on inline replaced elements. They happened
to pass before because we never rendered the iframes at all, which meant
they never had a chance to draw the red border the tests expect to not
render!
Closes #7377.
|
| |
|
| |
|
|
|
|
| |
closes #7197
|
| |
|
| |
|
|
|
|
| |
There is no reason for this trait to exist.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
absolutely-positioned elements.
This also implements a little bit of the infrastructure needed to
support for fragmentation via support for multiple positioned fragments
in one flow.
Improves Google.
|
| |
|
| |
|
|
|