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

Type (tag name) selector doesn't recognize type with uppercase letter #15483

Closed
upsuper opened this issue Feb 10, 2017 · 8 comments
Closed

Type (tag name) selector doesn't recognize type with uppercase letter #15483

upsuper opened this issue Feb 10, 2017 · 8 comments

Comments

@upsuper
Copy link
Contributor

upsuper commented Feb 10, 2017

For example the following code:

<!DOCTYPE HTML>
<style>
  DIV {
    display: inline-block;
    background: green;
    width: 100px;
    height: 100px;
  }
</style>
<div></div>
<DIV></DIV>

Per spec it should show two green blocks, while Servo (or at least Stylo) shows empty.

This is probably an issue in selectors. cc @SimonSapin

@upsuper upsuper added A-content/css Interacting with CSS from web content (parsing, serializing, introspection) A-stylo and removed A-content/css Interacting with CSS from web content (parsing, serializing, introspection) labels Feb 10, 2017
@upsuper
Copy link
Contributor Author

upsuper commented Feb 10, 2017

It seems Servo renders this page correctly. So either this is something Stylo-specific, or this issue has been fixed at some point.

@SimonSapin
Copy link
Member

rust-selectors does ASCII case-insensitive matching of local names when element.is_html_element_in_html_document() returns true, and that method looks like it’s implemented correctly in components/style/gecko/wrapper.rs… so I don’t know right now.

Relevant spec: https://html.spec.whatwg.org/multipage/scripting.html#selectors

@upsuper
Copy link
Contributor Author

upsuper commented Feb 15, 2017

Interesting that it doesn't seem to happen on our testing infra... but it fails in my local build...

@upsuper
Copy link
Contributor Author

upsuper commented Feb 15, 2017

So it works on my mac build as well... then there is probably something weird with windows?

@upsuper
Copy link
Contributor Author

upsuper commented Feb 16, 2017

This seems to be a bindgen bug then. node.owner_doc().mType returns eXUL while C++ code returns eHTML.

@upsuper
Copy link
Contributor Author

upsuper commented Feb 16, 2017

I don't know why but it seems bindgen generates a 80 bytes useless padding for msvc build...

@emilio
Copy link
Member

emilio commented Feb 16, 2017

This is fixed in #15216. We check for field offsets too so now we should be sure we're accessing what we think we're accessing.

@upsuper
Copy link
Contributor Author

upsuper commented Feb 16, 2017

So it isn't really ever a Stylo bug then, since Stylo build never depends on the broken bindgen. Let's close this bug.

@upsuper upsuper closed this as completed Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants