Closed
Bug 885289
Opened 11 years ago
Closed 11 years ago
Improve context menu behaviour for srcdoc iframes
Categories
(Firefox :: Menus, defect)
Firefox
Menus
Tracking
()
RESOLVED
FIXED
Firefox 25
People
(Reporter: jkitch, Assigned: jkitch)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
RyanVM
:
checkin+
|
Details | Diff | Splinter Review |
Bug 802895 disables the "This Frame" context menu item for srcdoc iframes. This was done to prevent "show only this frame" etc. displaying arbitrary web content in the about protocol that was previously reserved for browser-internal/addon pages
A consequence of this is that it will hide the "view image"/"view video" context menu items for images/videos in srcdoc frames, which probably isn't optimal.
To fix that we'd probably need to track inFrame and inSrcdocFrame separately, so that srcdoc iframes retain a "this frame" sub-menu, but without the offending menu options.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jkitch.bug
Assignee | ||
Comment 1•11 years ago
|
||
This hides the frame entries that are undesirable or do not make sense for srcdoc iframes.
The question is, whether suppressing the ability to open srcdoc iframes in isolation is still undesirable.
Since the decision to suppress them was made, new identity elements have been introduced to indicate secure Firefox-internal pages. If the srcdoc document in isolation displayed the standard grey globe icon (with an about:srcdoc URI), would it be clear that it is untrusted, arbitrary content?
Attachment #778431 -
Flags: review?(gavin.sharp)
Comment 2•11 years ago
|
||
Comment on attachment 778431 [details] [diff] [review]
menu
Someone else (bz?) should review the nsContentUtils change. At first glance it seems odd to be special-casing those particular schemes (perhaps it should be a check for nested URIs in general, using the innermost if present?).
I'll delegate the nsContextMenu reviews to mconley.
Attachment #778431 -
Flags: review?(gavin.sharp) → review?(mconley)
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 778431 [details] [diff] [review]
menu
Requesting review for the nsContentUtils portion of the patch.
The check is necessary to allow viewing the source of a srcdoc document to work in debug builds.
Attachment #778431 -
Flags: review?(bzbarsky)
Comment 4•11 years ago
|
||
Comment on attachment 778431 [details] [diff] [review]
menu
r=me on the contentutils change.
Attachment #778431 -
Flags: review?(bzbarsky) → review+
Comment 5•11 years ago
|
||
Comment on attachment 778431 [details] [diff] [review]
menu
Review of attachment 778431 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with my concerns resolved. Thanks!
::: browser/base/content/test/test_contextmenu.html
@@ +1060,5 @@
> select_inputtext = subwindow.document.getElementById("test-select-input-text");
> select_inputtext_password = subwindow.document.getElementById("test-select-input-text-type-password");
> plugin = subwindow.document.getElementById("test-plugin");
> longdesc = subwindow.document.getElementById("test-longdesc");
> + srcdoc = subwindow.document.getElementById("test-srcdoc");
Unless I'm mistaken, srcdoc should be added to the list of variables here: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/test_contextmenu.html?force=1#983
::: content/base/src/nsContentUtils.cpp
@@ +6105,5 @@
> // srcdoc loads, but the URI is non-resolvable in cases where it is not).
> if (aForceOwner) {
> nsAutoCString uriStr;
> aURI->GetSpec(uriStr);
> + if(!uriStr.EqualsLiteral("about:srcdoc") &&
Trailing whitespace.
Attachment #778431 -
Flags: review?(mconley) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #779686 -
Flags: checkin?
Comment 7•11 years ago
|
||
Comment on attachment 779686 [details] [diff] [review]
patch
You can just use the checkin-needed bug keyword in the future :)
Attachment #779686 -
Flags: checkin? → checkin+
Comment 8•11 years ago
|
||
Flags: in-testsuite+
Comment 9•11 years ago
|
||
Backed out for mochitest-bc orange.
https://hg.mozilla.org/integration/mozilla-inbound/rev/5005e426f324
https://tbpl.mozilla.org/php/getParsedLog.php?id=25718230&tree=Mozilla-Inbound
Comment 10•11 years ago
|
||
False alarm, these were due to bug 890690 which has now been backed out.
This can reland - sorry for the churn!
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment 11•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1514cf837dbe
Sorry again for the goof :(
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 13•11 years ago
|
||
Doesn't seem to have an impact for developers, no doc needed. Reset the keyword with an explanation if you disagree.
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•