Bug 802895 - hide frame menu options for srcdoc iframes r=gavin

This commit is contained in:
James Kitchener 2013-06-28 23:13:23 -04:00
Родитель 97d9e25ced
Коммит a33e8b9ec5
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -678,8 +678,13 @@ nsContextMenu.prototype = {
// See if the user clicked in a frame.
var docDefaultView = this.target.ownerDocument.defaultView;
if (docDefaultView != docDefaultView.top)
this.inFrame = true;
if (docDefaultView != docDefaultView.top) {
// srcdoc iframes are not considered frames for concerns about web
// content with about:srcdoc in location bar masqurading as trusted
// chrome/addon content.
if (!this.target.ownerDocument.isSrcdocDocument)
this.inFrame = true;
}
// if the document is editable, show context menu like in text inputs
if (!this.onEditableArea) {