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 upImplement attribute getter of Location #5591 #6135
Conversation
hoppipolla-critic-bot
commented
May 19, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/5051 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
| // FIXME: Url null check is skipped for now | ||
| let host = match url.host() { | ||
| None => "".to_owned(), | ||
| Some(host) => format!("{}", host) |
This comment has been minimized.
This comment has been minimized.
Manishearth
May 20, 2015
Member
nit: we format host twice here, perhaps we shouldn't (instead do all formatting in the match below)
|
Could you file a followup about making these attributes writeable, and about fixing the nullable-URL thing? (the current implementation using Or just fix them here :) I think the (I haven't read through the spec, just making guesses from the portions I saw, so I could be wrong here) |
|
Per @Ms2ger's suggestion, I'll add a test to data url. @Manishearth I think I'll open a followup for writable and nullable url. I don't want to block other people for too long. :) |
|
@Ms2ger : It turns out that there are two problems the prevent the data url test for location getters:
|
|
Review status: 0 of 11 files reviewed, 1 unresolved discussion, all commit checks successful. components/script/dom/urlhelper.rs, line 65 [r2] (raw file): Comments from the review on Reviewable.io |
|
@shinglyu You can click the "acknowledge" button to mark issues as resolved in Reviewable. |
|
Review status:
Comments from the review on Reviewable.io |
|
@bors-servo: r+ |
|
|
Reopening @yodalee 's #5597 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6135) <!-- Reviewable:end -->
|
|
|
|
Oops, let me fix that right away |
|
@shinglyu Could you squash the compile error into the original commit? |
Reopening @yodalee 's #5597 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6135) <!-- Reviewable:end -->
|
|
|
I remember I dealt with those tests before, let me check. Sorry! |
|
|
I disabled those tests locally, but didn't commit the |
|
Disabling (ie. not running) is the wrong choice here. Those are valid results; the tests now check more things because they were previously stopping silently on properties of location that didn't exist. |
|
These tests are failing because WorkerLocation implement URLUtilsReadOnly which this patch does not include. These was passing before because both (URLUtils and URLUtilsReadOnly) returned |
|
Fernandez, thanks for the information, I'll disable them. Sebastian N. Fernandez notifications@github.com 於 2015年6月4日 週四 上午12:54寫道:
|
|
@shinglyu I think you have to change them to FAIL, not disable them. |
|
@snf: sorry, I mean turn them to expected FAIL. |
|
Sure |
|
Err, didn't realise that my #6371 supersedes this. |
|
@nox: sorry, I should have make this merge earlier. |
|
@shinglyu I am a newbie and diving into how to implement the history api(forward and back). It may be helpful for me to add origin( https://url.spec.whatwg.org/#dom-urlutils-origin) into urlhelper.rs. Is that reasonable? Thanks~ |
|
@vectorijk : I am also quite new to this area, I think is reasonable, but you might need to consult someone who is more experienced then me. |
|
|
|
#6371 implemented this. Should I close it? |
|
I guess so! |
shinglyu commentedMay 19, 2015
Reopening @yodalee 's #5597