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

Implement the create an element for token algorithm #19397

Merged
merged 4 commits into from Jan 17, 2018

Conversation

@cbrewster
Copy link
Member

cbrewster commented Nov 27, 2017


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #19392 and fix #19393 (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 Nov 27, 2017

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/servoparser/mod.rs, components/script/dom/servoparser/async_html.rs
  • @fitzgen: components/script/dom/servoparser/mod.rs, components/script/dom/servoparser/async_html.rs
  • @KiChjang: components/script/dom/servoparser/mod.rs, components/script/dom/servoparser/async_html.rs
@highfive
Copy link

highfive commented Nov 27, 2017

warning Warning warning

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

cbrewster commented Nov 27, 2017

r? @jdm
Was there a specific test case that I could add here?
Also do we have a way of determining if the JavaScript execution context stack is empty?

@highfive highfive assigned jdm and unassigned KiChjang Nov 27, 2017
@jdm
Copy link
Member

jdm commented Nov 27, 2017

The test that led me to discover this was to take parser-fallsback-to-unknown-element.html and add a document.write() call in an onerror handler. Without #19393 the parser is in an unexpected state and we get a borrow panic.

// Step 6.1.
// TODO: handle throw-on-dynamic-markup-insertion counter.
// Step 6.2
// TODO: If the JavaScript execution context stack is empty, then perform a microtask checkpoint.

This comment has been minimized.


// Step 5.
// TODO: Check if the parser was created for the HTML fragment parsing algorithm
let will_execute_scrtipt = definition.is_some();

This comment has been minimized.

@jdm

jdm Nov 27, 2017

Member

script

let definition = document.lookup_custom_element_definition(&name.ns, &name.local, is.as_ref());

// Step 5.
// TODO: Check if the parser was created for the HTML fragment parsing algorithm

This comment has been minimized.

@jdm

jdm Nov 27, 2017

Member

We should add a field to ServoParser with this information.


// TODO: Step 10.
// TODO: Step 11.
// TODO: Step 12.

This comment has been minimized.

@jdm

jdm Nov 27, 2017

Member

Step 12 is handled from the parser callback associate_with_form.

@cbrewster cbrewster force-pushed the cbrewster:create_element_for_token branch from e17b271 to df301b5 Dec 3, 2017
@jdm
Copy link
Member

jdm commented Jan 4, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jan 4, 2018

Trying commit df301b5 with merge 5f72bae...

bors-servo added a commit that referenced this pull request Jan 4, 2018
Implement the create an element for token algorithm

<!-- 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 fix #19392 (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/19397)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 4, 2018

💔 Test failed - linux-rel-wpt

@jdm
Copy link
Member

jdm commented Jan 4, 2018

Bleah:

./components/script/dom/servoparser/mod.rs:110: derivable traits list is not in alphabetical order
	expected: Clone, Copy, JSTraceable, MallocSizeOf, PartialEq
	found: Clone, Copy, PartialEq, JSTraceable, MallocSizeOf
@jdm jdm force-pushed the cbrewster:create_element_for_token branch from df301b5 to f7e8f56 Jan 8, 2018
@highfive highfive removed the S-tests-failed label Jan 8, 2018
@jdm
Copy link
Member

jdm commented Jan 8, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2018

Trying commit f7e8f56 with merge 3fc40f7...

bors-servo added a commit that referenced this pull request Jan 8, 2018
Implement the create an element for token algorithm

<!-- 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 fix #19392 and fix #19393 (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/19397)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 9, 2018

💔 Test failed - mac-rel-wpt1

@CYBAI
Copy link
Collaborator

CYBAI commented Jan 9, 2018

Failed with #19495

@KiChjang
Copy link
Member

KiChjang commented Jan 9, 2018

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Jan 9, 2018

Trying commit f7e8f56 with merge 141192d...

bors-servo added a commit that referenced this pull request Jan 9, 2018
Implement the create an element for token algorithm

<!-- 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 fix #19392 and fix #19393 (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/19397)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Jan 9, 2018

I appreciate the support, but I was watching the build and it didn't need a retry.

@bors-servo
Copy link
Contributor

bors-servo commented Jan 9, 2018

@jdm jdm force-pushed the cbrewster:create_element_for_token branch from 280a133 to 10010ce Jan 11, 2018
@jdm jdm force-pushed the cbrewster:create_element_for_token branch from 10010ce to c55f25b Jan 11, 2018
@jdm
Copy link
Member

jdm commented Jan 11, 2018

r? @nox for the last commit. I've reviewed the rest of them.

@highfive highfive assigned nox and unassigned jdm Jan 11, 2018
@nox
Copy link
Member

nox commented Jan 17, 2018

@bors-servo r=jdm,nox

@bors-servo
Copy link
Contributor

bors-servo commented Jan 17, 2018

📌 Commit c55f25b has been approved by jdm,nox

@highfive highfive assigned jdm and unassigned nox Jan 17, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Jan 17, 2018

Testing commit c55f25b with merge fa82a6b...

bors-servo added a commit that referenced this pull request Jan 17, 2018
Implement the create an element for token algorithm

<!-- 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 fix #19392 and fix #19393 (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/19397)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 17, 2018

@bors-servo bors-servo merged commit c55f25b into servo:master Jan 17, 2018
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
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.