Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uphtmlanchorelement getter work before href setting is called #11182
Conversation
highfive
commented
May 14, 2016
|
Heads up! This PR modifies the following files:
|
|
You'll need to use |
highfive
commented
May 16, 2016
|
New code was committed to pull request. |
|
cc @KiChjang |
highfive
commented
May 16, 2016
|
New code was committed to pull request. |
| <a href="https://anonymous:pwd@developer.mozilla.org:1234/en-US/">a10</a> | ||
| <script> | ||
| function test_gettersetter(property, result, url) { | ||
| var a = document.querySelector('a[href="'+url+'"]'); |
This comment has been minimized.
This comment has been minimized.
| <title>HTMLAnchorElement getters before setters called</title> | ||
| <script src="/resources/testharness.js"></script> | ||
| <script src="/resources/testharnessreport.js"></script> | ||
| <a href="http://google.com?hi">a1</a> |
This comment has been minimized.
This comment has been minimized.
highfive
commented
May 16, 2016
|
New code was committed to pull request. |
|
cc @KiChjang |
| @@ -91,6 +91,20 @@ impl VirtualMethods for HTMLAnchorElement { | |||
| Some(self.upcast::<HTMLElement>() as &VirtualMethods) | |||
| } | |||
|
|
|||
| fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) { | |||
| self.super_type().unwrap().attribute_mutated(attr, mutation); | |||
| match attr.local_name() { | |||
This comment has been minimized.
This comment has been minimized.
KiChjang
May 16, 2016
Member
if attr.local_name() == &atom!("href") {
if self.url.is_mutably_borrowed() {
return;
}
self.set_url();
}
highfive
commented
May 16, 2016
|
New code was committed to pull request. |
|
cc @KiChjang |
|
It doesn't look like the latest commit changed anything. |
highfive
commented
May 16, 2016
|
New code was committed to pull request. |
highfive
commented
May 17, 2016
|
New code was committed to pull request. |
|
@bors-servo r+ |
|
|
htmlanchorelement getter work before href setting is called 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 #10876 (github issue number if applicable). Either: - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11182) <!-- Reviewable:end -->
|
|
highfive
commented
May 17, 2016
|
update tests rewrite it
highfive
commented
May 18, 2016
|
New code was committed to pull request. |
|
@bors-servo r+ |
|
|
htmlanchorelement getter work before href setting is called 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 #10876 (github issue number if applicable). Either: - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11182) <!-- Reviewable:end -->
|
|
|
This causes a crash: #11261 |
mrmiywj commentedMay 14, 2016
•
edited
Thank you for contributing to Servo! Please replace each
[ ]by[X]when the step is complete, and replace__with appropriate data:./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsEither:
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
This change is