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 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 Simplify an+b when serializing #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 try

@bors-servo
Copy link
Contributor

⌛ Trying commit 6c3fbac with merge b0e07ef...

bors-servo pushed 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

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 24, 2017
@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.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 26, 2017
@jdm
Copy link
Member

jdm commented Jun 27, 2017

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 8d719c7 with merge 0a2345f...

bors-servo pushed 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

💔 Test failed - mac-rel-css1

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 27, 2017
@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.

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label 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

⌛ Trying commit 1059821 with merge 9e2d61c...

bors-servo pushed 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

💥 Test timed out

@jdm
Copy link
Member

jdm commented Jun 28, 2017

@bors-servo: retry

@bors-servo
Copy link
Contributor

⌛ Trying commit 1059821 with merge 9a0cfe8...

bors-servo pushed 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

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

jyc commented Jul 12, 2017

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

Copy link
Member

@emilio emilio left a comment

Choose a reason for hiding this comment

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

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.
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"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,
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

📌 Commit 0d36738 has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 13, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 0d36738 with merge 4a4dc10...

bors-servo pushed 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

💔 Test failed - linux-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 13, 2017
@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.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels 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

📌 Commit 4142665 has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 13, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 4142665 with merge 559c0d1...

bors-servo pushed 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

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: emilio
Pushing 559c0d1 to master...

@bors-servo bors-servo merged commit 4142665 into servo:master Jul 13, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 13, 2017
bors-servo pushed 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 pushed 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 pushed 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 pushed 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 pushed 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 pushed 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify an+b when serializing
7 participants