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

fix #18776: use XML fragment serialization for innerHTML in XML documents #18888

Merged
merged 2 commits into from Oct 16, 2017

Conversation

@tigercosmos
Copy link
Collaborator

tigercosmos commented Oct 15, 2017

I am not sure whether my solution is in the right way.
@jdm Can you give some advises?


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

This change is Reviewable

@highfive
Copy link

highfive commented Oct 15, 2017

Heads up! This PR modifies the following files:

  • @fitzgen: components/script/dom/element.rs
  • @KiChjang: components/script/dom/element.rs
@highfive
Copy link

highfive commented Oct 15, 2017

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@jdm
Copy link
Member

jdm commented Oct 15, 2017

That looks like the right idea to me.
@bors-servo: try

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2017

Trying commit 280fadd with merge 3c39fec...

bors-servo added a commit that referenced this pull request Oct 15, 2017
(WIP) fix  #18776: use XML fragment serialization for innerHTML in XML documents

<!-- Please describe your changes on the following line: -->
I am not sure whether my solution is in the right way.
@jdm Can you give some advises?

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #18776 (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/18888)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2017

💔 Test failed - linux-dev

@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 15, 2017

@jdm
Copy link
Member

jdm commented Oct 15, 2017

  ▶ Unexpected subtest result in /domparsing/innerhtml-03.xhtml:
  └ PASS [expected FAIL] innerHTML in XHTML

  ▶ Unexpected subtest result in /domparsing/innerhtml-03.xhtml:
  └ PASS [expected FAIL] innerHTML in XHTML 1

  ▶ Unexpected subtest result in /domparsing/innerhtml-03.xhtml:
  └ PASS [expected FAIL] innerHTML in XHTML 2

  ▶ Unexpected subtest result in /domparsing/innerhtml-03.xhtml:
  └ PASS [expected FAIL] innerHTML in XHTML 7

This is exactly the result that we are hoping for :) Please remove the corresponding ini files in tests/wpt/metadata/domparsing/, since the tests are no longer expected to fail.

@jdm
Copy link
Member

jdm commented Oct 15, 2017

Actually, I think I was overeager. So we pass some of the tests in that file now, which is an improvement. We should remove those specific lines from https://dxr.mozilla.org/servo/source/tests/wpt/metadata/domparsing/innerhtml-03.xhtml.ini?q=path%3Ainnerhtml-03.xhtml.ini&redirect_type=single#3 rather than the entire file.

@jdm
Copy link
Member

jdm commented Oct 15, 2017

@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 15, 2017

Actually still remain two tests:
https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/domparsing/innerhtml-03.xhtml#L32-L41

  [innerHTML in XHTML 3]
    expected: FAIL

  [innerHTML in XHTML 4]
    expected: FAIL
@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 15, 2017

I have no idea how to fix these two.
Should I fix them in this PR?

@jdm
Copy link
Member

jdm commented Oct 15, 2017

We can investigate them separately from this PR.

@tigercosmos tigercosmos changed the title (WIP) fix #18776: use XML fragment serialization for innerHTML in XML documents fix #18776: use XML fragment serialization for innerHTML in XML documents Oct 15, 2017
@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 15, 2017

r? @jdm

@highfive highfive assigned jdm and unassigned asajeffrey Oct 15, 2017
@jdm
Copy link
Member

jdm commented Oct 15, 2017

Let's fix outerHTML in the same way, too.


[Node for data]
expected: FAIL

[Node for area]

This comment has been minimized.

@tigercosmos

tigercosmos Oct 15, 2017

Author Collaborator

I don't know why these remain to fail.

@jdm
Copy link
Member

jdm commented Oct 16, 2017

@bors-servo: r+
Thanks!

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

📌 Commit 548969d has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

Testing commit 548969d with merge 623a4f1...

bors-servo added a commit that referenced this pull request Oct 16, 2017
fix  #18776: use XML fragment serialization for innerHTML in XML documents

<!-- Please describe your changes on the following line: -->
I am not sure whether my solution is in the right way.
@jdm Can you give some advises?

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #18776 (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/18888)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

💔 Test failed - mac-rel-wpt3

@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 16, 2017

how to see the error log?

@jdm
Copy link
Member

jdm commented Oct 16, 2017

Clicking filtered-wpt-errorsummary.log shows the unexpected test results, and stdio for the test-wpt job shows the regular output. More passing tests!


  ▶ Unexpected subtest result in /html/semantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/outerhtml.html:
  └ PASS [expected FAIL] Template contents should be serialized instead of template element if serializing template element

  ▶ Unexpected subtest result in /html/semantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/outerhtml.html:
  └ PASS [expected FAIL] Template contents should be serialized instead of template element if serializing template element. Test nested template

  ▶ Unexpected subtest result in /html/semantics/scripting-1/the-template-element/additions-to-serializing-xhtml-documents/outerhtml.html:
  └ PASS [expected FAIL] Template contents should be serialized instead of template element if serializing template element. Test serializing whole document
@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 16, 2017

Where is /_mozilla/ folder? Seems not in tests?

▶ FAIL [expected PASS] /_mozilla/css/border_radius_elliptical_a.html
  └   → /_mozilla/css/border_radius_elliptical_a.html 1a25abe342c5059bd0971151cd815ddb48bcfde4
/_mozilla/css/border_radius_elliptical_ref.html ef32bea13c7811e9092d6f334643fda26a617ef6
Testing 1a25abe342c5059bd0971151cd815ddb48bcfde4 == ef32bea13c7811e9092d6f334643fda26a617ef6
@jdm
Copy link
Member

jdm commented Oct 16, 2017

That one is a known intermittent failure, so you should ignore it (which is why it wasn't included in the list of filtered-wpt-errorsummary.log. However, those tests live in tests/wpt/mozilla/tests/, and the ini files are in tests/wpt/mozilla/meta.

@KiChjang
Copy link
Member

KiChjang commented Oct 16, 2017

Squash!

@tigercosmos
Copy link
Collaborator Author

tigercosmos commented Oct 16, 2017

@KiChjang Shall we separate innerHTML and outerHTML to different commits?

@KiChjang
Copy link
Member

KiChjang commented Oct 16, 2017

Oh, I misread. I thought they're the same thing... I would still squash, but I don't mind either way.

Thanks for your work!

@bors-servo r=jdm

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

📌 Commit c77b611 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

Testing commit c77b611 with merge adb45eb...

bors-servo added a commit that referenced this pull request Oct 16, 2017
fix  #18776: use XML fragment serialization for innerHTML in XML documents

<!-- Please describe your changes on the following line: -->
I am not sure whether my solution is in the right way.
@jdm Can you give some advises?

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #18776 (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/18888)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

@bors-servo bors-servo merged commit c77b611 into servo:master Oct 16, 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
@tigercosmos tigercosmos deleted the tigercosmos:xml branch Oct 16, 2017
@jdm jdm mentioned this pull request Dec 8, 2017
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.

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