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

Have CharacterData call children_changed on its parent when data is set. #17501

Merged
merged 1 commit into from Jul 13, 2017

Conversation

@jyc
Copy link
Contributor

jyc commented Jun 23, 2017

Can't run WPT on my computer, so pushing here to run tests 😢

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes are part of a series to fix #17182 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@emilio
Copy link
Member

emilio commented Jun 24, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Jun 24, 2017

Trying commit 6c3fbac with merge b0e07ef...

bors-servo added a commit that referenced this pull request Jun 24, 2017
Have CharacterData call children_changed on its parent when data is set.

**Can't run WPT on my computer, so pushing here to run tests 😢**

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of a series to fix #17182 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17501)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 24, 2017

💔 Test failed - linux-rel-wpt

@jdm
Copy link
Member

jdm commented Jun 24, 2017

I suspect we always want to call replace_ node_ranges.

@jyc
Copy link
Contributor Author

jyc commented Jun 26, 2017

Oops, my bad. Shouldn't have pulled that into the branch.

@jyc jyc force-pushed the jyc:Text-children_changed branch from 6c3fbac to 8d719c7 Jun 26, 2017
@jdm
Copy link
Member

jdm commented Jun 27, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Jun 27, 2017

Trying commit 8d719c7 with merge 0a2345f...

bors-servo added a commit that referenced this pull request Jun 27, 2017
Have CharacterData call children_changed on its parent when data is set.

**Can't run WPT on my computer, so pushing here to run tests 😢**

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of a series to fix #17182 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17501)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 27, 2017

💔 Test failed - mac-rel-css1

@jyc
Copy link
Contributor Author

jyc commented Jun 27, 2017

Test in question, tests/wpt/css-tests/css-variables-1_dev/html/test_variable_legal_values.htm, does:

  var style = document.getElementById("style");
  var styleText = document.createTextNode("");
  style.appendChild(styleText);

  ...

  function assert_allowed_variable_value(value, description) {
    test(function() {
           styleText.data = "#test { \n" +
                            "  --test: red;\n" +
                            "  --test: " + value + ";\n" +
                            "  background-color: red;\n" +
                            "  background-color: var(--test);\n" +
                            "}";

After this commit, we get a lot of {"status": "PASS", "expected": "FAIL", ...} from these guys. Going to update the expectations.

@jyc jyc force-pushed the jyc:Text-children_changed branch from 8d719c7 to 1059821 Jun 27, 2017
@jyc
Copy link
Contributor Author

jyc commented Jun 27, 2017

@bors-servo: try

EDIT: Finally it works! No one man should have all that power.

@bors-servo
Copy link
Contributor

bors-servo commented Jun 27, 2017

Trying commit 1059821 with merge 9e2d61c...

bors-servo added a commit that referenced this pull request Jun 27, 2017
Have CharacterData call children_changed on its parent when data is set.

**Can't run WPT on my computer, so pushing here to run tests 😢**

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of a series to fix #17182 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17501)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2017

💥 Test timed out

@jdm
Copy link
Member

jdm commented Jun 28, 2017

@bors-servo: retry

@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2017

Trying commit 1059821 with merge 9a0cfe8...

bors-servo added a commit that referenced this pull request Jun 28, 2017
Have CharacterData call children_changed on its parent when data is set.

**Can't run WPT on my computer, so pushing here to run tests 😢**

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of a series to fix #17182 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17501)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2017

@jyc jyc mentioned this pull request Jul 6, 2017
3 of 5 tasks complete
@jyc
Copy link
Contributor Author

jyc commented Jul 12, 2017

@Manishearth hi! would you have time to review this?

@emilio
emilio approved these changes Jul 12, 2017
Copy link
Member

emilio left a comment

r=me, with my comments addressed at you wish (none of them are a big deal, just feel free to change it if you agree)

/// Mutation for when a Text node's data is modified.
/// This doesn't change the structure of the list, which is what the other
/// variants' fields are stored for at the moment, so this can just have no
/// arguments.

This comment has been minimized.

Copy link
@emilio

emilio Jul 12, 2017

Member

nit: this can have no fields instead? Actually, no big deal, it's understandable.

This comment has been minimized.

Copy link
@emilio

emilio Jul 12, 2017

Member

I'd also probably call this TextContentChanged or something like that, but that maybe associates it too much with the textContent property?

This comment has been minimized.

Copy link
@jyc

jyc Jul 12, 2017

Author Contributor

"this can have no fields" is more consistent, thanks for catching that! hm, "Text" looks nicer but the other ones are describing actions and "Text" is just a noun. maybe "ChangeText" (the others are present tense infinitives)? then it fits with us calling content_changed and with this applying for Text nodes, maybe

pub fn next_child(&self) -> Option<&Node> {
match *self {
ChildrenMutation::Append { .. } => None,
ChildrenMutation::Insert { next, .. } => Some(next),
ChildrenMutation::Prepend { next, .. } => Some(next),
ChildrenMutation::Replace { next, .. } => next,
ChildrenMutation::ReplaceAll { .. } => None,
ChildrenMutation::Text => None,

This comment has been minimized.

Copy link
@emilio

emilio Jul 12, 2017

Member

Hm... Do we restyle properly when the text changed affects how we should match :empty?

This comment has been minimized.

Copy link
@emilio

emilio Jul 12, 2017

Member

Of course probably before this we don't, so it should not block landing, but afterwards probably we still don't do the right thing... In particular, I'd expect servo to fail http://searchfox.org/mozilla-central/source/layout/reftests/bugs/534804-1.html.

If it does, mind filing an issue for it?

This comment has been minimized.

Copy link
@jyc

jyc Jul 12, 2017

Author Contributor

I think I will probably file an issue and try to get back to this later, because I really want to get some work in on the project I've been assigned. Will test this quickly, though.

This comment has been minimized.

Copy link
@jyc

jyc Jul 12, 2017

Author Contributor

We do fail it! Made issue here: #17695

@jdm
Copy link
Member

jdm commented Jul 13, 2017

@bors-servo: r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

📌 Commit 0d36738 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

Testing commit 0d36738 with merge 4a4dc10...

bors-servo added a commit that referenced this pull request Jul 13, 2017
Have CharacterData call children_changed on its parent when data is set.

**Can't run WPT on my computer, so pushing here to run tests 😢**

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of a series to fix #17182 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17501)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

💔 Test failed - linux-rel-css

@jdm
Copy link
Member

jdm commented Jul 13, 2017


  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single universal selector shows '*' when serialized.

  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single type (simple) selector in the sequence of simple selectors that is not a universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single class (simple) selector in the sequence of simple selectors that is not a universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single id (simple) selector in the sequence of simple selectors that is not a universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single pseudo (simple) selector which does not accept arguments in the sequence of simple selectors that is not a universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single pseudo (simple) selector "lang" which accepts arguments in the sequence of simple selectors that is not a universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/selectorSerialize.htm:
  └ PASS [expected FAIL] single pseudo (simple) selector ":not" which accepts arguments in the sequence of simple selectors that is not a universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Simple type selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector without a namespace

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector without a namespace

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector with namespace

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector with namespace

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Simple type selector followed by class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Simple type selector followed by id

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Simple type selector followed by pseudo class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Simple type selector followed by pseudo element

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Simple type selector followed by atttribute selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector without a namespace followed by class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector without a namespace followed by id

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector without a namespace followed by pseudo class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector without a namespace followed by pseudo element

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector without a namespace followed by attribute selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector without a namespace followed by class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector without a namespace followed by id

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector without a namespace followed by pseudo class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector without a namespace followed by pseudo element

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector without a namespace followed by attribute selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector with namespace followed by class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector with namespace followed by id

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector with namespace followed by pseudo class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector with namespace followed by pseudo element

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Type selector with namespace followed by attribute selector

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector with namespace followed by class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector with namespace followed by id

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector with namespace followed by pseudo class

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector with namespace followed by pseudo element

  ▶ Unexpected subtest result in /cssom-1_dev/html/serialize-namespaced-type-selectors.htm:
  └ PASS [expected FAIL] Universal selector with namespace followed by attribute selector
Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.
@jyc jyc force-pushed the jyc:Text-children_changed branch from 0d36738 to 4142665 Jul 13, 2017
@jyc
Copy link
Contributor Author

jyc commented Jul 13, 2017

@bors-servo: retry

@jdm
Copy link
Member

jdm commented Jul 13, 2017

@bors-servo: r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

📌 Commit 4142665 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

Testing commit 4142665 with merge 559c0d1...

bors-servo added a commit that referenced this pull request Jul 13, 2017
Have CharacterData call children_changed on its parent when data is set.

**Can't run WPT on my computer, so pushing here to run tests 😢**

Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.

This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of a series to fix #17182 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17501)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

@bors-servo bors-servo merged commit 4142665 into servo:master Jul 13, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request Jul 14, 2017
Replace Namespace components which map to the default namespace with DefaultNamespace

- Fix eliding default namespace when serializing
- Fix shortest serialization property when namespace prefix is `*|` and there is no default namespace

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes is part of a series to fix #17182

<!-- Either: -->

I'd like to land #17501 first, because it allows some tests for this to work.

- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17537)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 15, 2017
Some fixes to selector serialization re: namespaces and universal selector

- Fix eliding default namespace when serializing
- Fix shortest serialization property when namespace prefix is `*|` and there is no default namespace
- Omit universal selector when serializing to match `cssom/serialize-namespaced-type-selectors` (again so we get the shortest serialization)

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes is part of a series to fix #17182

<!-- Either: -->

I'd like to land #17501 first, because it allows some tests for this to work.

- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17537)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 17, 2017
Some fixes to selector serialization re: namespaces and universal selector

- Fix eliding default namespace when serializing
- Fix shortest serialization property when namespace prefix is `*|` and there is no default namespace
- Omit universal selector when serializing to match `cssom/serialize-namespaced-type-selectors` (again so we get the shortest serialization)

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes is part of a series to fix #17182

<!-- Either: -->

I'd like to land #17501 first, because it allows some tests for this to work.

- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17537)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 17, 2017
Some fixes to selector serialization re: namespaces and universal selector

- Fix eliding default namespace when serializing
- Fix shortest serialization property when namespace prefix is `*|` and there is no default namespace
- Omit universal selector when serializing to match `cssom/serialize-namespaced-type-selectors` (again so we get the shortest serialization)

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes is part of a series to fix #17182

<!-- Either: -->

I'd like to land #17501 first, because it allows some tests for this to work.

- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17537)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 17, 2017
Some fixes to selector serialization re: namespaces and universal selector

- Fix eliding default namespace when serializing
- Fix shortest serialization property when namespace prefix is `*|` and there is no default namespace
- Omit universal selector when serializing to match `cssom/serialize-namespaced-type-selectors` (again so we get the shortest serialization)

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes is part of a series to fix #17182

<!-- Either: -->

I'd like to land #17501 first, because it allows some tests for this to work.

- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17537)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 17, 2017
Some fixes to selector serialization re: namespaces and universal selector

- Fix eliding default namespace when serializing
- Fix shortest serialization property when namespace prefix is `*|` and there is no default namespace
- Omit universal selector when serializing to match `cssom/serialize-namespaced-type-selectors` (again so we get the shortest serialization)

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes is part of a series to fix #17182

<!-- Either: -->

I'd like to land #17501 first, because it allows some tests for this to work.

- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17537)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.