Bug 645756 - Disable zooming for frameset pages; r=mbrubeck

This commit is contained in:
Martijn Wargers 2011-08-26 01:20:59 +01:00
Родитель 2bdcc3d85d
Коммит 497395b930
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -33,6 +33,7 @@ let XULDocument = Ci.nsIDOMXULDocument;
let HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
let HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
let HTMLFrameElement = Ci.nsIDOMHTMLFrameElement;
let HTMLFrameSetElement = Ci.nsIDOMHTMLFrameSetElement;
let HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
let HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;
@ -745,6 +746,11 @@ let ViewportHandler = {
if (Util.isParentProcess())
return { defaultZoom: 1, autoSize: true, allowZoom: false, autoScale: false };
// HACK: Since we can't set the scale correctly in frameset pages yet (bug 645756), we force
// them to device-width and scale=1 so they will lay out reasonably.
if (content.frames.length > 0 && (content.document.body instanceof HTMLFrameSetElement))
return { defaultZoom: 1, autoSize: true, allowZoom: false, autoScale: false };
// viewport details found here
// http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
// http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html