mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
6e03687e23
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1317659919000">
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1318359094000">
|
||||
<emItems>
|
||||
<emItem blockID="i41" id="{99079a25-328f-4bd4-be04-00955acaa0a7}">
|
||||
<versionRange minVersion="0.1" maxVersion="4.3.1.00" severity="1">
|
||||
@ -9,6 +9,8 @@
|
||||
<versionRange minVersion=" " severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i43" id="supportaccessplugin@gmail.com">
|
||||
</emItem>
|
||||
<emItem blockID="i38" id="{B7082FAA-CB62-4872-9106-E42DD88EDE45}">
|
||||
<versionRange minVersion="0.1" maxVersion="3.3.0.*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
@ -86,6 +88,8 @@
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i44" id="sigma@labs.mozilla">
|
||||
</emItem>
|
||||
<emItem blockID="i5" id="support@daemon-tools.cc">
|
||||
<versionRange minVersion=" " maxVersion="1.0.0.5">
|
||||
</versionRange>
|
||||
|
@ -45,7 +45,7 @@
|
||||
"@mozilla.org/layout/htmlCopyEncoder;1"
|
||||
|
||||
// {972D8D8F-F0DA-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_DOCUMENT_VIEWER_CID \
|
||||
#define NS_CONTENT_VIEWER_CID \
|
||||
{ 0x972d8d8f, 0xf0da, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {FC886801-E768-11d4-9885-00C04FA0CF4B}
|
||||
|
@ -75,7 +75,4 @@ DEPRECATED_OPERATION(Position)
|
||||
DEPRECATED_OPERATION(TotalSize)
|
||||
DEPRECATED_OPERATION(IsSameNode)
|
||||
DEPRECATED_OPERATION(GlobalStorage)
|
||||
DEPRECATED_OPERATION(XmlVersion)
|
||||
DEPRECATED_OPERATION(InputEncoding)
|
||||
DEPRECATED_OPERATION(XmlStandalone)
|
||||
DEPRECATED_OPERATION(IsElementContentWhitespace)
|
||||
|
@ -200,9 +200,12 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID);
|
||||
#endif
|
||||
#include "nsDOMTouchEvent.h"
|
||||
#include "nsIScriptElement.h"
|
||||
#include "nsIContentViewer.h"
|
||||
|
||||
#include "prdtoa.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
@ -869,7 +869,7 @@ TransferShowingState(nsIDocument* aFromDoc, nsIDocument* aToDoc)
|
||||
|
||||
nsresult
|
||||
nsExternalResourceMap::AddExternalResource(nsIURI* aURI,
|
||||
nsIDocumentViewer* aViewer,
|
||||
nsIContentViewer* aViewer,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsIDocument* aDisplayDocument)
|
||||
{
|
||||
@ -951,7 +951,7 @@ nsExternalResourceMap::PendingLoad::OnStartRequest(nsIRequest *aRequest,
|
||||
return NS_BINDING_ABORTED;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> viewer;
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
nsCOMPtr<nsILoadGroup> loadGroup;
|
||||
nsresult rv = SetupViewer(aRequest, getter_AddRefs(viewer),
|
||||
getter_AddRefs(loadGroup));
|
||||
@ -972,7 +972,7 @@ nsExternalResourceMap::PendingLoad::OnStartRequest(nsIRequest *aRequest,
|
||||
|
||||
nsresult
|
||||
nsExternalResourceMap::PendingLoad::SetupViewer(nsIRequest* aRequest,
|
||||
nsIDocumentViewer** aViewer,
|
||||
nsIContentViewer** aViewer,
|
||||
nsILoadGroup** aLoadGroup)
|
||||
{
|
||||
NS_PRECONDITION(!mTargetListener, "Unexpected call to OnStartRequest");
|
||||
@ -1030,9 +1030,7 @@ nsExternalResourceMap::PendingLoad::SetupViewer(nsIRequest* aRequest,
|
||||
getter_AddRefs(listener),
|
||||
getter_AddRefs(viewer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer = do_QueryInterface(viewer);
|
||||
NS_ENSURE_TRUE(docViewer, NS_ERROR_UNEXPECTED);
|
||||
NS_ENSURE_TRUE(viewer, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsIParser> parser = do_QueryInterface(listener);
|
||||
if (!parser) {
|
||||
@ -1048,8 +1046,8 @@ nsExternalResourceMap::PendingLoad::SetupViewer(nsIRequest* aRequest,
|
||||
}
|
||||
|
||||
listener.swap(mTargetListener);
|
||||
docViewer.swap(*aViewer);
|
||||
newLoadGroup.swap(*aLoadGroup);
|
||||
viewer.forget(aViewer);
|
||||
newLoadGroup.forget(aLoadGroup);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -5903,25 +5901,6 @@ nsDocument::GetInputEncoding(nsAString& aInputEncoding)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::GetXmlStandalone(bool *aXmlStandalone)
|
||||
{
|
||||
WarnOnceAbout(eXmlStandalone);
|
||||
*aXmlStandalone =
|
||||
!IsHTML() &&
|
||||
mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
|
||||
mXMLDeclarationBits & XML_DECLARATION_BITS_STANDALONE_EXISTS &&
|
||||
mXMLDeclarationBits & XML_DECLARATION_BITS_STANDALONE_YES;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::SetXmlStandalone(bool aXmlStandalone)
|
||||
{
|
||||
return IsHTML() ? NS_ERROR_DOM_NOT_SUPPORTED_ERR : NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::GetMozSyntheticDocument(bool *aSyntheticDocument)
|
||||
{
|
||||
@ -5929,29 +5908,6 @@ nsDocument::GetMozSyntheticDocument(bool *aSyntheticDocument)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::GetXmlVersion(nsAString& aXmlVersion)
|
||||
{
|
||||
WarnOnceAbout(eXmlVersion);
|
||||
if (IsHTML()) {
|
||||
SetDOMStringToNull(aXmlVersion);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// If there is no declaration, the value is "1.0".
|
||||
|
||||
// XXX We only support "1.0", so always output "1.0" until that changes.
|
||||
aXmlVersion.AssignLiteral("1.0");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::SetXmlVersion(const nsAString& aXmlVersion)
|
||||
{
|
||||
return IsHTML() ? NS_ERROR_DOM_NOT_SUPPORTED_ERR : NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::GetDocumentURI(nsAString& aDocumentURI)
|
||||
{
|
||||
@ -5966,14 +5922,6 @@ nsDocument::GetDocumentURI(nsAString& aDocumentURI)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocument::SetDocumentURI(const nsAString& aDocumentURI)
|
||||
{
|
||||
// Not allowing this yet, need to think about security ramifications first.
|
||||
// We use mDocumentURI to get principals for this document.
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static void BlastSubtreeToPieces(nsINode *aNode);
|
||||
|
||||
PLDHashOperator
|
||||
|
@ -88,7 +88,7 @@
|
||||
#include "nsAttrAndChildArray.h"
|
||||
#include "nsDOMAttributeMap.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDOMXPathNSResolver.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsILoadContext.h"
|
||||
@ -401,10 +401,10 @@ protected:
|
||||
nsresult StartLoad(nsIURI* aURI, nsINode* aRequestingNode);
|
||||
|
||||
/**
|
||||
* Set up an nsIDocumentViewer based on aRequest. This is guaranteed to
|
||||
* Set up an nsIContentViewer based on aRequest. This is guaranteed to
|
||||
* put null in *aViewer and *aLoadGroup on all failures.
|
||||
*/
|
||||
nsresult SetupViewer(nsIRequest* aRequest, nsIDocumentViewer** aViewer,
|
||||
nsresult SetupViewer(nsIRequest* aRequest, nsIContentViewer** aViewer,
|
||||
nsILoadGroup** aLoadGroup);
|
||||
|
||||
private:
|
||||
@ -467,7 +467,7 @@ protected:
|
||||
* function makes sure to remove the pending load for aURI, if any, from our
|
||||
* hashtable, and to notify its observers, if any.
|
||||
*/
|
||||
nsresult AddExternalResource(nsIURI* aURI, nsIDocumentViewer* aViewer,
|
||||
nsresult AddExternalResource(nsIURI* aURI, nsIContentViewer* aViewer,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsIDocument* aDisplayDocument);
|
||||
|
||||
|
@ -330,13 +330,6 @@ protected:
|
||||
|
||||
nsresult GetWholeText(nsAString& aWholeText);
|
||||
|
||||
nsresult GetIsElementContentWhitespace(bool *aReturn)
|
||||
{
|
||||
GetOwnerDoc()->WarnOnceAbout(nsIDocument::eIsElementContentWhitespace);
|
||||
*aReturn = TextIsOnlyWhitespace();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static PRInt32 FirstLogicallyAdjacentTextNode(nsIContent* aParent,
|
||||
PRInt32 aIndex);
|
||||
|
||||
|
@ -3175,8 +3175,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsGenericHTMLFrameElement,
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(nsGenericHTMLFrameElement)
|
||||
NS_INTERFACE_TABLE_INHERITED2(nsGenericHTMLFrameElement,
|
||||
nsIDOMNSHTMLFrameElement,
|
||||
NS_INTERFACE_TABLE_INHERITED1(nsGenericHTMLFrameElement,
|
||||
nsIFrameLoaderOwner)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsGenericHTMLFrameElement)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
|
||||
@ -3197,7 +3196,7 @@ nsGenericHTMLFrameElement::GetContentDocument(nsIDOMDocument** aContentDocument)
|
||||
return win->GetDocument(aContentDocument);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
nsGenericHTMLFrameElement::GetContentWindow(nsIDOMWindow** aContentWindow)
|
||||
{
|
||||
NS_PRECONDITION(aContentWindow, "Null out param");
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsINameSpaceManager.h" // for kNameSpaceID_None
|
||||
#include "nsIFormControl.h"
|
||||
#include "nsIDOMNSHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsFrameLoader.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
@ -1017,7 +1017,6 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32);
|
||||
*/
|
||||
|
||||
class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
|
||||
public nsIDOMNSHTMLFrameElement,
|
||||
public nsIFrameLoaderOwner
|
||||
{
|
||||
public:
|
||||
@ -1034,9 +1033,6 @@ public:
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
|
||||
|
||||
// nsIDOMNSHTMLFrameElement
|
||||
NS_DECL_NSIDOMNSHTMLFRAMEELEMENT
|
||||
|
||||
// nsIFrameLoaderOwner
|
||||
NS_DECL_NSIFRAMELOADEROWNER
|
||||
|
||||
@ -1072,6 +1068,7 @@ protected:
|
||||
nsresult EnsureFrameLoader();
|
||||
nsresult LoadSrc();
|
||||
nsresult GetContentDocument(nsIDOMDocument** aContentDocument);
|
||||
nsresult GetContentWindow(nsIDOMWindow** aContentWindow);
|
||||
|
||||
nsRefPtr<nsFrameLoader> mFrameLoader;
|
||||
// True when the element is created by the parser
|
||||
|
@ -125,6 +125,12 @@ nsHTMLFrameElement::GetContentDocument(nsIDOMDocument** aContentDocument)
|
||||
return nsGenericHTMLFrameElement::GetContentDocument(aContentDocument);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLFrameElement::GetContentWindow(nsIDOMWindow** aContentWindow)
|
||||
{
|
||||
return nsGenericHTMLFrameElement::GetContentWindow(aContentWindow);
|
||||
}
|
||||
|
||||
bool
|
||||
nsHTMLFrameElement::ParseAttribute(PRInt32 aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
@ -139,6 +139,12 @@ nsHTMLIFrameElement::GetContentDocument(nsIDOMDocument** aContentDocument)
|
||||
return nsGenericHTMLFrameElement::GetContentDocument(aContentDocument);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLIFrameElement::GetContentWindow(nsIDOMWindow** aContentWindow)
|
||||
{
|
||||
return nsGenericHTMLFrameElement::GetContentWindow(aContentWindow);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLIFrameElement::GetSVGDocument(nsIDOMDocument **aResult)
|
||||
{
|
||||
|
@ -152,9 +152,6 @@ nsHTMLSelectElement::nsHTMLSelectElement(already_AddRefed<nsINodeInfo> aNodeInfo
|
||||
mOptGroupCount(0),
|
||||
mSelectedIndex(-1)
|
||||
{
|
||||
// FIXME: Bug 328908, set mOptions in an Init function and get rid of null
|
||||
// checks.
|
||||
|
||||
// DoneAddingChildren() will be called later if it's from the parser,
|
||||
// otherwise it is
|
||||
|
||||
@ -166,9 +163,7 @@ nsHTMLSelectElement::nsHTMLSelectElement(already_AddRefed<nsINodeInfo> aNodeInfo
|
||||
|
||||
nsHTMLSelectElement::~nsHTMLSelectElement()
|
||||
{
|
||||
if (mOptions) {
|
||||
mOptions->DropReference();
|
||||
}
|
||||
mOptions->DropReference();
|
||||
}
|
||||
|
||||
// ISupports
|
||||
|
@ -159,7 +159,7 @@ HTML_TAG("hgroup", "")
|
||||
HTML_TAG("hr", "HR");
|
||||
HTML_TAG("html", "Html");
|
||||
HTML_TAG("i", "");
|
||||
HTML_TAG("iframe", "IFrame", [ "nsIDOMNSHTMLFrameElement", "nsIDOMGetSVGDocument" ],
|
||||
HTML_TAG("iframe", "IFrame", [ "nsIDOMGetSVGDocument" ],
|
||||
[ "nsIFrameLoaderOwner" ]);
|
||||
HTML_TAG("image", "Span");
|
||||
HTML_TAG("img", "Image", [], [ "imgIDecoderObserver",
|
||||
|
@ -111,7 +111,7 @@
|
||||
#include "nsICharsetResolver.h"
|
||||
#include "nsICachingChannel.h"
|
||||
#include "nsIJSContextStack.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIWyciwygChannel.h"
|
||||
#include "nsIScriptElement.h"
|
||||
#include "nsIScriptError.h"
|
||||
@ -1771,9 +1771,8 @@ nsHTMLDocument::Open(const nsAString& aContentTypeOrUrl,
|
||||
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
shell->GetContentViewer(getter_AddRefs(cv));
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer = do_QueryInterface(cv);
|
||||
if (docViewer) {
|
||||
docViewer->LoadStart(static_cast<nsIHTMLDocument *>(this));
|
||||
if (cv) {
|
||||
cv->LoadStart(static_cast<nsIHTMLDocument *>(this));
|
||||
}
|
||||
|
||||
// Add a wyciwyg channel request into the document load group
|
||||
|
@ -86,7 +86,7 @@
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsContentPolicyUtils.h"
|
||||
#include "nsContentErrors.h"
|
||||
#include "nsIDOMProcessingInstruction.h"
|
||||
@ -375,9 +375,8 @@ nsXMLContentSink::OnDocumentCreated(nsIDocument* aResultDocument)
|
||||
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
mDocShell->GetContentViewer(getter_AddRefs(contentViewer));
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer = do_QueryInterface(contentViewer);
|
||||
if (docViewer) {
|
||||
return docViewer->SetDocumentInternal(aResultDocument, PR_TRUE);
|
||||
if (contentViewer) {
|
||||
return contentViewer->SetDocumentInternal(aResultDocument, PR_TRUE);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMStorage.h"
|
||||
#include "nsPIDOMStorage.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsURILoader.h"
|
||||
@ -1675,8 +1675,6 @@ nsDocShell::ValidateOrigin(nsIDocShellTreeItem* aOriginTreeItem,
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetEldestPresContext(nsPresContext** aPresContext)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aPresContext);
|
||||
*aPresContext = nsnull;
|
||||
|
||||
@ -1684,17 +1682,13 @@ nsDocShell::GetEldestPresContext(nsPresContext** aPresContext)
|
||||
while (viewer) {
|
||||
nsCOMPtr<nsIContentViewer> prevViewer;
|
||||
viewer->GetPreviousViewer(getter_AddRefs(prevViewer));
|
||||
if (prevViewer)
|
||||
viewer = prevViewer;
|
||||
else {
|
||||
nsCOMPtr<nsIDocumentViewer> docv(do_QueryInterface(viewer));
|
||||
if (docv)
|
||||
rv = docv->GetPresContext(aPresContext);
|
||||
break;
|
||||
if (!prevViewer) {
|
||||
return viewer->GetPresContext(aPresContext);
|
||||
}
|
||||
viewer = prevViewer;
|
||||
}
|
||||
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -1706,10 +1700,7 @@ nsDocShell::GetPresContext(nsPresContext ** aPresContext)
|
||||
if (!mContentViewer)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> docv(do_QueryInterface(mContentViewer));
|
||||
NS_ENSURE_TRUE(docv, NS_ERROR_NO_INTERFACE);
|
||||
|
||||
return docv->GetPresContext(aPresContext);
|
||||
return mContentViewer->GetPresContext(aPresContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -7659,16 +7650,11 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
|
||||
|
||||
// Try to extract the canvas background color from the old
|
||||
// presentation shell, so we can use it for the next document.
|
||||
nsCOMPtr<nsIDocumentViewer> docviewer =
|
||||
do_QueryInterface(mContentViewer);
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
mContentViewer->GetPresShell(getter_AddRefs(shell));
|
||||
|
||||
if (docviewer) {
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
docviewer->GetPresShell(getter_AddRefs(shell));
|
||||
|
||||
if (shell) {
|
||||
bgcolor = shell->GetCanvasBackground();
|
||||
}
|
||||
if (shell) {
|
||||
bgcolor = shell->GetCanvasBackground();
|
||||
}
|
||||
|
||||
mContentViewer->Close(mSavingOldViewer ? mOSHE.get() : nsnull);
|
||||
@ -7693,11 +7679,7 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
|
||||
|
||||
nsIntRect bounds(x, y, cx, cy);
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> docviewer =
|
||||
do_QueryInterface(mContentViewer);
|
||||
if (docviewer) {
|
||||
docviewer->SetNavigationTiming(mTiming);
|
||||
}
|
||||
mContentViewer->SetNavigationTiming(mTiming);
|
||||
|
||||
if (NS_FAILED(mContentViewer->Init(widget, bounds))) {
|
||||
mContentViewer = nsnull;
|
||||
@ -7731,13 +7713,11 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
|
||||
|
||||
// Stuff the bgcolor from the old pres shell into the new
|
||||
// pres shell. This improves page load continuity.
|
||||
if (docviewer) {
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
docviewer->GetPresShell(getter_AddRefs(shell));
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
mContentViewer->GetPresShell(getter_AddRefs(shell));
|
||||
|
||||
if (shell) {
|
||||
shell->SetCanvasBackground(bgcolor);
|
||||
}
|
||||
if (shell) {
|
||||
shell->SetCanvasBackground(bgcolor);
|
||||
}
|
||||
|
||||
// XXX: It looks like the LayoutState gets restored again in Embed()
|
||||
|
@ -1,3 +1,40 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ms2ger <ms2ger@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMDocument;
|
||||
@ -9,13 +46,21 @@ interface nsIPrintSettings;
|
||||
class nsIWidget;
|
||||
class nsIDocument;
|
||||
struct nsIntRect;
|
||||
class nsIPresShell;
|
||||
class nsPresContext;
|
||||
class nsIView;
|
||||
class nsDOMNavigationTiming;
|
||||
%}
|
||||
|
||||
[ptr] native nsIWidgetPtr(nsIWidget);
|
||||
[ptr] native nsIDocumentPtr(nsIDocument);
|
||||
[ref] native nsIntRectRef(nsIntRect);
|
||||
[ptr] native nsIPresShellPtr(nsIPresShell);
|
||||
[ptr] native nsPresContextPtr(nsPresContext);
|
||||
[ptr] native nsIViewPtr(nsIView);
|
||||
[ptr] native nsDOMNavigationTimingPtr(nsDOMNavigationTiming);
|
||||
|
||||
[scriptable, uuid(75306a89-e3ad-4a2b-9daf-ac4de06661a4)]
|
||||
[scriptable, builtinclass, uuid(26b2380b-4a1a-46cd-b7d8-7600e41c1688)]
|
||||
interface nsIContentViewer : nsISupports
|
||||
{
|
||||
|
||||
@ -142,4 +187,20 @@ interface nsIContentViewer : nsISupports
|
||||
* See bug 613800.
|
||||
*/
|
||||
readonly attribute boolean isTabModalPromptAllowed;
|
||||
|
||||
[noscript] readonly attribute nsIPresShellPtr presShell;
|
||||
[noscript] readonly attribute nsPresContextPtr presContext;
|
||||
[noscript] void setDocumentInternal(in nsIDocumentPtr aDocument,
|
||||
in boolean aForceReuseInnerWindow);
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
[noscript,notxpcom,nostdcall] nsIViewPtr findContainerView();
|
||||
/**
|
||||
* Set collector for navigation timing data (load, unload events).
|
||||
*/
|
||||
[noscript,notxpcom,nostdcall] void setNavigationTiming(in nsDOMNavigationTimingPtr aTiming);
|
||||
};
|
||||
|
@ -269,7 +269,7 @@
|
||||
#include "nsIDOMHTMLFontElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLFrameSetElement.h"
|
||||
#include "nsIDOMNSHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLHRElement.h"
|
||||
#include "nsIDOMHTMLHeadElement.h"
|
||||
#include "nsIDOMHTMLHeadingElement.h"
|
||||
@ -2590,7 +2590,6 @@ nsDOMClassInfo::Init()
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLFrameElement, nsIDOMHTMLFrameElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLFrameElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFrameElement)
|
||||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
@ -2621,7 +2620,6 @@ nsDOMClassInfo::Init()
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(HTMLIFrameElement, nsIDOMHTMLIFrameElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLIFrameElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFrameElement)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMGetSVGDocument)
|
||||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -239,39 +238,36 @@ nsWindowRoot::GetControllerForCommand(const char * aCommand,
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
*_retval = nsnull;
|
||||
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
nsCOMPtr<nsIController> controller;
|
||||
|
||||
GetControllers(getter_AddRefs(controllers));
|
||||
if (controllers) {
|
||||
controllers->GetControllerForCommand(aCommand, getter_AddRefs(controller));
|
||||
if (controller) {
|
||||
controller.swap(*_retval);
|
||||
return NS_OK;
|
||||
{
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
GetControllers(getter_AddRefs(controllers));
|
||||
if (controllers) {
|
||||
nsCOMPtr<nsIController> controller;
|
||||
controllers->GetControllerForCommand(aCommand, getter_AddRefs(controller));
|
||||
if (controller) {
|
||||
controller.forget(_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> focusedWindow;
|
||||
nsFocusManager::GetFocusedDescendant(mWindow, PR_TRUE, getter_AddRefs(focusedWindow));
|
||||
while (focusedWindow) {
|
||||
nsCOMPtr<nsIDOMWindow> domWindow(do_QueryInterface(focusedWindow));
|
||||
|
||||
nsCOMPtr<nsIControllers> controllers2;
|
||||
domWindow->GetControllers(getter_AddRefs(controllers2));
|
||||
if (controllers2) {
|
||||
controllers2->GetControllerForCommand(aCommand,
|
||||
getter_AddRefs(controller));
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
focusedWindow->GetControllers(getter_AddRefs(controllers));
|
||||
if (controllers) {
|
||||
nsCOMPtr<nsIController> controller;
|
||||
controllers->GetControllerForCommand(aCommand,
|
||||
getter_AddRefs(controller));
|
||||
if (controller) {
|
||||
controller.swap(*_retval);
|
||||
controller.forget(_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// XXXndeakin P3 is this casting safe?
|
||||
nsCOMPtr<nsPIDOMWindow> piWindow = do_QueryInterface(focusedWindow);
|
||||
nsGlobalWindow *win =
|
||||
static_cast<nsGlobalWindow *>
|
||||
(static_cast<nsIDOMWindow*>(piWindow));
|
||||
nsGlobalWindow *win = static_cast<nsGlobalWindow*>(focusedWindow.get());
|
||||
focusedWindow = win->GetPrivateParent();
|
||||
}
|
||||
|
||||
@ -296,8 +292,6 @@ nsresult
|
||||
NS_NewWindowRoot(nsPIDOMWindow* aWindow, nsIDOMEventTarget** aResult)
|
||||
{
|
||||
*aResult = new nsWindowRoot(aWindow);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(08a05c75-23de-4937-a45b-89bdcbe4f467)]
|
||||
[scriptable, uuid(92cfb4d4-7456-44fa-9c76-c70fdee78e2f)]
|
||||
interface nsIDOMCDATASection : nsIDOMText
|
||||
{
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ interface nsIDOMLocation;
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(CD4CD7C3-C688-4E50-9A72-4A00EABE66AB)]
|
||||
[scriptable, uuid(256a15f4-126f-48f9-90b6-7f5b2b1e30e6)]
|
||||
interface nsIDOMDocument : nsIDOMNode
|
||||
{
|
||||
readonly attribute nsIDOMDocumentType doctype;
|
||||
@ -106,13 +106,7 @@ interface nsIDOMDocument : nsIDOMNode
|
||||
// Introduced in DOM Level 3:
|
||||
readonly attribute DOMString inputEncoding;
|
||||
// Introduced in DOM Level 3:
|
||||
attribute boolean xmlStandalone;
|
||||
// raises(DOMException) on setting
|
||||
// Introduced in DOM Level 3:
|
||||
attribute DOMString xmlVersion;
|
||||
// raises(DOMException) on setting
|
||||
// Introduced in DOM Level 3:
|
||||
attribute DOMString documentURI;
|
||||
readonly attribute DOMString documentURI;
|
||||
// Introduced in DOM Level 3:
|
||||
nsIDOMNode adoptNode(in nsIDOMNode source)
|
||||
raises(DOMException);
|
||||
|
@ -47,20 +47,12 @@
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(8a876308-7891-468c-8f7a-9f2b81160c3c)]
|
||||
[scriptable, uuid(437ed60c-febd-4bd0-892f-cf358adc3c96)]
|
||||
interface nsIDOMText : nsIDOMCharacterData
|
||||
{
|
||||
nsIDOMText splitText(in unsigned long offset)
|
||||
raises(DOMException);
|
||||
|
||||
/**
|
||||
* Indicates whether this text node contains element content whitespace.
|
||||
* A text node is element content whitespace if it contains only XML
|
||||
* white space characters and is a child of an element whose content
|
||||
* model allows only child elements optionally separated by white space.
|
||||
*/
|
||||
readonly attribute boolean isElementContentWhitespace;
|
||||
|
||||
/**
|
||||
* The concatenation of all logically adjacent text nodes with this text
|
||||
* node, where "logically adjacent" consists of all text nodes which can be
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "nsIDOMDocument.idl"
|
||||
|
||||
[scriptable, uuid(BB4D4D76-3802-4191-88E2-933BA609C4E1)]
|
||||
[scriptable, uuid(f349fb58-544d-4254-b1b9-902e459d7b5c)]
|
||||
interface nsIDOMXMLDocument : nsIDOMDocument
|
||||
{
|
||||
// DOM Level 3 Load & Save, DocumentLS
|
||||
|
@ -122,7 +122,6 @@ XPIDLSRCS = \
|
||||
nsIDOMHTMLCanvasElement.idl \
|
||||
nsIDOMHTMLUnknownElement.idl \
|
||||
nsIDOMNSHTMLElement.idl \
|
||||
nsIDOMNSHTMLFrameElement.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -47,7 +47,7 @@
|
||||
*/
|
||||
interface nsISelection;
|
||||
|
||||
[scriptable, uuid(C94A5F14-F79F-4054-A93C-E8FF35623460)]
|
||||
[scriptable, uuid(3d94491d-fd74-4710-bfa8-83724b674177)]
|
||||
interface nsIDOMHTMLDocument : nsIDOMDocument
|
||||
{
|
||||
readonly attribute DOMString URL;
|
||||
|
@ -50,7 +50,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6e141f6c-c22e-4b3c-9835-b234913dfd38)]
|
||||
[scriptable, uuid(1c913d18-db4d-444e-860d-e7cd4b0aeaf2)]
|
||||
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString frameBorder;
|
||||
@ -63,4 +63,5 @@ interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
|
||||
attribute DOMString src;
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute nsIDOMDocument contentDocument;
|
||||
readonly attribute nsIDOMWindow contentWindow;
|
||||
};
|
||||
|
@ -50,7 +50,7 @@
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(712586b2-b229-4730-9019-b02c6d371275)]
|
||||
[scriptable, uuid(77fc0727-2803-41a7-ae2c-9a012777fa1d)]
|
||||
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
@ -65,7 +65,10 @@ interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
|
||||
attribute DOMString width;
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute nsIDOMDocument contentDocument;
|
||||
readonly attribute nsIDOMWindow contentWindow;
|
||||
|
||||
|
||||
// Mozilla extensions
|
||||
// iframe elements require the mozAllowFullScreen attribute to be present
|
||||
// if they're to allow content in the sub document to go into DOM full-screen
|
||||
// mode. See https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI
|
||||
|
@ -1,46 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Vidur Apparao <vidur@netscape.com> (original author)
|
||||
* Johnny Stenback <jst@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(d67bd267-f984-4993-b378-95851b71f0a3)]
|
||||
interface nsIDOMNSHTMLFrameElement : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMWindow contentWindow;
|
||||
};
|
@ -39,7 +39,7 @@
|
||||
|
||||
interface nsIDOMSVGSVGElement;
|
||||
|
||||
[scriptable, uuid(B3806DF6-7ED4-4426-84E6-545EEFE5AA9A)]
|
||||
[scriptable, uuid(872c2e8f-80cb-4405-981d-ba3474e7925e)]
|
||||
interface nsIDOMSVGDocument : nsIDOMDocument
|
||||
{
|
||||
readonly attribute DOMString domain;
|
||||
|
@ -61,7 +61,7 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsContentPermissionHelper.h"
|
||||
#include "nsIDOMNSHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDialogCreator.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsSerializationHelper.h"
|
||||
|
@ -114,8 +114,5 @@ nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.pa
|
||||
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
|
||||
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
|
||||
IsSameNodeWarning=Use of isSameNode is deprecated. Please use A == B to test for equality instead.
|
||||
XmlVersionWarning=Use of xmlVersion is deprecated.
|
||||
InputEncodingWarning=Use of inputEncoding is deprecated.
|
||||
XmlStandaloneWarning=Use of xmlStandalone is deprecated.
|
||||
IsElementContentWhitespaceWarning=Use of isElementContentWhitespaceWarning is deprecated.
|
||||
GlobalStorageWarning=Use of globalStorage is deprecated. Please use localStorage instead.
|
||||
|
@ -36,9 +36,6 @@ function runTest() {
|
||||
// doc.contentType
|
||||
ok(doc.contentType == clonefalse.contentType, "contentType not preserved correctly; " + iframes[i].id);
|
||||
|
||||
// doc.xmlStandalone
|
||||
ok(doc.xmlStandalone == clonefalse.xmlStandalone, "xmlStandalone not preserved correctly; " + iframes[i].id);
|
||||
|
||||
// doc.characterSet
|
||||
ok(doc.characterSet == clonefalse.characterSet, "charset not preserved correctly; " + iframes[i].id);
|
||||
|
||||
|
@ -78,7 +78,6 @@
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIWindowProvider.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsISupportsArray.h"
|
||||
|
@ -238,11 +238,13 @@ members = [
|
||||
'nsIDOMHTMLFormElement.action',
|
||||
'nsIDOMHTMLFrameElement.src',
|
||||
'nsIDOMHTMLFrameElement.contentDocument',
|
||||
'nsIDOMHTMLFrameElement.contentWindow',
|
||||
'nsIDOMHTMLFrameElement.name',
|
||||
'nsIDOMHTMLFrameSetElement.rows',
|
||||
'nsIDOMHTMLFrameSetElement.cols',
|
||||
'nsIDOMHTMLIFrameElement.src',
|
||||
'nsIDOMHTMLIFrameElement.contentDocument',
|
||||
'nsIDOMHTMLIFrameElement.contentWindow',
|
||||
'nsIDOMHTMLImageElement.src',
|
||||
'nsIDOMHTMLImageElement.name',
|
||||
'nsIDOMHTMLImageElement.height',
|
||||
@ -340,7 +342,6 @@ members = [
|
||||
'nsIDOMNSHTMLElement.offsetHeight',
|
||||
'nsIDOMNSHTMLElement.offsetWidth',
|
||||
'nsIDOMNSHTMLElement.scrollIntoView',
|
||||
'nsIDOMNSHTMLFrameElement.contentWindow',
|
||||
'nsIDOMHTMLOptionsCollection.selectedIndex',
|
||||
'nsIDOMHTMLOptionsCollection.add',
|
||||
|
||||
|
@ -74,7 +74,6 @@ EXPORTS = \
|
||||
nsFrameManager.h \
|
||||
nsFrameManagerBase.h \
|
||||
nsFrameTraversal.h \
|
||||
nsIDocumentViewer.h \
|
||||
nsIFrameTraversal.h \
|
||||
nsILayoutDebugger.h \
|
||||
nsILayoutHistoryState.h \
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include "nsISupports.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIContentViewerContainer.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "mozilla/FunctionTimer.h"
|
||||
#include "nsIDocumentViewerPrint.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
@ -282,7 +282,7 @@ private:
|
||||
|
||||
|
||||
//-------------------------------------------------------------
|
||||
class DocumentViewerImpl : public nsIDocumentViewer,
|
||||
class DocumentViewerImpl : public nsIContentViewer,
|
||||
public nsIContentViewerEdit,
|
||||
public nsIContentViewerFile,
|
||||
public nsIMarkupDocumentViewer,
|
||||
@ -308,24 +308,6 @@ public:
|
||||
// nsIContentViewer interface...
|
||||
NS_DECL_NSICONTENTVIEWER
|
||||
|
||||
// nsIDocumentViewer interface...
|
||||
NS_IMETHOD GetPresShell(nsIPresShell** aResult);
|
||||
NS_IMETHOD GetPresContext(nsPresContext** aResult);
|
||||
NS_IMETHOD SetDocumentInternal(nsIDocument* aDocument,
|
||||
bool aForceReuseInnerWindow);
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual nsIView* FindContainerView();
|
||||
|
||||
/**
|
||||
* Set collector for navigation timing data (load, unload events).
|
||||
*/
|
||||
virtual void SetNavigationTiming(nsDOMNavigationTiming* timing);
|
||||
|
||||
// nsIContentViewerEdit
|
||||
NS_DECL_NSICONTENTVIEWEREDIT
|
||||
|
||||
@ -536,7 +518,7 @@ static NS_DEFINE_CID(kViewManagerCID, NS_VIEW_MANAGER_CID);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
nsresult
|
||||
NS_NewDocumentViewer(nsIDocumentViewer** aResult)
|
||||
NS_NewContentViewer(nsIContentViewer** aResult)
|
||||
{
|
||||
*aResult = new DocumentViewerImpl();
|
||||
|
||||
@ -593,7 +575,6 @@ NS_IMPL_RELEASE(DocumentViewerImpl)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(DocumentViewerImpl)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocumentViewer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMarkupDocumentViewer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewerFile)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewerEdit)
|
||||
@ -1015,7 +996,7 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
|
||||
http://bugzilla.mozilla.org/show_bug.cgi?id=78445 for more
|
||||
explanation.
|
||||
*/
|
||||
nsCOMPtr<nsIDocumentViewer> kungFuDeathGrip(this);
|
||||
nsRefPtr<DocumentViewerImpl> kungFuDeathGrip(this);
|
||||
|
||||
// Flush out layout so it's up-to-date by the time onload is called.
|
||||
// Note that this could destroy the window, so do this before
|
||||
@ -1333,20 +1314,19 @@ AttachContainerRecurse(nsIDocShell* aShell)
|
||||
{
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
aShell->GetContentViewer(getter_AddRefs(viewer));
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer = do_QueryInterface(viewer);
|
||||
if (docViewer) {
|
||||
nsIDocument* doc = docViewer->GetDocument();
|
||||
if (viewer) {
|
||||
nsIDocument* doc = viewer->GetDocument();
|
||||
if (doc) {
|
||||
doc->SetContainer(aShell);
|
||||
}
|
||||
nsRefPtr<nsPresContext> pc;
|
||||
docViewer->GetPresContext(getter_AddRefs(pc));
|
||||
viewer->GetPresContext(getter_AddRefs(pc));
|
||||
if (pc) {
|
||||
pc->SetContainer(aShell);
|
||||
pc->SetLinkHandler(nsCOMPtr<nsILinkHandler>(do_QueryInterface(aShell)));
|
||||
}
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
docViewer->GetPresShell(getter_AddRefs(presShell));
|
||||
viewer->GetPresShell(getter_AddRefs(presShell));
|
||||
if (presShell) {
|
||||
presShell->SetForwardingContainer(nsnull);
|
||||
}
|
||||
@ -1491,20 +1471,19 @@ DetachContainerRecurse(nsIDocShell *aShell)
|
||||
// Unhook this docshell's presentation
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
aShell->GetContentViewer(getter_AddRefs(viewer));
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer = do_QueryInterface(viewer);
|
||||
if (docViewer) {
|
||||
nsIDocument* doc = docViewer->GetDocument();
|
||||
if (viewer) {
|
||||
nsIDocument* doc = viewer->GetDocument();
|
||||
if (doc) {
|
||||
doc->SetContainer(nsnull);
|
||||
}
|
||||
nsRefPtr<nsPresContext> pc;
|
||||
docViewer->GetPresContext(getter_AddRefs(pc));
|
||||
viewer->GetPresContext(getter_AddRefs(pc));
|
||||
if (pc) {
|
||||
pc->SetContainer(nsnull);
|
||||
pc->SetLinkHandler(nsnull);
|
||||
}
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
docViewer->GetPresShell(getter_AddRefs(presShell));
|
||||
viewer->GetPresShell(getter_AddRefs(presShell));
|
||||
if (presShell) {
|
||||
presShell->SetForwardingContainer(nsWeakPtr(do_GetWeakReference(aShell)));
|
||||
}
|
||||
|
@ -1,80 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* container for a document and its presentation */
|
||||
|
||||
#ifndef nsIDocumentViewer_h___
|
||||
#define nsIDocumentViewer_h___
|
||||
|
||||
#include "nsIContentViewer.h"
|
||||
|
||||
class nsIDocument;
|
||||
class nsPresContext;
|
||||
class nsIPresShell;
|
||||
class nsIStyleSheet;
|
||||
class nsIView;
|
||||
|
||||
class nsDOMNavigationTiming;
|
||||
|
||||
#define NS_IDOCUMENT_VIEWER_IID \
|
||||
{ 0x5a5c9a1d, 0x49c4, 0x4f3f, \
|
||||
{ 0x80, 0xcd, 0x12, 0x09, 0x5b, 0x1e, 0x1f, 0x61 } }
|
||||
|
||||
/**
|
||||
* A document viewer is a kind of content viewer that uses NGLayout
|
||||
* to manage the presentation of the content.
|
||||
*/
|
||||
class nsIDocumentViewer : public nsIContentViewer
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_IID)
|
||||
|
||||
NS_IMETHOD GetPresShell(nsIPresShell** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetPresContext(nsPresContext** aResult) = 0;
|
||||
|
||||
NS_IMETHOD SetDocumentInternal(nsIDocument* aDocument,
|
||||
bool aForceReuseInnerWindow) = 0;
|
||||
|
||||
virtual nsIView* FindContainerView() = 0;
|
||||
|
||||
virtual void SetNavigationTiming(nsDOMNavigationTiming* timing) = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentViewer, NS_IDOCUMENT_VIEWER_IID)
|
||||
|
||||
#endif /* nsIDocumentViewer_h___ */
|
@ -46,7 +46,6 @@
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsStyleSet.h"
|
||||
#include "nsImageLoader.h"
|
||||
@ -1735,10 +1734,9 @@ nsPresContext::EnsureVisible()
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
docShell->GetContentViewer(getter_AddRefs(cv));
|
||||
// Make sure this is the content viewer we belong with
|
||||
nsCOMPtr<nsIDocumentViewer> docV(do_QueryInterface(cv));
|
||||
if (docV) {
|
||||
if (cv) {
|
||||
nsRefPtr<nsPresContext> currentPresContext;
|
||||
docV->GetPresContext(getter_AddRefs(currentPresContext));
|
||||
cv->GetPresContext(getter_AddRefs(currentPresContext));
|
||||
if (currentPresContext == this) {
|
||||
// OK, this is us. We want to call Show() on the content viewer.
|
||||
cv->Show();
|
||||
|
@ -41,10 +41,10 @@
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsNodeInfo.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
@ -84,7 +84,7 @@ static NS_DEFINE_IID(kImageDocumentCID, NS_IMAGEDOCUMENT_CID);
|
||||
static NS_DEFINE_IID(kXULDocumentCID, NS_XULDOCUMENT_CID);
|
||||
|
||||
nsresult
|
||||
NS_NewDocumentViewer(nsIDocumentViewer** aResult);
|
||||
NS_NewContentViewer(nsIContentViewer** aResult);
|
||||
|
||||
// XXXbz if you change the MIME types here, be sure to update
|
||||
// nsIParser.h and DetermineParseMode in nsParser.cpp accordingly.
|
||||
@ -325,24 +325,17 @@ NS_IMETHODIMP
|
||||
nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer,
|
||||
nsIDocument* aDocument,
|
||||
const char *aCommand,
|
||||
nsIContentViewer** aDocViewerResult)
|
||||
nsIContentViewer** aContentViewer)
|
||||
{
|
||||
NS_TIME_FUNCTION;
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
do {
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
rv = NS_NewDocumentViewer(getter_AddRefs(docv));
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
nsIContentViewer* cv = static_cast<nsIContentViewer*>(docv.get());
|
||||
rv = cv->LoadStart(aDocument);
|
||||
NS_ADDREF(*aDocViewerResult = cv);
|
||||
} while (PR_FALSE);
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
nsresult rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
rv = contentViewer->LoadStart(aDocument);
|
||||
contentViewer.forget(aContentViewer);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -431,7 +424,7 @@ nsContentDLF::CreateDocument(const char* aCommand,
|
||||
nsISupports* aContainer,
|
||||
const nsCID& aDocumentCID,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer)
|
||||
nsIContentViewer** aContentViewer)
|
||||
{
|
||||
NS_TIME_FUNCTION;
|
||||
|
||||
@ -450,34 +443,26 @@ nsContentDLF::CreateDocument(const char* aCommand,
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
do {
|
||||
// Create the document
|
||||
doc = do_CreateInstance(aDocumentCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
// Create the document
|
||||
nsCOMPtr<nsIDocument> doc = do_CreateInstance(aDocumentCID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Create the document viewer XXX: could reuse document viewer here!
|
||||
rv = NS_NewDocumentViewer(getter_AddRefs(docv));
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
// Create the content viewer XXX: could reuse content viewer here!
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
doc->SetContainer(aContainer);
|
||||
doc->SetContainer(aContainer);
|
||||
|
||||
// Initialize the document to begin loading the data. An
|
||||
// nsIStreamListener connected to the parser is returned in
|
||||
// aDocListener.
|
||||
rv = doc->StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer, aDocListener, PR_TRUE);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
rv = docv->LoadStart(doc);
|
||||
*aDocViewer = docv;
|
||||
NS_IF_ADDREF(*aDocViewer);
|
||||
} while (PR_FALSE);
|
||||
// Initialize the document to begin loading the data. An
|
||||
// nsIStreamListener connected to the parser is returned in
|
||||
// aDocListener.
|
||||
rv = doc->StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer, aDocListener, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
rv = contentViewer->LoadStart(doc);
|
||||
contentViewer.forget(aContentViewer);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -489,7 +474,7 @@ nsContentDLF::CreateXULDocument(const char* aCommand,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer)
|
||||
nsIContentViewer** aContentViewer)
|
||||
{
|
||||
NS_TIME_FUNCTION;
|
||||
|
||||
@ -497,8 +482,8 @@ nsContentDLF::CreateXULDocument(const char* aCommand,
|
||||
nsCOMPtr<nsIDocument> doc = do_CreateInstance(kXULDocumentCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
rv = NS_NewDocumentViewer(getter_AddRefs(docv));
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
rv = NS_NewContentViewer(getter_AddRefs(contentViewer));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIURI> aURL;
|
||||
@ -515,15 +500,13 @@ nsContentDLF::CreateXULDocument(const char* aCommand,
|
||||
doc->SetContainer(aContainer);
|
||||
|
||||
rv = doc->StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer, aDocListener, PR_TRUE);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
/*
|
||||
* Bind the document to the Content Viewer...
|
||||
*/
|
||||
rv = docv->LoadStart(doc);
|
||||
*aDocViewer = docv;
|
||||
NS_IF_ADDREF(*aDocViewer);
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
/*
|
||||
* Bind the document to the Content Viewer...
|
||||
*/
|
||||
rv = contentViewer->LoadStart(doc);
|
||||
contentViewer.forget(aContentViewer);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -39,13 +39,11 @@
|
||||
#define nsContentDLF_h__
|
||||
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsMimeTypes.h"
|
||||
|
||||
class nsIChannel;
|
||||
class nsIContentViewer;
|
||||
class nsIDocumentViewer;
|
||||
class nsIFile;
|
||||
class nsIInputStream;
|
||||
class nsILoadGroup;
|
||||
@ -71,7 +69,7 @@ public:
|
||||
nsISupports* aContainer,
|
||||
const nsCID& aDocumentCID,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer);
|
||||
nsIContentViewer** aContentViewer);
|
||||
|
||||
nsresult CreateXULDocument(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
@ -80,7 +78,7 @@ public:
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer);
|
||||
nsIContentViewer** aContentViewer);
|
||||
|
||||
private:
|
||||
static nsresult EnsureUAStyleSheet();
|
||||
|
@ -53,13 +53,13 @@
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIContentIterator.h"
|
||||
#include "nsIContentSerializer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMDOMImplementation.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIFrameUtil.h"
|
||||
#include "nsHTMLStyleSheet.h"
|
||||
@ -441,7 +441,7 @@ nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult
|
||||
nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult);
|
||||
|
||||
nsresult NS_NewDomSelection(nsISelection** aResult);
|
||||
nsresult NS_NewDocumentViewer(nsIDocumentViewer** aResult);
|
||||
nsresult NS_NewContentViewer(nsIContentViewer** aResult);
|
||||
nsresult NS_NewRange(nsIDOMRange** aResult);
|
||||
nsresult NS_NewRangeUtils(nsIRangeUtils** aResult);
|
||||
nsresult NS_NewContentIterator(nsIContentIterator** aResult);
|
||||
@ -505,7 +505,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
|
||||
|
||||
MAKE_CTOR(CreateNameSpaceManager, nsINameSpaceManager, NS_GetNameSpaceManager)
|
||||
MAKE_CTOR(CreateDocumentViewer, nsIDocumentViewer, NS_NewDocumentViewer)
|
||||
MAKE_CTOR(CreateContentViewer, nsIContentViewer, NS_NewContentViewer)
|
||||
MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument)
|
||||
MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument)
|
||||
MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument)
|
||||
@ -740,7 +740,7 @@ NS_DEFINE_NAMED_CID(IN_FLASHER_CID);
|
||||
NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
|
||||
NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_NAMESPACEMANAGER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOCUMENT_VIEWER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_CONTENT_VIEWER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_HTMLDOCUMENT_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_XMLDOCUMENT_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SVGDOCUMENT_CID);
|
||||
@ -874,7 +874,7 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
||||
{ &kIN_CSSVALUESEARCH_CID, false, NULL, inCSSValueSearchConstructor },
|
||||
{ &kIN_DOMUTILS_CID, false, NULL, inDOMUtilsConstructor },
|
||||
{ &kNS_NAMESPACEMANAGER_CID, false, NULL, CreateNameSpaceManager },
|
||||
{ &kNS_DOCUMENT_VIEWER_CID, false, NULL, CreateDocumentViewer },
|
||||
{ &kNS_CONTENT_VIEWER_CID, false, NULL, CreateContentViewer },
|
||||
{ &kNS_HTMLDOCUMENT_CID, false, NULL, CreateHTMLDocument },
|
||||
{ &kNS_XMLDOCUMENT_CID, false, NULL, CreateXMLDocument },
|
||||
{ &kNS_SVGDOCUMENT_CID, false, NULL, CreateSVGDocument },
|
||||
|
@ -55,7 +55,6 @@
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIComponentManager.h"
|
||||
@ -964,15 +963,12 @@ EndSwapDocShellsForDocument(nsIDocument* aDocument, void*)
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
ds->GetContentViewer(getter_AddRefs(cv));
|
||||
while (cv) {
|
||||
nsCOMPtr<nsIDocumentViewer> dv = do_QueryInterface(cv);
|
||||
if (dv) {
|
||||
nsCOMPtr<nsPresContext> pc;
|
||||
dv->GetPresContext(getter_AddRefs(pc));
|
||||
nsDeviceContext* dc = pc ? pc->DeviceContext() : nsnull;
|
||||
if (dc) {
|
||||
nsIView* v = dv->FindContainerView();
|
||||
dc->Init(v ? v->GetNearestWidget(nsnull) : nsnull);
|
||||
}
|
||||
nsCOMPtr<nsPresContext> pc;
|
||||
cv->GetPresContext(getter_AddRefs(pc));
|
||||
nsDeviceContext* dc = pc ? pc->DeviceContext() : nsnull;
|
||||
if (dc) {
|
||||
nsIView* v = cv->FindContainerView();
|
||||
dc->Init(v ? v->GetNearestWidget(nsnull) : nsnull);
|
||||
}
|
||||
nsCOMPtr<nsIContentViewer> prev;
|
||||
cv->GetPreviousViewer(getter_AddRefs(prev));
|
||||
|
@ -154,7 +154,6 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
#include "nsIDOMHTMLImageElement.h"
|
||||
#include "nsIContentViewerContainer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocumentViewerPrint.h"
|
||||
|
||||
#include "nsPIDOMWindow.h"
|
||||
@ -1914,9 +1913,9 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO)
|
||||
documentIsTopLevel = PR_TRUE;
|
||||
|
||||
if (mIsCreatingPrintPreview) {
|
||||
nsCOMPtr<nsIDocumentViewer> dv = do_QueryInterface(mDocViewerPrint);
|
||||
if (dv) {
|
||||
parentView = dv->FindContainerView();
|
||||
nsCOMPtr<nsIContentViewer> cv = do_QueryInterface(mDocViewerPrint);
|
||||
if (cv) {
|
||||
parentView = cv->FindContainerView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "nsIDocShellTreeNode.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIAtom.h"
|
||||
@ -80,29 +80,14 @@ doc_viewer(nsIDocShell *aDocShell)
|
||||
static already_AddRefed<nsIPresShell>
|
||||
pres_shell(nsIDocShell *aDocShell)
|
||||
{
|
||||
nsCOMPtr<nsIDocumentViewer> dv =
|
||||
do_QueryInterface(nsCOMPtr<nsIContentViewer>(doc_viewer(aDocShell)));
|
||||
if (!dv)
|
||||
nsCOMPtr<nsIContentViewer> cv = doc_viewer(aDocShell);
|
||||
if (!cv)
|
||||
return nsnull;
|
||||
nsIPresShell *result = nsnull;
|
||||
dv->GetPresShell(&result);
|
||||
return result;
|
||||
nsCOMPtr<nsIPresShell> result;
|
||||
cv->GetPresShell(getter_AddRefs(result));
|
||||
return result.forget();
|
||||
}
|
||||
|
||||
#if 0 // not currently needed
|
||||
static already_AddRefed<nsPresContext>
|
||||
pres_context(nsIDocShell *aDocShell)
|
||||
{
|
||||
nsCOMPtr<nsIDocumentViewer> dv =
|
||||
do_QueryInterface(nsCOMPtr<nsIContentViewer>(doc_viewer(aDocShell)));
|
||||
if (!dv)
|
||||
return nsnull;
|
||||
nsPresContext *result = nsnull;
|
||||
dv->GetPresContext(result);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
static nsIViewManager*
|
||||
view_manager(nsIDocShell *aDocShell)
|
||||
{
|
||||
|
@ -37,13 +37,14 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "SVGDocumentWrapper.h"
|
||||
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDOMSVGAnimatedLength.h"
|
||||
#include "nsIDOMSVGLength.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
@ -352,7 +353,7 @@ SVGDocumentWrapper::Observe(nsISupports* aSubject,
|
||||
// nsExternalResourceMap::PendingLoad::SetupViewer.
|
||||
nsresult
|
||||
SVGDocumentWrapper::SetupViewer(nsIRequest* aRequest,
|
||||
nsIDocumentViewer** aViewer,
|
||||
nsIContentViewer** aViewer,
|
||||
nsILoadGroup** aLoadGroup)
|
||||
{
|
||||
nsCOMPtr<nsIChannel> chan(do_QueryInterface(aRequest));
|
||||
@ -397,8 +398,7 @@ SVGDocumentWrapper::SetupViewer(nsIRequest* aRequest,
|
||||
getter_AddRefs(viewer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer = do_QueryInterface(viewer);
|
||||
NS_ENSURE_TRUE(docViewer, NS_ERROR_UNEXPECTED);
|
||||
NS_ENSURE_TRUE(viewer, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsIParser> parser = do_QueryInterface(listener);
|
||||
NS_ENSURE_TRUE(parser, NS_ERROR_UNEXPECTED);
|
||||
@ -409,8 +409,8 @@ SVGDocumentWrapper::SetupViewer(nsIRequest* aRequest,
|
||||
NS_ENSURE_TRUE(sink, NS_ERROR_UNEXPECTED);
|
||||
|
||||
listener.swap(mListener);
|
||||
docViewer.swap(*aViewer);
|
||||
newLoadGroup.swap(*aLoadGroup);
|
||||
viewer.forget(aViewer);
|
||||
newLoadGroup.forget(aLoadGroup);
|
||||
|
||||
RegisterForXPCOMShutdown();
|
||||
return NS_OK;
|
||||
|
@ -44,13 +44,12 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsIPresShell;
|
||||
class nsIRequest;
|
||||
class nsIDocumentViewer;
|
||||
class nsILoadGroup;
|
||||
class nsIFrame;
|
||||
struct nsIntSize;
|
||||
@ -171,7 +170,7 @@ public:
|
||||
|
||||
private:
|
||||
nsresult SetupViewer(nsIRequest *aRequest,
|
||||
nsIDocumentViewer** aViewer,
|
||||
nsIContentViewer** aViewer,
|
||||
nsILoadGroup** aLoadGroup);
|
||||
void DestroyViewer();
|
||||
void RegisterForXPCOMShutdown();
|
||||
@ -179,7 +178,7 @@ private:
|
||||
|
||||
void FlushLayout();
|
||||
|
||||
nsCOMPtr<nsIDocumentViewer> mViewer;
|
||||
nsCOMPtr<nsIContentViewer> mViewer;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsIStreamListener> mListener;
|
||||
bool mIgnoreInvalidation;
|
||||
|
@ -37,13 +37,13 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "VectorImage.h"
|
||||
|
||||
#include "imgIDecoderObserver.h"
|
||||
#include "SVGDocumentWrapper.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIStreamListener.h"
|
||||
@ -55,9 +55,10 @@
|
||||
#include "gfxUtils.h"
|
||||
#include "nsSVGSVGElement.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
using namespace dom;
|
||||
|
||||
namespace imagelib {
|
||||
|
||||
// Helper-class: SVGRootRenderingObserver
|
||||
|
@ -58,7 +58,6 @@
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -44,8 +44,6 @@
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIWidget.h"
|
||||
|
||||
#include "nsIStringBundle.h"
|
||||
|
@ -35,9 +35,10 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsAppShellWindowEnumerator.h"
|
||||
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
@ -47,7 +48,6 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIXULWindow.h"
|
||||
|
||||
#include "nsAppShellWindowEnumerator.h"
|
||||
#include "nsWindowMediator.h"
|
||||
|
||||
//
|
||||
@ -83,7 +83,7 @@ nsCOMPtr<nsIDOMNode> GetDOMNodeFromDocShell(nsIDocShell *aShell)
|
||||
nsCOMPtr<nsIDOMElement> element;
|
||||
domdoc->GetDocumentElement(getter_AddRefs(element));
|
||||
if (element)
|
||||
node = do_QueryInterface(element);
|
||||
node = element;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "nsIWeakReference.h"
|
||||
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURL.h"
|
||||
@ -80,7 +80,6 @@
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMNode.h"
|
||||
@ -719,11 +718,9 @@ bool nsWebShellWindow::ExecuteCloseHandler()
|
||||
if (eventTarget) {
|
||||
nsCOMPtr<nsIContentViewer> contentViewer;
|
||||
mDocShell->GetContentViewer(getter_AddRefs(contentViewer));
|
||||
nsCOMPtr<nsIDocumentViewer> docViewer(do_QueryInterface(contentViewer));
|
||||
|
||||
if (docViewer) {
|
||||
if (contentViewer) {
|
||||
nsRefPtr<nsPresContext> presContext;
|
||||
docViewer->GetPresContext(getter_AddRefs(presContext));
|
||||
contentViewer->GetPresContext(getter_AddRefs(presContext));
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(PR_TRUE, NS_XUL_CLOSE, nsnull,
|
||||
|
@ -44,10 +44,6 @@
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include "nsIAppShell.h"
|
||||
#include "nsIAppShellService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMBarProp.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
Loading…
Reference in New Issue
Block a user