Closed Bug 809290 Opened 12 years ago Closed 12 years ago

document.referrer should be based on the script entry point

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: bholley, Assigned: bholley)

References

Details

(Keywords: dev-doc-needed)

Attachments

(2 files, 1 obsolete file)

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
Attachment #679239 - Flags: review?(bzbarsky)
Attached patch Tests. v1 (obsolete) — Splinter Review
Attachment #679240 - Flags: review?(bzbarsky)
Attached patch Tests. v2Splinter Review
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
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Depends on: 810808
Depends on: 843477
No longer depends on: 810808
Depends on: 810808
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: