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

Window should own Location, Document shouldn't #18578

Merged
merged 1 commit into from Sep 20, 2017

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Sep 20, 2017

Document shouldn't own location, Window should.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #18438
  • These changes do not require tests because it's an intermittent

This change is Reviewable

@highfive
Copy link

highfive commented Sep 20, 2017

Heads up! This PR modifies the following files:

  • @fitzgen: components/script/dom/document.rs, components/script/dom/window.rs
  • @KiChjang: components/script/dom/document.rs, components/script/dom/window.rs
@highfive
Copy link

highfive commented Sep 20, 2017

warning Warning warning

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

asajeffrey commented Sep 20, 2017

@highfive highfive assigned KiChjang and unassigned wafflespeanut Sep 20, 2017
@emilio
Copy link
Member

emilio commented Sep 20, 2017

@bors-servo r+

Looks good.

@bors-servo
Copy link
Contributor

bors-servo commented Sep 20, 2017

📌 Commit 211b008 has been approved by emilio

@highfive highfive assigned emilio and unassigned KiChjang Sep 20, 2017
@@ -3438,7 +3436,7 @@ impl DocumentMethods for Document {

// https://html.spec.whatwg.org/multipage/#dom-document-location
fn GetLocation(&self) -> Option<Root<Location>> {
self.browsing_context().map(|_| self.location.or_init(|| Location::new(&self.window)))
self.browsing_context().map(|_| self.window.Location())

This comment has been minimized.

Copy link
@KiChjang

KiChjang Sep 20, 2017

Member

I believe the document needs to be checked whether it's fully active, instead of checking whether there's a browsing context.

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Sep 20, 2017

Author Member

Fixed.

@KiChjang
Copy link
Member

KiChjang commented Sep 20, 2017

@asajeffrey asajeffrey force-pushed the asajeffrey:script-window-owns-location branch from 211b008 to 3d00b0e Sep 20, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Sep 20, 2017

📌 Commit 3d00b0e has been approved by KiChjang

@highfive highfive assigned KiChjang and unassigned emilio Sep 20, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Sep 20, 2017

Testing commit 3d00b0e with merge 6a791cd...

bors-servo added a commit that referenced this pull request Sep 20, 2017
…jang

Window should own Location, Document shouldn't

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

Document shouldn't own location, Window should.

---
<!-- 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 #18438
- [X] These changes do not require tests because it's an intermittent

<!-- 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/18578)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 20, 2017

@bors-servo bors-servo merged commit 3d00b0e into servo:master Sep 20, 2017
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
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.

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