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

HTMLStyleElement only applies CSS in the document #2692

Merged
merged 1 commit into from Jun 21, 2014

Conversation

Projects
None yet
4 participants
@Martiusweb
Contributor

Martiusweb commented Jun 21, 2014

HTMLStyleElement will not parse a style element created in Javascript until it
is attached to the DOM.

This fixes the bug #2107.

I added a reftest for the given cases:

  • a style element is defined in the HTML code,
  • a style element is created in Javascript, CSS content is added to the
    element and the element is later attached to the document,
  • a style element is created in Javascript, attached to the document and
    later CSS content is added to the element,
  • a style element is created in Javascript, CSS content is added to the
  • element but the element is never attached to the document.
HTMLStyleElement only applies CSS in the document
HTMLStyleElement will not parse a style element created in Javascript until it
is attached to the DOM.

I added a reftest for the given cases:

  * a style element is defined in the HTML code,
  * a style element is created in Javascript, CSS content is added to the
    element and the element is later attached to the document,
  * a style element is created in Javascript, attached to the document and
    later CSS content is added to the element,
  * a style element is created in Javascript, CSS content is added to the
  * element but the element is never attached to the document.
@hoppipolla-critic-bot

This comment has been minimized.

hoppipolla-critic-bot commented Jun 21, 2014

Critic review: https://critic.hoppipolla.co.uk/r/1870

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@highfive

This comment has been minimized.

highfive commented Jun 21, 2014

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon.

Ms2ger added a commit that referenced this pull request Jun 21, 2014

Merge pull request #2692 from Martiusweb/style_is_in_doc
HTMLStyleElement only applies CSS in the document; r=Ms2ger

@Ms2ger Ms2ger merged commit 1a34936 into servo:master Jun 21, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@Martiusweb Martiusweb deleted the Martiusweb:style_is_in_doc branch Jun 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment