Skip to content
This repository was archived by the owner on Jan 21, 2023. It is now read-only.

Upgrade html5ever to a TendrilSink based API. #19

Merged
merged 2 commits into from
Jan 26, 2016
Merged

Conversation

SimonSapin
Copy link
Collaborator

Waiting on servo/html5ever#188.

@@ -13,21 +13,18 @@ doctest = false
[features]
unstable = [
"string_cache/unstable",
"tendril/unstable",
"rc/unstable",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems "rc/unstable" can be replaced with stabilized Weak element. Perhaps in another PR?

mbrubeck did it for me in Ygg01/xml5ever/pull/12

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kuchiki needs Rc::strong_count or Rc::would_unwrap, and both are still unstable.

(It could do without them by removing impl Drop for NodeRef, but there would be a risk of stack overflow when dropping deep trees.)

/// ```
pub mod traits {
pub use iter::{NodeIterator, ElementIterator};
pub use html5ever::tendril::TendrilSink;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why html5ever::tendril::TendrilSink instead of tendril::TendrilSink?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve made html5ever re-export the tendril crates, so that users like kuchiki don’t need to depend on it themselves. That way, when html5ever upgrades to a semver-incompatible version of tendril, kuchiki will automatically use the same version. Previously, the version numbers of both dependencies had to be kept in sync.

@SimonSapin
Copy link
Collaborator Author

Alright, thanks for your comments!

SimonSapin added a commit that referenced this pull request Jan 26, 2016
Upgrade html5ever to a TendrilSink based API.
@SimonSapin SimonSapin merged commit e77cf98 into master Jan 26, 2016
@SimonSapin SimonSapin deleted the tendrilsink branch January 26, 2016 17:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants