Auto merge of #13418 - stshine:location-replace, r=KiChjang

Make document url mutable and implement location.replace()

<!-- 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 #13413 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- 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/13418)

<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-20 02:27:54 -06:00 committed by GitHub
commit 72e4c6dc21
26 changed files with 117 additions and 156 deletions

View file

@ -208,7 +208,7 @@ impl AttrValue {
AttrValue::Atom(value)
}
pub fn from_url(base: &ServoUrl, url: String) -> AttrValue {
pub fn from_url(base: ServoUrl, url: String) -> AttrValue {
let joined = base.join(&url).ok();
AttrValue::Url(url, joined)
}