| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
CSSStyleRule, CSSStyleSheet (#36375)
Add CanGc as arguments in methods in devtools.rs, CharacterData,
CSSStyleRule, CSSStyleSheet
Testing: These changes do not require tests because they are a refactor.
Addressed part of https://github.com/servo/servo/issues/34573.
---------
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Move HasParent to script_bindings and update imports for InheritTypes.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make principal creation generic over DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move a bunch of proxy-related code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make some proxy-related code generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move DomSlice to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some utility bindings code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make enumerating and resolving globals generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make realm helpers generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move implementations on concrete DOM types to concrete bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make additional codegen helpers generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make iterator creation generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make reporting an exception a generic operation.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move AsCCharPtrPtr to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Address clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Background:
> JavaScript strings are potentially ill-formed UTF-16 (arbitrary
> Vec<u16>) and can contain unpaired surrogates. Rust’s String type is
> well-formed UTF-8 and can not contain any surrogate. Surrogates are
> never emitted when decoding bytes from the network, but they can sneak
> in through document.write, the Element.innerHtml setter, or other DOM
> APIs.
In 2015, Servo launched an experiment to see if unpaired surrogates
cropped up in page content. That experiment caused Servo to panic if
unpaired surrogates were encountered with a request to report the page
to bug #6564. During that time several pages were reported with unpaired
surrogates, causing Servo to panic. In addition, when running the WPT
tests Servo will never panic due to the `-Z replace-surrogates` option
being passed by the test driver.
Motivation:
After this 10 year experiment, it's clear that unpaired surrogates are a
real concern in page content. Several reports were filed of Servo
panicking after encountering them in real world pages. A complete fix for
this issue would be to somehow maintain unpaired surrogates in the DOM,
but that is a much larger task than simply emitting U+FFD instead of an
unpaired surrogate.
Since it is clear that this kind of content exists, it is better for
Servo to try its best to handle the content rather than crash as
production browsers should not crash due to user content when possible.
In this change, I modify Servo to always replace unpaired surrogates.
It would have been ideal to only crash when debug assertions are
enabled, but debug assertions are enabled by default in release mode --
so this wouldn't be effective for WPT tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* manual implementation of an assign operation
* manual implementation of an assign operation
* single-character string
* manual cjheck for common ascii range
|
|
|
|
|
|
|
|
|
| |
* clippy: Fix explicit auto-deref warnings
* clippy: Fix explicit auto-deref warnings
* refactor: Tidy up code
* refactor: Fix method not found errors
|
| |
|
|
|
|
|
| |
* Update Codegen.py to emit Foo_Binding instead of FooBinding
* s/FooBinding/Foo_Binding/g
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.
This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.
|
| |
|
| |
|
|
|
|
| |
This reverts commit ec723057b2360446790d436fe5e234d798fb4175.
|
| |
|
|
|
|
|
|
|
|
| |
It now fails since DOMString is currently based on std::string::String
on the Rust side, which is strictly well-formed UTF-8 and can not
contain unpaired surrogate code points.
Fixes #10780
|
|
|
|
| |
This entirely removes the 'non-geckolib' feature of the util crate.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The methods which are currently implemented are the ones on String that are currently being used:
string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
|
|
|
|
|
|
| |
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
|
|
|
|
|
|
|
|
|
|
| |
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
|