diff -r 000000000000 -r 6474c204b198 docshell/base/nsIMarkupDocumentViewer.idl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docshell/base/nsIMarkupDocumentViewer.idl Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,109 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/** + * The nsIMarkupDocumentViewer + * This interface describes the properties of a content viewer + * for a markup document - HTML or XML + */ + +#include "nsISupports.idl" + +interface nsIDOMNode; + +%{C++ +template class nsCOMPtr; +template class nsTArray; +%} + +interface nsIMarkupDocumentViewer; + +[ref] native nsIMarkupDocumentViewerTArray(nsTArray >); + +[scriptable, uuid(7aea9561-5346-401c-b40e-418688da2d0d)] +interface nsIMarkupDocumentViewer : nsISupports +{ + + /* + Scrolls to a given DOM content node. + */ + void scrollToNode(in nsIDOMNode node); + + /** The amount by which to scale all text. Default is 1.0. */ + attribute float textZoom; + + /** The amount by which to scale all lengths. Default is 1.0. */ + attribute float fullZoom; + + /** Disable entire author style level (including HTML presentation hints) */ + attribute boolean authorStyleDisabled; + + /** + * XXX comm-central only: bug 829543. Not the Character Encoding menu in + * browser! + */ + attribute ACString forceCharacterSet; + + /** + * XXX comm-central only: bug 829543. + */ + attribute ACString hintCharacterSet; + + /** + * XXX comm-central only: bug 829543. + */ + attribute int32_t hintCharacterSetSource; + + //void GetCharacterSetHint(in wstring hintCharset, in int32_t charsetSource); + + /** + * Requests the size of the content to the container. + */ + void getContentSize(out long width, out long height); + + /** The minimum font size */ + attribute long minFontSize; + + /** + * Append |this| and all of its descendants to the given array, + * in depth-first pre-order traversal. + */ + [noscript] void appendSubtree(in nsIMarkupDocumentViewerTArray array); + + /** + * Set the maximum line width for the document. + * NOTE: This will generate a reflow! + * + * @param maxLineWidth The maximum width of any line boxes on the page, + * in CSS pixels. + */ + void changeMaxLineBoxWidth(in int32_t maxLineBoxWidth); + + /** + * Instruct the refresh driver to discontinue painting until further + * notice. + */ + void pausePainting(); + + /** + * Instruct the refresh driver to resume painting after a previous call to + * pausePainting(). + */ + void resumePainting(); + + /* + * Render the document as if being viewed on a device with the specified + * media type. This will cause a reflow. + * + * @param mediaType The media type to be emulated + */ + void emulateMedium(in AString aMediaType); + + /* + * Restore the viewer's natural media type + */ + void stopEmulatingMedium(); +};