From 31e3e8c5d1a93a56afa6688fd81ade71fcae6903 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sun, 24 Apr 2011 08:54:25 +0200 Subject: [PATCH] Bug 616684 - Remove support for DOM Views; r=sicking,ehsan --- .../src/atk/nsMaiInterfaceComponent.cpp | 2 - accessible/src/base/nsCoreUtils.cpp | 22 +++--- accessible/src/html/nsHyperTextAccessible.cpp | 2 - accessible/src/msaa/nsAccessNodeWrap.cpp | 1 - content/base/src/nsContentAreaDragDrop.cpp | 1 - content/base/src/nsContentUtils.cpp | 4 +- content/base/src/nsDocument.cpp | 18 ++--- content/base/src/nsDocument.h | 6 -- content/base/src/nsGenericElement.cpp | 1 - content/events/src/nsDOMDragEvent.cpp | 4 +- content/events/src/nsDOMKeyboardEvent.cpp | 6 +- content/events/src/nsDOMMouseEvent.cpp | 8 +-- content/events/src/nsDOMMouseScrollEvent.cpp | 6 +- content/events/src/nsDOMMozTouchEvent.cpp | 5 +- content/events/src/nsDOMScrollAreaEvent.cpp | 7 +- .../events/src/nsDOMSimpleGestureEvent.cpp | 2 +- content/events/src/nsDOMTouchEvent.cpp | 4 +- content/events/src/nsDOMUIEvent.cpp | 12 ++-- content/events/src/nsDOMUIEvent.h | 9 ++- content/events/src/nsDOMXULCommandEvent.cpp | 6 +- content/events/src/nsEventStateManager.cpp | 1 - content/html/document/src/nsHTMLDocument.cpp | 6 ++ content/smil/nsDOMTimeEvent.cpp | 5 +- content/smil/nsDOMTimeEvent.h | 4 +- content/svg/content/src/nsSVGElement.cpp | 2 - .../xml/document/src/nsXMLPrettyPrinter.cpp | 20 ++---- content/xul/content/src/nsXULElement.cpp | 6 +- dom/Makefile.in | 1 - dom/base/nsDOMClassInfo.cpp | 11 --- dom/base/nsGlobalWindow.cpp | 28 -------- dom/base/nsGlobalWindow.h | 8 --- dom/interfaces/base/domstubs.idl | 5 -- dom/interfaces/base/nsIDOMWindow.idl | 11 ++- dom/interfaces/base/nsIDOMWindow2.idl | 2 +- dom/interfaces/base/nsIDOMWindowInternal.idl | 2 +- dom/interfaces/core/nsIDOMDocument.idl | 9 ++- dom/interfaces/core/nsIDOMXMLDocument.idl | 2 +- dom/interfaces/css/Makefile.in | 1 - dom/interfaces/css/nsIDOMViewCSS.idl | 49 ------------- dom/interfaces/events/nsIDOMDragEvent.idl | 5 +- dom/interfaces/events/nsIDOMKeyEvent.idl | 4 +- dom/interfaces/events/nsIDOMMouseEvent.idl | 4 +- .../events/nsIDOMMouseScrollEvent.idl | 4 +- dom/interfaces/events/nsIDOMMozTouchEvent.idl | 4 +- dom/interfaces/events/nsIDOMNSMouseEvent.idl | 4 +- .../events/nsIDOMScrollAreaEvent.idl | 4 +- .../events/nsIDOMSimpleGestureEvent.idl | 4 +- dom/interfaces/events/nsIDOMTouchEvent.idl | 6 +- dom/interfaces/events/nsIDOMUIEvent.idl | 6 +- dom/interfaces/html/nsIDOMHTMLDocument.idl | 2 +- dom/interfaces/smil/nsIDOMTimeEvent.idl | 6 +- dom/interfaces/svg/nsIDOMSVGDocument.idl | 2 +- dom/interfaces/svg/nsIDOMSVGZoomEvent.idl | 2 +- dom/interfaces/views/Makefile.in | 54 --------------- dom/interfaces/views/nsIDOMAbstractView.idl | 53 --------------- dom/interfaces/views/nsIDOMDocumentView.idl | 54 --------------- dom/interfaces/xul/nsIDOMXULCommandEvent.idl | 4 +- editor/libeditor/html/nsHTMLAbsPosition.cpp | 9 +-- .../libeditor/html/nsHTMLAnonymousUtils.cpp | 8 +-- editor/libeditor/html/nsHTMLCSSUtils.cpp | 68 +++++++++---------- editor/libeditor/html/nsHTMLCSSUtils.h | 29 ++++---- .../browser/webBrowser/nsContextMenuInfo.cpp | 24 +++---- .../spellcheck/src/mozInlineSpellWordUtil.cpp | 21 +++--- .../spellcheck/src/mozInlineSpellWordUtil.h | 3 +- extensions/widgetutils/src/nsWidgetUtils.cpp | 26 +++---- js/src/xpconnect/src/dom_quickstubs.qsconf | 6 +- layout/inspector/src/inLayoutUtils.cpp | 17 ++--- toolkit/toolkit-makefiles.sh | 1 - widget/src/cocoa/nsMenuItemIconX.mm | 31 +++++---- widget/src/cocoa/nsMenuUtilsX.mm | 5 +- xpfe/appshell/src/nsXULWindow.cpp | 5 +- 71 files changed, 221 insertions(+), 553 deletions(-) delete mode 100644 dom/interfaces/css/nsIDOMViewCSS.idl delete mode 100644 dom/interfaces/views/Makefile.in delete mode 100644 dom/interfaces/views/nsIDOMAbstractView.idl delete mode 100644 dom/interfaces/views/nsIDOMDocumentView.idl diff --git a/accessible/src/atk/nsMaiInterfaceComponent.cpp b/accessible/src/atk/nsMaiInterfaceComponent.cpp index 34bafd1465c9..c6f8ea009ca8 100644 --- a/accessible/src/atk/nsMaiInterfaceComponent.cpp +++ b/accessible/src/atk/nsMaiInterfaceComponent.cpp @@ -45,8 +45,6 @@ #include "nsCoreUtils.h" #include "nsIDOMDocument.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMAbstractView.h" #include "nsIDOMWindowInternal.h" #include "nsIDocShellTreeItem.h" #include "nsIInterfaceRequestorUtils.h" diff --git a/accessible/src/base/nsCoreUtils.cpp b/accessible/src/base/nsCoreUtils.cpp index f7d660f6c849..081888febad0 100644 --- a/accessible/src/base/nsCoreUtils.cpp +++ b/accessible/src/base/nsCoreUtils.cpp @@ -43,15 +43,12 @@ #include "nsAccessNode.h" #include "nsIDocument.h" -#include "nsIDOMAbstractView.h" #include "nsIDOM3Node.h" #include "nsIDOMDocument.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMHTMLDocument.h" #include "nsIDOMHTMLElement.h" #include "nsIDOMNodeList.h" #include "nsIDOMRange.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMWindowInternal.h" #include "nsIDOMXULElement.h" #include "nsIDocShell.h" @@ -425,13 +422,12 @@ nsCoreUtils::GetScreenCoordsForWindow(nsINode *aNode) nsCOMPtr rootTreeItem; treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem)); nsCOMPtr domDoc = do_GetInterface(rootTreeItem); - nsCOMPtr docView(do_QueryInterface(domDoc)); - if (!docView) + if (!domDoc) return coords; - nsCOMPtr abstractView; - docView->GetDefaultView(getter_AddRefs(abstractView)); - nsCOMPtr windowInter(do_QueryInterface(abstractView)); + nsCOMPtr window; + domDoc->GetDefaultView(getter_AddRefs(window)); + nsCOMPtr windowInter(do_QueryInterface(window)); if (!windowInter) return coords; @@ -597,14 +593,14 @@ nsCoreUtils::GetComputedStyleDeclaration(const nsAString& aPseudoElt, if (!document) return nsnull; - nsCOMPtr viewCSS(do_QueryInterface(document->GetWindow())); - if (!viewCSS) + nsCOMPtr window = do_QueryInterface(document->GetWindow()); + if (!window) return nsnull; - nsIDOMCSSStyleDeclaration* cssDecl = nsnull; + nsCOMPtr cssDecl; nsCOMPtr domElement(do_QueryInterface(content)); - viewCSS->GetComputedStyle(domElement, aPseudoElt, &cssDecl); - return cssDecl; + window->GetComputedStyle(domElement, aPseudoElt, getter_AddRefs(cssDecl)); + return cssDecl.forget(); } already_AddRefed diff --git a/accessible/src/html/nsHyperTextAccessible.cpp b/accessible/src/html/nsHyperTextAccessible.cpp index 912641c32301..ae826053be8b 100644 --- a/accessible/src/html/nsHyperTextAccessible.cpp +++ b/accessible/src/html/nsHyperTextAccessible.cpp @@ -47,11 +47,9 @@ #include "nsIClipboard.h" #include "nsContentCID.h" -#include "nsIDOMAbstractView.h" #include "nsIDOMCharacterData.h" #include "nsIDOMDocument.h" #include "nsPIDOMWindow.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMRange.h" #include "nsIDOMNSRange.h" #include "nsIDOMWindowInternal.h" diff --git a/accessible/src/msaa/nsAccessNodeWrap.cpp b/accessible/src/msaa/nsAccessNodeWrap.cpp index 3129dec2d2fa..9c8dc89f21f5 100644 --- a/accessible/src/msaa/nsAccessNodeWrap.cpp +++ b/accessible/src/msaa/nsAccessNodeWrap.cpp @@ -52,7 +52,6 @@ #include "nsIDocument.h" #include "nsIDOMNodeList.h" #include "nsIDOMNSHTMLElement.h" -#include "nsIDOMViewCSS.h" #include "nsIFrame.h" #include "nsINameSpaceManager.h" #include "nsIPrefService.h" diff --git a/content/base/src/nsContentAreaDragDrop.cpp b/content/base/src/nsContentAreaDragDrop.cpp index 6d52bb5915da..675bbdb68d49 100644 --- a/content/base/src/nsContentAreaDragDrop.cpp +++ b/content/base/src/nsContentAreaDragDrop.cpp @@ -54,7 +54,6 @@ #include "nsIDOMEvent.h" #include "nsIDOMNSEvent.h" #include "nsIDOMDragEvent.h" -#include "nsIDOMAbstractView.h" #include "nsPIDOMWindow.h" #include "nsIDOMDocument.h" #include "nsIDOMDocumentRange.h" diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index fd93d929a248..fa3f89bd3d9a 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -168,7 +168,6 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID); #include "nsIChromeRegistry.h" #include "nsIMIMEHeaderParam.h" #include "nsIDOMXULCommandEvent.h" -#include "nsIDOMAbstractView.h" #include "nsIDOMDragEvent.h" #include "nsDOMDataTransfer.h" #include "nsHtml5Module.h" @@ -5523,9 +5522,8 @@ nsContentUtils::DispatchXULCommand(nsIContent* aTarget, nsCOMPtr xulCommand = do_QueryInterface(event); nsCOMPtr pEvent = do_QueryInterface(xulCommand); NS_ENSURE_STATE(pEvent); - nsCOMPtr view = do_QueryInterface(doc->GetWindow()); nsresult rv = xulCommand->InitCommandEvent(NS_LITERAL_STRING("command"), - PR_TRUE, PR_TRUE, view, + PR_TRUE, PR_TRUE, doc->GetWindow(), 0, aCtrl, aAlt, aShift, aMeta, aSourceEvent); NS_ENSURE_SUCCESS(rv, rv); diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 660f13b5acf5..d4a2f553156c 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -75,8 +75,6 @@ #include "nsDOMAttribute.h" #include "nsIDOMDOMStringList.h" #include "nsIDOMDOMImplementation.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMAbstractView.h" #include "nsIDOMDocumentXBL.h" #include "mozilla/FunctionTimer.h" #include "nsGenericElement.h" @@ -5077,16 +5075,14 @@ nsDocument::CreateTreeWalker(nsIDOMNode *aRoot, NS_IMETHODIMP -nsDocument::GetDefaultView(nsIDOMAbstractView** aDefaultView) +nsDocument::GetDefaultView(nsIDOMWindow** aDefaultView) { - nsPIDOMWindow* win = GetWindow(); - if (win) { - return CallQueryInterface(win, aDefaultView); - } - *aDefaultView = nsnull; - - return NS_OK; + nsPIDOMWindow* win = GetWindow(); + if (!win) { + return NS_OK; + } + return CallQueryInterface(win, aDefaultView); } NS_IMETHODIMP @@ -8331,7 +8327,7 @@ nsDocument::SetImagesNeedAnimating(PRBool aAnimating) } NS_IMETHODIMP -nsDocument::CreateTouch(nsIDOMAbstractView* aView, +nsDocument::CreateTouch(nsIDOMWindow* aView, nsIDOMEventTarget* aTarget, PRInt32 aIdentifier, PRInt32 aPageX, diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index 449a6073568e..710d50c66b42 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -52,7 +52,6 @@ #include "nsTArray.h" #include "nsHashSets.h" #include "nsIDOMXMLDocument.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMDocumentXBL.h" #include "nsIDOMNSDocument.h" #include "nsIDOMNSDocumentStyle.h" @@ -499,7 +498,6 @@ class nsDocument : public nsIDocument, public nsIDOMDocumentEvent, public nsIDOM3DocumentEvent, public nsIDOMNSDocumentStyle, - public nsIDOMDocumentView, public nsIDOMDocumentRange, public nsIDOMDocumentTraversal, public nsIDOMDocumentXBL, @@ -816,9 +814,6 @@ public: // nsIDOMNSDocumentStyle NS_DECL_NSIDOMNSDOCUMENTSTYLE - // nsIDOMDocumentView - NS_DECL_NSIDOMDOCUMENTVIEW - // nsIDOMDocumentRange NS_DECL_NSIDOMDOCUMENTRANGE @@ -1268,7 +1263,6 @@ protected: NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMDocument, nsDocument) \ NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMNSDocument, nsDocument) \ NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMDocumentEvent, nsDocument) \ - NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMDocumentView, nsDocument) \ NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMDocumentTraversal, \ nsDocument) \ NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMEventTarget, nsDocument) \ diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index ee3bebe04f95..5a9b06461688 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -92,7 +92,6 @@ #include "nsBindingManager.h" #include "nsXBLBinding.h" -#include "nsIDOMViewCSS.h" #include "nsIXBLService.h" #include "nsPIDOMWindow.h" #include "nsIBoxObject.h" diff --git a/content/events/src/nsDOMDragEvent.cpp b/content/events/src/nsDOMDragEvent.cpp index 3622ed48cbab..abb29ba8e28e 100644 --- a/content/events/src/nsDOMDragEvent.cpp +++ b/content/events/src/nsDOMDragEvent.cpp @@ -80,7 +80,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMMouseEvent) NS_IMETHODIMP nsDOMDragEvent::InitDragEvent(const nsAString & aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView* aView, PRInt32 aDetail, + nsIDOMWindow* aView, PRInt32 aDetail, PRInt32 aScreenX, PRInt32 aScreenY, PRInt32 aClientX, PRInt32 aClientY, PRBool aCtrlKey, PRBool aAltKey, PRBool aShiftKey, @@ -132,7 +132,5 @@ nsresult NS_NewDOMDragEvent(nsIDOMEvent** aInstancePtrResult, nsDragEvent *aEvent) { nsDOMDragEvent* event = new nsDOMDragEvent(aPresContext, aEvent); - NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY); - return CallQueryInterface(event, aInstancePtrResult); } diff --git a/content/events/src/nsDOMKeyboardEvent.cpp b/content/events/src/nsDOMKeyboardEvent.cpp index 33cc4ed450ba..e69a875183a8 100644 --- a/content/events/src/nsDOMKeyboardEvent.cpp +++ b/content/events/src/nsDOMKeyboardEvent.cpp @@ -175,7 +175,7 @@ nsDOMKeyboardEvent::GetWhich(PRUint32* aWhich) NS_IMETHODIMP nsDOMKeyboardEvent::InitKeyEvent(const nsAString& aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView* aView, PRBool aCtrlKey, PRBool aAltKey, + nsIDOMWindow* aView, PRBool aCtrlKey, PRBool aAltKey, PRBool aShiftKey, PRBool aMetaKey, PRUint32 aKeyCode, PRUint32 aCharCode) { @@ -198,9 +198,5 @@ nsresult NS_NewDOMKeyboardEvent(nsIDOMEvent** aInstancePtrResult, nsKeyEvent *aEvent) { nsDOMKeyboardEvent* it = new nsDOMKeyboardEvent(aPresContext, aEvent); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return CallQueryInterface(it, aInstancePtrResult); } diff --git a/content/events/src/nsDOMMouseEvent.cpp b/content/events/src/nsDOMMouseEvent.cpp index dbedcde48bea..322fc60b9994 100644 --- a/content/events/src/nsDOMMouseEvent.cpp +++ b/content/events/src/nsDOMMouseEvent.cpp @@ -104,7 +104,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMUIEvent) NS_IMETHODIMP nsDOMMouseEvent::InitMouseEvent(const nsAString & aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView *aView, PRInt32 aDetail, PRInt32 aScreenX, + nsIDOMWindow* aView, PRInt32 aDetail, PRInt32 aScreenX, PRInt32 aScreenY, PRInt32 aClientX, PRInt32 aClientY, PRBool aCtrlKey, PRBool aAltKey, PRBool aShiftKey, PRBool aMetaKey, PRUint16 aButton, nsIDOMEventTarget *aRelatedTarget) @@ -147,7 +147,7 @@ nsDOMMouseEvent::InitMouseEvent(const nsAString & aType, PRBool aCanBubble, PRBo NS_IMETHODIMP nsDOMMouseEvent::InitNSMouseEvent(const nsAString & aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView *aView, PRInt32 aDetail, PRInt32 aScreenX, + nsIDOMWindow *aView, PRInt32 aDetail, PRInt32 aScreenX, PRInt32 aScreenY, PRInt32 aClientX, PRInt32 aClientY, PRBool aCtrlKey, PRBool aAltKey, PRBool aShiftKey, PRBool aMetaKey, PRUint16 aButton, nsIDOMEventTarget *aRelatedTarget, @@ -313,9 +313,5 @@ nsresult NS_NewDOMMouseEvent(nsIDOMEvent** aInstancePtrResult, nsInputEvent *aEvent) { nsDOMMouseEvent* it = new nsDOMMouseEvent(aPresContext, aEvent); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return CallQueryInterface(it, aInstancePtrResult); } diff --git a/content/events/src/nsDOMMouseScrollEvent.cpp b/content/events/src/nsDOMMouseScrollEvent.cpp index 34bda3a5ddea..ac61c741286d 100644 --- a/content/events/src/nsDOMMouseScrollEvent.cpp +++ b/content/events/src/nsDOMMouseScrollEvent.cpp @@ -88,7 +88,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMMouseEvent) NS_IMETHODIMP nsDOMMouseScrollEvent::InitMouseScrollEvent(const nsAString & aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView *aView, PRInt32 aDetail, PRInt32 aScreenX, + nsIDOMWindow *aView, PRInt32 aDetail, PRInt32 aScreenX, PRInt32 aScreenY, PRInt32 aClientX, PRInt32 aClientY, PRBool aCtrlKey, PRBool aAltKey, PRBool aShiftKey, PRBool aMetaKey, PRUint16 aButton, nsIDOMEventTarget *aRelatedTarget, @@ -129,9 +129,5 @@ nsresult NS_NewDOMMouseScrollEvent(nsIDOMEvent** aInstancePtrResult, nsInputEvent *aEvent) { nsDOMMouseScrollEvent* it = new nsDOMMouseScrollEvent(aPresContext, aEvent); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return CallQueryInterface(it, aInstancePtrResult); } diff --git a/content/events/src/nsDOMMozTouchEvent.cpp b/content/events/src/nsDOMMozTouchEvent.cpp index 03faf82f72f9..0c517e9dd06e 100644 --- a/content/events/src/nsDOMMozTouchEvent.cpp +++ b/content/events/src/nsDOMMozTouchEvent.cpp @@ -85,7 +85,7 @@ NS_IMETHODIMP nsDOMMozTouchEvent::InitMozTouchEvent(const nsAString& aTypeArg, PRBool aCanBubbleArg, PRBool aCancelableArg, - nsIDOMAbstractView* aViewArg, + nsIDOMWindow* aViewArg, PRInt32 aDetailArg, PRInt32 aScreenX, PRInt32 aScreenY, @@ -127,8 +127,5 @@ nsresult NS_NewDOMMozTouchEvent(nsIDOMEvent** aInstancePtrResult, nsMozTouchEvent *aEvent) { nsDOMMozTouchEvent *it = new nsDOMMozTouchEvent(aPresContext, aEvent); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } return CallQueryInterface(it, aInstancePtrResult); } diff --git a/content/events/src/nsDOMScrollAreaEvent.cpp b/content/events/src/nsDOMScrollAreaEvent.cpp index 5712179653b4..dec9f2684510 100644 --- a/content/events/src/nsDOMScrollAreaEvent.cpp +++ b/content/events/src/nsDOMScrollAreaEvent.cpp @@ -101,7 +101,7 @@ NS_IMETHODIMP nsDOMScrollAreaEvent::InitScrollAreaEvent(const nsAString &aEventType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView *aView, + nsIDOMWindow *aView, PRInt32 aDetail, float aX, float aY, float aWidth, float aHeight) @@ -156,10 +156,5 @@ NS_NewDOMScrollAreaEvent(nsIDOMEvent **aInstancePtrResult, nsScrollAreaEvent *aEvent) { nsDOMScrollAreaEvent *ev = new nsDOMScrollAreaEvent(aPresContext, aEvent); - - if (!ev) { - return NS_ERROR_OUT_OF_MEMORY; - } - return CallQueryInterface(ev, aInstancePtrResult); } diff --git a/content/events/src/nsDOMSimpleGestureEvent.cpp b/content/events/src/nsDOMSimpleGestureEvent.cpp index 61374c488fa8..c3d3b59f1c44 100644 --- a/content/events/src/nsDOMSimpleGestureEvent.cpp +++ b/content/events/src/nsDOMSimpleGestureEvent.cpp @@ -95,7 +95,7 @@ NS_IMETHODIMP nsDOMSimpleGestureEvent::InitSimpleGestureEvent(const nsAString& aTypeArg, PRBool aCanBubbleArg, PRBool aCancelableArg, - nsIDOMAbstractView* aViewArg, + nsIDOMWindow* aViewArg, PRInt32 aDetailArg, PRInt32 aScreenX, PRInt32 aScreenY, diff --git a/content/events/src/nsDOMTouchEvent.cpp b/content/events/src/nsDOMTouchEvent.cpp index b0f78013271e..8fbd374a2c3f 100644 --- a/content/events/src/nsDOMTouchEvent.cpp +++ b/content/events/src/nsDOMTouchEvent.cpp @@ -1,4 +1,4 @@ - /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ +/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -244,7 +244,7 @@ NS_IMETHODIMP nsDOMTouchEvent::InitTouchEvent(const nsAString& aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView* aView, + nsIDOMWindow* aView, PRInt32 aDetail, PRBool aCtrlKey, PRBool aAltKey, diff --git a/content/events/src/nsDOMUIEvent.cpp b/content/events/src/nsDOMUIEvent.cpp index 07bcba00a9d3..c25f1cbfcb87 100644 --- a/content/events/src/nsDOMUIEvent.cpp +++ b/content/events/src/nsDOMUIEvent.cpp @@ -176,7 +176,7 @@ nsDOMUIEvent::GetClientPoint() } NS_IMETHODIMP -nsDOMUIEvent::GetView(nsIDOMAbstractView** aView) +nsDOMUIEvent::GetView(nsIDOMWindow** aView) { *aView = mView; NS_IF_ADDREF(*aView); @@ -191,7 +191,11 @@ nsDOMUIEvent::GetDetail(PRInt32* aDetail) } NS_IMETHODIMP -nsDOMUIEvent::InitUIEvent(const nsAString & typeArg, PRBool canBubbleArg, PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg) +nsDOMUIEvent::InitUIEvent(const nsAString& typeArg, + PRBool canBubbleArg, + PRBool cancelableArg, + nsIDOMWindow* viewArg, + PRInt32 detailArg) { nsresult rv = nsDOMEvent::InitEvent(typeArg, canBubbleArg, cancelableArg); NS_ENSURE_SUCCESS(rv, rv); @@ -418,9 +422,5 @@ nsresult NS_NewDOMUIEvent(nsIDOMEvent** aInstancePtrResult, nsGUIEvent *aEvent) { nsDOMUIEvent* it = new nsDOMUIEvent(aPresContext, aEvent); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return CallQueryInterface(it, aInstancePtrResult); } diff --git a/content/events/src/nsDOMUIEvent.h b/content/events/src/nsDOMUIEvent.h index a242af36f5be..22cee7ade555 100644 --- a/content/events/src/nsDOMUIEvent.h +++ b/content/events/src/nsDOMUIEvent.h @@ -36,12 +36,11 @@ * * ***** END LICENSE BLOCK ***** */ -#ifndef nsDOMUIEvent_h__ -#define nsDOMUIEvent_h__ +#ifndef nsDOMUIEvent_h +#define nsDOMUIEvent_h #include "nsIDOMUIEvent.h" #include "nsIDOMNSUIEvent.h" -#include "nsIDOMAbstractView.h" #include "nsDOMEvent.h" class nsDOMUIEvent : public nsDOMEvent, @@ -78,7 +77,7 @@ protected: nsIntPoint GetPagePoint(); protected: - nsCOMPtr mView; + nsCOMPtr mView; PRInt32 mDetail; nsIntPoint mClientPoint; // Screenpoint is mEvent->refPoint. @@ -90,4 +89,4 @@ protected: NS_FORWARD_NSIDOMUIEVENT(nsDOMUIEvent::) \ NS_FORWARD_TO_NSDOMEVENT -#endif // nsDOMUIEvent_h__ +#endif // nsDOMUIEvent_h diff --git a/content/events/src/nsDOMXULCommandEvent.cpp b/content/events/src/nsDOMXULCommandEvent.cpp index 1090d318f62b..30611e651112 100644 --- a/content/events/src/nsDOMXULCommandEvent.cpp +++ b/content/events/src/nsDOMXULCommandEvent.cpp @@ -118,7 +118,7 @@ nsDOMXULCommandEvent::GetSourceEvent(nsIDOMEvent** aSourceEvent) NS_IMETHODIMP nsDOMXULCommandEvent::InitCommandEvent(const nsAString& aType, PRBool aCanBubble, PRBool aCancelable, - nsIDOMAbstractView *aView, + nsIDOMWindow* aView, PRInt32 aDetail, PRBool aCtrlKey, PRBool aAltKey, PRBool aShiftKey, PRBool aMetaKey, @@ -144,9 +144,5 @@ nsresult NS_NewDOMXULCommandEvent(nsIDOMEvent** aInstancePtrResult, nsInputEvent *aEvent) { nsDOMXULCommandEvent* it = new nsDOMXULCommandEvent(aPresContext, aEvent); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return CallQueryInterface(it, aInstancePtrResult); } diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index b87f2f04ad39..2f95f42e5662 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -118,7 +118,6 @@ #include "nsIDOMMouseScrollEvent.h" #include "nsIDOMDragEvent.h" #include "nsIDOMEventTarget.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMNSUIEvent.h" #include "nsDOMDragEvent.h" #include "nsIDOMNSEditableElement.h" diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index f6bfefb3519a..dfc984c1c852 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -1388,6 +1388,12 @@ nsHTMLDocument::NormalizeDocument() return nsDocument::NormalizeDocument(); } +NS_IMETHODIMP +nsHTMLDocument::GetDefaultView(nsIDOMWindow** aWindow) +{ + return nsDocument::GetDefaultView(aWindow); +} + // // nsIDOMHTMLDocument interface implementation // diff --git a/content/smil/nsDOMTimeEvent.cpp b/content/smil/nsDOMTimeEvent.cpp index 100a385b31c3..d37dc033c37b 100644 --- a/content/smil/nsDOMTimeEvent.cpp +++ b/content/smil/nsDOMTimeEvent.cpp @@ -39,7 +39,6 @@ #include "nsGUIEvent.h" #include "nsPresContext.h" #include "nsIInterfaceRequestorUtils.h" -#include "nsIDOMAbstractView.h" nsDOMTimeEvent::nsDOMTimeEvent(nsPresContext* aPresContext, nsEvent* aEvent) : nsDOMEvent(aPresContext, aEvent ? aEvent : new nsUIEvent(PR_FALSE, 0, 0)), @@ -92,7 +91,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMTimeEvent) NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent) NS_IMETHODIMP -nsDOMTimeEvent::GetView(nsIDOMAbstractView** aView) +nsDOMTimeEvent::GetView(nsIDOMWindow** aView) { *aView = mView; NS_IF_ADDREF(*aView); @@ -108,7 +107,7 @@ nsDOMTimeEvent::GetDetail(PRInt32* aDetail) NS_IMETHODIMP nsDOMTimeEvent::InitTimeEvent(const nsAString& aTypeArg, - nsIDOMAbstractView* aViewArg, + nsIDOMWindow* aViewArg, PRInt32 aDetailArg) { nsresult rv = nsDOMEvent::InitEvent(aTypeArg, PR_FALSE /*doesn't bubble*/, diff --git a/content/smil/nsDOMTimeEvent.h b/content/smil/nsDOMTimeEvent.h index 632b8ddc19a9..9ff25f5e37ca 100644 --- a/content/smil/nsDOMTimeEvent.h +++ b/content/smil/nsDOMTimeEvent.h @@ -58,8 +58,8 @@ public: NS_FORWARD_TO_NSDOMEVENT private: - nsCOMPtr mView; - PRInt32 mDetail; + nsCOMPtr mView; + PRInt32 mDetail; }; #endif // NS_DOMTIMEEVENT_H_ diff --git a/content/svg/content/src/nsSVGElement.cpp b/content/svg/content/src/nsSVGElement.cpp index 6818d4f9a215..e885ef81906c 100644 --- a/content/svg/content/src/nsSVGElement.cpp +++ b/content/svg/content/src/nsSVGElement.cpp @@ -51,8 +51,6 @@ #include "nsStyleConsts.h" #include "nsDOMError.h" #include "nsIPresShell.h" -#include "nsIDOMViewCSS.h" -#include "nsIDOMCSSStyleDeclaration.h" #include "nsIServiceManager.h" #include "nsIXBLService.h" #include "nsGkAtoms.h" diff --git a/content/xml/document/src/nsXMLPrettyPrinter.cpp b/content/xml/document/src/nsXMLPrettyPrinter.cpp index e6b963561bc8..504db4af51db 100644 --- a/content/xml/document/src/nsXMLPrettyPrinter.cpp +++ b/content/xml/document/src/nsXMLPrettyPrinter.cpp @@ -38,10 +38,7 @@ #include "nsXMLPrettyPrinter.h" #include "nsContentUtils.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMAbstractView.h" #include "nsIDOMCSSStyleDeclaration.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMDocumentXBL.h" #include "nsIObserver.h" #include "nsIXSLTProcessor.h" @@ -95,16 +92,13 @@ nsXMLPrettyPrinter::PrettyPrint(nsIDocument* aDocument, nsCOMPtr computedStyle; nsCOMPtr frameOwnerDoc; frameElem->GetOwnerDocument(getter_AddRefs(frameOwnerDoc)); - nsCOMPtr docView = do_QueryInterface(frameOwnerDoc); - if (docView) { - nsCOMPtr defaultView; - docView->GetDefaultView(getter_AddRefs(defaultView)); - nsCOMPtr defaultCSSView = - do_QueryInterface(defaultView); - if (defaultCSSView) { - defaultCSSView->GetComputedStyle(frameElem, - EmptyString(), - getter_AddRefs(computedStyle)); + if (frameOwnerDoc) { + nsCOMPtr window; + frameOwnerDoc->GetDefaultView(getter_AddRefs(window)); + if (window) { + window->GetComputedStyle(frameElem, + EmptyString(), + getter_AddRefs(computedStyle)); } } diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 214eaf90529f..24d9b857e259 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -1,6 +1,5 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * ***** BEGIN LICENSE BLOCK ***** +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** 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 @@ -119,7 +118,6 @@ #include "nsXULDocument.h" #include "nsXULPopupListener.h" #include "nsRuleWalker.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsCSSParser.h" #include "nsIListBoxObject.h" diff --git a/dom/Makefile.in b/dom/Makefile.in index 78893d2c07db..ab5772684bce 100644 --- a/dom/Makefile.in +++ b/dom/Makefile.in @@ -50,7 +50,6 @@ DIRS = \ interfaces/html \ interfaces/events \ interfaces/stylesheets \ - interfaces/views \ interfaces/sidebar \ interfaces/css \ interfaces/traversal \ diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index aaa914ab7625..1d62908fbff1 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -192,7 +192,6 @@ #include "nsBindingManager.h" #include "nsIFrame.h" #include "nsIPresShell.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMElement.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsStyleSet.h" @@ -253,7 +252,6 @@ #include "nsIDOMDocumentRange.h" #include "nsIDOMDocumentTraversal.h" #include "nsIDOMDocumentXBL.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMElementCSSInlineStyle.h" #include "nsIDOMLinkStyle.h" #include "nsIDOMHTMLDocument.h" @@ -2303,7 +2301,6 @@ nsDOMClassInfo::RegisterExternalClasses() DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentEvent) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentStyle) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocumentStyle) \ - DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentView) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentRange) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentTraversal) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentXBL) \ @@ -2380,8 +2377,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal) DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget) DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMViewCSS) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMAbstractView) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB) DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow_2_0_BRANCH) @@ -2393,8 +2388,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal) DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget) DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMViewCSS) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMAbstractView) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow) DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow_2_0_BRANCH) DOM_CLASSINFO_MAP_END @@ -3128,8 +3121,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMViewCSS) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMAbstractView) DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_BEGIN(RangeException, nsIDOMRangeException) @@ -4023,8 +4014,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal) DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget) DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMViewCSS) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMAbstractView) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow) DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB) DOM_CLASSINFO_MAP_ENTRY(nsIDOMModalContentWindow) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 747082afba19..3b3ecd7fead6 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -111,7 +111,6 @@ #endif #include "nsIDOMDocument.h" #include "nsIDOMNSDocument.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMElement.h" #include "nsIDOMDocumentEvent.h" #include "nsIDOMEvent.h" @@ -1334,8 +1333,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsGlobalWindow) NS_INTERFACE_MAP_ENTRY(nsIDOM3EventTarget) NS_INTERFACE_MAP_ENTRY(nsIDOMNSEventTarget) NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow) - NS_INTERFACE_MAP_ENTRY(nsIDOMViewCSS) - NS_INTERFACE_MAP_ENTRY(nsIDOMAbstractView) NS_INTERFACE_MAP_ENTRY(nsIDOMStorageWindow) NS_INTERFACE_MAP_ENTRY(nsIDOMStorageIndexedDB) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) @@ -7888,10 +7885,6 @@ nsGlobalWindow::UpdateCanvasFocus(PRBool aFocusChanged, nsIContent* aNewContent) } } -//***************************************************************************** -// nsGlobalWindow::nsIDOMViewCSS -//***************************************************************************** - NS_IMETHODIMP nsGlobalWindow::GetComputedStyle(nsIDOMElement* aElt, const nsAString& aPseudoElt, @@ -7928,27 +7921,6 @@ nsGlobalWindow::GetComputedStyle(nsIDOMElement* aElt, return NS_OK; } -//***************************************************************************** -// nsGlobalWindow::nsIDOMAbstractView -//***************************************************************************** - -NS_IMETHODIMP -nsGlobalWindow::GetDocument(nsIDOMDocumentView ** aDocumentView) -{ - NS_ENSURE_ARG_POINTER(aDocumentView); - - nsresult rv = NS_OK; - - if (mDocument) { - rv = CallQueryInterface(mDocument, aDocumentView); - } - else { - *aDocumentView = nsnull; - } - - return rv; -} - //***************************************************************************** // nsGlobalWindow::nsIDOMStorageWindow //***************************************************************************** diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index e033bf7f20d3..c9e46b40a561 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -62,7 +62,6 @@ #include "nsIDocShellTreeOwner.h" #include "nsIDocShellTreeItem.h" #include "nsIDOMClientInformation.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMEventTarget.h" #include "nsIDOM3EventTarget.h" #include "nsIDOMNSEventTarget.h" @@ -280,7 +279,6 @@ class nsGlobalWindow : public nsPIDOMWindow, public nsPIDOMEventTarget, public nsIDOM3EventTarget, public nsIDOMNSEventTarget, - public nsIDOMViewCSS, public nsIDOMStorageWindow, public nsIDOMStorageIndexedDB, public nsSupportsWeakReference, @@ -419,12 +417,6 @@ public: virtual NS_HIDDEN_(void) MaybeUpdateTouchState(); virtual NS_HIDDEN_(void) UpdateTouchState(); - // nsIDOMViewCSS - NS_DECL_NSIDOMVIEWCSS - - // nsIDOMAbstractView - NS_DECL_NSIDOMABSTRACTVIEW - // nsIDOMStorageWindow NS_DECL_NSIDOMSTORAGEWINDOW diff --git a/dom/interfaces/base/domstubs.idl b/dom/interfaces/base/domstubs.idl index 3dd14bb44d75..1a4496dddad8 100644 --- a/dom/interfaces/base/domstubs.idl +++ b/dom/interfaces/base/domstubs.idl @@ -77,10 +77,6 @@ interface nsIDOMLinkStyle; interface nsIDOMStyleSheet; interface nsIDOMMediaList; -// Views -interface nsIDOMAbstractView; -interface nsIDOMDocumentView; - // Base interface nsIDOMWindow; interface nsIDOMWindowInternal; @@ -130,4 +126,3 @@ interface nsIDOMRange; interface nsIDOMCRMFObject; interface nsIDOMCrypto; interface nsIDOMPkcs11; - diff --git a/dom/interfaces/base/nsIDOMWindow.idl b/dom/interfaces/base/nsIDOMWindow.idl index fdc98011b44c..ec0414e05708 100644 --- a/dom/interfaces/base/nsIDOMWindow.idl +++ b/dom/interfaces/base/nsIDOMWindow.idl @@ -47,11 +47,10 @@ interface nsISelection; * contain child windows if the document in the window contains a * HTML frameset document or if the document contains iframe elements. * - * This interface is not officially defined by any standard bodies, it - * originates from the defacto DOM Level 0 standard. + * @see */ -[scriptable, uuid(a6cf906b-15b3-11d2-932e-00805f8add32)] +[scriptable, uuid(ff7d278f-93db-4078-b89a-058c8e1270b4)] interface nsIDOMWindow : nsISupports { /** @@ -150,4 +149,10 @@ interface nsIDOMWindow : nsISupports * Method for sizing this window to the content in the window. */ void sizeToContent(); + + /** + * @see + */ + nsIDOMCSSStyleDeclaration getComputedStyle(in nsIDOMElement elt, + [optional] in DOMString pseudoElt); }; diff --git a/dom/interfaces/base/nsIDOMWindow2.idl b/dom/interfaces/base/nsIDOMWindow2.idl index 510e3178f081..a69d0ae88162 100644 --- a/dom/interfaces/base/nsIDOMWindow2.idl +++ b/dom/interfaces/base/nsIDOMWindow2.idl @@ -40,7 +40,7 @@ interface nsIDOMOfflineResourceList; interface nsIDOMBlob; -[scriptable, uuid(efff0d88-3b94-4375-bdeb-676a847ecd7d)] +[scriptable, uuid(e2796e00-14de-4ce0-acfe-0374bc0e715d)] interface nsIDOMWindow2 : nsIDOMWindow { /** diff --git a/dom/interfaces/base/nsIDOMWindowInternal.idl b/dom/interfaces/base/nsIDOMWindowInternal.idl index 114b39d40926..27e2d3167aba 100644 --- a/dom/interfaces/base/nsIDOMWindowInternal.idl +++ b/dom/interfaces/base/nsIDOMWindowInternal.idl @@ -46,7 +46,7 @@ interface nsIVariant; interface nsIAnimationFrameListener; interface nsIDOMMediaQueryList; -[scriptable, uuid(04eafa93-efbe-4254-9d65-91c344fa7ff2)] +[scriptable, uuid(4d95736f-8130-43cb-a276-5bc554eca80a)] interface nsIDOMWindowInternal : nsIDOMWindow2 { readonly attribute nsIDOMWindowInternal window; diff --git a/dom/interfaces/core/nsIDOMDocument.idl b/dom/interfaces/core/nsIDOMDocument.idl index e9587254012b..68956bbe4d18 100644 --- a/dom/interfaces/core/nsIDOMDocument.idl +++ b/dom/interfaces/core/nsIDOMDocument.idl @@ -52,7 +52,7 @@ * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html */ -[scriptable, uuid(2d305b95-a030-4d24-a12c-7fabf61a8c3c)] +[scriptable, uuid(d12f0ecf-434a-4b5c-81ad-354e3b9037b9)] interface nsIDOMDocument : nsIDOMNode { readonly attribute nsIDOMDocumentType doctype; @@ -108,4 +108,11 @@ interface nsIDOMDocument : nsIDOMNode raises(DOMException); // Introduced in DOM Level 3: void normalizeDocument(); + + /** + * The window associated with this document. + * + * @see http://www.whatwg.org/html/#dom-document-defaultview + */ + readonly attribute nsIDOMWindow defaultView; }; diff --git a/dom/interfaces/core/nsIDOMXMLDocument.idl b/dom/interfaces/core/nsIDOMXMLDocument.idl index 224ba547c50e..3069153065ac 100644 --- a/dom/interfaces/core/nsIDOMXMLDocument.idl +++ b/dom/interfaces/core/nsIDOMXMLDocument.idl @@ -38,7 +38,7 @@ #include "nsIDOMDocument.idl" -[scriptable, uuid(f493687c-ea80-471b-965b-11467ebea24b)] +[scriptable, uuid(68e4448c-eb64-48ea-801a-0c83008d2607)] interface nsIDOMXMLDocument : nsIDOMDocument { // DOM Level 3 Load & Save, DocumentLS diff --git a/dom/interfaces/css/Makefile.in b/dom/interfaces/css/Makefile.in index a0b4c64838c8..b432a249adbf 100644 --- a/dom/interfaces/css/Makefile.in +++ b/dom/interfaces/css/Makefile.in @@ -71,7 +71,6 @@ XPIDLSRCS = \ nsIDOMDocumentCSS.idl \ nsIDOMRGBColor.idl \ nsIDOMRect.idl \ - nsIDOMViewCSS.idl \ nsIDOMNSRGBAColor.idl \ $(NULL) diff --git a/dom/interfaces/css/nsIDOMViewCSS.idl b/dom/interfaces/css/nsIDOMViewCSS.idl deleted file mode 100644 index 2eb66fc9e9f9..000000000000 --- a/dom/interfaces/css/nsIDOMViewCSS.idl +++ /dev/null @@ -1,49 +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): - * Johnny Stenback (original author) - * - * 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 "nsIDOMAbstractView.idl" - -[scriptable, uuid(0b9341f3-95d4-4fa4-adcd-e119e0db2889)] -interface nsIDOMViewCSS : nsIDOMAbstractView -{ - /** - * @see - */ - nsIDOMCSSStyleDeclaration getComputedStyle(in nsIDOMElement elt, - [optional] in DOMString pseudoElt); -}; diff --git a/dom/interfaces/events/nsIDOMDragEvent.idl b/dom/interfaces/events/nsIDOMDragEvent.idl index a443f7d5e3ec..13e25628e296 100644 --- a/dom/interfaces/events/nsIDOMDragEvent.idl +++ b/dom/interfaces/events/nsIDOMDragEvent.idl @@ -38,10 +38,9 @@ #include "domstubs.idl" #include "nsIDOMMouseEvent.idl" -interface nsIDOMAbstractView; interface nsIDOMDataTransfer; -[scriptable, uuid(98351627-62d7-4b07-bbf3-78009b20764b)] +[scriptable, uuid(0f4fef03-c0e9-406c-a754-c01148e431ae)] interface nsIDOMDragEvent : nsIDOMMouseEvent { readonly attribute nsIDOMDataTransfer dataTransfer; @@ -49,7 +48,7 @@ interface nsIDOMDragEvent : nsIDOMMouseEvent void initDragEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView aView, + in nsIDOMWindow aView, in long aDetail, in long aScreenX, in long aScreenY, diff --git a/dom/interfaces/events/nsIDOMKeyEvent.idl b/dom/interfaces/events/nsIDOMKeyEvent.idl index c0ed1dfc59aa..18e770dd603c 100644 --- a/dom/interfaces/events/nsIDOMKeyEvent.idl +++ b/dom/interfaces/events/nsIDOMKeyEvent.idl @@ -39,7 +39,7 @@ #include "nsIDOMUIEvent.idl" -[scriptable, uuid(028e0e6e-8b01-11d3-aae7-0010838a3123)] +[scriptable, uuid(e44d7977-20f2-442e-bc13-0f2f52992a4c)] interface nsIDOMKeyEvent : nsIDOMUIEvent { const unsigned long DOM_VK_CANCEL = 0x03; @@ -193,7 +193,7 @@ interface nsIDOMKeyEvent : nsIDOMUIEvent void initKeyEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, diff --git a/dom/interfaces/events/nsIDOMMouseEvent.idl b/dom/interfaces/events/nsIDOMMouseEvent.idl index f21e93d8b614..7f0d763b9edb 100644 --- a/dom/interfaces/events/nsIDOMMouseEvent.idl +++ b/dom/interfaces/events/nsIDOMMouseEvent.idl @@ -47,7 +47,7 @@ * http://www.w3.org/TR/DOM-Level-2-Events/ */ -[scriptable, uuid(ff751edc-8b02-aae7-0010-8301838a3123)] +[scriptable, uuid(73558605-f479-493e-86d1-9794cd117fef)] interface nsIDOMMouseEvent : nsIDOMUIEvent { readonly attribute long screenX; @@ -67,7 +67,7 @@ interface nsIDOMMouseEvent : nsIDOMUIEvent void initMouseEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg, in long screenXArg, in long screenYArg, diff --git a/dom/interfaces/events/nsIDOMMouseScrollEvent.idl b/dom/interfaces/events/nsIDOMMouseScrollEvent.idl index 269061fab605..fafce7cb327f 100644 --- a/dom/interfaces/events/nsIDOMMouseScrollEvent.idl +++ b/dom/interfaces/events/nsIDOMMouseScrollEvent.idl @@ -38,7 +38,7 @@ #include "nsIDOMMouseEvent.idl" -[scriptable, uuid(ba8d1a7e-b475-4542-8d32-01e7ea7b8091)] +[scriptable, uuid(af08bce0-6821-4bac-8964-0fcee4be549a)] interface nsIDOMMouseScrollEvent : nsIDOMMouseEvent { const long HORIZONTAL_AXIS = 1; @@ -49,7 +49,7 @@ interface nsIDOMMouseScrollEvent : nsIDOMMouseEvent void initMouseScrollEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg, in long screenXArg, in long screenYArg, diff --git a/dom/interfaces/events/nsIDOMMozTouchEvent.idl b/dom/interfaces/events/nsIDOMMozTouchEvent.idl index b9439dfa06fc..d9f73c5bc8e8 100644 --- a/dom/interfaces/events/nsIDOMMozTouchEvent.idl +++ b/dom/interfaces/events/nsIDOMMozTouchEvent.idl @@ -40,7 +40,7 @@ #include "nsIDOMMouseEvent.idl" -[scriptable, uuid(9b454391-0190-4313-a070-1e26e9bf6f31)] +[scriptable, uuid(e9ed248b-1995-482f-8407-33ae7744bb9c)] interface nsIDOMMozTouchEvent : nsIDOMMouseEvent { readonly attribute unsigned long streamId; @@ -48,7 +48,7 @@ interface nsIDOMMozTouchEvent : nsIDOMMouseEvent void initMozTouchEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg, in long screenXArg, in long screenYArg, diff --git a/dom/interfaces/events/nsIDOMNSMouseEvent.idl b/dom/interfaces/events/nsIDOMNSMouseEvent.idl index a9b54780d177..abf10c770905 100644 --- a/dom/interfaces/events/nsIDOMNSMouseEvent.idl +++ b/dom/interfaces/events/nsIDOMNSMouseEvent.idl @@ -43,7 +43,7 @@ * by providing various information related to the mouse event. */ -[scriptable, uuid(f5dd5fbb-f4ff-4277-819c-f31aa1dafc32)] +[scriptable, uuid(8418a402-3c9b-431a-80a7-a59b23ed57a0)] interface nsIDOMNSMouseEvent : nsIDOMMouseEvent { // Finger or touch pressure event value @@ -63,7 +63,7 @@ interface nsIDOMNSMouseEvent : nsIDOMMouseEvent void initNSMouseEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg, in long screenXArg, in long screenYArg, diff --git a/dom/interfaces/events/nsIDOMScrollAreaEvent.idl b/dom/interfaces/events/nsIDOMScrollAreaEvent.idl index 0cbc870b8425..b4ad5b9fd174 100644 --- a/dom/interfaces/events/nsIDOMScrollAreaEvent.idl +++ b/dom/interfaces/events/nsIDOMScrollAreaEvent.idl @@ -37,7 +37,7 @@ #include "nsIDOMUIEvent.idl" -[scriptable, uuid(b2f49035-4a2f-4e62-8fb0-deb68b0de4d9)] +[scriptable, uuid(911c3352-6690-421c-9bbe-6bd34f1600dc)] interface nsIDOMScrollAreaEvent : nsIDOMUIEvent { // Scroll area client rect @@ -49,7 +49,7 @@ interface nsIDOMScrollAreaEvent : nsIDOMUIEvent void initScrollAreaEvent(in DOMString aEventType, in boolean aCanBubble, in boolean aCancelable, - in nsIDOMAbstractView aView, + in nsIDOMWindow aView, in long aDetail, in float x, in float y, diff --git a/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl b/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl index 91d1ac23d461..625acd43b056 100644 --- a/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl +++ b/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl @@ -97,7 +97,7 @@ * consuming events. */ -[scriptable, uuid(cb68e879-f710-415d-a871-9a550860df01)] +[scriptable, uuid(fe6b7df3-be7c-4a0b-99a2-da84e956e2f5)] interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent { /* Swipe direction constants */ @@ -148,7 +148,7 @@ interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent void initSimpleGestureEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg, in long screenXArg, in long screenYArg, diff --git a/dom/interfaces/events/nsIDOMTouchEvent.idl b/dom/interfaces/events/nsIDOMTouchEvent.idl index e3a25ad17cda..7001a7695954 100644 --- a/dom/interfaces/events/nsIDOMTouchEvent.idl +++ b/dom/interfaces/events/nsIDOMTouchEvent.idl @@ -77,7 +77,7 @@ interface nsIDOMTouchEvent : nsIDOMUIEvent { void initTouchEvent(in DOMString type, in boolean canBubble, in boolean cancelable, - in nsIDOMAbstractView view, + in nsIDOMWindow view, in long detail, in boolean ctrlKey, in boolean altKey, @@ -88,9 +88,9 @@ interface nsIDOMTouchEvent : nsIDOMUIEvent { in nsIDOMTouchList changedTouches); }; -[scriptable, uuid(922e0f11-28b9-4560-9fb8-869fe143845f)] +[scriptable, uuid(804a3851-ea2e-4e5f-bedd-315f37f31ab1)] interface nsIDOMDocumentTouch : nsISupports { - nsIDOMTouch createTouch([optional] in nsIDOMAbstractView view, + nsIDOMTouch createTouch([optional] in nsIDOMWindow view, [optional] in nsIDOMEventTarget target, [optional] in long identifier, [optional] in long pageX, diff --git a/dom/interfaces/events/nsIDOMUIEvent.idl b/dom/interfaces/events/nsIDOMUIEvent.idl index cbd86bfe10dd..155858d1964c 100644 --- a/dom/interfaces/events/nsIDOMUIEvent.idl +++ b/dom/interfaces/events/nsIDOMUIEvent.idl @@ -47,14 +47,14 @@ * http://www.w3.org/TR/DOM-Level-2-Events/ */ -[scriptable, uuid(a6cf90c3-15b3-11d2-932e-00805f8add32)] +[scriptable, uuid(25f28689-3f78-47e8-8d76-15b936faf8c1)] interface nsIDOMUIEvent : nsIDOMEvent { - readonly attribute nsIDOMAbstractView view; + readonly attribute nsIDOMWindow view; readonly attribute long detail; void initUIEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg); }; diff --git a/dom/interfaces/html/nsIDOMHTMLDocument.idl b/dom/interfaces/html/nsIDOMHTMLDocument.idl index 53972ff95ae9..bc957bec92d6 100644 --- a/dom/interfaces/html/nsIDOMHTMLDocument.idl +++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl @@ -50,7 +50,7 @@ * http://www.whatwg.org/specs/web-apps/current-work/ */ -[scriptable, uuid(2d7a0f2e-6b1c-4e93-bbea-122eb0a8a513)] +[scriptable, uuid(42bb545e-be46-4f4f-8c0a-6c948ea0c1d4)] interface nsIDOMHTMLDocument : nsIDOMDocument { attribute DOMString title; diff --git a/dom/interfaces/smil/nsIDOMTimeEvent.idl b/dom/interfaces/smil/nsIDOMTimeEvent.idl index af1e5bc5ea09..086b7aebe23f 100644 --- a/dom/interfaces/smil/nsIDOMTimeEvent.idl +++ b/dom/interfaces/smil/nsIDOMTimeEvent.idl @@ -45,13 +45,13 @@ * http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent */ -[scriptable, uuid(0d309c26-ddbb-44cb-9af1-3008972349e3)] +[scriptable, uuid(873785cc-d8be-48af-8b30-5c566e3f4e6e)] interface nsIDOMTimeEvent : nsIDOMEvent { readonly attribute long detail; - readonly attribute nsIDOMAbstractView view; + readonly attribute nsIDOMWindow view; void initTimeEvent(in DOMString typeArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg); }; diff --git a/dom/interfaces/svg/nsIDOMSVGDocument.idl b/dom/interfaces/svg/nsIDOMSVGDocument.idl index 89aff8b4048f..78faa0f9b0db 100644 --- a/dom/interfaces/svg/nsIDOMSVGDocument.idl +++ b/dom/interfaces/svg/nsIDOMSVGDocument.idl @@ -39,7 +39,7 @@ interface nsIDOMSVGSVGElement; -[scriptable, uuid(dcac0765-b258-4e0b-9862-6470eb9876ba)] +[scriptable, uuid(907f1ada-5ace-4789-8c25-0c79f251044d)] interface nsIDOMSVGDocument : nsIDOMDocument /* , nsIDOMDocumentEvent */ { diff --git a/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl b/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl index edf22923df90..839845422287 100644 --- a/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl +++ b/dom/interfaces/svg/nsIDOMSVGZoomEvent.idl @@ -45,7 +45,7 @@ interface nsIDOMSVGRect; interface nsIDOMSVGPoint; -[scriptable, uuid(339a8c7a-552e-4cbc-8d96-8370a3939358)] +[scriptable, uuid(7298880d-127d-470d-a8ac-e5a8e5969270)] interface nsIDOMSVGZoomEvent : nsIDOMUIEvent { readonly attribute nsIDOMSVGRect zoomRectScreen; diff --git a/dom/interfaces/views/Makefile.in b/dom/interfaces/views/Makefile.in deleted file mode 100644 index 6137d4a5c4fc..000000000000 --- a/dom/interfaces/views/Makefile.in +++ /dev/null @@ -1,54 +0,0 @@ -# -# ***** 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) 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 ***** - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = dom -XPIDL_MODULE = dom_views -GRE_MODULE = 1 - -SDK_XPIDLSRCS = \ - nsIDOMDocumentView.idl \ - nsIDOMAbstractView.idl \ - $(NULL) - -include $(topsrcdir)/config/rules.mk diff --git a/dom/interfaces/views/nsIDOMAbstractView.idl b/dom/interfaces/views/nsIDOMAbstractView.idl deleted file mode 100644 index eedc3e05384d..000000000000 --- a/dom/interfaces/views/nsIDOMAbstractView.idl +++ /dev/null @@ -1,53 +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): - * Johnny Stenback (original author) - * - * 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" - -/** - * The nsIDOMAbstractView interface is a datatype for a view in the - * Document Object Model. - * - * For more information on this interface please see - * http://www.w3.org/TR/DOM-Level-2-Views - */ - -[scriptable, uuid(F51EBADE-8B1A-11D3-AAE7-0010830123B4)] -interface nsIDOMAbstractView : nsISupports -{ - readonly attribute nsIDOMDocumentView document; -}; diff --git a/dom/interfaces/views/nsIDOMDocumentView.idl b/dom/interfaces/views/nsIDOMDocumentView.idl deleted file mode 100644 index a78ef779be65..000000000000 --- a/dom/interfaces/views/nsIDOMDocumentView.idl +++ /dev/null @@ -1,54 +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): - * Johnny Stenback (original author) - * - * 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" - -/** - * The nsIDOMDocumentView interface is a datatype for a document that - * supports views in the Document Object Model. - * - * For more information on this interface please see - * http://www.w3.org/TR/DOM-Level-2-Views - */ - -[scriptable, uuid(1ACDB2BA-1DD2-11B2-95BC-9542495D2569)] -interface nsIDOMDocumentView : nsISupports -{ - readonly attribute nsIDOMAbstractView defaultView; -}; - diff --git a/dom/interfaces/xul/nsIDOMXULCommandEvent.idl b/dom/interfaces/xul/nsIDOMXULCommandEvent.idl index 0f8263a3344a..803857f05fb3 100644 --- a/dom/interfaces/xul/nsIDOMXULCommandEvent.idl +++ b/dom/interfaces/xul/nsIDOMXULCommandEvent.idl @@ -43,7 +43,7 @@ #include "nsIDOMUIEvent.idl" -[scriptable, uuid(f9fa8205-a988-4828-9228-f3332d5475ac)] +[scriptable, uuid(1d78da1e-2177-4b8f-9b11-41e78d1e60f7)] interface nsIDOMXULCommandEvent : nsIDOMUIEvent { /** @@ -68,7 +68,7 @@ interface nsIDOMXULCommandEvent : nsIDOMUIEvent void initCommandEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, - in nsIDOMAbstractView viewArg, + in nsIDOMWindow viewArg, in long detailArg, in boolean ctrlKeyArg, in boolean altKeyArg, diff --git a/editor/libeditor/html/nsHTMLAbsPosition.cpp b/editor/libeditor/html/nsHTMLAbsPosition.cpp index c3b72590d251..5c685dc5cc11 100644 --- a/editor/libeditor/html/nsHTMLAbsPosition.cpp +++ b/editor/libeditor/html/nsHTMLAbsPosition.cpp @@ -690,13 +690,14 @@ nsHTMLEditor::CheckPositionedElementBGandFG(nsIDOMElement * aElement, bgColorStr); NS_ENSURE_SUCCESS(res, res); if (bgColorStr.EqualsLiteral("transparent")) { + nsCOMPtr window; + res = mHTMLCSSUtils->GetDefaultViewCSS(aElement, getter_AddRefs(window)); + NS_ENSURE_SUCCESS(res, res); - nsCOMPtr viewCSS; - res = mHTMLCSSUtils->GetDefaultViewCSS(aElement, getter_AddRefs(viewCSS)); - NS_ENSURE_SUCCESS(res, res); nsCOMPtr cssDecl; - res = viewCSS->GetComputedStyle(aElement, EmptyString(), getter_AddRefs(cssDecl)); + res = window->GetComputedStyle(aElement, EmptyString(), getter_AddRefs(cssDecl)); NS_ENSURE_SUCCESS(res, res); + // from these declarations, get the one we want and that one only nsCOMPtr colorCssValue; res = cssDecl->GetPropertyCSSValue(NS_LITERAL_STRING("color"), getter_AddRefs(colorCssValue)); diff --git a/editor/libeditor/html/nsHTMLAnonymousUtils.cpp b/editor/libeditor/html/nsHTMLAnonymousUtils.cpp index 79a0f6924281..b7aea69a67d4 100644 --- a/editor/libeditor/html/nsHTMLAnonymousUtils.cpp +++ b/editor/libeditor/html/nsHTMLAnonymousUtils.cpp @@ -430,13 +430,13 @@ nsHTMLEditor::GetPositionAndDimensions(nsIDOMElement * aElement, // Yes, it is absolutely positioned mResizedObjectIsAbsolutelyPositioned = PR_TRUE; - nsCOMPtr viewCSS; - res = mHTMLCSSUtils->GetDefaultViewCSS(aElement, getter_AddRefs(viewCSS)); - NS_ENSURE_TRUE(viewCSS, NS_ERROR_FAILURE); + nsCOMPtr window; + res = mHTMLCSSUtils->GetDefaultViewCSS(aElement, getter_AddRefs(window)); + NS_ENSURE_TRUE(window, NS_ERROR_FAILURE); nsCOMPtr cssDecl; // Get the all the computed css styles attached to the element node - res = viewCSS->GetComputedStyle(aElement, EmptyString(), getter_AddRefs(cssDecl)); + res = window->GetComputedStyle(aElement, EmptyString(), getter_AddRefs(cssDecl)); NS_ENSURE_SUCCESS(res, res); aBorderLeft = GetCSSFloatValue(cssDecl, NS_LITERAL_STRING("border-left-width")); diff --git a/editor/libeditor/html/nsHTMLCSSUtils.cpp b/editor/libeditor/html/nsHTMLCSSUtils.cpp index 884a00d46909..58b8e573db94 100644 --- a/editor/libeditor/html/nsHTMLCSSUtils.cpp +++ b/editor/libeditor/html/nsHTMLCSSUtils.cpp @@ -47,7 +47,6 @@ #include "nsIDOMElement.h" #include "nsIDOMElementCSSInlineStyle.h" #include "nsIDOMDocument.h" -#include "nsIDOMDocumentView.h" #include "nsIContent.h" #include "nsIAtom.h" #include "nsTextEditUtils.h" @@ -538,35 +537,36 @@ nsresult nsHTMLCSSUtils::GetComputedProperty(nsIDOMNode *aNode, nsIAtom *aProperty, nsAString & aValue) { - nsCOMPtr viewCSS = nsnull; - nsresult res = GetDefaultViewCSS(aNode, getter_AddRefs(viewCSS)); + nsCOMPtr window; + nsresult res = GetDefaultViewCSS(aNode, getter_AddRefs(window)); NS_ENSURE_SUCCESS(res, res); - return GetCSSInlinePropertyBase(aNode, aProperty, aValue, viewCSS, COMPUTED_STYLE_TYPE); + return GetCSSInlinePropertyBase(aNode, aProperty, aValue, window, COMPUTED_STYLE_TYPE); } nsresult nsHTMLCSSUtils::GetCSSInlinePropertyBase(nsIDOMNode *aNode, nsIAtom *aProperty, - nsAString &aValue, - nsIDOMViewCSS *aViewCSS, - PRUint8 aStyleType) + nsAString& aValue, + nsIDOMWindow* aWindow, + PRUint8 aStyleType) { aValue.Truncate(); NS_ENSURE_TRUE(aProperty, NS_ERROR_NULL_POINTER); - nsCOMPtrelement; + nsCOMPtr element; nsresult res = GetElementContainerOrSelf(aNode, getter_AddRefs(element)); NS_ENSURE_SUCCESS(res, res); switch (aStyleType) { case COMPUTED_STYLE_TYPE: - if (element && aViewCSS) { + if (element && aWindow) { nsAutoString value, propString; nsCOMPtr cssDecl; aProperty->ToString(propString); // Get the all the computed css styles attached to the element node - res = aViewCSS->GetComputedStyle(element, EmptyString(), getter_AddRefs(cssDecl)); - if (NS_FAILED(res) || !cssDecl) return res; + res = aWindow->GetComputedStyle(element, EmptyString(), getter_AddRefs(cssDecl)); + if (NS_FAILED(res) || !cssDecl) + return res; // from these declarations, get the one we want and that one only res = cssDecl->GetPropertyValue(propString, value); NS_ENSURE_SUCCESS(res, res); @@ -591,33 +591,29 @@ nsHTMLCSSUtils::GetCSSInlinePropertyBase(nsIDOMNode *aNode, nsIAtom *aProperty, } nsresult -nsHTMLCSSUtils::GetDefaultViewCSS(nsIDOMNode *aNode, nsIDOMViewCSS **aViewCSS) +nsHTMLCSSUtils::GetDefaultViewCSS(nsIDOMNode *aNode, nsIDOMWindow **aViewCSS) { - nsCOMPtrelement; + nsCOMPtr element; nsresult res = GetElementContainerOrSelf(aNode, getter_AddRefs(element)); NS_ENSURE_SUCCESS(res, res); - // if we have an element node - if (element) { - // find the owner document - nsCOMPtr doc; - nsCOMPtr node = do_QueryInterface(element); - res = node->GetOwnerDocument(getter_AddRefs(doc)); - NS_ENSURE_SUCCESS(res, res); - if (doc) { - nsCOMPtr documentView = do_QueryInterface(doc); - nsCOMPtr abstractView; - // from the document, get the abtractView - res = documentView->GetDefaultView(getter_AddRefs(abstractView)); - NS_ENSURE_SUCCESS(res, res); - if (abstractView) { - // from the abstractView, get the CSS view - CallQueryInterface(abstractView, aViewCSS); - return NS_OK; - } - } - } + // TODO: move this initialization to the top of the function *aViewCSS = nsnull; + if (!element) { + return NS_OK; + } + // find the owner document + nsCOMPtr doc; + nsCOMPtr node = do_QueryInterface(element); + res = node->GetOwnerDocument(getter_AddRefs(doc)); + NS_ENSURE_SUCCESS(res, res); + if (!doc) { + return NS_OK; + } + nsCOMPtr window; + res = doc->GetDefaultView(getter_AddRefs(window)); + NS_ENSURE_SUCCESS(res, res); + window.forget(aViewCSS); return NS_OK; } @@ -1087,9 +1083,9 @@ nsHTMLCSSUtils::GetCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode, if (theElement && IsCSSEditableProperty(theElement, aHTMLProperty, aAttribute)) { // Yes, the requested HTML style has a CSS equivalence in this implementation // Retrieve the default ViewCSS if we are asked for computed styles - nsCOMPtr viewCSS = nsnull; + nsCOMPtr window; if (COMPUTED_STYLE_TYPE == aStyleType) { - res = GetDefaultViewCSS(theElement, getter_AddRefs(viewCSS)); + res = GetDefaultViewCSS(theElement, getter_AddRefs(window)); NS_ENSURE_SUCCESS(res, res); } nsTArray cssPropertyArray; @@ -1104,7 +1100,7 @@ nsHTMLCSSUtils::GetCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode, nsAutoString valueString; // retrieve the specified/computed value of the property res = GetCSSInlinePropertyBase(theElement, cssPropertyArray[index], - valueString, viewCSS, aStyleType); + valueString, window, aStyleType); NS_ENSURE_SUCCESS(res, res); // append the value to aValueString (possibly with a leading whitespace) if (index) aValueString.Append(PRUnichar(' ')); diff --git a/editor/libeditor/html/nsHTMLCSSUtils.h b/editor/libeditor/html/nsHTMLCSSUtils.h index f310aecf544a..54ddf2ea7994 100644 --- a/editor/libeditor/html/nsHTMLCSSUtils.h +++ b/editor/libeditor/html/nsHTMLCSSUtils.h @@ -42,7 +42,6 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsTArray.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMNode.h" #include "nsIDOMElement.h" #include "nsIHTMLEditor.h" @@ -54,6 +53,7 @@ #define COMPUTED_STYLE_TYPE 2 class nsHTMLEditor; +class nsIDOMWindow; typedef void (*nsProcessValueFunc)(const nsAString * aInputString, nsAString & aOutputString, const char * aDefaultValueString, @@ -312,12 +312,13 @@ public: */ nsresult GetElementContainerOrSelf(nsIDOMNode * aNode, nsIDOMElement ** aElement); - /** Gets the default DOMView for a given node + /** + * Gets the default Window for a given node. * - * @param aNode the node we want the default DOMView for - * @param aViewCSS [OUT] the default DOMViewCSS + * @param aNode the node we want the default Window for + * @param aWindow [OUT] the default Window */ - nsresult GetDefaultViewCSS(nsIDOMNode * aNode, nsIDOMViewCSS ** aViewCSS); + nsresult GetDefaultViewCSS(nsIDOMNode* aNode, nsIDOMWindow** aWindow); private: @@ -383,17 +384,17 @@ private: PRBool aRemoveProperty); /** back-end for GetSpecifiedProperty and GetComputedProperty - * - * @param aNode [IN] a DOM node - * @param aProperty [IN] a CSS property - * @param aValue [OUT] the retrieved value for this property - * @param aViewCSS [IN] the ViewCSS we need in case we query computed styles - * @param aStyleType [IN] SPECIFIED_STYLE_TYPE to query the specified style values - COMPUTED_STYLE_TYPE to query the computed style values - */ + * + * @param aNode [IN] a DOM node + * @param aProperty [IN] a CSS property + * @param aValue [OUT] the retrieved value for this property + * @param aWindow [IN] the window we need in case we query computed styles + * @param aStyleType [IN] SPECIFIED_STYLE_TYPE to query the specified style values + * COMPUTED_STYLE_TYPE to query the computed style values + */ nsresult GetCSSInlinePropertyBase(nsIDOMNode * aNode, nsIAtom * aProperty, nsAString & aValue, - nsIDOMViewCSS * aViewCSS, + nsIDOMWindow* aWindow, PRUint8 aStyleType); diff --git a/embedding/browser/webBrowser/nsContextMenuInfo.cpp b/embedding/browser/webBrowser/nsContextMenuInfo.cpp index f3fb991e7aff..6455ee172d5d 100644 --- a/embedding/browser/webBrowser/nsContextMenuInfo.cpp +++ b/embedding/browser/webBrowser/nsContextMenuInfo.cpp @@ -1,6 +1,5 @@ -/* -*- Mode: C++; tab-width: 2; 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 @@ -24,6 +23,7 @@ * Chris Saari * Conrad Carlen * Pierre Chanial + * Ms2ger * * 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 @@ -51,9 +51,7 @@ #include "nsIDOMHTMLImageElement.h" #include "nsIDOMHTMLAreaElement.h" #include "nsIDOMHTMLLinkElement.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMAbstractView.h" -#include "nsIDOMViewCSS.h" +#include "nsIDOMWindow.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsIDOMCSSValue.h" #include "nsIDOMCSSPrimitiveValue.h" @@ -293,13 +291,11 @@ nsContextMenuInfo::GetBackgroundImageRequestInternal(nsIDOMNode *aDOMNode, imgIR nsCOMPtr document; domNode->GetOwnerDocument(getter_AddRefs(document)); - nsCOMPtr docView(do_QueryInterface(document)); - NS_ENSURE_TRUE(docView, NS_ERROR_FAILURE); + NS_ENSURE_TRUE(document, NS_ERROR_FAILURE); - nsCOMPtr defaultView; - docView->GetDefaultView(getter_AddRefs(defaultView)); - nsCOMPtr defaultCSSView(do_QueryInterface(defaultView)); - NS_ENSURE_TRUE(defaultCSSView, NS_ERROR_FAILURE); + nsCOMPtr window; + document->GetDefaultView(getter_AddRefs(window)); + NS_ENSURE_TRUE(window, NS_ERROR_FAILURE); nsCOMPtr primitiveValue; nsAutoString bgStringValue; @@ -327,8 +323,8 @@ nsContextMenuInfo::GetBackgroundImageRequestInternal(nsIDOMNode *aDOMNode, imgIR break; nsCOMPtr computedStyle; - defaultCSSView->GetComputedStyle(domElement, EmptyString(), - getter_AddRefs(computedStyle)); + window->GetComputedStyle(domElement, EmptyString(), + getter_AddRefs(computedStyle)); if (computedStyle) { nsCOMPtr cssValue; computedStyle->GetPropertyCSSValue(NS_LITERAL_STRING("background-image"), diff --git a/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp b/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp index 2ca15167ecff..7ab425a2151f 100644 --- a/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp +++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp @@ -21,6 +21,7 @@ * Contributor(s): * Brett Wilson (original author) * Robert O'Callahan + * Ms2ger * * 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 @@ -41,7 +42,6 @@ #include "nsIAtom.h" #include "nsComponentManagerUtils.h" #include "nsIDOMCSSStyleDeclaration.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMElement.h" #include "nsIDOMNSRange.h" #include "nsIDOMRange.h" @@ -102,15 +102,14 @@ mozInlineSpellWordUtil::Init(nsWeakPtr aWeakEditor) mDOMDocumentRange = do_QueryInterface(domDoc, &rv); NS_ENSURE_SUCCESS(rv, rv); - // view - nsCOMPtr docView = do_QueryInterface(domDoc, &rv); - NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr abstractView; - rv = docView->GetDefaultView(getter_AddRefs(abstractView)); - NS_ENSURE_SUCCESS(rv, rv); - mCSSView = do_QueryInterface(abstractView, &rv); + // Window + nsCOMPtr window; + rv = domDoc->GetDefaultView(getter_AddRefs(window)); NS_ENSURE_SUCCESS(rv, rv); + mCSSView = window; + NS_ENSURE_TRUE(window, NS_ERROR_NULL_POINTER); + // Find the root node for the editor. For contenteditable we'll need something // cleverer here. nsCOMPtr rootElt; @@ -498,7 +497,7 @@ ContainsDOMWordSeparator(nsIDOMNode* aNode, PRInt32 aBeforeOffset, } static PRBool -IsBreakElement(nsIDOMViewCSS* aDocView, nsIDOMNode* aNode) +IsBreakElement(nsIDOMWindow* aDocView, nsIDOMNode* aNode) { nsCOMPtr element = do_QueryInterface(aNode); if (!element) @@ -537,8 +536,8 @@ IsBreakElement(nsIDOMViewCSS* aDocView, nsIDOMNode* aNode) } struct CheckLeavingBreakElementClosure { - nsIDOMViewCSS* mDocView; - PRPackedBool mLeftBreakElement; + nsIDOMWindow* mDocView; + PRPackedBool mLeftBreakElement; }; static void diff --git a/extensions/spellcheck/src/mozInlineSpellWordUtil.h b/extensions/spellcheck/src/mozInlineSpellWordUtil.h index 9591f8f530ea..8cedaecc7732 100644 --- a/extensions/spellcheck/src/mozInlineSpellWordUtil.h +++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.h @@ -38,7 +38,6 @@ #include "nsCOMPtr.h" #include "nsIDOMDocument.h" #include "nsIDOMDocumentRange.h" -#include "nsIDOMViewCSS.h" #include "nsIDocument.h" #include "nsString.h" #include "nsTArray.h" @@ -126,7 +125,7 @@ private: // cached stuff for the editor, set by Init nsCOMPtr mDOMDocumentRange; nsCOMPtr mDocument; - nsCOMPtr mCSSView; + nsCOMPtr mCSSView; nsCOMPtr mCategories; // range to check, see SetRange diff --git a/extensions/widgetutils/src/nsWidgetUtils.cpp b/extensions/widgetutils/src/nsWidgetUtils.cpp index 57cf60749829..affc72cdc0cf 100644 --- a/extensions/widgetutils/src/nsWidgetUtils.cpp +++ b/extensions/widgetutils/src/nsWidgetUtils.cpp @@ -22,6 +22,7 @@ * Contributor(s): * Oleg Romashin (original author) * Brad Lassey + * Ms2ger * * 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 @@ -39,9 +40,7 @@ #include "nsCURILoader.h" #include "nsICategoryManager.h" -#include "nsIDOMAbstractView.h" #include "nsIDOMDocument.h" -#include "nsIDOMDocumentView.h" #include "nsIDOMHTMLElement.h" #include "nsIDOMHTMLIFrameElement.h" #include "nsIDOMNSDocument.h" @@ -68,7 +67,6 @@ #include "nsIDOMEventTarget.h" #include "nsPIDOMWindow.h" #include "nsIDOMWindow.h" -//#include ".h" #include "nsIDOM3EventTarget.h" #include "nsIDOMKeyListener.h" #include "nsIDOMCompositionListener.h" @@ -428,28 +426,24 @@ nsWidgetUtils::IsXULNode(nsIDOMNode *aNode, PRUint32 *aType) } nsresult -nsWidgetUtils::GetDOMWindowByNode(nsIDOMNode *aNode, nsIDOMWindow * *aDOMWindow) +nsWidgetUtils::GetDOMWindowByNode(nsIDOMNode* aNode, nsIDOMWindow** aDOMWindow) { - nsresult rv; nsCOMPtr nodeDoc; - rv = aNode->GetOwnerDocument(getter_AddRefs(nodeDoc)); + nsresult rv = aNode->GetOwnerDocument(getter_AddRefs(nodeDoc)); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr docView = do_QueryInterface(nodeDoc, &rv); + NS_ENSURE_TRUE(nodeDoc, NS_ERROR_NULL_POINTER); + + nsCOMPtr window; + rv = nodeDoc->GetDefaultView(getter_AddRefs(window)); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr absView; - NS_ENSURE_SUCCESS(rv, rv); - rv = docView->GetDefaultView(getter_AddRefs(absView)); - NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr window = do_QueryInterface(absView, &rv); - NS_ENSURE_SUCCESS(rv, rv); - *aDOMWindow = window; - NS_IF_ADDREF(*aDOMWindow); + NS_ENSURE_TRUE(window, NS_ERROR_NULL_POINTER); + window.forget(aDOMWindow); return rv; } void nsWidgetUtils::GetChromeEventHandler(nsIDOMWindow *aDOMWin, - nsIDOMEventTarget **aChromeTarget) + nsIDOMEventTarget **aChromeTarget) { nsCOMPtr privateDOMWindow(do_QueryInterface(aDOMWin)); nsPIDOMEventTarget* chromeEventHandler = nsnull; diff --git a/js/src/xpconnect/src/dom_quickstubs.qsconf b/js/src/xpconnect/src/dom_quickstubs.qsconf index 22585da2bb60..cbae578eccbf 100644 --- a/js/src/xpconnect/src/dom_quickstubs.qsconf +++ b/js/src/xpconnect/src/dom_quickstubs.qsconf @@ -71,6 +71,7 @@ members = [ #'nsIDOMWindow.document', 'nsIDOMWindow.getSelection', 'nsIDOMWindow.scrollByLines', + 'nsIDOMWindow.getComputedStyle', 'nsIDOMJSWindow.dump', 'nsIDOMScreen.top', 'nsIDOMScreen.height', @@ -108,6 +109,7 @@ members = [ 'nsIDOMDocument.createTextNode', 'nsIDOMDocument.documentURI', 'nsIDOMDocument.adoptNode', + 'nsIDOMDocument.defaultView', 'nsIDOMElement.removeAttributeNS', 'nsIDOMElement.removeAttribute', 'nsIDOMElement.getAttribute', @@ -173,7 +175,6 @@ members = [ 'nsIDOMElementCSSInlineStyle.*', 'nsIDOMCSS2Properties.*', 'nsIDOMRect.*', - 'nsIDOMViewCSS.getComputedStyle', 'nsIDOMCSSStyleDeclaration.*', # dom/interfaces/events @@ -390,9 +391,6 @@ members = [ 'nsIDOMDocumentTraversal.createNodeIterator', 'nsIDOMNodeIterator.nextNode', - # dom/interfaces/views - 'nsIDOMDocumentView.defaultView', - # dom/interfaces/xbl - None. # dom/interfaces/xpath diff --git a/layout/inspector/src/inLayoutUtils.cpp b/layout/inspector/src/inLayoutUtils.cpp index 111b2bf4febd..7fc4b345af28 100644 --- a/layout/inspector/src/inLayoutUtils.cpp +++ b/layout/inspector/src/inLayoutUtils.cpp @@ -37,8 +37,6 @@ #include "inLayoutUtils.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMAbstractView.h" #include "nsIDocument.h" #include "nsIContent.h" #include "nsIContentViewer.h" @@ -60,15 +58,14 @@ inLayoutUtils::GetWindowFor(nsIDOMNode* aNode) nsIDOMWindowInternal* inLayoutUtils::GetWindowFor(nsIDOMDocument* aDoc) { - nsCOMPtr doc = do_QueryInterface(aDoc); - if (!doc) return nsnull; + nsCOMPtr window; + aDoc->GetDefaultView(getter_AddRefs(window)); + if (!window) { + return nsnull; + } - nsCOMPtr view; - doc->GetDefaultView(getter_AddRefs(view)); - if (!view) return nsnull; - - nsCOMPtr window = do_QueryInterface(view); - return window; + nsCOMPtr windowInternal = do_QueryInterface(window); + return windowInternal; } nsIPresShell* diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 2ec206d46deb..a16e2b5f3b65 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -70,7 +70,6 @@ MAKEFILES_dom=" dom/interfaces/stylesheets/Makefile dom/interfaces/threads/Makefile dom/interfaces/traversal/Makefile - dom/interfaces/views/Makefile dom/interfaces/xbl/Makefile dom/interfaces/xpath/Makefile dom/interfaces/xul/Makefile diff --git a/widget/src/cocoa/nsMenuItemIconX.mm b/widget/src/cocoa/nsMenuItemIconX.mm index 343d5b551ffd..3605a8c89d23 100644 --- a/widget/src/cocoa/nsMenuItemIconX.mm +++ b/widget/src/cocoa/nsMenuItemIconX.mm @@ -49,8 +49,6 @@ #include "nsIDocument.h" #include "nsINameSpaceManager.h" #include "nsWidgetAtoms.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMElement.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsIDOMCSSValue.h" @@ -201,24 +199,27 @@ nsMenuItemIconX::GetIconURI(nsIURI** aIconURI) if (!hasImageAttr) { // If the content node has no "image" attribute, get the // "list-style-image" property from CSS. - nsCOMPtr domDocumentView = - do_QueryInterface(mContent->GetDocument()); - if (!domDocumentView) return NS_ERROR_FAILURE; + nsCOMPtr domDocument = + do_QueryInterface(mContent->GetDocument()); + if (!domDocument) + return NS_ERROR_FAILURE; - nsCOMPtr domAbstractView; - rv = domDocumentView->GetDefaultView(getter_AddRefs(domAbstractView)); - if (NS_FAILED(rv)) return rv; - - nsCOMPtr domViewCSS = do_QueryInterface(domAbstractView); - if (!domViewCSS) return NS_ERROR_FAILURE; + nsCOMPtr window; + rv = domDocument->GetDefaultView(getter_AddRefs(window)); + if (NS_FAILED(rv)) + return rv; + if (!window) + return NS_ERROR_FAILURE; nsCOMPtr domElement = do_QueryInterface(mContent); - if (!domElement) return NS_ERROR_FAILURE; + if (!domElement) + return NS_ERROR_FAILURE; - rv = domViewCSS->GetComputedStyle(domElement, EmptyString(), - getter_AddRefs(cssStyleDecl)); - if (NS_FAILED(rv)) return rv; + rv = window->GetComputedStyle(domElement, EmptyString(), + getter_AddRefs(cssStyleDecl)); + if (NS_FAILED(rv)) + return rv; NS_NAMED_LITERAL_STRING(listStyleImage, "list-style-image"); rv = cssStyleDecl->GetPropertyCSSValue(listStyleImage, diff --git a/widget/src/cocoa/nsMenuUtilsX.mm b/widget/src/cocoa/nsMenuUtilsX.mm index f05a50914343..eecef2c4f284 100644 --- a/widget/src/cocoa/nsMenuUtilsX.mm +++ b/widget/src/cocoa/nsMenuUtilsX.mm @@ -51,7 +51,6 @@ #include "nsIDOMXULCommandEvent.h" #include "nsIPrivateDOMEvent.h" #include "nsPIDOMWindow.h" -#include "nsIDOMAbstractView.h" void nsMenuUtilsX::DispatchCommandTo(nsIContent* aTargetContent) { @@ -66,13 +65,13 @@ void nsMenuUtilsX::DispatchCommandTo(nsIContent* aTargetContent) getter_AddRefs(event)); nsCOMPtr command = do_QueryInterface(event); nsCOMPtr pEvent = do_QueryInterface(command); - nsCOMPtr view = do_QueryInterface(doc->GetWindow()); // FIXME: Should probably figure out how to init this with the actual // pressed keys, but this is a big old edge case anyway. -dwh if (pEvent && NS_SUCCEEDED(command->InitCommandEvent(NS_LITERAL_STRING("command"), - PR_TRUE, PR_TRUE, view, 0, + PR_TRUE, PR_TRUE, + doc->GetWindow(), 0, PR_FALSE, PR_FALSE, PR_FALSE, PR_FALSE, nsnull))) { pEvent->SetTrusted(PR_TRUE); diff --git a/xpfe/appshell/src/nsXULWindow.cpp b/xpfe/appshell/src/nsXULWindow.cpp index 9d5f889aa67c..59262b0cfe50 100644 --- a/xpfe/appshell/src/nsXULWindow.cpp +++ b/xpfe/appshell/src/nsXULWindow.cpp @@ -1,7 +1,6 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 ci et: */ -/* - * ***** BEGIN LICENSE BLOCK ***** +/* ***** 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 @@ -84,8 +83,6 @@ #include "nsIScriptSecurityManager.h" #include "nsIWindowWatcher.h" #include "nsIURI.h" -#include "nsIDOMDocumentView.h" -#include "nsIDOMViewCSS.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsITimelineService.h" #include "nsAppShellCID.h"