mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Minor fixes and update test expectations
This commit is contained in:
parent
91f3d4f474
commit
5287e70829
11 changed files with 12 additions and 50 deletions
|
@ -591,7 +591,7 @@ impl Document {
|
|||
// Step 6
|
||||
.or_else(|| self.get_anchor_by_name(fragid))
|
||||
// Step 7
|
||||
.or_else(|| if fragid.to_lowercase() == "top" {
|
||||
.or_else(|| if fragid.eq_ignore_ascii_case("top") {
|
||||
self.GetDocumentElement()
|
||||
} else {
|
||||
// Step 8
|
||||
|
@ -607,7 +607,7 @@ impl Document {
|
|||
// Step 1
|
||||
self.set_target_element(target.r());
|
||||
|
||||
let point = if fragment.is_empty() || fragment.to_lowercase() == "top" {
|
||||
let point = if fragment.is_empty() || fragment.eq_ignore_ascii_case("top") {
|
||||
// FIXME(stshine): this should be the origin of the stacking context space,
|
||||
// which may differ under the influence of writing mode.
|
||||
Some((0.0, 0.0))
|
||||
|
|
|
@ -1335,13 +1335,14 @@ impl Window {
|
|||
let referrer_policy = referrer_policy.or(doc.get_referrer_policy());
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#navigating-across-documents
|
||||
if !force_reload && url.as_url().unwrap()[..Position::AfterQuery] == doc.url().as_url().unwrap()[..Position::AfterQuery] {
|
||||
// Step 5
|
||||
if let Some(fragment) = url.fragment() {
|
||||
doc.check_and_scroll_fragment(fragment);
|
||||
doc.set_url(url.clone());
|
||||
return
|
||||
}
|
||||
if !force_reload && url.as_url().unwrap()[..Position::AfterQuery] ==
|
||||
doc.url().as_url().unwrap()[..Position::AfterQuery] {
|
||||
// Step 5
|
||||
if let Some(fragment) = url.fragment() {
|
||||
doc.check_and_scroll_fragment(fragment);
|
||||
doc.set_url(url.clone());
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
self.main_thread_script_chan().send(
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
[Fragment Navigation: Updating document address]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[002.html]
|
||||
type: testharness
|
||||
[Fragment Navigation: Updating document address twice]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
[Fragment Navigation: Updating scroll position]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[scroll-to-anchor-name.html]
|
||||
type: testharness
|
||||
[Fragment Navigation: scroll to anchor name is lower priority than equal id]
|
||||
expected: FAIL
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
[004.html]
|
||||
type: testharness
|
||||
[.go commands should be queued until the thread has ended]
|
||||
expected: FAIL
|
||||
|
||||
[browser needs to support hashchange events for this testcase]
|
||||
expected: FAIL
|
||||
|
||||
[queued .go commands should all be executed when the queue is processed]
|
||||
expected: FAIL
|
||||
|
||||
[history position should be calculated when executing, not when calling the .go command]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[location_assign.html]
|
||||
type: testharness
|
||||
[location assign]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[location_replace.html]
|
||||
type: testharness
|
||||
[location replace]
|
||||
expected: FAIL
|
||||
|
|
@ -5646,9 +5646,6 @@
|
|||
[HTMLDirectoryElement interface: document.createElement("dir") must inherit property "compact" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[Location interface: window.location must have own property "replace"]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLOptionElement must be primary interface of new Option()]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -6282,9 +6279,6 @@
|
|||
[HTMLAreaElement interface: document.createElement("area") must inherit property "hash" with the proper type (19)]
|
||||
expected: FAIL
|
||||
|
||||
[Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Location interface: window.location must have own property "ancestorOrigins"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
[028.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[ scheduler: javascript: URL]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue