Skip to content

Commit 81a55ac

Browse files
authored
Switch to markup5ever's version of Atom and upgrade xml5ever (#34)
`html5ever` was just rexporting `markup5ever`'s version of Atom's so it makes sense to loosen the dependencies and switch to the ones in `markup5ever`. This should make it easier to keep things up to date in the future. In addition, we are now using the latest version of `xml5ever`.
1 parent b6d21ef commit 81a55ac

File tree

6 files changed

+23
-56
lines changed

6 files changed

+23
-56
lines changed

Cargo.lock

Lines changed: 10 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ gstreamer-gl-wayland = { version = "0.21" }
5454
gstreamer-sys = "0.21"
5555
gstreamer-video = "0.21"
5656
headers = "0.3"
57-
html5ever = "0.26"
5857
http = "0.2"
5958
hyper = "0.14"
6059
hyper-rustls = { version = "0.24", default-features = false, features = ["acceptor", "http1", "http2", "logging", "tls12", "webpki-tokio"] }
@@ -72,6 +71,7 @@ lazy_static = "1.4"
7271
libc = "0.2"
7372
log = "0.4"
7473
malloc_size_of_derive = "0.1"
74+
markup5ever = "0.12"
7575
mime = "0.3.13"
7676
mime_guess = "2.0.3"
7777
mozangle = "0.5.1"
@@ -125,4 +125,4 @@ wgpu-core = "0.18"
125125
wgpu-types = "0.18"
126126
winapi = "0.3"
127127
xi-unicode = "0.1.0"
128-
xml5ever = "0.17"
128+
xml5ever = "0.18"

style/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ doctest = false
1818

1919
[features]
2020
gecko = ["style_traits/gecko", "bindgen", "regex", "toml", "mozbuild"]
21-
servo = ["serde", "style_traits/servo", "servo_atoms", "html5ever",
21+
servo = ["serde", "style_traits/servo", "servo_atoms", "markup5ever",
2222
"cssparser/serde", "encoding_rs", "malloc_size_of/servo",
2323
"string_cache", "to_shmem/servo", "servo_arc/servo", "url"]
2424
gecko_debug = []
@@ -35,7 +35,6 @@ derive_more = { version = "0.99", default-features = false, features = ["add", "
3535
encoding_rs = { version = "0.8", optional = true }
3636
euclid = "0.22"
3737
fxhash = "0.2"
38-
html5ever = { version = "0.26", optional = true }
3938
icu_segmenter = { version = "1.4", default-features = false, features = ["auto", "compiled_data"] }
4039
indexmap = "1.0"
4140
itertools = "0.10"
@@ -44,6 +43,7 @@ lazy_static = "1"
4443
log = { version = "0.4", features = ["std"] }
4544
malloc_size_of = { path = "../malloc_size_of" }
4645
malloc_size_of_derive = "0.1"
46+
markup5ever = { workspace = true, optional = true }
4747
matches = "0.1"
4848
mime = "0.3.13"
4949
new_debug_unreachable = "1.0"

style/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern crate gecko_profiler;
4141
pub mod gecko_string_cache;
4242
#[cfg(feature = "servo")]
4343
#[macro_use]
44-
extern crate html5ever;
44+
extern crate markup5ever;
4545
#[macro_use]
4646
extern crate lazy_static;
4747
#[macro_use]
@@ -154,13 +154,13 @@ pub use servo_atoms::Atom;
154154

155155
#[cfg(feature = "servo")]
156156
#[allow(missing_docs)]
157-
pub type LocalName = crate::values::GenericAtomIdent<html5ever::LocalNameStaticSet>;
157+
pub type LocalName = crate::values::GenericAtomIdent<markup5ever::LocalNameStaticSet>;
158158
#[cfg(feature = "servo")]
159159
#[allow(missing_docs)]
160-
pub type Namespace = crate::values::GenericAtomIdent<html5ever::NamespaceStaticSet>;
160+
pub type Namespace = crate::values::GenericAtomIdent<markup5ever::NamespaceStaticSet>;
161161
#[cfg(feature = "servo")]
162162
#[allow(missing_docs)]
163-
pub type Prefix = crate::values::GenericAtomIdent<html5ever::PrefixStaticSet>;
163+
pub type Prefix = crate::values::GenericAtomIdent<markup5ever::PrefixStaticSet>;
164164

165165
pub use style_traits::arc_slice::ArcSlice;
166166
pub use style_traits::owned_slice::OwnedSlice;

style/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ macro_rules! try_match_ident_ignore_ascii_case {
6868
#[cfg(feature = "servo")]
6969
macro_rules! local_name {
7070
($s:tt) => {
71-
$crate::values::GenericAtomIdent(html5ever::local_name!($s))
71+
$crate::values::GenericAtomIdent(markup5ever::local_name!($s))
7272
};
7373
}
7474

7575
#[cfg(feature = "servo")]
7676
macro_rules! ns {
7777
() => {
78-
$crate::values::GenericAtomIdent(html5ever::ns!())
78+
$crate::values::GenericAtomIdent(markup5ever::ns!())
7979
};
8080
($s:tt) => {
81-
$crate::values::GenericAtomIdent(html5ever::ns!($s))
81+
$crate::values::GenericAtomIdent(markup5ever::ns!($s))
8282
};
8383
}
8484

style/servo/selector_parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ impl ::selectors::SelectorImpl for SelectorImpl {
442442
type LocalName = LocalName;
443443
type NamespacePrefix = Prefix;
444444
type NamespaceUrl = Namespace;
445-
type BorrowedLocalName = html5ever::LocalName;
446-
type BorrowedNamespaceUrl = html5ever::Namespace;
445+
type BorrowedLocalName = markup5ever::LocalName;
446+
type BorrowedNamespaceUrl = markup5ever::Namespace;
447447
}
448448

449449
impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {

0 commit comments

Comments
 (0)