| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Upgrades `markup5ever` and fixes "unnecessary import" lints.
See https://github.com/servo/html5ever/pull/599
And https://github.com/servo/stylo/pull/173
Signed-off-by: Nico Burns <nico@nicoburns.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also ensures that document now reports all violations and we set
the correct directive.
With these changes, all `script-src-attr-elem` WPT tests pass.
Part of #36437
Requires servo/rust-content-security-policy#3 to land first
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#36111)
* new_js_regex and matches_js_regex need a CanGc argument
Signed-off-by: dericko681 <abonghoderick@gmail.com>
* new_js_regex and matches_js_regex need a CanGc argument
Signed-off-by: dericko681 <abonghoderick@gmail.com>
* edit Propagate CanGc arguments through new_js_regex and matches_js_regex
Signed-off-by: dericko681 <abonghoderick@gmail.com>
* Propagate CanGc arguments through new_js_regex and matches_js_regex
Signed-off-by: dericko681 <abonghoderick@gmail.com>
* Propagate CanGc arguments through new_js_regex and matches_js_regex
Signed-off-by: dericko681 <abonghoderick@gmail.com>
* Propagate CanGc arguments through new_js_regex and matches_js_regex
Signed-off-by: dericko681 <abonghoderick@gmail.com>
---------
Signed-off-by: dericko681 <abonghoderick@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
| |
These will be a single method in the upcoming `WebView` delegate, so it
makes sense to also combine the internal message to match this. In
addition, since `LoadStatus` is now exposed to the API if there is ever
the need to add more statuses or to move to an event-based version, the
API is already set up for this.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`EmbedderMsg` was previously paired with an implicit
`Option<WebViewId>`, even though almost all variants were either always
`Some` or always `None`, depending on whether there was a `WebView
involved.
This patch adds the `WebViewId` to as many `EmbedderMsg` variants as
possible, so we can call their associated `WebView` delegate methods
without needing to check and unwrap the `Option`. In many cases, this
required more changes to plumb through the `WebViewId`.
Notably, all `Request`s now explicitly need a `WebView` or not, in order
to ensure that it is passed when appropriate.
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Feature-gate all crown support.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Use cfg(crown) instead of a cargo feature.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Restrict reexport visibility of DOM types.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Mass pub->pub(crate) conversion.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Hide existing dead code warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix unit tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* More formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename IS_IN_DOC flag to IS_IN_A_DOCUMENT_TREE
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add BindContext::is_in_a_shadow_tree
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add UnbindContext::tree_is_in_shadow_tree
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* ./mach fmt
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update test expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* fix build after rebasing
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#34832)
This puts a few commonly used `Node` helpers into a trait (`NodeTraits`)
and gives them more descriptive names and documentation. The renames:
- `document_from_node` -> `NodeTraits::owner_document`
- `window_from_node` -> `NodeTraits::owner_window`
- `stylesheets_owner_from_node<T:` -> `NodeTraits::stylesheet_list_owner`
- `containing_shadow_root` -> `NodeTraits::containing_shadow_root`
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These all happen now in *update the rendering*, typically after the
message that triggered this code is processed, though in two cases
reflow needs to be triggered explicitly. This makes `ReflowReason`
redundant though perhaps `ReflowCondition` can be expanded later to give
more insight into why the page is dirty.
- Handling of the "reflow timer" concept has been explained a bit more via
data structures and rustdoc comments.
- Theme changes are cleaned up a little to simplify what happens during
reflow and to avoid unecessary reflows when the theme doesn't change.
Notably, layout queries and scrolling still trigger normal reflows and
don't update the rendering. This needs more investigation as it's
unclear to me currently whether or not they should update the rendering
and simply delay event dispatch or only reflow.
In general, this is a simplfication of the code.
Fixes #31871.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Update trait implementations with new generic type.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
| |
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
|
|
|
|
|
|
|
| |
Use `std::time` from the Rust standard library instead. This is one step
toward removing our use of the legacy `time` crate which has security
issues.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
| |
* Upgrade Stylo to 2024-03-01
* Fixup for https://bugzil.la/1882754
* Update test expectations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update Stylo to 2023-10-16
* Fixup for https://phabricator.services.mozilla.com/D185154
* Fixup for https://phabricator.services.mozilla.com/D188216
* Fixup for https://phabricator.services.mozilla.com/D185677
* Fixup for https://phabricator.services.mozilla.com/D188566
* Fixup for https://phabricator.services.mozilla.com/D188727
* Fixup for https://phabricator.services.mozilla.com/D189475
* Fixup for https://phabricator.services.mozilla.com/D189521
* Fixup for https://phabricator.services.mozilla.com/D188812
* Fixup for https://phabricator.services.mozilla.com/D189484
* Update test expectations
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed clippy warnings
* made changes for lowercase characters.
* changed is_lowercase() to is_ascii_lowercase()
* added std library function `is_ascii_uppercase()` and `is_ascii_lowercase()`
* made recommended changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update Stylo to 2023-09-01
* Fixup for https://phabricator.services.mozilla.com/D184929
* Fixup for https://phabricator.services.mozilla.com/D184526
* Fixup for https://phabricator.services.mozilla.com/D184525
* Fixup for https://phabricator.services.mozilla.com/D185154
* Fixup for https://phabricator.services.mozilla.com/D184685
* Fixup for https://phabricator.services.mozilla.com/D185916
* Fixup for https://phabricator.services.mozilla.com/D185492
* Fixup for https://phabricator.services.mozilla.com/D186626
* Update test expectations
|
|
|
|
|
| |
In order for stylo to be a separate crate, it needs to depend on less
things from Servo. This change makes it so that stylo no longer depends
on servo_url.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove script_plugins
* Use crown instead of script_plugins
* crown_is_not_used
* Use crown in command base
* bootstrap crown
* tidy happy
* disable sccache
* Bring crown in tree
* Install crown from tree
* fix windows ci
* fix warning
* fix mac
libscript_plugins.dylib is not available anymore
* Update components/script/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Update for nightly-2023-03-18
Mostly just based off https://github.com/servo/servo/pull/30630
* Always install crown
it's slow only when there is new version
* Run crown test with `mach test-unit`
* Small fixups; better trace_in_no_trace tests
* Better doc
* crown in config.toml
* Fix tidy for real
* no sccache on rustc_wrapper
* document rustc overrides
* fixup of compiletest
* Make a few minor comment adjustments
* Fix a typo in python/servo/platform/base.py
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* Proper test types
* Ignore tidy on crown/tests
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
| |
This safe method is the basic block to access element attributes from layout.
We reuse it in the other attr-related layout methods to remove a pretty big
source of rampant unsafe code between script and layout.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix some is_in_doc -> is_connected mistakes
|
| |
|
| |
|
| |
|
|
|
|
| |
A `crate_name::foo` path always works in 2018
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.
This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.
This is expected since `Box::new` is defined as:
```rust
impl<T> Box<T> {
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
}
```
With inlining, it should compile to the same as box syntax.
|
|
|
|
|
| |
There is actually only one attribute that can use that, the one for
<body background>.
|
|
|
|
|
| |
URL attributes should always use AttrValue::Url, and the input should be
resolved against the document's base URL at setting time always.
|
| |
|
|
|
|
|
|
|
| |
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
|
| |
|
| |
|
| |
|
| |
|