The default bug view has changed. See this FAQ.

document.referrer should be based on the script entry point

RESOLVED FIXED in mozilla19

Status

()

Core
DOM
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

(Depends on: 1 bug, {dev-doc-needed})

unspecified
mozilla19
dev-doc-needed
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Currently it's based on the calling document. We decided in a recent spec thread to change this:

http://lists.w3.org/Archives/Public/public-script-coord/2012OctDec/0014.html
https://hg.mozilla.org/integration/mozilla-inbound/rev/d6f15467b587
Created attachment 679239 [details] [diff] [review]
Fix nsLocation::CheckURL. v1
Attachment #679239 - Flags: review?(bzbarsky)
Created attachment 679240 [details] [diff] [review]
Tests. v1
Attachment #679240 - Flags: review?(bzbarsky)
Created attachment 679242 [details] [diff] [review]
Tests. v2

I just realized that invoking the callback on window.top from the inner iframe
will break when the mochtest is run within an iframe. Let's use
window.parent.parent instead.
Attachment #679240 - Attachment is obsolete: true
Attachment #679240 - Flags: review?(bzbarsky)
Attachment #679242 - Flags: review?(bzbarsky)
Comment on attachment 679239 [details] [diff] [review]
Fix nsLocation::CheckURL. v1

Review of attachment 679239 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsLocation.cpp
@@ +147,5 @@
> +      do_QueryInterface(nsJSUtils::GetDynamicScriptGlobal(cx));
> +    if (entryPoint) {
> +      nsCOMPtr<nsIDOMDocument> domDoc;
> +      entryPoint->GetDocument(getter_AddRefs(domDoc));
> +      doc = do_QueryInterface(domDoc);

QI to nsPIDOMWindow and set doc to entryPoint->GetDoc().
Filed a corresponding spec bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=19893
Comment on attachment 679239 [details] [diff] [review]
Fix nsLocation::CheckURL. v1

Modulo Ms2ger's nit, r=me
Attachment #679239 - Flags: review?(bzbarsky) → review+
Comment on attachment 679242 [details] [diff] [review]
Tests. v2

r=me
Attachment #679242 - Flags: review?(bzbarsky) → review+
Per my investigation in bug 797204, the only test in our testsuite that is sensitive to this distinction is bug dom/tests/mochitest/bugs/test_bug593174.html, which I've fixed in this patch.

remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/9ec4fbe7040f
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/5272e198951c
https://hg.mozilla.org/mozilla-central/rev/9ec4fbe7040f
https://hg.mozilla.org/mozilla-central/rev/5272e198951c
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Depends on: 810808

Updated

4 years ago
Keywords: dev-doc-needed
Depends on: 843477
No longer depends on: 810808
Depends on: 810808
You need to log in before you can comment on or make changes to this bug.