Closed
Bug 1268810
Opened 9 years ago
Closed 8 years ago
[Presentation WebAPI] set sandboxed auxiliary navigation browsing context flag on receiving browsing context
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: schien, Assigned: kershaw)
References
()
Details
(Whiteboard: [ft:conndevices]btpp-backlog [ETA 6/30])
Attachments
(3 files, 4 obsolete files)
5.16 KB,
patch
|
kershaw
:
review+
|
Details | Diff | Splinter Review |
10.03 KB,
patch
|
kershaw
:
review+
jocheng
:
approval-mozilla-b2g48+
|
Details | Diff | Splinter Review |
5.78 KB,
patch
|
jocheng
:
approval-mozilla-b2g48+
|
Details | Diff | Splinter Review |
We need to set sandboxed auxiliary navigation browsing context flag to prevent presented content opening popup window.
Updated•9 years ago
|
Whiteboard: btpp-backlog
Reporter | ||
Updated•9 years ago
|
Whiteboard: btpp-backlog → btpp-backlog [ETA 6/30]
Updated•8 years ago
|
Whiteboard: btpp-backlog [ETA 6/30] → [ft:conndevices]btpp-backlog [ETA 6/30]
Updated•8 years ago
|
Target Milestone: --- → FxOS-S1 (26Jun)
Assignee | ||
Comment 1•8 years ago
|
||
First version.
Assignee: nobody → kechang
Attachment #8763028 -
Flags: feedback?(schien)
Reporter | ||
Comment 3•8 years ago
|
||
Comment on attachment 8763028 [details] [diff] [review] Part1: Add SANDBOXED_AUXILIARY_NAVIGATION flag to receiver page Review of attachment 8763028 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsFrameLoader.cpp @@ +2137,5 @@ > + HTMLIFrameElement* iframe = HTMLIFrameElement::FromContent(mOwnerContent); > + if (iframe) { > + sandboxFlags = iframe->GetSandboxFlags(); > + } > + ApplySandboxFlags(sandboxFlags); Why we need to move this code? Please add comment for it if there is legitimate reason. @@ +3014,5 @@ > + nsAutoString presentationURL; > + nsContentUtils::GetPresentationURL(mDocShell, presentationURL); > + if (!presentationURL.IsEmpty()) { > + sandboxFlags |= SANDBOXED_AUXILIARY_NAVIGATION; > + } Please add a comment for it, or leave a reference to spec here. ::: dom/ipc/TabChild.cpp @@ +894,5 @@ > nsDocShell::Cast(docShell)->SetOriginAttributes(OriginAttributesRef()); > + > + if (!PresentationURL().IsEmpty()) { > + docShell->SetSandboxFlags(SANDBOXED_AUXILIARY_NAVIGATION); > + } comment here, too.
Attachment #8763028 -
Flags: feedback?(schien) → feedback+
Reporter | ||
Comment 4•8 years ago
|
||
Comment on attachment 8763029 [details] [diff] [review] Part2: Test case Review of attachment 8763029 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/presentation/tests/mochitest/mochitest.ini @@ +50,5 @@ > skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785 > +[test_presentation_receiver_auxiliary_navigation_inproc.html] > +skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785 > +[test_presentation_receiver_auxiliary_navigation_oop.html] > +skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785 we can probably run this test on Android as well. please try it.
Attachment #8763029 -
Flags: feedback?(schien) → feedback+
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #3) > Comment on attachment 8763028 [details] [diff] [review] > Part1: Add SANDBOXED_AUXILIARY_NAVIGATION flag to receiver page > > Review of attachment 8763028 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/base/nsFrameLoader.cpp > @@ +2137,5 @@ > > + HTMLIFrameElement* iframe = HTMLIFrameElement::FromContent(mOwnerContent); > > + if (iframe) { > > + sandboxFlags = iframe->GetSandboxFlags(); > > + } > > + ApplySandboxFlags(sandboxFlags); > > Why we need to move this code? Please add comment for it if there is > legitimate reason. > We have to do mDocShell->SetFrameType first for setting the mozbrowser boundary, or we will get a wrong top frame element in nsContentUtils::GetPresentationURL. > @@ +3014,5 @@ > > + nsAutoString presentationURL; > > + nsContentUtils::GetPresentationURL(mDocShell, presentationURL); > > + if (!presentationURL.IsEmpty()) { > > + sandboxFlags |= SANDBOXED_AUXILIARY_NAVIGATION; > > + } > > Please add a comment for it, or leave a reference to spec here. > Will do. > ::: dom/ipc/TabChild.cpp > @@ +894,5 @@ > > nsDocShell::Cast(docShell)->SetOriginAttributes(OriginAttributesRef()); > > + > > + if (!PresentationURL().IsEmpty()) { > > + docShell->SetSandboxFlags(SANDBOXED_AUXILIARY_NAVIGATION); > > + } > > comment here, too. Will do. Thanks.
Assignee | ||
Comment 6•8 years ago
|
||
Add some comments.
Attachment #8763028 -
Attachment is obsolete: true
Attachment #8763202 -
Flags: review?(bugs)
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #4) > Comment on attachment 8763029 [details] [diff] [review] > Part2: Test case > > Review of attachment 8763029 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/presentation/tests/mochitest/mochitest.ini > @@ +50,5 @@ > > skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785 > > +[test_presentation_receiver_auxiliary_navigation_inproc.html] > > +skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785 > > +[test_presentation_receiver_auxiliary_navigation_oop.html] > > +skip-if = (e10s || toolkit == 'gonk' || toolkit == 'android') # Bug 1129785 > > we can probably run this test on Android as well. please try it. Let's see if this can pass on Android. https://treeherder.mozilla.org/#/jobs?repo=try&revision=ae7106e72500
Updated•8 years ago
|
Attachment #8763202 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 8•8 years ago
|
||
Enable tests on Android.
Attachment #8763029 -
Attachment is obsolete: true
Attachment #8763752 -
Flags: review?(bugs)
Comment 9•8 years ago
|
||
Comment on attachment 8763752 [details] [diff] [review] Part2: Test case -v2 Not about this bug, but presentation code in general. I wonder if we should add a new module for it and have couple of peers for reviewing and such?
Attachment #8763752 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 10•8 years ago
|
||
Attachment #8763202 -
Attachment is obsolete: true
Attachment #8764100 -
Flags: review+
Assignee | ||
Comment 11•8 years ago
|
||
Attachment #8763752 -
Attachment is obsolete: true
Attachment #8764101 -
Flags: review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 12•8 years ago
|
||
(In reply to Olli Pettay [:smaug] (high review load, please consider other reviewers) from comment #9) > Comment on attachment 8763752 [details] [diff] [review] > Part2: Test case -v2 > > Not about this bug, but presentation code in general. I wonder if we should > add a new module for it and have couple of peers for reviewing and such? Sounds a good idea. I think S.C. should be the peer or perhaps the owner. :)
Flags: needinfo?(schien)
Comment 13•8 years ago
|
||
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/29e67b27dae3 Set SANDBOXED_AUXILIARY_NAVIGATION flag to receiver page, r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/79918d9ceb0b Test case, r=smaug
Keywords: checkin-needed
Reporter | ||
Comment 14•8 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #12) > (In reply to Olli Pettay [:smaug] (high review load, please consider other > reviewers) from comment #9) > > Comment on attachment 8763752 [details] [diff] [review] > > Part2: Test case -v2 > > > > Not about this bug, but presentation code in general. I wonder if we should > > add a new module for it and have couple of peers for reviewing and such? > > Sounds a good idea. > > I think S.C. should be the peer or perhaps the owner. :) I'm ok with it since I've been doing drive-by review for a while.
Flags: needinfo?(schien)
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/29e67b27dae3 https://hg.mozilla.org/mozilla-central/rev/79918d9ceb0b
Assignee | ||
Comment 16•8 years ago
|
||
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): Presentation API User impact if declined: Receiver page can do window.open(). Testing completed: with automation test Risk to taking this patch (and alternatives if risky): low String or UUID changes made by this patch: N/A
Attachment #8765806 -
Flags: approval-mozilla-b2g48?
Assignee | ||
Updated•8 years ago
|
Attachment #8764101 -
Flags: approval-mozilla-b2g48?
Comment 18•8 years ago
|
||
Comment on attachment 8765806 [details] [diff] [review] [b2g_48_v2_6] Part1: Add SANDBOXED_AUXILIARY_NAVIGATION flag to receiver page, r=smaug Approve for TV 2.6
Flags: needinfo?(jocheng)
Attachment #8765806 -
Flags: approval-mozilla-b2g48? → approval-mozilla-b2g48+
Comment 19•8 years ago
|
||
Comment on attachment 8764101 [details] [diff] [review] Part2: Test case, r=smaug Approve for TV 2.6
Attachment #8764101 -
Flags: approval-mozilla-b2g48? → approval-mozilla-b2g48+
Assignee | ||
Comment 20•8 years ago
|
||
Gary, please help to merge the pull request. Thanks. https://github.com/mozilla-b2g/gecko-b2g/pull/29
Flags: needinfo?(xeonchen)
Comment 21•8 years ago
|
||
https://github.com/mozilla-b2g/gecko-b2g/commit/e81fd19f9e908939f9476b95b85d09e155b4aaea
status-b2g-v2.6:
--- → fixed
Flags: needinfo?(xeonchen)
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•