Interface nsIContentViewerType

Hierarchy

Properties

DOMDocument: Document

Returns the same thing as getDocument(), but for use from script only. C++ consumers should use getDocument().

authorStyleDisabled: boolean

Disable entire author style level (including HTML presentation hints), for this viewer but not any child viewers.

beforeUnloadFiring: boolean

Exposes whether we're in the process of firing the beforeunload event. In this case, the corresponding docshell will not allow navigation.

container: nsIDocShell
deviceFullZoomForTest: number

The actual full zoom in effect, as modified by the device context. For a requested full zoom, the device context may choose a slightly different effectiveFullZoom to accomodate integer rounding of app units per dev pixel. This property returns the actual zoom amount in use, though it may not be good user experience to report that a requested zoom of 90% is actually 89.1%, for example. This value is provided primarily to support media queries of dppx values, because those queries are matched against the actual native device pixel ratio and the actual full zoom.

You should only need this for testing.

historyEntry: nsISHEntry

Get the history entry that this viewer will save itself into when destroyed. Can return null

inPermitUnload: boolean

Exposes whether we're blocked in a call to permitUnload.

isHidden: boolean

Returns whether this content viewer is in a hidden state.

Note

Only Gecko internal code should set the attribute!

isStopped: boolean
isTabModalPromptAllowed: boolean

Indicates when we're in a state where content shouldn't be allowed to trigger a tab-modal prompt (as opposed to a window-modal prompt) because we're part way through some operation (eg beforeunload) that shouldn't be rentrant if the user closes the tab while the prompt is showing. See bug 613800.

loadCompleted: boolean
presContext: nsPresContextPtr
presShell: PresShellPtr
previousViewer: nsIContentViewer

The previous content viewer, which has been |close|d but not |destroy|ed.

sticky: boolean

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Clears the current history entry. This is used if we need to clear out the saved presentation state.

    Returns void

  • All users of a content viewer are responsible for calling both close() and destroy(), in that order.

    close() should be called when the load of a new page for the next content viewer begins, and destroy() should be called when the next content viewer replaces this one.

    |historyEntry| sets the session history entry for the content viewer. If this is null, then Destroy() will be called on the document by close(). If it is non-null, the document will not be destroyed, and the following actions will happen when destroy() is called (*):

    • Sanitize() will be called on the viewer's document
    • The content viewer will set the contentViewer property on the history entry, and release its reference (ownership reversal).
    • hide() will be called, and no further destruction will happen.

    (*) unless the document is currently being printed, in which case it will never be saved in session history.

    Parameters

    • historyEntry: nsISHEntry

    Returns void

  • Returns void

  • Dispatches the "beforeunload" event and returns the result, as documented in the PermitUnloadResult enum.

    Returns nsIContentViewer_PermitUnloadResult

  • Find the view to use as the container view for MakeWindow. Returns null if this will be the root of a view manager hierarchy. In that case, if mParentWidget is null then this document should not even be displayed.

    Returns nsViewPtr

  • Returns void

  • Parameters

    • aBounds: nsIntRectRef

    Returns void

  • Returns the preferred width and height of the content, constrained to the given maximum values. If either maxWidth or maxHeight is less than or equal to zero, that dimension is not constrained.

    If a pref width is provided, it is max'd with the min-content size.

    All input and output values are in CSS pixels.

    Parameters

    • maxWidth: number
    • maxHeight: number
    • prefWidth: number
    • width: number
    • height: number

    Returns void

  • Returns DOMDocument without addrefing.

    Returns Document

  • Parameters

    • aSource: int32_t

    Returns Encoding

  • Returns void

  • Parameters

    • aParentWidget: nsIWidgetPtr
    • aBounds: nsIntRectRef
    • aWindowActor: WindowGlobalChildPtr

    Returns void

  • Parameters

    • aStatus: number

    Returns void

  • Parameters

    • aDoc: Document

    Returns void

  • Parameters

    • aX: number
    • aY: number

    Returns void

  • Attach the content viewer to its DOM window and docshell.

    Parameters

    • aState: nsISupports

      A state object that might be useful in attaching the DOM window.

    • aSHEntry: nsISHEntry

      The history entry that the content viewer was stored in. The entry must have the docshells for all of the child documents stored in its child shell list.

    Returns void

  • Parameters

    • isUnload: boolean

    Returns void

  • Checks if the document wants to prevent unloading by firing beforeunload on the document. The result is returned.

    Parameters

    • aAction: nsIContentViewer_PermitUnloadAction

    Returns boolean

  • Parameters

    • aBounds: nsIntRectRef

    Returns void

  • Parameters

    • aBounds: nsIntRectRef
    • aFlags: number

    Returns void

  • Allows setting the document.

    Parameters

    • aDocument: Document

    Returns void

  • Parameters

    • aDocument: Document
    • aForceReuseInnerWindow: boolean

    Returns void

  • Set collector for navigation timing data (load, unload events).

    Parameters

    • aTiming: nsDOMNavigationTimingPtr

    Returns void

  • Change the layout to view the document with page layout (like print preview), but dynamic and editable (like Galley layout).

    Parameters

    • aPageMode: boolean
    • aPrintSettings: nsIPrintSettings

    Returns void

  • Sets the print settings for print / print-previewing a subdocument.

    Parameters

    • aPrintSettings: nsIPrintSettings
    • aRemotePrintJob: RemotePrintJobChildPtr

    Returns void

  • Parameters

    • aEncoding: Encoding
    • aSource: int32_t

    Returns void

  • Returns void

  • Returns void

Generated using TypeDoc