Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PartialEq impl of SpecifiedUrl value is wrong for stylo #15950

Closed
upsuper opened this issue Mar 15, 2017 · 1 comment
Closed

PartialEq impl of SpecifiedUrl value is wrong for stylo #15950

upsuper opened this issue Mar 15, 2017 · 1 comment

Comments

@upsuper
Copy link
Member

@upsuper upsuper commented Mar 15, 2017

Serialization of shorthand marker depends on equality of url, and it fails when the url are set in different CSSOM call.

Specifically, the following code shows the problem:

<!DOCTYPE HTML>
<p style='marker-start: url("#a"); marker-mid: url("#a"); marker-end: url("#a");'></p>
<script>
let $p = document.querySelector('p');
alert($p.style.marker); // returns `url("#a")`
let a = "url(#a)"
$p.style.markerStart = a;
$p.style.markerMid = a;
$p.style.markerEnd = a;
alert($p.style.marker); // returns empty string
</script>

because it relies on the equality of urls:

if self.marker_start == self.marker_mid && self.marker_mid == self.marker_end {

but the equality of urls depends on equality of UrlExtraData which contains different pointers for each CSSOM call.

This probably should be fixed as part of the next change of how URL is implemented for stylo. File this issue just for a record.

@upsuper upsuper added the A-stylo label Mar 15, 2017
@upsuper
Copy link
Member Author

@upsuper upsuper commented May 24, 2017

This seem to have been fixed.

@upsuper upsuper closed this May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.