Josh Matthews
c94d909a86
script: Limit public exports. ( #34915 )
...
* 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>
2025-01-10 08:19:19 +00:00
Hayashi Mikihiro
a797969efe
Replace the lazy_static crate whth std::sync::LazyLock
in components/script ( #33004 )
...
* replace in str.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* replace navigator.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* replace htmlmetaelement.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* replace document.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* replace cssstyledeclaration.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* replace script_runtime.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* replace window_named_properties.rs
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* reduce dependency lazy_static
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* reduce lazy in script_runtime.rs
`Mutex::new()` is const contexts. I think that `JS_ENGINE` is need not lazy initialize.
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
---------
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2024-08-12 07:30:35 +00:00
Bumsoo Kim
141a594e23
Replace null-byte terminated string literals with C-string literals ( #32716 )
...
* simple conversion from byte string to c-string
Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
* convert byte strings to c-strings to c_char ptr
Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
---------
Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
2024-07-06 20:14:15 +00:00
RustAndMetal
f6a975fc58
clippy: Fix several warnings ( #31710 )
...
Signed-off-by: RustAndMetal <111676747+RustAndMetal@users.noreply.github.com>
2024-03-18 08:33:43 +00:00
Richard Dushime
8a6481c341
clippy: Fix warnings in components/script
( #31700 )
...
* Fix warnings: immediate dereferencing of references and unneeded statement
* Fix warnings in Components/script
2024-03-15 17:27:50 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) ( #30325 )
...
* strict imports formatting
* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate
( #30311 )
...
* 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>
2023-09-08 12:11:31 +00:00
Delan Azabani
557ce73f5f
add spec issue as todo in [[OwnPropertyKeys]] trap
2023-03-23 19:15:20 +08:00
Delan Azabani
c831a136b2
clarify and test interactions with indexed access
2023-03-23 18:07:50 +08:00
Delan Azabani
b1f78d8a3d
fix attrs in descriptor for @@toStringTag property
2023-03-23 18:07:44 +08:00
Delan Azabani
dd905d8434
clean up spurious changes and todos with no action needed
2023-03-23 18:07:39 +08:00
Delan Azabani
65da7b668b
clean up lints and tidy errors
2023-03-23 18:07:36 +08:00
Delan Azabani
9a8a5bdbf7
make ownPropertyKeys trap return @@toStringTag key
...
This fixes the failures in the “[[OwnPropertyKeys]]” subtest.
2023-03-23 18:07:11 +08:00
Delan Azabani
bbaacb7b2d
make getOwnPropertyDescriptor trap accept @@toStringTag key
...
This fixes the failures in the “[[Get]]” and “[[Delete]]” subtests.
2023-03-23 18:07:08 +08:00
Delan Azabani
33387eb75a
make getOwnPropertyDescriptor trap accept integer indices
...
Several /webidl/ecmascript-binding/window-named-properties-object.html
subtests, including the “[[GetOwnProperty]]” and “[[HasProperty]]”
subtests, expect iframe.contentWindow.Window.prototype[0] to return an
element with id “0”.
This commit makes the getOwnPropertyDescriptor trap accept property
keys that are integer indices, by converting them to a DOMString just
like we would for a property key that is a JSString.
2023-03-23 18:07:05 +08:00
Delan Azabani
9a3d6969c9
migrate use of deprecated RUST_JS_{IS,TO}_STRING
2023-03-23 18:07:02 +08:00
Delan Azabani
8814e4bb4f
fix failures in [[DefineOwnProperty]] subtest
...
Calling throw_type_error in the [[DefineOwnProperty]] trap (and
returning false) makes the internal method throw a TypeError, which
means both Object#defineProperty and Reflect#defineProperty will throw
a TypeError, but we actually want the latter to return false.
This commit makes the trap set ObjectOpResult to a TypeError (and
return true), making the internal method return false per the spec [1]
and in turn allowing Reflect#defineProperty to return false.
[1] https://webidl.spec.whatwg.org/#named-properties-object-defineownproperty
2023-03-23 18:06:58 +08:00
Delan Azabani
4c7f198ee2
apply yvt/servo/fix-named-window-getter
2023-03-23 18:02:35 +08:00
Delan Azabani
fd1de05592
apply pylbrecht/servo/named.window.getter ( closes #27952 )
2023-03-23 18:01:26 +08:00