From b50408b623a0ca8b6b29d30aac8151dbb5fd2b51 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@18797224-902f-48f8-a5cc-f745e15eee43> Date: Tue, 3 Jul 2001 04:41:16 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'MOZILLA_0_9_2_BRANCH'. git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_2_BRANCH@98531 18797224-902f-48f8-a5cc-f745e15eee43 --- .../public/nsIAccessibleDocument.idl | 41 + .../public/nsIAccessibleSelectable.idl | 34 + .../src/html/nsHTMLSelectAccessible.cpp | 792 ++++++++++++++++++ .../src/html/nsHTMLSelectAccessible.h | 72 ++ .../accessible/src/nsHTMLSelectAccessible.cpp | 792 ++++++++++++++++++ .../accessible/src/nsHTMLSelectAccessible.h | 72 ++ .../help/resources/skin/classic/help.css | 46 + .../help/resources/skin/modern/help.css | 117 +++ .../help/resources/skin/modern/home-act.gif | Bin 0 -> 2230 bytes .../help/resources/skin/modern/home-dis.gif | Bin 0 -> 1821 bytes .../help/resources/skin/modern/home-hov.gif | Bin 0 -> 2222 bytes .../help/resources/skin/modern/home.gif | Bin 0 -> 2222 bytes .../help/resources/skin/modern/mast-help.gif | Bin 0 -> 3984 bytes .../transformiix/source/xpath/Expr.cpp | 44 + .../source/xpath/ExprLexerChars.cpp | 372 ++++++++ .../transformiix/source/xpath/UnaryExpr.cpp | 73 ++ .../modern/communicator/icons/lock-mixed.gif | Bin 0 -> 582 bytes .../sidebar/sbtab-lft-btm-act.gif | Bin 0 -> 57 bytes .../sidebar/sbtab-lft-btm-hov.gif | Bin 0 -> 70 bytes .../sidebar/sbtab-lft-btm-sel.gif | Bin 0 -> 49 bytes .../communicator/sidebar/sbtab-lft-btm.gif | Bin 0 -> 49 bytes .../sidebar/sbtab-lft-mid-act.gif | Bin 0 -> 50 bytes .../sidebar/sbtab-lft-mid-hov.gif | Bin 0 -> 44 bytes .../sidebar/sbtab-lft-mid-sel.gif | Bin 0 -> 44 bytes .../communicator/sidebar/sbtab-lft-mid.gif | Bin 0 -> 44 bytes .../sidebar/sbtab-lft-top-act.gif | Bin 0 -> 186 bytes .../sidebar/sbtab-lft-top-hov.gif | Bin 0 -> 183 bytes .../sidebar/sbtab-lft-top-sel.gif | Bin 0 -> 184 bytes .../communicator/sidebar/sbtab-lft-top.gif | Bin 0 -> 184 bytes .../sidebar/sbtab-mid-btm-act.gif | Bin 0 -> 44 bytes .../sidebar/sbtab-mid-btm-hov.gif | Bin 0 -> 50 bytes .../sidebar/sbtab-mid-btm-sel.gif | Bin 0 -> 43 bytes .../communicator/sidebar/sbtab-mid-btm.gif | Bin 0 -> 43 bytes .../sidebar/sbtab-mid-top-act.gif | Bin 0 -> 94 bytes .../sidebar/sbtab-mid-top-hov.gif | Bin 0 -> 94 bytes .../sidebar/sbtab-mid-top-sel.gif | Bin 0 -> 94 bytes .../communicator/sidebar/sbtab-mid-top.gif | Bin 0 -> 94 bytes .../sidebar/sbtab-rit-btm-act.gif | Bin 0 -> 87 bytes .../sidebar/sbtab-rit-btm-hov.gif | Bin 0 -> 69 bytes .../sidebar/sbtab-rit-btm-sel.gif | Bin 0 -> 52 bytes .../communicator/sidebar/sbtab-rit-btm.gif | Bin 0 -> 52 bytes .../sidebar/sbtab-rit-mid-act.gif | Bin 0 -> 72 bytes .../sidebar/sbtab-rit-mid-hov.gif | Bin 0 -> 72 bytes .../sidebar/sbtab-rit-mid-sel.gif | Bin 0 -> 57 bytes .../communicator/sidebar/sbtab-rit-mid.gif | Bin 0 -> 71 bytes .../sidebar/sbtab-rit-top-act.gif | Bin 0 -> 1301 bytes .../sidebar/sbtab-rit-top-hov.gif | Bin 0 -> 1241 bytes .../sidebar/sbtab-rit-top-sel.gif | Bin 0 -> 1262 bytes .../communicator/sidebar/sbtab-rit-top.gif | Bin 0 -> 1130 bytes .../communicator/sidebar/sbtab-ritcap-act.gif | Bin 0 -> 69 bytes .../communicator/sidebar/sbtab-ritcap-hov.gif | Bin 0 -> 68 bytes .../communicator/sidebar/sbtab-ritcap-sel.gif | Bin 0 -> 68 bytes .../communicator/sidebar/sbtab-ritcap.gif | Bin 0 -> 52 bytes .../global/scrollbar/mini-slider-hrz-mid.gif | Bin 0 -> 65 bytes .../global/scrollbar/mini-slider-vrt-mid.gif | Bin 0 -> 65 bytes .../scrollbar/mini-thumb-hrz-grip-act.gif | Bin 0 -> 116 bytes .../scrollbar/mini-thumb-hrz-lft-act.gif | Bin 0 -> 99 bytes .../scrollbar/mini-thumb-hrz-mid-act.gif | Bin 0 -> 65 bytes .../scrollbar/mini-thumb-hrz-rit-act.gif | Bin 0 -> 99 bytes .../scrollbar/mini-thumb-vrt-btm-act.gif | Bin 0 -> 98 bytes .../scrollbar/mini-thumb-vrt-grip-act.gif | Bin 0 -> 115 bytes .../scrollbar/mini-thumb-vrt-mid-act.gif | Bin 0 -> 65 bytes .../scrollbar/mini-thumb-vrt-top-act.gif | Bin 0 -> 97 bytes .../global/scrollbar/slider-hrz-lft.gif | Bin 0 -> 73 bytes .../global/scrollbar/slider-hrz-mid.gif | Bin 0 -> 102 bytes .../global/scrollbar/slider-hrz-rit.gif | Bin 0 -> 74 bytes .../global/scrollbar/slider-vrt-mid.gif | Bin 0 -> 65 bytes .../global/scrollbar/thumb-hrz-grip-act.gif | Bin 0 -> 128 bytes .../global/scrollbar/thumb-hrz-lft-act.gif | Bin 0 -> 104 bytes .../global/scrollbar/thumb-hrz-mid-act.gif | Bin 0 -> 68 bytes .../global/scrollbar/thumb-hrz-rit-act.gif | Bin 0 -> 106 bytes .../global/scrollbar/thumb-vrt-btm-act.gif | Bin 0 -> 105 bytes .../global/scrollbar/thumb-vrt-grip-act.gif | Bin 0 -> 128 bytes .../global/scrollbar/thumb-vrt-mid-act.gif | Bin 0 -> 68 bytes .../global/scrollbar/thumb-vrt-top-act.gif | Bin 0 -> 102 bytes .../themes/modern/global/scrollbars-mini.css | 186 ++++ mozilla/widget/src/windows/SimpleDOMNode.cpp | 436 ++++++++++ mozilla/widget/src/windows/SimpleDOMNode.h | 107 +++ .../ISimpleDOMDocument/ISimpleDOMDocument.def | 7 + .../ISimpleDOMDocument/ISimpleDOMDocument.idl | 108 +++ .../expose/ISimpleDOMDocument/makefile.win | 72 ++ .../expose/ISimpleDOMNode/ISimpleDOMNode.def | 7 + .../expose/ISimpleDOMNode/ISimpleDOMNode.idl | 145 ++++ .../expose/ISimpleDOMNode/makefile.win | 72 ++ .../widget/src/windows/expose/makefile.win | 25 + .../locale/en-US/mac/platformKeys.properties | 18 + .../locale/en-US/os2/platformKeys.properties | 18 + .../locale/en-US/unix/platformKeys.properties | 18 + .../locale/en-US/win/platformKeys.properties | 18 + 89 files changed, 3692 insertions(+) create mode 100644 mozilla/accessible/public/nsIAccessibleDocument.idl create mode 100644 mozilla/accessible/public/nsIAccessibleSelectable.idl create mode 100644 mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp create mode 100644 mozilla/accessible/src/html/nsHTMLSelectAccessible.h create mode 100644 mozilla/accessible/src/nsHTMLSelectAccessible.cpp create mode 100644 mozilla/accessible/src/nsHTMLSelectAccessible.h create mode 100644 mozilla/extensions/help/resources/skin/classic/help.css create mode 100644 mozilla/extensions/help/resources/skin/modern/help.css create mode 100644 mozilla/extensions/help/resources/skin/modern/home-act.gif create mode 100644 mozilla/extensions/help/resources/skin/modern/home-dis.gif create mode 100644 mozilla/extensions/help/resources/skin/modern/home-hov.gif create mode 100644 mozilla/extensions/help/resources/skin/modern/home.gif create mode 100644 mozilla/extensions/help/resources/skin/modern/mast-help.gif create mode 100644 mozilla/extensions/transformiix/source/xpath/Expr.cpp create mode 100644 mozilla/extensions/transformiix/source/xpath/ExprLexerChars.cpp create mode 100644 mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp create mode 100644 mozilla/themes/modern/communicator/icons/lock-mixed.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-lft-top.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-top-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-top-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-top-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-mid-top.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-btm-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-btm-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-btm-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-btm.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-rit-top.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-act.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-hov.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-sel.gif create mode 100644 mozilla/themes/modern/communicator/sidebar/sbtab-ritcap.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-slider-hrz-mid.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-slider-vrt-mid.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-grip-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-lft-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-mid-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-rit-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-vrt-btm-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-vrt-grip-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-vrt-mid-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/mini-thumb-vrt-top-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/slider-hrz-lft.gif create mode 100644 mozilla/themes/modern/global/scrollbar/slider-hrz-mid.gif create mode 100644 mozilla/themes/modern/global/scrollbar/slider-hrz-rit.gif create mode 100644 mozilla/themes/modern/global/scrollbar/slider-vrt-mid.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-hrz-grip-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-hrz-lft-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-hrz-mid-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-hrz-rit-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-vrt-btm-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-vrt-grip-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-vrt-mid-act.gif create mode 100644 mozilla/themes/modern/global/scrollbar/thumb-vrt-top-act.gif create mode 100644 mozilla/themes/modern/global/scrollbars-mini.css create mode 100644 mozilla/widget/src/windows/SimpleDOMNode.cpp create mode 100644 mozilla/widget/src/windows/SimpleDOMNode.h create mode 100644 mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.def create mode 100644 mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.idl create mode 100755 mozilla/widget/src/windows/expose/ISimpleDOMDocument/makefile.win create mode 100644 mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.def create mode 100644 mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.idl create mode 100755 mozilla/widget/src/windows/expose/ISimpleDOMNode/makefile.win create mode 100755 mozilla/widget/src/windows/expose/makefile.win create mode 100644 mozilla/xpfe/global/resources/locale/en-US/mac/platformKeys.properties create mode 100644 mozilla/xpfe/global/resources/locale/en-US/os2/platformKeys.properties create mode 100644 mozilla/xpfe/global/resources/locale/en-US/unix/platformKeys.properties create mode 100644 mozilla/xpfe/global/resources/locale/en-US/win/platformKeys.properties diff --git a/mozilla/accessible/public/nsIAccessibleDocument.idl b/mozilla/accessible/public/nsIAccessibleDocument.idl new file mode 100644 index 00000000000..f3b564a29a9 --- /dev/null +++ b/mozilla/accessible/public/nsIAccessibleDocument.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Aaron Leventhal + * + * Contributor(s): + * John Gaunt + */ + +#include "nsISupports.idl" +#include "nsIAccessible.idl" +#include "domstubs.idl" +interface nsIDocument; + +[scriptable, uuid(8781FC88-355F-4439-881F-6504A0A1CEB6)] +interface nsIAccessibleDocument : nsISupports +{ + readonly attribute DOMString URL; + readonly attribute DOMString title; + readonly attribute DOMString mimeType; + readonly attribute DOMString docType; + DOMString getNameSpaceURIForID(in short nameSpaceID); + [noscript] nsIDocument getDocument(); + +}; diff --git a/mozilla/accessible/public/nsIAccessibleSelectable.idl b/mozilla/accessible/public/nsIAccessibleSelectable.idl new file mode 100644 index 00000000000..45908df85c4 --- /dev/null +++ b/mozilla/accessible/public/nsIAccessibleSelectable.idl @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: John Gaunt (jgaunt@netscape.com) + * + * Contributor(s): + * John Gaunt + */ + +#include "nsISupports.idl" +#include "nsIAccessible.idl" +#include "nsISupportsArray.idl" + +[scriptable, uuid(34d268d6-1dd2-11b2-9d63-83a5e0ada290)] +interface nsIAccessibleSelectable : nsISupports +{ + nsISupportsArray GetSelectedChildren(); +}; diff --git a/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp b/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp new file mode 100644 index 00000000000..7cab0f760ec --- /dev/null +++ b/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp @@ -0,0 +1,792 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Eric Vaughan (evaughan@netscape.com) + * + * Contributor(s): + */ + +#include "nsHTMLSelectAccessible.h" +#include "nsCOMPtr.h" +#include "nsIDocument.h" +#include "nsIPresShell.h" +#include "nsIPresContext.h" +#include "nsIContent.h" +#include "nsIFrame.h" +#include "nsRootAccessible.h" +#include "nsINameSpaceManager.h" +#include "nsIDOMHTMLInputElement.h" +#include "nsLayoutAtoms.h" +#include "nsIDOMMenuListener.h" +#include "nsIDOMEventReceiver.h" +#include "nsReadableUtils.h" +#include "nsIDOMHTMLCollection.h" +#include "nsISelectElement.h" +#include "nsIDOMHTMLSelectElement.h" +#include "nsIAccessibilityService.h" +#include "nsIServiceManager.h" +#include "nsIDOMHTMLOptionElement.h" + +/* + * A class the represents the text field in the Select to the left + * of the drop down button + */ +class nsHTMLSelectTextFieldAccessible : public nsLeafAccessible +{ +public: + + nsHTMLSelectTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccValue(nsAWritableString& _retval); + + virtual void GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame); + + nsCOMPtr mParent; +}; + +/* + * A base class that can listen to menu events. Its used so the + * button and the window accessibles can change there name and role + * depending on whether the drop down list is dropped down on not + */ +class nsMenuListenerAccessible : public nsAccessible, + public nsIDOMMenuListener +{ +public: + + NS_DECL_ISUPPORTS_INHERITED + + nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + virtual ~nsMenuListenerAccessible(); + + // popup listener + NS_IMETHOD Create(nsIDOMEvent* aEvent); + NS_IMETHOD Close(nsIDOMEvent* aEvent); + NS_IMETHOD Destroy(nsIDOMEvent* aEvent); + NS_IMETHOD Action(nsIDOMEvent* aEvent) { return NS_OK; } + NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; } + NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; } + NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; } + + virtual void SetupMenuListener(); + + PRBool mRegistered; + PRBool mOpen; +}; + +NS_IMPL_ISUPPORTS_INHERITED(nsMenuListenerAccessible, nsAccessible, nsIDOMMenuListener) + +/** + * A class that represents the button inside the Select to the right of the text field + */ +class nsHTMLSelectButtonAccessible : public nsMenuListenerAccessible +{ +public: + + nsHTMLSelectButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccName(nsAWritableString& _retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + NS_IMETHOD GetAccChildCount(PRInt32 *_retval); + NS_IMETHOD GetAccNumActions(PRUint8 *_retval); + NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval); + NS_IMETHOD AccDoAction(PRUint8 index); + + + virtual void GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame); + + + + nsCOMPtr mParent; +}; + +/* + * A class that represents the window that lives to the right + * of the drop down button inside the Select. This is the window + * that is made visible when the button is pressed. + */ +class nsHTMLSelectWindowAccessible : public nsMenuListenerAccessible +{ +public: + + nsHTMLSelectWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + NS_IMETHOD GetAccChildCount(PRInt32 *_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccState(PRUint32 *_retval); + + virtual void GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame); + + nsCOMPtr mParent; +}; + +/* + * The list that contains all the options in the select. It is inside the window. + */ +class nsHTMLSelectListAccessible : public nsAccessible +{ +public: + + nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + virtual ~nsHTMLSelectListAccessible() {} + + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height); + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + + nsCOMPtr mParent; +}; + +//--------- nsHTMLSelectAccessible ----- + +nsHTMLSelectAccessible::nsHTMLSelectAccessible(nsIDOMNode* aDOMNode, + nsIWeakReference* aShell) + :nsAccessible(aDOMNode, aShell) +{ +} + +NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLSelectAccessible, nsAccessible, nsIAccessibleSelectable) + +// ------------- Helper method for determination of proper Frame ------ +//static +PRBool nsHTMLSelectAccessible::IsCorrectFrame( nsIFrame* aFrame, nsIAtom* aAtom ) { + if (!aFrame || !aAtom) + return PR_FALSE; + nsCOMPtr frameType; + aFrame->GetFrameType(getter_AddRefs(frameType)); + if (frameType.get() != aAtom) + return PR_FALSE; + return PR_TRUE; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccValue(nsAWritableString& _retval) +{ + nsCOMPtr text; + GetAccFirstChild(getter_AddRefs(text)); + if (text) + return text->GetAccValue(_retval); + + return NS_ERROR_FAILURE; +} + + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_COMBOBOX; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + // create a window accessible + *_retval = new nsHTMLSelectWindowAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + // create a text field + + *_retval = new nsHTMLSelectTextFieldAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccChildCount(PRInt32 *_retval) +{ + // always have 3 children + *_retval = 3; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetSelectedChildren(nsISupportsArray **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +//-------- SelectTextFieldAccessible ------ + +nsHTMLSelectTextFieldAccessible::nsHTMLSelectTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsLeafAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccValue(nsAWritableString& _retval) +{ + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + if ( !frame ) + return NS_ERROR_FAILURE; + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return NS_ERROR_FAILURE; + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::textFrame) ) + return NS_ERROR_FAILURE; + + nsCOMPtr content; + frame->GetContent(getter_AddRefs(content)); + + if (!content) + return NS_ERROR_FAILURE; + + AppendFlatStringFromSubtree(content, &_retval); + + return NS_OK; +} + +void nsHTMLSelectTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame) +{ + // get our first child's frame + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + if ( !frame ) + return; + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return; + + frame->GetParent(aRelativeFrame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( *aRelativeFrame, nsLayoutAtoms::areaFrame) ) + return; + + frame->GetRect(aBounds); +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectButtonAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_STATICTEXT; + return NS_OK; +} + +// --------- nsMenuListenerAccessible ----------- + +nsMenuListenerAccessible::nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsAccessible(aDOMNode, aShell) +{ + mRegistered = PR_FALSE; + mOpen = PR_FALSE; +} + +nsMenuListenerAccessible::~nsMenuListenerAccessible() +{ + if (mRegistered) { + nsCOMPtr eventReceiver(do_QueryInterface(mDOMNode)); + if (eventReceiver) + eventReceiver->RemoveEventListener(NS_LITERAL_STRING("create"), this, PR_TRUE); + } +} + +NS_IMETHODIMP nsMenuListenerAccessible::Create(nsIDOMEvent* aEvent) +{ + mOpen = PR_TRUE; + + /* TBD send state change event */ + + return NS_OK; +} + +NS_IMETHODIMP nsMenuListenerAccessible::Destroy(nsIDOMEvent* aEvent) +{ + mOpen = PR_FALSE; + + /* TBD send state change event */ + + return NS_OK; +} + +NS_IMETHODIMP nsMenuListenerAccessible::Close(nsIDOMEvent* aEvent) +{ + mOpen = PR_FALSE; + + /* TBD send state change event */ + + return NS_OK; +} + +void +nsMenuListenerAccessible::SetupMenuListener() +{ + // not not already one register ourselves as a popup listener + if (!mRegistered) { + + nsCOMPtr eventReceiver(do_QueryInterface(mDOMNode)); + if (!eventReceiver) { + return; + } + + nsresult rv = eventReceiver->AddEventListener(NS_LITERAL_STRING("create"), this, PR_TRUE); + + if (NS_FAILED(rv)) { + return; + } + + mRegistered = PR_TRUE; + } + +} + + +//-------- SelectButtonAccessible ------ + +nsHTMLSelectButtonAccessible::nsHTMLSelectButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsMenuListenerAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +/* void accDoAction (in PRUint8 index); */ +NS_IMETHODIMP nsHTMLSelectButtonAccessible::AccDoAction(PRUint8 index) +{ + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return NS_ERROR_FAILURE; + + frame->GetNextSibling(&frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::gfxButtonControlFrame) ) + return NS_ERROR_FAILURE; + + nsCOMPtr content; + frame->GetContent(getter_AddRefs(content)); + + if (index == 0) { + nsCOMPtr element(do_QueryInterface(content)); + if (element) + { + element->Click(); + return NS_OK; + } + return NS_ERROR_FAILURE; + } + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* PRUint8 getAccNumActions (); */ +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccNumActions(PRUint8 *_retval) +{ + *_retval = 1; + return NS_OK; +} + +void nsHTMLSelectButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame) +{ + // get our second child's frame + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return; + + frame->GetNextSibling(&frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::gfxButtonControlFrame) ) + return; + + frame->GetParent(aRelativeFrame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( *aRelativeFrame, nsLayoutAtoms::areaFrame) ) + return; + + frame->GetRect(aBounds); +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_PUSHBUTTON; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccName(nsAWritableString& _retval) +{ + return GetAccActionName(0, _retval); +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval) +{ + SetupMenuListener(); + + // get the current state open or closed + // set _retval to it. + // notice its supposed to be reversed. Close if opened + // and Open if closed. + + if (mOpen) + _retval = NS_LITERAL_STRING("Close"); + else + _retval = NS_LITERAL_STRING("Open"); + + return NS_OK; +} + + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectWindowAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectTextFieldAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccChildCount(PRInt32 *_retval) +{ + *_retval = 0; + return NS_OK; +} + +//--------------------- + + +nsHTMLSelectWindowAccessible::nsHTMLSelectWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell) +:nsMenuListenerAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccState(PRUint32 *_retval) +{ + nsAccessible::GetAccState(_retval); + + SetupMenuListener(); + + // if open we are visible if closed we are invisible + // set _retval to it. + if (mOpen) + *_retval |= STATE_DEFAULT; + else + *_retval |= STATE_INVISIBLE; + + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_WINDOW; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectButtonAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + *_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + *_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccChildCount(PRInt32 *_retval) +{ + *_retval = 1; + return NS_OK; +} + +void nsHTMLSelectWindowAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame) +{ + // get our first option + nsCOMPtr child; + mDOMNode->GetFirstChild(getter_AddRefs(child)); + + // now get its frame + nsCOMPtr shell(do_QueryReferent(mPresShell)); + if (!shell) { + *aRelativeFrame = nsnull; + return; + } + + nsIFrame* frame = nsnull; + nsCOMPtr content(do_QueryInterface(child)); + shell->GetPrimaryFrameFor(content, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return; + + frame->GetParent(&frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::areaFrame) ) + return; + + frame->GetParent(aRelativeFrame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( *aRelativeFrame, nsLayoutAtoms::listControlFrame) ) + return; + + frame->GetRect(aBounds); +} + +//---------- + + +nsHTMLSelectListAccessible::nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell) +:nsAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height) +{ + return mParent->AccGetBounds(x,y,width,height); +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_LIST; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + nsCOMPtr last; + mDOMNode->GetLastChild(getter_AddRefs(last)); + + *_retval = new nsHTMLSelectOptionAccessible(this, last, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + nsCOMPtr first; + mDOMNode->GetFirstChild(getter_AddRefs(first)); + + *_retval = new nsHTMLSelectOptionAccessible(this, first, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +//-------- + +nsHTMLSelectOptionAccessible::nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsLeafAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_LISTITEM; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + + nsCOMPtr next; + mDOMNode->GetNextSibling(getter_AddRefs(next)); + + if (next) { + *_retval = new nsHTMLSelectOptionAccessible(mParent, next, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + } + + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + + nsCOMPtr prev; + mDOMNode->GetPreviousSibling(getter_AddRefs(prev)); + + if (prev) { + *_retval = new nsHTMLSelectOptionAccessible(mParent, prev, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + } + + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccName(nsAWritableString& _retval) +{ + nsCOMPtr content (do_QueryInterface(mDOMNode)); + if (!content) { + return NS_ERROR_FAILURE; + } + + nsAutoString option; + nsresult rv = AppendFlatStringFromSubtree(content, &option); + if (NS_SUCCEEDED(rv)) { + // Temp var needed until CompressWhitespace built for nsAWritableString + option.CompressWhitespace(); + _retval.Assign(option); + } + return rv; +} + diff --git a/mozilla/accessible/src/html/nsHTMLSelectAccessible.h b/mozilla/accessible/src/html/nsHTMLSelectAccessible.h new file mode 100644 index 00000000000..cdf858c842a --- /dev/null +++ b/mozilla/accessible/src/html/nsHTMLSelectAccessible.h @@ -0,0 +1,72 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Eric Vaughan (evaughan@netscape.com) + * + * Contributor(s): + */ +#ifndef __nsHTMLSelectAccessible_h__ +#define __nsHTMLSelectAccessible_h__ + +#include "nsAccessible.h" +#include "nsCOMPtr.h" +#include "nsIAtom.h" +#include "nsIAccessibleSelectable.h" + +class nsHTMLSelectAccessible : public nsAccessible, + public nsIAccessibleSelectable +{ +public: + + NS_DECL_ISUPPORTS_INHERITED + NS_DECL_NSIACCESSIBLESELECTABLE + + nsHTMLSelectAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + virtual ~nsHTMLSelectAccessible() {} + + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccValue(nsAWritableString& _retval); + NS_IMETHOD GetAccChildCount(PRInt32 *_retval); + +// helper method to verify frames + static PRBool IsCorrectFrame( nsIFrame* aFrame, nsIAtom* aAtom ); + +}; + +/* + * Each option in the Select. These are in the nsListAccessible + */ +class nsHTMLSelectOptionAccessible : public nsLeafAccessible +{ +public: + + nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccName(nsAWritableString& _retval); + + nsCOMPtr mParent; +}; + +#endif diff --git a/mozilla/accessible/src/nsHTMLSelectAccessible.cpp b/mozilla/accessible/src/nsHTMLSelectAccessible.cpp new file mode 100644 index 00000000000..7cab0f760ec --- /dev/null +++ b/mozilla/accessible/src/nsHTMLSelectAccessible.cpp @@ -0,0 +1,792 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Eric Vaughan (evaughan@netscape.com) + * + * Contributor(s): + */ + +#include "nsHTMLSelectAccessible.h" +#include "nsCOMPtr.h" +#include "nsIDocument.h" +#include "nsIPresShell.h" +#include "nsIPresContext.h" +#include "nsIContent.h" +#include "nsIFrame.h" +#include "nsRootAccessible.h" +#include "nsINameSpaceManager.h" +#include "nsIDOMHTMLInputElement.h" +#include "nsLayoutAtoms.h" +#include "nsIDOMMenuListener.h" +#include "nsIDOMEventReceiver.h" +#include "nsReadableUtils.h" +#include "nsIDOMHTMLCollection.h" +#include "nsISelectElement.h" +#include "nsIDOMHTMLSelectElement.h" +#include "nsIAccessibilityService.h" +#include "nsIServiceManager.h" +#include "nsIDOMHTMLOptionElement.h" + +/* + * A class the represents the text field in the Select to the left + * of the drop down button + */ +class nsHTMLSelectTextFieldAccessible : public nsLeafAccessible +{ +public: + + nsHTMLSelectTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccValue(nsAWritableString& _retval); + + virtual void GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame); + + nsCOMPtr mParent; +}; + +/* + * A base class that can listen to menu events. Its used so the + * button and the window accessibles can change there name and role + * depending on whether the drop down list is dropped down on not + */ +class nsMenuListenerAccessible : public nsAccessible, + public nsIDOMMenuListener +{ +public: + + NS_DECL_ISUPPORTS_INHERITED + + nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + virtual ~nsMenuListenerAccessible(); + + // popup listener + NS_IMETHOD Create(nsIDOMEvent* aEvent); + NS_IMETHOD Close(nsIDOMEvent* aEvent); + NS_IMETHOD Destroy(nsIDOMEvent* aEvent); + NS_IMETHOD Action(nsIDOMEvent* aEvent) { return NS_OK; } + NS_IMETHOD Broadcast(nsIDOMEvent* aEvent) { return NS_OK; } + NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent) { return NS_OK; } + NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; } + + virtual void SetupMenuListener(); + + PRBool mRegistered; + PRBool mOpen; +}; + +NS_IMPL_ISUPPORTS_INHERITED(nsMenuListenerAccessible, nsAccessible, nsIDOMMenuListener) + +/** + * A class that represents the button inside the Select to the right of the text field + */ +class nsHTMLSelectButtonAccessible : public nsMenuListenerAccessible +{ +public: + + nsHTMLSelectButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccName(nsAWritableString& _retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + NS_IMETHOD GetAccChildCount(PRInt32 *_retval); + NS_IMETHOD GetAccNumActions(PRUint8 *_retval); + NS_IMETHOD GetAccActionName(PRUint8 index, nsAWritableString& _retval); + NS_IMETHOD AccDoAction(PRUint8 index); + + + virtual void GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame); + + + + nsCOMPtr mParent; +}; + +/* + * A class that represents the window that lives to the right + * of the drop down button inside the Select. This is the window + * that is made visible when the button is pressed. + */ +class nsHTMLSelectWindowAccessible : public nsMenuListenerAccessible +{ +public: + + nsHTMLSelectWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + NS_IMETHOD GetAccChildCount(PRInt32 *_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccState(PRUint32 *_retval); + + virtual void GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame); + + nsCOMPtr mParent; +}; + +/* + * The list that contains all the options in the select. It is inside the window. + */ +class nsHTMLSelectListAccessible : public nsAccessible +{ +public: + + nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + virtual ~nsHTMLSelectListAccessible() {} + + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height); + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + + nsCOMPtr mParent; +}; + +//--------- nsHTMLSelectAccessible ----- + +nsHTMLSelectAccessible::nsHTMLSelectAccessible(nsIDOMNode* aDOMNode, + nsIWeakReference* aShell) + :nsAccessible(aDOMNode, aShell) +{ +} + +NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLSelectAccessible, nsAccessible, nsIAccessibleSelectable) + +// ------------- Helper method for determination of proper Frame ------ +//static +PRBool nsHTMLSelectAccessible::IsCorrectFrame( nsIFrame* aFrame, nsIAtom* aAtom ) { + if (!aFrame || !aAtom) + return PR_FALSE; + nsCOMPtr frameType; + aFrame->GetFrameType(getter_AddRefs(frameType)); + if (frameType.get() != aAtom) + return PR_FALSE; + return PR_TRUE; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccValue(nsAWritableString& _retval) +{ + nsCOMPtr text; + GetAccFirstChild(getter_AddRefs(text)); + if (text) + return text->GetAccValue(_retval); + + return NS_ERROR_FAILURE; +} + + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_COMBOBOX; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + // create a window accessible + *_retval = new nsHTMLSelectWindowAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + // create a text field + + *_retval = new nsHTMLSelectTextFieldAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetAccChildCount(PRInt32 *_retval) +{ + // always have 3 children + *_retval = 3; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectAccessible::GetSelectedChildren(nsISupportsArray **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +//-------- SelectTextFieldAccessible ------ + +nsHTMLSelectTextFieldAccessible::nsHTMLSelectTextFieldAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsLeafAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccValue(nsAWritableString& _retval) +{ + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + if ( !frame ) + return NS_ERROR_FAILURE; + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return NS_ERROR_FAILURE; + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::textFrame) ) + return NS_ERROR_FAILURE; + + nsCOMPtr content; + frame->GetContent(getter_AddRefs(content)); + + if (!content) + return NS_ERROR_FAILURE; + + AppendFlatStringFromSubtree(content, &_retval); + + return NS_OK; +} + +void nsHTMLSelectTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame) +{ + // get our first child's frame + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + if ( !frame ) + return; + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return; + + frame->GetParent(aRelativeFrame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( *aRelativeFrame, nsLayoutAtoms::areaFrame) ) + return; + + frame->GetRect(aBounds); +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectButtonAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectTextFieldAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_STATICTEXT; + return NS_OK; +} + +// --------- nsMenuListenerAccessible ----------- + +nsMenuListenerAccessible::nsMenuListenerAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsAccessible(aDOMNode, aShell) +{ + mRegistered = PR_FALSE; + mOpen = PR_FALSE; +} + +nsMenuListenerAccessible::~nsMenuListenerAccessible() +{ + if (mRegistered) { + nsCOMPtr eventReceiver(do_QueryInterface(mDOMNode)); + if (eventReceiver) + eventReceiver->RemoveEventListener(NS_LITERAL_STRING("create"), this, PR_TRUE); + } +} + +NS_IMETHODIMP nsMenuListenerAccessible::Create(nsIDOMEvent* aEvent) +{ + mOpen = PR_TRUE; + + /* TBD send state change event */ + + return NS_OK; +} + +NS_IMETHODIMP nsMenuListenerAccessible::Destroy(nsIDOMEvent* aEvent) +{ + mOpen = PR_FALSE; + + /* TBD send state change event */ + + return NS_OK; +} + +NS_IMETHODIMP nsMenuListenerAccessible::Close(nsIDOMEvent* aEvent) +{ + mOpen = PR_FALSE; + + /* TBD send state change event */ + + return NS_OK; +} + +void +nsMenuListenerAccessible::SetupMenuListener() +{ + // not not already one register ourselves as a popup listener + if (!mRegistered) { + + nsCOMPtr eventReceiver(do_QueryInterface(mDOMNode)); + if (!eventReceiver) { + return; + } + + nsresult rv = eventReceiver->AddEventListener(NS_LITERAL_STRING("create"), this, PR_TRUE); + + if (NS_FAILED(rv)) { + return; + } + + mRegistered = PR_TRUE; + } + +} + + +//-------- SelectButtonAccessible ------ + +nsHTMLSelectButtonAccessible::nsHTMLSelectButtonAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsMenuListenerAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +/* void accDoAction (in PRUint8 index); */ +NS_IMETHODIMP nsHTMLSelectButtonAccessible::AccDoAction(PRUint8 index) +{ + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return NS_ERROR_FAILURE; + + frame->GetNextSibling(&frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::gfxButtonControlFrame) ) + return NS_ERROR_FAILURE; + + nsCOMPtr content; + frame->GetContent(getter_AddRefs(content)); + + if (index == 0) { + nsCOMPtr element(do_QueryInterface(content)); + if (element) + { + element->Click(); + return NS_OK; + } + return NS_ERROR_FAILURE; + } + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* PRUint8 getAccNumActions (); */ +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccNumActions(PRUint8 *_retval) +{ + *_retval = 1; + return NS_OK; +} + +void nsHTMLSelectButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame) +{ + // get our second child's frame + nsIFrame* frame = nsAccessible::GetBoundsFrame(); + nsCOMPtr context; + GetPresContext(context); + + frame->FirstChild(context, nsnull, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return; + + frame->GetNextSibling(&frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::gfxButtonControlFrame) ) + return; + + frame->GetParent(aRelativeFrame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( *aRelativeFrame, nsLayoutAtoms::areaFrame) ) + return; + + frame->GetRect(aBounds); +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_PUSHBUTTON; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccName(nsAWritableString& _retval) +{ + return GetAccActionName(0, _retval); +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccActionName(PRUint8 index, nsAWritableString& _retval) +{ + SetupMenuListener(); + + // get the current state open or closed + // set _retval to it. + // notice its supposed to be reversed. Close if opened + // and Open if closed. + + if (mOpen) + _retval = NS_LITERAL_STRING("Close"); + else + _retval = NS_LITERAL_STRING("Open"); + + return NS_OK; +} + + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectWindowAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectTextFieldAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectButtonAccessible::GetAccChildCount(PRInt32 *_retval) +{ + *_retval = 0; + return NS_OK; +} + +//--------------------- + + +nsHTMLSelectWindowAccessible::nsHTMLSelectWindowAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell) +:nsMenuListenerAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccState(PRUint32 *_retval) +{ + nsAccessible::GetAccState(_retval); + + SetupMenuListener(); + + // if open we are visible if closed we are invisible + // set _retval to it. + if (mOpen) + *_retval |= STATE_DEFAULT; + else + *_retval |= STATE_INVISIBLE; + + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_WINDOW; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + nsCOMPtr parent; + GetAccParent(getter_AddRefs(parent)); + + *_retval = new nsHTMLSelectButtonAccessible(parent, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + *_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + *_retval = new nsHTMLSelectListAccessible(this, mDOMNode, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectWindowAccessible::GetAccChildCount(PRInt32 *_retval) +{ + *_retval = 1; + return NS_OK; +} + +void nsHTMLSelectWindowAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame) +{ + // get our first option + nsCOMPtr child; + mDOMNode->GetFirstChild(getter_AddRefs(child)); + + // now get its frame + nsCOMPtr shell(do_QueryReferent(mPresShell)); + if (!shell) { + *aRelativeFrame = nsnull; + return; + } + + nsIFrame* frame = nsnull; + nsCOMPtr content(do_QueryInterface(child)); + shell->GetPrimaryFrameFor(content, &frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::blockFrame) ) + return; + + frame->GetParent(&frame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( frame, nsLayoutAtoms::areaFrame) ) + return; + + frame->GetParent(aRelativeFrame); + if ( ! nsHTMLSelectAccessible::IsCorrectFrame( *aRelativeFrame, nsLayoutAtoms::listControlFrame) ) + return; + + frame->GetRect(aBounds); +} + +//---------- + + +nsHTMLSelectListAccessible::nsHTMLSelectListAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell) +:nsAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height) +{ + return mParent->AccGetBounds(x,y,width,height); +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_LIST; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **_retval) +{ + nsCOMPtr last; + mDOMNode->GetLastChild(getter_AddRefs(last)); + + *_retval = new nsHTMLSelectOptionAccessible(this, last, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **_retval) +{ + nsCOMPtr first; + mDOMNode->GetFirstChild(getter_AddRefs(first)); + + *_retval = new nsHTMLSelectOptionAccessible(this, first, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + return NS_OK; +} + +//-------- + +nsHTMLSelectOptionAccessible::nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell): +nsLeafAccessible(aDOMNode, aShell) +{ + mParent = aParent; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccRole(PRUint32 *_retval) +{ + *_retval = ROLE_LISTITEM; + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccParent(nsIAccessible **_retval) +{ + *_retval = mParent; + NS_IF_ADDREF(*_retval); + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + + nsCOMPtr next; + mDOMNode->GetNextSibling(getter_AddRefs(next)); + + if (next) { + *_retval = new nsHTMLSelectOptionAccessible(mParent, next, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + } + + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval) +{ + *_retval = nsnull; + + nsCOMPtr prev; + mDOMNode->GetPreviousSibling(getter_AddRefs(prev)); + + if (prev) { + *_retval = new nsHTMLSelectOptionAccessible(mParent, prev, mPresShell); + if ( ! *_retval ) + return NS_ERROR_FAILURE; + NS_ADDREF(*_retval); + } + + return NS_OK; +} + +NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccName(nsAWritableString& _retval) +{ + nsCOMPtr content (do_QueryInterface(mDOMNode)); + if (!content) { + return NS_ERROR_FAILURE; + } + + nsAutoString option; + nsresult rv = AppendFlatStringFromSubtree(content, &option); + if (NS_SUCCEEDED(rv)) { + // Temp var needed until CompressWhitespace built for nsAWritableString + option.CompressWhitespace(); + _retval.Assign(option); + } + return rv; +} + diff --git a/mozilla/accessible/src/nsHTMLSelectAccessible.h b/mozilla/accessible/src/nsHTMLSelectAccessible.h new file mode 100644 index 00000000000..cdf858c842a --- /dev/null +++ b/mozilla/accessible/src/nsHTMLSelectAccessible.h @@ -0,0 +1,72 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Eric Vaughan (evaughan@netscape.com) + * + * Contributor(s): + */ +#ifndef __nsHTMLSelectAccessible_h__ +#define __nsHTMLSelectAccessible_h__ + +#include "nsAccessible.h" +#include "nsCOMPtr.h" +#include "nsIAtom.h" +#include "nsIAccessibleSelectable.h" + +class nsHTMLSelectAccessible : public nsAccessible, + public nsIAccessibleSelectable +{ +public: + + NS_DECL_ISUPPORTS_INHERITED + NS_DECL_NSIACCESSIBLESELECTABLE + + nsHTMLSelectAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + virtual ~nsHTMLSelectAccessible() {} + + NS_IMETHOD GetAccLastChild(nsIAccessible **_retval); + NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccValue(nsAWritableString& _retval); + NS_IMETHOD GetAccChildCount(PRInt32 *_retval); + +// helper method to verify frames + static PRBool IsCorrectFrame( nsIFrame* aFrame, nsIAtom* aAtom ); + +}; + +/* + * Each option in the Select. These are in the nsListAccessible + */ +class nsHTMLSelectOptionAccessible : public nsLeafAccessible +{ +public: + + nsHTMLSelectOptionAccessible(nsIAccessible* aParent, nsIDOMNode* aDOMNode, nsIWeakReference* aShell); + + NS_IMETHOD GetAccParent(nsIAccessible **_retval); + NS_IMETHOD GetAccRole(PRUint32 *_retval); + NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval); + NS_IMETHOD GetAccName(nsAWritableString& _retval); + + nsCOMPtr mParent; +}; + +#endif diff --git a/mozilla/extensions/help/resources/skin/classic/help.css b/mozilla/extensions/help/resources/skin/classic/help.css new file mode 100644 index 00000000000..95405f842dc --- /dev/null +++ b/mozilla/extensions/help/resources/skin/classic/help.css @@ -0,0 +1,46 @@ +/* + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998-1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Joe Hewitt (hewitt@netscape.com) + */ + +@import url("chrome://communicator/skin/"); + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: primary toolbar buttons ::::: */ + +#print { + list-style-image: url("chrome://global/skin/print.gif"); +} + +#print[disabled="true"], +#print[disabled="true"]:hover, +#print[disabled="true"]:hover:active { + list-style-image: url("chrome://global/skin/print-disabled.gif"); +} + +#print:hover { + list-style-image: url("chrome://global/skin/print-hover.gif"); +} + +#print:hover:active { + list-style-image: url("chrome://global/skin/print-hover-active.gif"); +} + diff --git a/mozilla/extensions/help/resources/skin/modern/help.css b/mozilla/extensions/help/resources/skin/modern/help.css new file mode 100644 index 00000000000..420193792f8 --- /dev/null +++ b/mozilla/extensions/help/resources/skin/modern/help.css @@ -0,0 +1,117 @@ +/* + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998-1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Joe Hewitt (hewitt@netscape.com) + */ + +@import url("chrome://communicator/skin/"); + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: primary toolbar masthead ::::: */ + +#helpToolbar > .toolbar-holder > .toolbar-primary-icon { + background-image: url("chrome://communicator/skin/help/mast-help.gif"); +} + +/* ::::: primary toolbar buttons ::::: */ + +.button-toolbar-1 { + margin: 0px; +} + +.toolbar-primary-mid-top { + background-image: url("chrome://navigator/skin/toolbar/navbar-mid-top.gif"); +} + +#helpBackButton { + list-style-image: url("chrome://navigator/skin/btn1/back.gif"); +} + +#helpBackButton[disabled="true"], +#helpBackButton[disabled="true"]:hover, +#helpBackButton[disabled="true"]:hover:active +{ + list-style-image: url("chrome://navigator/skin/btn1/back-dis.gif"); +} + +#helpBackButton:hover { + list-style-image: url("chrome://navigator/skin/btn1/back-hov.gif"); +} + +#helpBackButton:hover:active { + list-style-image: url("chrome://navigator/skin/btn1/back-act.gif"); +} + +#helpForwardButton { + list-style-image: url("chrome://navigator/skin/btn1/forward.gif"); +} + +#helpForwardButton[disabled="true"], +#helpForwardButton[disabled="true"]:hover, +#helpForwardButton[disabled="true"]:hover:active +{ + list-style-image: url("chrome://navigator/skin/btn1/forward-dis.gif"); +} + +#helpForwardButton:hover { + list-style-image: url("chrome://navigator/skin/btn1/forward-hov.gif"); +} + +#helpForwardButton:hover:active { + list-style-image: url("chrome://navigator/skin/btn1/forward-act.gif"); +} + +#helpHomeButton { + list-style-image: url("chrome://communicator/skin/help/home.gif"); +} + +#helpHomeButton[disabled="true"], +#helpHomeButton[disabled="true"]:hover, +#helpHomeButton[disabled="true"]:hover:active +{ + list-style-image: url("chrome://communicator/skin/help/home-dis.gif"); +} + +#helpHomeButton:hover { + list-style-image: url("chrome://communicator/skin/help/home-hov.gif"); +} + +#helpHomeButton:hover:active { + list-style-image: url("chrome://communicator/skin/help/home-act.gif"); +} + +#print { + list-style-image: url("chrome://communicator/skin/btn1/print.gif"); +} + +#print[disabled="true"], +#print[disabled="true"]:hover, +#print[disabled="true"]:hover:active { + list-style-image: url("chrome://communicator/skin/btn1/print-dis.gif"); +} + +#print:hover { + list-style-image: url("chrome://communicator/skin/btn1/print-hov.gif"); +} + +#print:hover:active { + list-style-image: url("chrome://communicator/skin/btn1/print-act.gif"); +} + diff --git a/mozilla/extensions/help/resources/skin/modern/home-act.gif b/mozilla/extensions/help/resources/skin/modern/home-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..090b4937c9f0057976f01bc390cb6b1e6463d994 GIT binary patch literal 2230 zcmV;n2ub%xNk%w1VJZM80QUd@xWmqgnW;5BNO^{qg^{1?`T3%-zOuf`?)v$>#?ebv zW606kovgZOc7;7cN%s8wdWe{r%gup~oW97@OH*CC#n8gc*1Xf%bAgeEqO8-}<9CIX z{{a6oH9MxX!PVU4t-8kDVK`@qW7VQ_)8z|8yo{e6#|lbfT;)7*xXq-=VLL`qUw zWpmu*?0SfnDJ?V3*574xgnQCeis*x_(} zjDU=rb%K!H_V(G}=xTU~isgOr-7xW?q>e2JH&vcI*?)5Y4~s<_40-Q{h3ip z;D3dT;`H@=iI}Oj!>qZ*nVzLvYkQ2Sv8=PbGB`ib*y4VRn5eeH^!)r%U20}^h}iG& zEHXQstGU?U=xKL|e2SY)QC7p(+~fB4;Pv&w%G9UL(YM0R)baAOzsp@}d17a69wI5w z*Wtg((@0KKd5D>+ueD@yf+8m_*4*aJ*WX@gbwWr@!OPWKXnjysTV`~FUv7WhDu7v*x%={yvW+&>Db=qu)WFm{r%F};@sov+282hlsKm5-jRmc7GmdyBEY$)v`~-1YQaY<;7# zzoWdv-s9`w^Ynj=owB~k%H835jGMmP-|6`Hz{}Qsnx$G?V64>Eg^7@Qfrr!E<9>;l zc!iTkP+83E?5DNC-0|}E`~0f4!iArzwZhJqu(`Fu&B)K$aDR`Jps(EG>&DO8z{%6B zx5U`s=iv7CA^8LV00000EC2ui04e|{000R808a@VNU)&6g9r_lTF9`W!-o(fN}Ncs zqQ#3CGdc_rqSP^N9W^pUMY5#Hk}g8HNXe1o%9Ai-rkY8!X02JZ7`EiNaMr9`Kvk(q zl`B}yqd=1?Em>-32ssNDXwmYMhO1&iTxs2^G^x<9LXDN#qd?&j9~dm0T_MOgA}3svK^2ai;D&&;vjMBcwS@3^9!OW-qE3-~bO8EZ3Z#dtUjc2nEzb z00C-<(Euea2op&d30SZ|3XjJBP|2ID&0suc?(0fKD>UgmQ84CCy zhJ#fgAcCK3;_mCG(hJ7TwHNS39V{z&pivALE;lwbg=>kFT9aK4Fw>806g-^ z2hKQAVB^NihsXd&JD4#4kVHT6HnIg66{{)B2TtJ706y#>k-;JbL_SE|KP<6G5IMN< z#SqJoFozW?K%AjN$|a17y%m6guc|!w(_K*G!r zGLQg77rz(*O%m`{UmHFB5#_2U>?MfiA($<0Ls&b9jLIX3M8Nc zVDzB|ClCn|2p}COSV05UxW-YaZx^JRMt#SHS`hdrR619!|L7m{EH5LlxGVHji>Mmfqsn(`4>ID`Nk zFo!)Dfe1eU!V8F?iyh!W6qNV{9t*(*ZQ#NNRB%Qlh(U}n5c8PFv29PU;`WQMgX9} z0BAsi3jn>sJIr7M5EPW5C{-vdS^?2J+`$Zg@W2(4pbc#p0H8^@f(LM62OAKS3M@^j zP#p?U5V({HFnz~6JiyeQ+JU4$1!^k{Dpa99lnN2OgAHt8hOT;bs{{oBR;Nl;g$4uw EJ7DrSGynhq literal 0 HcmV?d00001 diff --git a/mozilla/extensions/help/resources/skin/modern/home-dis.gif b/mozilla/extensions/help/resources/skin/modern/home-dis.gif new file mode 100644 index 0000000000000000000000000000000000000000..cbe0c7ff97a657f3f344024b076adfa0289f4df9 GIT binary patch literal 1821 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 literal 0 HcmV?d00001 diff --git a/mozilla/extensions/help/resources/skin/modern/home.gif b/mozilla/extensions/help/resources/skin/modern/home.gif new file mode 100644 index 0000000000000000000000000000000000000000..6043cee8005aeadebf098fa769e8308a37f3c797 GIT binary patch literal 2222 zcmV;f2vPS(Nk%w1VJZM80QUd@LQGb9iJ7v#%2ZuuX>xq>^!A;sy6W!nXnBbxD>re0 zk*>PNTx4vx!p*tF&!Vutc7>L1evakp?!d~_QDSw|+T($do;*WLYjuFm*59kR#MRv7 zzR1%3{r$qs*0jLPl%J}sxW$>Kw93=mp{=^d(b@U>`%`6jrnJGYyT?miaoyzXw7$yB z)ZJcgfHFEnj-095;_6vxeMeAOo~gFk;N{WR-K)04yvEVQ&DYS_;MCjVevO^k;OMr( z&6cFG)!gFk@ba3fxUjp&y2a3AZh7?f_@J)5*4^cjpss+9p0vQq;O6R#nyH7Cr94Vn z-Q?@V&e({Tq@1g{vcAdQ8!cM(AeUNn5IirV6M5vskXz%(b}@T$->IihLoYb$kR_*WiB;A*x%?@XnVK9&T4v$ zv%t%#w85sbzofFiq_DhXb%)&I=g`;SZF-B#)7#0?*}uutzR1vZe~5X9nObXp`uqG^ zW^!9-de+?L&DP(^(%Z<<*}}`!{{a7)sJCNug-%;+gpr_hg_B%reBI;gvAxOb^#9!B z>)hh%+u`Zj;ON-j=dirU+TrQg-siBr$3+~exr&~JZ_*x%-{zRJPO)n|B#v%lBhc3zncUSRL!Zs;gI~ONojliu6>rg*+b}3NUWlwk|~& zbsJJa79drsWXbB0iWRCGt%W+a+baXppX4gn4xaN%(9LC>8Vs#y7cMlg#u{m0qQff{oY$LgT&R*tX;%zDKopz2CI|~dz`%zEQYayX6#gX9&3_0? zz)T*Qv;c<=JM>mT1-zlx11%g-lTSF$MW@FCFd$F>8=e1Ou%3lxNL27FkIkimhA z99Y2yt)Suo0SsUh9flz^fj|cxkXb+w5>#OU85Z!+Mi*P~5RC&kOn^lr#bl7dihBZs z$`LbwpyL9&)Nv@Hl$6P66=W#?!9xJO{PKq-!4TrZ8OCVBsi%wVsR}I?ToBuA$f#-p zq8+rlXrnN+5dZ`V`~rp-BBT&Z1DdATLJJwZvVkg>L@>Z~)u~zl8YWOei3vuSaexH3 zI0Az-3Pey&9AJd8K1>{_S89^LCj5|6kQ4RuDc=E{$ z0X%?03cEU~i6h`9xJe~NTsMU}^AID!0S5rV4m&ht!Ali8w6Mf5iIm~OCx7&E#1#PZ zip4(rn3IMM=d>`6AN%$H_lqJ-Xnl_o(n8Qo4H=X`g(tJPFbM!#1Yp1+>9F9-9yvr2 z#gpM~@XH12^p}JJ8`Pjk72LGZ3%*3`;D|6(%p#5qfouVW6YumB#s@^;;z15MV3CK4 z6(n&1C?diTN(O8I;SMhl;2VJhEeJCPKa&JYr!1}Ai0E>;w-W^r&!vwe?075Xp5e|We1)$>tK4^dg1VKttHsF*EAmtSp z0f0ZmK@_s1-6R3nJxosF2>q~y22!90LO=r=g7~E{g&B=seqaGg_{0_x@Pa3JAr4+} z!ygi0Nf{(z3YzQ(3c|2}RdnzJzZ8Ht$4O2BSfdsx=tmnw;RP_f;17S;f*YKX2q$3k z9S`Wo6?8d^hiOUKnF@tQn;cPt4P5DzMz3AG(i#&fB+A)@D2mK;~huH=RU&_ zf(7`qpdcNnD^`)vIm{spctF7ws?m>rJRqNkxB?1nfd>urGX*3KsZI}?&;^)O11PnH wEl@zznc^V~HeEmpaJq_r>Qtu)U8+w*0Msy8)v6i@K|hs>Q&%{3paB5@JImNzHvj+t literal 0 HcmV?d00001 diff --git a/mozilla/extensions/help/resources/skin/modern/mast-help.gif b/mozilla/extensions/help/resources/skin/modern/mast-help.gif new file mode 100644 index 0000000000000000000000000000000000000000..cae3414231c57c986ca854df8640416ecc18ecbb GIT binary patch literal 3984 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 O+a4Jo6QEGQ_WuQzm?$X# literal 0 HcmV?d00001 diff --git a/mozilla/extensions/transformiix/source/xpath/Expr.cpp b/mozilla/extensions/transformiix/source/xpath/Expr.cpp new file mode 100644 index 00000000000..380e4c3c9eb --- /dev/null +++ b/mozilla/extensions/transformiix/source/xpath/Expr.cpp @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * 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 Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001, Jonas Sicking. + * All rights reserved. + * + * Contributor(s): + * Jonas Sicking, sicking@bigfoot.com + * -- original author. + */ + +#include "Expr.h" + +Expr::~Expr() { +} + +/* + * Determines whether this Expr matches the given node within + * the given context. + */ +MBool Expr::matches(Node* node, Node* context, ContextState* cs) +{ + NS_ASSERTION(0, "Expr::matches() called"); + return MB_FALSE; +} + +/* + * Returns the default priority of this Expr based on the given Node, + * context Node, and ContextState. + */ +double Expr::getDefaultPriority(Node* node, Node* context, ContextState* cs) +{ + NS_ASSERTION(0, "Expr::matches() called"); + return 0; +} diff --git a/mozilla/extensions/transformiix/source/xpath/ExprLexerChars.cpp b/mozilla/extensions/transformiix/source/xpath/ExprLexerChars.cpp new file mode 100644 index 00000000000..2ee2fe0fa20 --- /dev/null +++ b/mozilla/extensions/transformiix/source/xpath/ExprLexerChars.cpp @@ -0,0 +1,372 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * 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 Axel Hecht. Portions + * created by Axel Hecht are Copyright (C) 2001 Axel Hecht. All + * Rights Reserved. + * + * Contributor(s): + * Axel Hecht (Original Author) + */ + +#include "ExprLexer.h" + +// macros for inclusion of char range headers +#define TX_CHAR_RANGE(ch, a, b) if (ch < a) return MB_FALSE; \ + if (ch <= b) return MB_TRUE +#define TX_MATCH_CHAR(ch, a) if (ch < a) return MB_FALSE; \ + if (ch == a) return MB_TRUE + +/** + * Returns true if the given character represents a numeric letter (digit) +**/ +MBool ExprLexer::isDigit(UNICODE_CHAR ch) +{ + TX_CHAR_RANGE(ch, '0', '9'); + return MB_FALSE; +} //-- isDigit + +/** + * Returns true if the given character represents an Alpha letter +**/ +MBool ExprLexer::isLetter(UNICODE_CHAR ch) +{ +/* Letter = BaseChar | Ideographic; and _ */ + TX_CHAR_RANGE(ch, 0x0041, 0x005A); + TX_MATCH_CHAR(ch, 0x005F); /* '_' */ + TX_CHAR_RANGE(ch, 0x0061, 0x007A); + TX_CHAR_RANGE(ch, 0x00C0, 0x00D6); + TX_CHAR_RANGE(ch, 0x00D8, 0x00F6); + TX_CHAR_RANGE(ch, 0x00F8, 0x00FF); + TX_CHAR_RANGE(ch, 0x0100, 0x0131); + TX_CHAR_RANGE(ch, 0x0134, 0x013E); + TX_CHAR_RANGE(ch, 0x0141, 0x0148); + TX_CHAR_RANGE(ch, 0x014A, 0x017E); + TX_CHAR_RANGE(ch, 0x0180, 0x01C3); + TX_CHAR_RANGE(ch, 0x01CD, 0x01F0); + TX_CHAR_RANGE(ch, 0x01F4, 0x01F5); + TX_CHAR_RANGE(ch, 0x01FA, 0x0217); + TX_CHAR_RANGE(ch, 0x0250, 0x02A8); + TX_CHAR_RANGE(ch, 0x02BB, 0x02C1); + TX_MATCH_CHAR(ch, 0x0386); + TX_CHAR_RANGE(ch, 0x0388, 0x038A); + TX_MATCH_CHAR(ch, 0x038C); + TX_CHAR_RANGE(ch, 0x038E, 0x03A1); + TX_CHAR_RANGE(ch, 0x03A3, 0x03CE); + TX_CHAR_RANGE(ch, 0x03D0, 0x03D6); + TX_MATCH_CHAR(ch, 0x03DA); + TX_MATCH_CHAR(ch, 0x03DC); + TX_MATCH_CHAR(ch, 0x03DE); + TX_MATCH_CHAR(ch, 0x03E0); + TX_CHAR_RANGE(ch, 0x03E2, 0x03F3); + TX_CHAR_RANGE(ch, 0x0401, 0x040C); + TX_CHAR_RANGE(ch, 0x040E, 0x044F); + TX_CHAR_RANGE(ch, 0x0451, 0x045C); + TX_CHAR_RANGE(ch, 0x045E, 0x0481); + TX_CHAR_RANGE(ch, 0x0490, 0x04C4); + TX_CHAR_RANGE(ch, 0x04C7, 0x04C8); + TX_CHAR_RANGE(ch, 0x04CB, 0x04CC); + TX_CHAR_RANGE(ch, 0x04D0, 0x04EB); + TX_CHAR_RANGE(ch, 0x04EE, 0x04F5); + TX_CHAR_RANGE(ch, 0x04F8, 0x04F9); + TX_CHAR_RANGE(ch, 0x0531, 0x0556); + TX_MATCH_CHAR(ch, 0x0559); + TX_CHAR_RANGE(ch, 0x0561, 0x0586); + TX_CHAR_RANGE(ch, 0x05D0, 0x05EA); + TX_CHAR_RANGE(ch, 0x05F0, 0x05F2); + TX_CHAR_RANGE(ch, 0x0621, 0x063A); + TX_CHAR_RANGE(ch, 0x0641, 0x064A); + TX_CHAR_RANGE(ch, 0x0671, 0x06B7); + TX_CHAR_RANGE(ch, 0x06BA, 0x06BE); + TX_CHAR_RANGE(ch, 0x06C0, 0x06CE); + TX_CHAR_RANGE(ch, 0x06D0, 0x06D3); + TX_MATCH_CHAR(ch, 0x06D5); + TX_CHAR_RANGE(ch, 0x06E5, 0x06E6); + TX_CHAR_RANGE(ch, 0x0905, 0x0939); + TX_MATCH_CHAR(ch, 0x093D); + TX_CHAR_RANGE(ch, 0x0958, 0x0961); + TX_CHAR_RANGE(ch, 0x0985, 0x098C); + TX_CHAR_RANGE(ch, 0x098F, 0x0990); + TX_CHAR_RANGE(ch, 0x0993, 0x09A8); + TX_CHAR_RANGE(ch, 0x09AA, 0x09B0); + TX_MATCH_CHAR(ch, 0x09B2); + TX_CHAR_RANGE(ch, 0x09B6, 0x09B9); + TX_CHAR_RANGE(ch, 0x09DC, 0x09DD); + TX_CHAR_RANGE(ch, 0x09DF, 0x09E1); + TX_CHAR_RANGE(ch, 0x09F0, 0x09F1); + TX_CHAR_RANGE(ch, 0x0A05, 0x0A0A); + TX_CHAR_RANGE(ch, 0x0A0F, 0x0A10); + TX_CHAR_RANGE(ch, 0x0A13, 0x0A28); + TX_CHAR_RANGE(ch, 0x0A2A, 0x0A30); + TX_CHAR_RANGE(ch, 0x0A32, 0x0A33); + TX_CHAR_RANGE(ch, 0x0A35, 0x0A36); + TX_CHAR_RANGE(ch, 0x0A38, 0x0A39); + TX_CHAR_RANGE(ch, 0x0A59, 0x0A5C); + TX_MATCH_CHAR(ch, 0x0A5E); + TX_CHAR_RANGE(ch, 0x0A72, 0x0A74); + TX_CHAR_RANGE(ch, 0x0A85, 0x0A8B); + TX_MATCH_CHAR(ch, 0x0A8D); + TX_CHAR_RANGE(ch, 0x0A8F, 0x0A91); + TX_CHAR_RANGE(ch, 0x0A93, 0x0AA8); + TX_CHAR_RANGE(ch, 0x0AAA, 0x0AB0); + TX_CHAR_RANGE(ch, 0x0AB2, 0x0AB3); + TX_CHAR_RANGE(ch, 0x0AB5, 0x0AB9); + TX_MATCH_CHAR(ch, 0x0ABD); + TX_MATCH_CHAR(ch, 0x0AE0); + TX_CHAR_RANGE(ch, 0x0B05, 0x0B0C); + TX_CHAR_RANGE(ch, 0x0B0F, 0x0B10); + TX_CHAR_RANGE(ch, 0x0B13, 0x0B28); + TX_CHAR_RANGE(ch, 0x0B2A, 0x0B30); + TX_CHAR_RANGE(ch, 0x0B32, 0x0B33); + TX_CHAR_RANGE(ch, 0x0B36, 0x0B39); + TX_MATCH_CHAR(ch, 0x0B3D); + TX_CHAR_RANGE(ch, 0x0B5C, 0x0B5D); + TX_CHAR_RANGE(ch, 0x0B5F, 0x0B61); + TX_CHAR_RANGE(ch, 0x0B85, 0x0B8A); + TX_CHAR_RANGE(ch, 0x0B8E, 0x0B90); + TX_CHAR_RANGE(ch, 0x0B92, 0x0B95); + TX_CHAR_RANGE(ch, 0x0B99, 0x0B9A); + TX_MATCH_CHAR(ch, 0x0B9C); + TX_CHAR_RANGE(ch, 0x0B9E, 0x0B9F); + TX_CHAR_RANGE(ch, 0x0BA3, 0x0BA4); + TX_CHAR_RANGE(ch, 0x0BA8, 0x0BAA); + TX_CHAR_RANGE(ch, 0x0BAE, 0x0BB5); + TX_CHAR_RANGE(ch, 0x0BB7, 0x0BB9); + TX_CHAR_RANGE(ch, 0x0C05, 0x0C0C); + TX_CHAR_RANGE(ch, 0x0C0E, 0x0C10); + TX_CHAR_RANGE(ch, 0x0C12, 0x0C28); + TX_CHAR_RANGE(ch, 0x0C2A, 0x0C33); + TX_CHAR_RANGE(ch, 0x0C35, 0x0C39); + TX_CHAR_RANGE(ch, 0x0C60, 0x0C61); + TX_CHAR_RANGE(ch, 0x0C85, 0x0C8C); + TX_CHAR_RANGE(ch, 0x0C8E, 0x0C90); + TX_CHAR_RANGE(ch, 0x0C92, 0x0CA8); + TX_CHAR_RANGE(ch, 0x0CAA, 0x0CB3); + TX_CHAR_RANGE(ch, 0x0CB5, 0x0CB9); + TX_MATCH_CHAR(ch, 0x0CDE); + TX_CHAR_RANGE(ch, 0x0CE0, 0x0CE1); + TX_CHAR_RANGE(ch, 0x0D05, 0x0D0C); + TX_CHAR_RANGE(ch, 0x0D0E, 0x0D10); + TX_CHAR_RANGE(ch, 0x0D12, 0x0D28); + TX_CHAR_RANGE(ch, 0x0D2A, 0x0D39); + TX_CHAR_RANGE(ch, 0x0D60, 0x0D61); + TX_CHAR_RANGE(ch, 0x0E01, 0x0E2E); + TX_MATCH_CHAR(ch, 0x0E30); + TX_CHAR_RANGE(ch, 0x0E32, 0x0E33); + TX_CHAR_RANGE(ch, 0x0E40, 0x0E45); + TX_CHAR_RANGE(ch, 0x0E81, 0x0E82); + TX_MATCH_CHAR(ch, 0x0E84); + TX_CHAR_RANGE(ch, 0x0E87, 0x0E88); + TX_MATCH_CHAR(ch, 0x0E8A); + TX_MATCH_CHAR(ch, 0x0E8D); + TX_CHAR_RANGE(ch, 0x0E94, 0x0E97); + TX_CHAR_RANGE(ch, 0x0E99, 0x0E9F); + TX_CHAR_RANGE(ch, 0x0EA1, 0x0EA3); + TX_MATCH_CHAR(ch, 0x0EA5); + TX_MATCH_CHAR(ch, 0x0EA7); + TX_CHAR_RANGE(ch, 0x0EAA, 0x0EAB); + TX_CHAR_RANGE(ch, 0x0EAD, 0x0EAE); + TX_MATCH_CHAR(ch, 0x0EB0); + TX_CHAR_RANGE(ch, 0x0EB2, 0x0EB3); + TX_MATCH_CHAR(ch, 0x0EBD); + TX_CHAR_RANGE(ch, 0x0EC0, 0x0EC4); + TX_CHAR_RANGE(ch, 0x0F40, 0x0F47); + TX_CHAR_RANGE(ch, 0x0F49, 0x0F69); + TX_CHAR_RANGE(ch, 0x10A0, 0x10C5); + TX_CHAR_RANGE(ch, 0x10D0, 0x10F6); + TX_MATCH_CHAR(ch, 0x1100); + TX_CHAR_RANGE(ch, 0x1102, 0x1103); + TX_CHAR_RANGE(ch, 0x1105, 0x1107); + TX_MATCH_CHAR(ch, 0x1109); + TX_CHAR_RANGE(ch, 0x110B, 0x110C); + TX_CHAR_RANGE(ch, 0x110E, 0x1112); + TX_MATCH_CHAR(ch, 0x113C); + TX_MATCH_CHAR(ch, 0x113E); + TX_MATCH_CHAR(ch, 0x1140); + TX_MATCH_CHAR(ch, 0x114C); + TX_MATCH_CHAR(ch, 0x114E); + TX_MATCH_CHAR(ch, 0x1150); + TX_CHAR_RANGE(ch, 0x1154, 0x1155); + TX_MATCH_CHAR(ch, 0x1159); + TX_CHAR_RANGE(ch, 0x115F, 0x1161); + TX_MATCH_CHAR(ch, 0x1163); + TX_MATCH_CHAR(ch, 0x1165); + TX_MATCH_CHAR(ch, 0x1167); + TX_MATCH_CHAR(ch, 0x1169); + TX_CHAR_RANGE(ch, 0x116D, 0x116E); + TX_CHAR_RANGE(ch, 0x1172, 0x1173); + TX_MATCH_CHAR(ch, 0x1175); + TX_MATCH_CHAR(ch, 0x119E); + TX_MATCH_CHAR(ch, 0x11A8); + TX_MATCH_CHAR(ch, 0x11AB); + TX_CHAR_RANGE(ch, 0x11AE, 0x11AF); + TX_CHAR_RANGE(ch, 0x11B7, 0x11B8); + TX_MATCH_CHAR(ch, 0x11BA); + TX_CHAR_RANGE(ch, 0x11BC, 0x11C2); + TX_MATCH_CHAR(ch, 0x11EB); + TX_MATCH_CHAR(ch, 0x11F0); + TX_MATCH_CHAR(ch, 0x11F9); + TX_CHAR_RANGE(ch, 0x1E00, 0x1E9B); + TX_CHAR_RANGE(ch, 0x1EA0, 0x1EF9); + TX_CHAR_RANGE(ch, 0x1F00, 0x1F15); + TX_CHAR_RANGE(ch, 0x1F18, 0x1F1D); + TX_CHAR_RANGE(ch, 0x1F20, 0x1F45); + TX_CHAR_RANGE(ch, 0x1F48, 0x1F4D); + TX_CHAR_RANGE(ch, 0x1F50, 0x1F57); + TX_MATCH_CHAR(ch, 0x1F59); + TX_MATCH_CHAR(ch, 0x1F5B); + TX_MATCH_CHAR(ch, 0x1F5D); + TX_CHAR_RANGE(ch, 0x1F5F, 0x1F7D); + TX_CHAR_RANGE(ch, 0x1F80, 0x1FB4); + TX_CHAR_RANGE(ch, 0x1FB6, 0x1FBC); + TX_MATCH_CHAR(ch, 0x1FBE); + TX_CHAR_RANGE(ch, 0x1FC2, 0x1FC4); + TX_CHAR_RANGE(ch, 0x1FC6, 0x1FCC); + TX_CHAR_RANGE(ch, 0x1FD0, 0x1FD3); + TX_CHAR_RANGE(ch, 0x1FD6, 0x1FDB); + TX_CHAR_RANGE(ch, 0x1FE0, 0x1FEC); + TX_CHAR_RANGE(ch, 0x1FF2, 0x1FF4); + TX_CHAR_RANGE(ch, 0x1FF6, 0x1FFC); + TX_MATCH_CHAR(ch, 0x2126); + TX_CHAR_RANGE(ch, 0x212A, 0x212B); + TX_MATCH_CHAR(ch, 0x212E); + TX_CHAR_RANGE(ch, 0x2180, 0x2182); + TX_MATCH_CHAR(ch, 0x3007); + TX_CHAR_RANGE(ch, 0x3021, 0x3029); + TX_CHAR_RANGE(ch, 0x3041, 0x3094); + TX_CHAR_RANGE(ch, 0x30A1, 0x30FA); + TX_CHAR_RANGE(ch, 0x3105, 0x312C); + TX_CHAR_RANGE(ch, 0x4E00, 0x9FA5); + TX_CHAR_RANGE(ch, 0xAC00, 0xD7A3); + return MB_FALSE; +} //-- isAlphaChar + +/** + * Returns true if the given character is an allowable NCName character +**/ +MBool ExprLexer::isNCNameChar(UNICODE_CHAR ch) +{ +/* NCNameChar = Letter | Digit ('0'-'9') | '.' | '-' | '_' | + CombiningChar | Extender */ + if (isLetter(ch)) return MB_TRUE; /* Letter | '_' */ + + TX_CHAR_RANGE(ch, 0x002D, 0x002E); /* '-' | '.' */ + TX_CHAR_RANGE(ch, 0x0030, 0x0039); /* Digit */ + TX_MATCH_CHAR(ch, 0x00B7); + TX_MATCH_CHAR(ch, 0x02D0); + TX_MATCH_CHAR(ch, 0x02D1); + TX_CHAR_RANGE(ch, 0x0300, 0x0345); + TX_CHAR_RANGE(ch, 0x0360, 0x0361); + TX_MATCH_CHAR(ch, 0x0387); + TX_CHAR_RANGE(ch, 0x0483, 0x0486); + TX_CHAR_RANGE(ch, 0x0591, 0x05A1); + TX_CHAR_RANGE(ch, 0x05A3, 0x05B9); + TX_CHAR_RANGE(ch, 0x05BB, 0x05BD); + TX_MATCH_CHAR(ch, 0x05BF); + TX_CHAR_RANGE(ch, 0x05C1, 0x05C2); + TX_MATCH_CHAR(ch, 0x05C4); + TX_MATCH_CHAR(ch, 0x0640); + TX_CHAR_RANGE(ch, 0x064B, 0x0652); + TX_MATCH_CHAR(ch, 0x0670); + TX_CHAR_RANGE(ch, 0x06D6, 0x06DC); + TX_CHAR_RANGE(ch, 0x06DD, 0x06DF); + TX_CHAR_RANGE(ch, 0x06E0, 0x06E4); + TX_CHAR_RANGE(ch, 0x06E7, 0x06E8); + TX_CHAR_RANGE(ch, 0x06EA, 0x06ED); + TX_CHAR_RANGE(ch, 0x0901, 0x0903); + TX_MATCH_CHAR(ch, 0x093C); + TX_CHAR_RANGE(ch, 0x093E, 0x094C); + TX_MATCH_CHAR(ch, 0x094D); + TX_CHAR_RANGE(ch, 0x0951, 0x0954); + TX_CHAR_RANGE(ch, 0x0962, 0x0963); + TX_CHAR_RANGE(ch, 0x0981, 0x0983); + TX_MATCH_CHAR(ch, 0x09BC); + TX_MATCH_CHAR(ch, 0x09BE); + TX_MATCH_CHAR(ch, 0x09BF); + TX_CHAR_RANGE(ch, 0x09C0, 0x09C4); + TX_CHAR_RANGE(ch, 0x09C7, 0x09C8); + TX_CHAR_RANGE(ch, 0x09CB, 0x09CD); + TX_MATCH_CHAR(ch, 0x09D7); + TX_CHAR_RANGE(ch, 0x09E2, 0x09E3); + TX_MATCH_CHAR(ch, 0x0A02); + TX_MATCH_CHAR(ch, 0x0A3C); + TX_MATCH_CHAR(ch, 0x0A3E); + TX_MATCH_CHAR(ch, 0x0A3F); + TX_CHAR_RANGE(ch, 0x0A40, 0x0A42); + TX_CHAR_RANGE(ch, 0x0A47, 0x0A48); + TX_CHAR_RANGE(ch, 0x0A4B, 0x0A4D); + TX_CHAR_RANGE(ch, 0x0A70, 0x0A71); + TX_CHAR_RANGE(ch, 0x0A81, 0x0A83); + TX_MATCH_CHAR(ch, 0x0ABC); + TX_CHAR_RANGE(ch, 0x0ABE, 0x0AC5); + TX_CHAR_RANGE(ch, 0x0AC7, 0x0AC9); + TX_CHAR_RANGE(ch, 0x0ACB, 0x0ACD); + TX_CHAR_RANGE(ch, 0x0B01, 0x0B03); + TX_MATCH_CHAR(ch, 0x0B3C); + TX_CHAR_RANGE(ch, 0x0B3E, 0x0B43); + TX_CHAR_RANGE(ch, 0x0B47, 0x0B48); + TX_CHAR_RANGE(ch, 0x0B4B, 0x0B4D); + TX_CHAR_RANGE(ch, 0x0B56, 0x0B57); + TX_CHAR_RANGE(ch, 0x0B82, 0x0B83); + TX_CHAR_RANGE(ch, 0x0BBE, 0x0BC2); + TX_CHAR_RANGE(ch, 0x0BC6, 0x0BC8); + TX_CHAR_RANGE(ch, 0x0BCA, 0x0BCD); + TX_MATCH_CHAR(ch, 0x0BD7); + TX_CHAR_RANGE(ch, 0x0C01, 0x0C03); + TX_CHAR_RANGE(ch, 0x0C3E, 0x0C44); + TX_CHAR_RANGE(ch, 0x0C46, 0x0C48); + TX_CHAR_RANGE(ch, 0x0C4A, 0x0C4D); + TX_CHAR_RANGE(ch, 0x0C55, 0x0C56); + TX_CHAR_RANGE(ch, 0x0C82, 0x0C83); + TX_CHAR_RANGE(ch, 0x0CBE, 0x0CC4); + TX_CHAR_RANGE(ch, 0x0CC6, 0x0CC8); + TX_CHAR_RANGE(ch, 0x0CCA, 0x0CCD); + TX_CHAR_RANGE(ch, 0x0CD5, 0x0CD6); + TX_CHAR_RANGE(ch, 0x0D02, 0x0D03); + TX_CHAR_RANGE(ch, 0x0D3E, 0x0D43); + TX_CHAR_RANGE(ch, 0x0D46, 0x0D48); + TX_CHAR_RANGE(ch, 0x0D4A, 0x0D4D); + TX_MATCH_CHAR(ch, 0x0D57); + TX_MATCH_CHAR(ch, 0x0E31); + TX_CHAR_RANGE(ch, 0x0E34, 0x0E3A); + TX_MATCH_CHAR(ch, 0x0E46); + TX_CHAR_RANGE(ch, 0x0E47, 0x0E4E); + TX_MATCH_CHAR(ch, 0x0EB1); + TX_CHAR_RANGE(ch, 0x0EB4, 0x0EB9); + TX_CHAR_RANGE(ch, 0x0EBB, 0x0EBC); + TX_MATCH_CHAR(ch, 0x0EC6); + TX_CHAR_RANGE(ch, 0x0EC8, 0x0ECD); + TX_CHAR_RANGE(ch, 0x0F18, 0x0F19); + TX_MATCH_CHAR(ch, 0x0F35); + TX_MATCH_CHAR(ch, 0x0F37); + TX_MATCH_CHAR(ch, 0x0F39); + TX_MATCH_CHAR(ch, 0x0F3E); + TX_MATCH_CHAR(ch, 0x0F3F); + TX_CHAR_RANGE(ch, 0x0F71, 0x0F84); + TX_CHAR_RANGE(ch, 0x0F86, 0x0F8B); + TX_CHAR_RANGE(ch, 0x0F90, 0x0F95); + TX_MATCH_CHAR(ch, 0x0F97); + TX_CHAR_RANGE(ch, 0x0F99, 0x0FAD); + TX_CHAR_RANGE(ch, 0x0FB1, 0x0FB7); + TX_MATCH_CHAR(ch, 0x0FB9); + TX_CHAR_RANGE(ch, 0x20D0, 0x20DC); + TX_MATCH_CHAR(ch, 0x20E1); + TX_MATCH_CHAR(ch, 0x3005); + TX_CHAR_RANGE(ch, 0x302A, 0x302F); + TX_CHAR_RANGE(ch, 0x3031, 0x3035); + TX_MATCH_CHAR(ch, 0x3099); + TX_MATCH_CHAR(ch, 0x309A); + TX_CHAR_RANGE(ch, 0x309D, 0x309E); + TX_CHAR_RANGE(ch, 0x30FC, 0x30FE); + return MB_FALSE; +} //-- isNCNameChar diff --git a/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp b/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp new file mode 100644 index 00000000000..356d583a2e1 --- /dev/null +++ b/mozilla/extensions/transformiix/source/xpath/UnaryExpr.cpp @@ -0,0 +1,73 @@ +/* + * 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 Initial Developer of the Original Code is Jonas Sicking. + * Portions created by Jonas Sicking are Copyright (C) 2001, Jonas Sicking. + * All rights reserved. + * + * Contributor(s): + * Jonas Sicking, sicking@bigfoot.com + * -- original author. + */ + +#include "Expr.h" + +UnaryExpr::UnaryExpr() +{ + expr = 0; +} + +UnaryExpr::UnaryExpr(Expr* expr) +{ + this->expr = expr; +} + +UnaryExpr::~UnaryExpr() +{ + delete expr; +} + +void UnaryExpr::setExpr(Expr* expr) +{ + delete this->expr; + this->expr = expr; +} + +/* + * Evaluates this Expr based on the given context node and processor state + * @param context the context node for evaluation of this Expr + * @param ps the ContextState containing the stack information needed + * for evaluation. + * @return the result of the evaluation. + */ +ExprResult* UnaryExpr::evaluate(Node* context, ContextState* cs) +{ + ExprResult* exprRes = expr->evaluate(context, cs); + double value = exprRes->numberValue(); + delete exprRes; + return new NumberResult(-value); +} + +/* + * Returns the String representation of this Expr. + * @param dest the String to use when creating the String + * representation. The String representation will be appended to + * any data in the destination String, to allow cascading calls to + * other #toString() methods for Expressions. + * @return the String representation of this Expr. + */ +void UnaryExpr::toString(String& str) +{ + if (!expr) + return; + str.append('-'); + expr->toString(str); +} diff --git a/mozilla/themes/modern/communicator/icons/lock-mixed.gif b/mozilla/themes/modern/communicator/icons/lock-mixed.gif new file mode 100644 index 0000000000000000000000000000000000000000..82e4391ffe4f9c1704c9c157986e70f0675b5a0a GIT binary patch literal 582 zcmZ?wbhEHblw#mvc*el+!h}UkO4VCYHmKP!%Jk)1y63Dqdj3XL zeNSQ2g!Z19DdlZHfBjvwVNZ4U4BzCEH9L>YU$<-0q74b0iJ8_Rd?wFf@VUPZqGlbwDI2P8ir1H!w6caWFBqOS3mKw6-&L zb~kfKD#nV2iOp!5=*O@hufk}w3Pf&`fY3cIzl@5y;Ss9xdS++84-nnbXrY+m{ z?K;r3eb3RplYN|=eJ76Z($-KlG1PPt<7G6`y?J3GqkssPf&{;uI2)rdH_xlZ-HcWi zrj}aD_Ohak`f9)Ke>^hLxZO|Ix||_*?uLWSE&X!lY&;wW$?Zp4&QHuSS(KbtrTCMD0R(hF1W2BNiEB(TTo8~NJ HV6X-N^ScoH literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..ae3569f2d8687796de330110886c0f029dfdb8d9 GIT binary patch literal 70 zcmZ?wbhEHbWM^PySj51vaqr1Vi#Hv=bobhWR|_}pXMh34pDbXe4u}M)WnkvE*sx~L NyNM331uWDVtN|o&6r=zE literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-sel.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm-sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..5897f98c715b7e22ab13b62bf2cd0f92b9bc30e2 GIT binary patch literal 49 ycmZ?wbhEHbWM^PyXkcJCcH#E3w_g;0vM_*v4u}BBFfeiO^tCO&z0;48!5RQgwG6TV literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-btm.gif new file mode 100644 index 0000000000000000000000000000000000000000..f1500c4c2d52dfda6f8a0a7a43d2ec313e40fc65 GIT binary patch literal 49 ycmZ?wbhEHbWM^PyXkcL2xcB6>2d@-=vM_*v4u}BBFfeiO^tCO&z0;48!5RQT-V9Ly literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-act.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..bc81aec54b278ffbcd8de67f9061788e5a645c98 GIT binary patch literal 50 zcmZ?wbhEHbWM^Pxn8?5|WBJzBDT|Wxsu&m;6o0Y+Nd^WT5CM{BU}6qwh+wb=059_i A`Tzg` literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..968af6ea4d586153d86fdfa1e1a657e971c3ab5c GIT binary patch literal 44 tcmZ?wbhEHbWM^PxXkcL2xcB6>2d@-=vM_*v4u}BBFfcLm^szEn0{{U&2{`}& literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-sel.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid-sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..495d52119d950b0664b94b975867fb5ec4a31350 GIT binary patch literal 44 tcmZ?wbhEHbWM^PxXkcJCcH#E3w_g;0vM_*v4u}BBFfcLm^szEn0{{##37P-^ literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-mid.gif new file mode 100644 index 0000000000000000000000000000000000000000..968af6ea4d586153d86fdfa1e1a657e971c3ab5c GIT binary patch literal 44 tcmZ?wbhEHbWM^PxXkcL2xcB6>2d@-=vM_*v4u}BBFfcLm^szEn0{{U&2{`}& literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-act.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..f5b941985a5bfad468e3d7892ba470f1382aaf6b GIT binary patch literal 186 zcmZ?wbhEHbWM>dyIKsd%WBJyNdrv0kRkco8R5x+)s_jQtY(Kng>)~q;UQJ!Re&XCU zb64+LvGeGZ#p~OqE?&Cz@ci}rmTo$*VEx{iE4D4&a(MBkLuao)n6+~I${j~$uh_P1 z8_-A;p!kyo%+~>tAUhdY%@u@tmU#3%%M{Gf-t%F#O37u8zM?l%40PHS9Axhh={v&1 cX34;y!owzLP?@o;!IhP}p+G;zfrG&s00pK_mH+?% literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..7b75b6b8b0956388b0af0221283324bbf2ab4ef5 GIT binary patch literal 183 zcmZ?wbhEHbWM>dyIKsfNaqr1%4_?(xTzvH6ox|sE9X@yS;Mp68FWla=@6@4lH@6)+ zci`;J{im<*J9%}>fz$g>U)y!;(zzRt4xYQUdH?AHXKtLhd~fHm%SSHU-h1jg12&-e zlLaiS10q3oGO(H?F!U_(=zA8)nIp|wAYSB3GAgpI0Ji^9P#5)!_Brzf&l$^><^ Ts;~wmtYF|SYhrC-V6X-Noc2%< literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-sel.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top-sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..a063ca6000b2a5a38f360bf24ffc3736a7ce5e95 GIT binary patch literal 184 zcmZ?wbhEHbWM>dyIKsei?85Dhdrv-l`{nYT=MSELted#_%Doqt?>@ix{N2Ud&yHWZ zbLr0WW0&rnyn6q_&8HV`Jv)8v(M6!_vv=oiK0SQ)`i0xi&s=+S{>Bpq96<3W3s^=6 zM1t&OU^P_`>RIB^_sml?M_aH!C&qcN4%1_mKgtZfQE%A`B>G&AGIC}_@v$p41a^8f PPS$2v6q>=P$Y2csF>_Ld literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-lft-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..fac11d6b9dac4feba87d03ea37dd1690baeed9fb GIT binary patch literal 184 zcmZ?wbhEHbWM>dyIKsfNaqr1%4_@7S{_g0-J9QHmA3lHU@VT1@&)ztE;r79Ew>IxT zec;TEL+5VpKYeZ2v5RM~KiGBr%Fd$~&s@8|_tf<*2hMIgbd~`xQ2faPme&E1AUhdY zO&2iqEb-`j_ER87o3%hkV#`5;rcE+`l&o444u(ib_=-MOxay$5q~fZ?sOqW~Dx_k) KsK8y3!5RRy4obHG literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-act.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..daa9a177de98e98ed721acdd4bf2e0d46d49180e GIT binary patch literal 44 tcmZ?wbhEHbWMp7tXkcKNv3%>b2d@-=vM_*v4u}BBFfcK<$g(n60|5D+2>Sp4 literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-mid-btm-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..1df63d5fdf51dfcde635f46d74ac655103edd01d GIT binary patch literal 50 zcmZ?wbhEHbWMp7tn8?7eaqr3Fm+nqlyorHM1ss!#nQM=aU%q?s?(PlLgGv0g)gx7+AOkJWNk;IkANJSP3#%0|0haBsBm4 literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-mid-top.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-mid-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..8f6df9ce27cc82997bfe4cfe786de016af0adbca GIT binary patch literal 94 zcmZ?wbhEHbWMmLv*v!DNaqr2a7w;TCfBV3h8wbzb+I#AH-NeOP51u`I{??&$H+LPs ovi-=#YY$#Az<}aU7BEu>M1ss(^b literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-btm-act.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-btm-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..4900191f6e7f9addd56d0ce7a52150bc53bfd9d9 GIT binary patch literal 87 zcmZ?wbhEHbRAOLdSj51vaqr0)%eP*8@an?tr&sR1Jb&{E0~jd&WC7DUAQGgOfmudk i*BK^*Q<}3w`?IQ|?>1E1{(*m*(NbwZkHN4g-TV0J`HAMF0Q* literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..43b0c7392547f722eba54b28c56e804731e59298 GIT binary patch literal 72 zcmZ?wbhEHbRAOLcSj51vaqr1Z`%iD$cWU$g(~}o(-n8%Z@k@6Z7#I|PvH(d21|1Lq YQp>>1D`90Q=j!3ev%?~L4g-TV0OZIQ8~^|S literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-sel.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid-sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..fce1215efe5549efc6bde1c3f62a1ac88e2a45c6 GIT binary patch literal 57 zcmZ?wbhEHbRAOLcn8?6z?85D1m+l<9eCPP3JBmM97(hS=M1bTOn7F2>FBW>suz1cU H1_o;YKtU2N literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-mid.gif new file mode 100644 index 0000000000000000000000000000000000000000..607d98beefc6c00a3d34dbe453e8f4d9d53d3775 GIT binary patch literal 71 zcmZ?wbhEHbRAOLcSj51vaqr1Z`%iD$cWN_;Jk0>1BVlDI=i=em Lu-D=-3xhQPA}A9S literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-act.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..ff3ab46dee446199b305f02892ab00cf6f082542 GIT binary patch literal 1301 zcmWktdrVVz7%fl~pjpgDGI0|3FcFyMJJVQo_?k2Mz2_8bP9}4MCV`|-GdqnA0v1wb02Dglmtg^yeBhu zNpxLR`IgTidJ^(y{Iao#T z)aHvV5Km*3heoaNE(rHB5S4f| zz%qGZCE+5$r4~r!7!_K)@UT_n4@t*E;{Zq}LRONLKbl39CW&W47JMwQ_!wLTthM#L zTwpwuwPV%}9@?X_+(QXfnA9wg?ObJ-%8V_Lj6tK!V+u8pNaG4Vl?P@Niwr)7qy_{f25looiV|vV zBE6maisZc_9aHlnx8FH6@1Q6r0Fc(smgxAnlOxk{hx7~>oic-O@w-IY`n&fLCBaf#AfeVZ^^~o3C;+7hlWdb$8kq3{ zaF;9Z#w;wt%fieYgM)=xZuLrf)n+|O_9={Zijs^3x&-Q>kpO$x#@0F8*n`)37)xQi z(V`zP1_q}{i^BsOW+!7IlEEg?O;>-6YhL-`R)YU0^*p~%a%SGN{4H7I1dg!n75 zrIPsAqfslk>&lizyjb<6|Mi2n`%YbtYsttkn;D(} literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-top-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..f1455e65bb914d688c22cb24be722fc40a6d129c GIT binary patch literal 1241 zcmWlYdu$U00LD8QGUT<5k&I`?RD@;f2pGX34n%=O2#SyJ5C_EQA4D-B28lw)#z3~1 zft#{qjt&?w2CVJcu8+07>-%x-J$k*~UEkNPy*1 zd6m3>c)W4FQ>3G=6gAf4_=%Ca#j{)(jP+IAaNKMGa>vw|boZRZtAYQS~A;A11txajc ziEy&(?A4GPGuaZ++`L@=g_=Zdjxfl2382;~kYf~hPP<6QA1$#80$TNjRv zs?7RO>^8}O2u*|%AWTd2sLX;fnY_&63KeJ6F5e_fdlP97n{uZpUw{At4!#7pK*BLLG?8OfEW+9tRv6J7EmRbug{45=xj=BkJ&PepIj0#Q|vF=-AqZV8YI^;%d!iJA3En`|Jl+O8*8GkYZ zKqTOpg#sb6z3<+W*;OSoY`%0~k4W^+aRV&X!653LbdZxyYGQU^sLwgYG1-E2wz5B_ zu($!#D-dd9*`hnh$|1MhM#vxnfINECr^fvw?%;hqKt_@Zgj)BkocBVFFYLu9coqNg z=2ooUD-?k370ViqS%l$T<(2Es=Xl?{err7PMEEQs46S@8cdU`~d}pY*aPQxi6CEdy z|8cRorRiW3pU&D&u^I<-3dGmY>03NRzU;V4a|7r9gHFo&JwWpu+e`u%s z@g=M41h)k*E#7$ijd0t6z?Mxl98}ghqU%0gy>+p;HGO$o)!a8LHk^xecGhk$`9as6 z&YQ2k4}3=U*{`S;JU^K~>?s5I#(AfB`>M)syt3xq^TN>+-E+D=zkF%`jk@{24}WtP zIVY=b8xSm9RQt=%_D>o+1}py(9(+19a!JroI`VOy7+gEdJY3!j@=x`&E!vc58gj1s zs`paIx}~9A^Xei%Yv*S5?%bUHqg6O?WpOXEZ$TcYhu-_~Oxd-X{;S2Eb%#32+AI6m zdTX=!?AD&L?SrYb$0L9B%uozg17JO`R!)JAKQzSm3Sx~1UOF$Nq&CD$5+y zaB%5PbjajrxpdRVuoTN_Opd{ESZhWHjc`K98s{=Iyf83kiSoSFPbY<}BS0h5 zRFoG`EHZ4KqB$N(GXn-&GMiP8fPf*z3LXaz{ zcap#)2A~)ch;+r~X-=>QqJWD~{&EZUQii!Sl3~c1lpgj3s3hu-s76c=ZCsdNyMVOuZXqb|7F-;=fa=FJr#`_;x(LmHRi5s27{h72o!=iZ9I-dcj zh`5l|nj9z*L;Q4%7hpX0SjZ}`-a&kkVUu$z!}g4t&2G|w_`D3O)+ z%U|i$-g`W6^HMH`^-;5UEEVCNdXG+GQHtY7P;3xHVIKv$2s;@Er${%$k}Nm!Bu&Ip z2p&ZzH>pw26 z>6A)W9IxElao{;|Q|^i4%17_rT36F8|60@duI%*LPN?E-y`;Qg(Na;-;d8g}RD^+9lGu70ufeKYnzr{@&^G#^pt8zdBR5)74lj zF4?tfU1ubGOv#_K3w{S=H;l?!60(2P@0;SBblQ%Ei^?NAp+j klOu-0ZLr$BW^==4AZMeZwXkI4pNTyM3*?_PRET!|3z!QfRR910 literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-rit-top.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-rit-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..b45ce47cb43e4bbca56ba0d49925efdc84ee7810 GIT binary patch literal 1130 zcmeH`?N1v80LHISpktU7wm9ZkC}pB7YPzU#x`i;^crlugWhNvprp(OjlkNji_eFCdF8$@SS*>33K_efcB1sM#kaWOxjw(b=VS{^z+?hM*`F-_ zsUO!@Yysf^{HKAAKa~IS7oPN!PXMaF0EMb;z+^9G&{$J$JqVc_e~H;4CWbtew&Oy6vp{GbLl>ED{_ zZ7iPBtC!v#Z+PugTfTYwQcZ39M=yyZ-Dkd2&$sqozGCdF>pOCC)NxCrXi&b`(=AKm zKCwmnig-m*H%!}(rnRE}qDlom^|&%Wb5HuA``|#U@i&FPzOGC8@X-7AuNn^>U)No@ z2*WG*r(M+{^@II}hI3cXx6XA2+h5)Lth}H@_G(@>3|-Ujo}HO*nmfANVV!(O3+*{F z@Y%ID_f0l;eydW?-k4}R-g{Tqf4ZfXy3^Cs(l|^loPFl)PiTV)F3xJ+xcVMDU3+O_ tRsqzj@_UpAF6%p=9)659-yQ7;Y81rKnXZZI?s)qRrBRwVT(1O9{tbjS`TGC> literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-act.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..48658c251537d52866e38d95c49936abd781480e GIT binary patch literal 69 zcmZ?wbhEHbWMmLySj51vaqr2E`%iD!f2MoR+G`J9Z9H&h!-3Nb3=E1tS%4%1gARxQ Vsbyg1;@Bmi=GtPw5zNV84FI6R75M-F literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-hov.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-hov.gif new file mode 100644 index 0000000000000000000000000000000000000000..e01a129c1f283ae0f158c68d29b05af19c19276a GIT binary patch literal 68 zcmZ?wbhEHbWMmLySj51vaqr2E`%Z1zck0@MSKV{gGQfc1PZls!2SkF@GB9&;>=Mvp LoOCdRiNP8G=Mxdq literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-sel.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap-sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..c556f9871a97b3b785db90b82f8a26f31cbb2a94 GIT binary patch literal 68 zcmZ?wbhEHbWMmLySj51vaqr1v7jAFdcdBv9vW@#rK6w6-0Spv>vVdtF5D8Mtz|6_9 O%UdaHibFONgEas~sT6Pk literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap.gif b/mozilla/themes/modern/communicator/sidebar/sbtab-ritcap.gif new file mode 100644 index 0000000000000000000000000000000000000000..37929ca7c0184f092839d0e95cd52bc1f1bb2600 GIT binary patch literal 52 zcmZ?wbhEHbWMmLyn8?7eaqr1%4_25SI? C0}Q(W literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/mini-slider-hrz-mid.gif b/mozilla/themes/modern/global/scrollbar/mini-slider-hrz-mid.gif new file mode 100644 index 0000000000000000000000000000000000000000..5fe1eaedee0a692bc0dbfdc66ec291c8d8214b85 GIT binary patch literal 65 zcmZ?wbhEHbWMtrESj50EXVEGK28JbTHcyzjxTd8a$c6yLpDbX84u}M)WngBLFu9pF literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-grip-act.gif b/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-grip-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..331ac8b11a1838ba8c63ea1802f7232a85b6ce8f GIT binary patch literal 116 zcmZ?wbhEHbG vhy#S0{l&79Tb(Ztl0vB~UCh2L8T76xkoZEYc- literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-lft-act.gif b/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-lft-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..61ae5f182953131d48f433e570d133ebb2a84a58 GIT binary patch literal 99 zcmZ?wbhEHbWM<%G*vtR|>$V@9w{q)@B^&$atjepOxOUrt_Nhy%I%myYxwU)7@`8p* nU{z2;@h1zIr2`^CW-zb_2zV?I;CRW!dxqf%qsVCyMh0sDmi-*d literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-mid-act.gif b/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-mid-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..349f4228787cf6ef96d6933a8b95a98b39b599ab GIT binary patch literal 65 zcmZ?wbhEHbWMtrESj50EW64Ga28PM=*A_HPn!9rAq=2-)!e9*mZHo`G literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-rit-act.gif b/mozilla/themes/modern/global/scrollbar/mini-thumb-hrz-rit-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..7cc951680b626740de9ec9bc33a914621ce09bf4 GIT binary patch literal 99 zcmZ?wbhEHbWM<%G*vtR|ozs@iUAeWmdFtf(YYQ4C%~-Orrh868UR~Ri#gpc(sqdQy mRs|&#f3kpCIv^5c1_O(Lz=G vhy=2-)!e9*mZL1Hm literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/mini-thumb-vrt-top-act.gif b/mozilla/themes/modern/global/scrollbar/mini-thumb-vrt-top-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..9183231ae9a620dcd3cf9f3b751af1d2c66a338e GIT binary patch literal 97 zcmZ?wbhEHb$V@9w{q)@B^&$atjepOxOUrt_Nhy%I%myYxwU)7@`8p* lU{z2;@h1zIr2`^CW-zeu37qf@-O(n}IZ5E~Mg~C!YXEFC9jpKV literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/slider-hrz-lft.gif b/mozilla/themes/modern/global/scrollbar/slider-hrz-lft.gif new file mode 100644 index 0000000000000000000000000000000000000000..9c8d26107bd2b7518e4488e2643f12ba4d3107ce GIT binary patch literal 73 zcmZ?wbhEHbWM<%FSi}GVbC+$}e&E#ZBNrB~+A?R^Mz9!z;!hSZLkC2H)G{#hac~Jb RG#xcqy+`D@Q5X}0H2?(d6CeNp literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/slider-hrz-mid.gif b/mozilla/themes/modern/global/scrollbar/slider-hrz-mid.gif new file mode 100644 index 0000000000000000000000000000000000000000..208e7178701817c272600893c25a78f8ba2f0694 GIT binary patch literal 102 zcmZ?wbhEHblx5&!Sj50EXVEGK28JbTHcyzjxTd8a$c6yLpDbX84u}M)Wnk8p*mdV$ w;|b5zdsAMV-Tj|gp)VzKUdF0*Ij{E>=$tRfUF@{(ea(CB2@3)yGB8*J0Qi0*SpWb4 literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/slider-hrz-rit.gif b/mozilla/themes/modern/global/scrollbar/slider-hrz-rit.gif new file mode 100644 index 0000000000000000000000000000000000000000..7e676e414fdee74c8de3dc394a90cf7b10bab1f4 GIT binary patch literal 74 zcmZ?wbhEHbWM<%FSi}GV=dRy7a{BVzWt+AiII;b}DX%=Jq5~p9W-zem8l3Q)yjSAo*~b456a-p4y3#CHB?WF-KjGY_2ZvV3-e-Ej+_s>g OLPM&5N{Rv#gEas$L@IIs literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/thumb-hrz-lft-act.gif b/mozilla/themes/modern/global/scrollbar/thumb-hrz-lft-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..3f5dd04e4e7485b57a377e74d118caab176b6692 GIT binary patch literal 104 zcmZ?wbhEHbWM<%F*vtR|>$V@9w{q+JRol8}EbpJQDzARx+?89~r!J}LoHb*~#h($ literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/thumb-hrz-rit-act.gif b/mozilla/themes/modern/global/scrollbar/thumb-hrz-rit-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..850c6f3a632bdc4c78994c5dddc62e2b1286c7ae GIT binary patch literal 106 zcmZ?wbhEHbWM<%F*vtR|ozs@iS+S*k>XNxDx6W9yvAB6^+myxiee-I%=OpCS6*Nqm zG;hu1`D?*y85DoAfEhX<5@ZGgi@3mvr4G&uWE9xGyL@0&)XZX-%+RLjDac?A0P2w; A_W%F@ literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/thumb-vrt-btm-act.gif b/mozilla/themes/modern/global/scrollbar/thumb-vrt-btm-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..b538f65c6d23c74bbe9cc895cce6ef06d226efc7 GIT binary patch literal 105 zcmZ?wbhEHbXNxDx6W9yvAB6^+myxiee-I%=OpCS6*Nqm zG;hu1`D?*y85DoAfEhX<5@ZGgi%=Jq5~p9W-zem8mO?e?L9C@Vdam6ZKVv3BI$}n!IjIjD-)$&H^$$Ym9g-eiX6|4 NS&=2?ceI!otO3XrC!qiU literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/thumb-vrt-mid-act.gif b/mozilla/themes/modern/global/scrollbar/thumb-vrt-mid-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..4852cfac3923b6bab55a16c4e64458b8181ddb9c GIT binary patch literal 68 zcmZ?wbhEHbh($ literal 0 HcmV?d00001 diff --git a/mozilla/themes/modern/global/scrollbar/thumb-vrt-top-act.gif b/mozilla/themes/modern/global/scrollbar/thumb-vrt-top-act.gif new file mode 100644 index 0000000000000000000000000000000000000000..99fcbf0663ddc764b62accbcc170a44cf091277d GIT binary patch literal 102 zcmZ?wbhEHb$V@9w{q+JRol8}EbpJQDzARx+?89~r!J}LoHb*~# .thumb-horz-spring-left { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-hrz-lft-act.gif"); +} + +thumb:active > .thumb-horz-box-middle { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-hrz-mid-act.gif"); +} + +thumb:active > .thumb-horz-spring-right { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-hrz-rit-act.gif"); +} + +thumb:active > .thumb-horz-box-middle > .thumb-horz-grippy { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-hrz-grip-act.gif"); +} + +/* ::::: thumb (vertical) ::::: */ + +thumb[align="vertical"] { + -moz-binding: url("chrome://global/skin/globalBindings.xml#thumb-vertical"); +} + +.thumb-vert-spring-top { + background: url("chrome://global/skin/scrollbar/mini-thumb-vrt-top.gif") no-repeat; + height: 3px; + width: 8px; +} + +.thumb-vert-box-middle { + background: url("chrome://global/skin/scrollbar/mini-thumb-vrt-mid.gif") repeat-y; + width: 8px; +} + +.thumb-vert-spring-bottom { + background: url("chrome://global/skin/scrollbar/mini-thumb-vrt-btm.gif") no-repeat; + height: 3px; + width: 8px; +} + +.thumb-vert-grippy { + margin-top: 1px; + height: 10px; + background: url("chrome://global/skin/scrollbar/mini-thumb-vrt-grip.gif") repeat-y; +} + +/* ..... active state ..... */ + +thumb:active > .thumb-vert-spring-top { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-vrt-top-act.gif") no-repeat; +} + +thumb:active > .thumb-vert-box-middle { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-vrt-mid-act.gif") repeat-y; +} + +thumb:active > .thumb-vert-spring-bottom { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-vrt-btm-act.gif") no-repeat; +} + +thumb:active > .thumb-vert-box-middle > .thumb-vert-grippy { + background-image: url("chrome://global/skin/scrollbar/mini-thumb-vrt-grip-act.gif"); +} + +/* ::::: scrollbar button ::::: */ + +scrollbarbutton { + -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbarbutton"); + cursor: default; + vertical-align: bottom; +} + +/* ..... increment .... */ + +scrollbarbutton[type="increment"] { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-rit.gif") +} + +scrollbarbutton[type="increment"]:hover:active { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-rit-act.gif") +} + +scrollbar[align="vertical"] > scrollbarbutton[type="increment"] { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-dn.gif") +} + +scrollbar[align="vertical"] > scrollbarbutton[type="increment"]:hover:active { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-dn-act.gif") +} + +/* ..... decrement .... */ + +scrollbarbutton[type="decrement"] { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-lft.gif") +} + +scrollbarbutton[type="decrement"]:hover:active { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-lft-act.gif") +} + +scrollbar[align="vertical"] > scrollbarbutton[type="decrement"] { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-up.gif") +} + +scrollbar[align="vertical"] > scrollbarbutton[type="decrement"]:hover:active { + list-style-image: url("chrome://global/skin/scrollbar/mini-btn-up-act.gif") +} diff --git a/mozilla/widget/src/windows/SimpleDOMNode.cpp b/mozilla/widget/src/windows/SimpleDOMNode.cpp new file mode 100644 index 00000000000..aa105b8e9d2 --- /dev/null +++ b/mozilla/widget/src/windows/SimpleDOMNode.cpp @@ -0,0 +1,436 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Aaron Leventhal (aaronl@netscape.com) + * + * Contributor(s): + */ + +#include "nsIAccessible.h" +#include "nsIAccessibleDocument.h" +#include "Accessible.h" +#include "SimpleDOMNode.h" +#include "ISimpleDOMNode_iid.h" +#include "ISimpleDOMDocument_iid.h" +#include "nsIWidget.h" +#include "nsWindow.h" +#include "nsCOMPtr.h" +#include "nsXPIDLString.h" +#include "nsIAccessibleEventReceiver.h" +#include "nsReadableUtils.h" +#include "nsITextContent.h" +#include "nsIFrame.h" +#include "nsIDocument.h" +#include "nsIPresShell.h" +#include "nsIDOMNodeList.h" +#include "nsIDOMDocument.h" +#include "nsIScriptGlobalObject.h" +#include "nsIDOMCSSStyleDeclaration.h" +#include "nsIDOMViewCSS.h" +#include "nsIDOMHTMLAreaElement.h" +#include "nsILink.h" +#include "nsIAccessibilityService.h" +#include "nsIServiceManager.h" +#include "nsIWeakReference.h" +#include "nsIDocShellTreeItem.h" +#include "nsIPresContext.h" +#include "nsPromiseFlatString.h" + +/* For documentation of the accessibility architecture, + * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html + */ + +//#define DEBUG_LEAKS + +#ifdef DEBUG_LEAKS +static gSimpleDOMNodes = 0; +#endif + +/* + * Class Accessible + */ + + +//----------------------------------------------------- +// construction +//----------------------------------------------------- + +SimpleDOMNode::SimpleDOMNode(nsIAccessible* aNSAcc, nsIDOMNode *aNode, HWND aWnd): mWnd(aWnd), m_cRef(0) +{ + MOZ_COUNT_CTOR(SimpleDOMNode); // For catching leaks on tinderbox + mDOMNode = aNode; + if (!aNode && aNSAcc) + aNSAcc->AccGetDOMNode(getter_AddRefs(mDOMNode)); + +#ifdef DEBUG_LEAKS + printf("SimpleDOMNodes=%d\n", ++gSimpleDOMNodes); +#endif +} + +//----------------------------------------------------- +// destruction +//----------------------------------------------------- +SimpleDOMNode::~SimpleDOMNode() +{ + MOZ_COUNT_DTOR(SimpleDOMNode); // For catching leaks on tinderbox + m_cRef = 0; +#ifdef DEBUG_LEAKS + printf("SimpleDOMNodes=%d\n", --gSimpleDOMNodes); +#endif +} + + +//----------------------------------------------------- +// IUnknown interface methods - see iunknown.h for documentation +//----------------------------------------------------- +STDMETHODIMP SimpleDOMNode::QueryInterface(REFIID iid, void** ppv) +{ + *ppv = nsnull; + + if (IID_IUnknown == iid || IID_ISimpleDOMNode == iid) + *ppv = NS_STATIC_CAST(ISimpleDOMNode*, this); + + if (nsnull == *ppv) + return E_NOINTERFACE; //iid not supported. + + (NS_REINTERPRET_CAST(IUnknown*, *ppv))->AddRef(); + return S_OK; +} + +//----------------------------------------------------- +STDMETHODIMP_(ULONG) SimpleDOMNode::AddRef() +{ + return ++m_cRef; +} + + +//----------------------------------------------------- +STDMETHODIMP_(ULONG) SimpleDOMNode::Release() +{ + if (0 != --m_cRef) + return m_cRef; + + delete this; + + return 0; +} + + +//----------------------------------------------------- +// ISimpleDOMNode methods +//----------------------------------------------------- + +STDMETHODIMP SimpleDOMNode::get_nodeInfo( + /* [out] */ BSTR __RPC_FAR *aNodeName, + /* [out] */ short __RPC_FAR *aNameSpaceID, + /* [out] */ BSTR __RPC_FAR *aNodeValue, + /* [out] */ unsigned int __RPC_FAR *aNumChildren, + /* [out] */ unsigned short __RPC_FAR *aNodeType) +{ + *aNodeName = nsnull; + nsCOMPtr domElement; + nsCOMPtr content; + GetElementAndContentFor(domElement, content); + + PRUint16 nodeType = 0; + mDOMNode->GetNodeType(&nodeType); + *aNodeType=NS_STATIC_CAST(unsigned short, nodeType); + + if (*aNodeType != NODETYPE_TEXT) { + nsAutoString nodeName; + mDOMNode->GetNodeName(nodeName); + *aNodeName = ::SysAllocString(nodeName.get()); + } + + nsAutoString nodeValue; + + mDOMNode->GetNodeValue(nodeValue); + *aNodeValue = ::SysAllocString(nodeValue.get()); + + PRInt32 nameSpaceID = 0; + if (content) + content->GetNameSpaceID(nameSpaceID); + *aNameSpaceID = NS_STATIC_CAST(short, nameSpaceID); + + *aNumChildren = 0; + PRUint32 numChildren = 0; + nsCOMPtr nodeList; + mDOMNode->GetChildNodes(getter_AddRefs(nodeList)); + if (nodeList && NS_OK == nodeList->GetLength(&numChildren)) + *aNumChildren = NS_STATIC_CAST(unsigned int, numChildren); + + return S_OK; +} + + + +STDMETHODIMP SimpleDOMNode::get_attributes( + /* [in] */ unsigned short aMaxAttribs, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *aAttribNames, + /* [length_is][size_is][out] */ short __RPC_FAR *aNameSpaceIDs, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *aAttribValues, + /* [out] */ unsigned short __RPC_FAR *aNumAttribs) +{ + nsCOMPtr domElement; + nsCOMPtr content; + GetElementAndContentFor(domElement, content); + *aNumAttribs = 0; + + if (!content || !domElement) + return S_FALSE; + PRInt32 numAttribs; + content->GetAttributeCount(numAttribs); + if (numAttribs > aMaxAttribs) + numAttribs = aMaxAttribs; + *aNumAttribs = NS_STATIC_CAST(unsigned short, numAttribs); + + PRInt32 index, nameSpaceID; + nsCOMPtr nameAtom, prefixAtom; + + for (index = 0; index < numAttribs; index++) { + aNameSpaceIDs[index] = 0; aAttribValues[index] = aAttribNames[index] = nsnull; + nsAutoString attributeValue; + const PRUnichar *pszAttributeName; + + if (NS_SUCCEEDED(content->GetAttributeNameAt(index, nameSpaceID, *getter_AddRefs(nameAtom), *getter_AddRefs(prefixAtom)))) { + aNameSpaceIDs[index] = NS_STATIC_CAST(short, nameSpaceID); + nameAtom->GetUnicode(&pszAttributeName); + aAttribNames[index] = ::SysAllocString(pszAttributeName); + if (NS_SUCCEEDED(content->GetAttribute(nameSpaceID, nameAtom, attributeValue))) + aAttribValues[index] = ::SysAllocString(attributeValue.get()); + } + } + + return S_OK; +} + + +NS_IMETHODIMP SimpleDOMNode::GetComputedStyleDeclaration(nsIDOMCSSStyleDeclaration **aCssDecl, PRUint32 *aLength) +{ + nsCOMPtr domElement; + nsCOMPtr content; + GetElementAndContentFor(domElement, content); + if (!domElement || !content) + return NS_ERROR_FAILURE; + + nsCOMPtr doc; + if (content) + content->GetDocument(*getter_AddRefs(doc)); + + nsCOMPtr shell; + if (doc) + doc->GetShellAt(0, getter_AddRefs(shell)); + + if (!shell) + return NS_ERROR_FAILURE; + + nsCOMPtr global; + doc->GetScriptGlobalObject(getter_AddRefs(global)); + nsCOMPtr viewCSS(do_QueryInterface(global)); + + if (!viewCSS) + return NS_ERROR_FAILURE; + + nsCOMPtr cssDecl; + nsAutoString empty; + viewCSS->GetComputedStyle(domElement, empty, getter_AddRefs(cssDecl)); + if (cssDecl) { + *aCssDecl = cssDecl; + NS_ADDREF(*aCssDecl); + cssDecl->GetLength(aLength); + return NS_OK; + } + return NS_ERROR_FAILURE; +} + + +/* To do: use media type if not null */ +STDMETHODIMP SimpleDOMNode::get_computedStyle( + /* [in] */ unsigned short aMaxStyleProperties, + /* [in] */ boolean aUseAlternateView, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *aStyleProperties, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *aStyleValues, + /* [out] */ unsigned short __RPC_FAR *aNumStyleProperties) +{ + *aNumStyleProperties = 0; + PRUint32 length; + nsCOMPtr cssDecl; + if (NS_FAILED(GetComputedStyleDeclaration(getter_AddRefs(cssDecl), &length))) + return S_FALSE; + + PRUint32 index, realIndex; + for (index = realIndex = 0; index < length && realIndex < aMaxStyleProperties; index ++) { + nsAutoString property, value; + if (NS_SUCCEEDED(cssDecl->Item(index, property)) && property.CharAt(0) != '-') // Ignore -moz-* properties + cssDecl->GetPropertyValue(property, value); // Get property value + if (!value.IsEmpty()) { + aStyleProperties[realIndex] = ::SysAllocString(property.get()); + aStyleValues[realIndex] = ::SysAllocString(value.get()); + ++realIndex; + } + } + *aNumStyleProperties = NS_STATIC_CAST(unsigned short, realIndex); + + return S_OK; +} + + +STDMETHODIMP SimpleDOMNode::get_computedStyleForProperties( + /* [in] */ unsigned short aNumStyleProperties, + /* [in] */ boolean aUseAlternateView, + /* [length_is][size_is][in] */ BSTR __RPC_FAR *aStyleProperties, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *aStyleValues) +{ + PRUint32 length = 0; + nsCOMPtr cssDecl; + nsresult rv = GetComputedStyleDeclaration(getter_AddRefs(cssDecl), &length); + if (NS_FAILED(rv)) + return S_FALSE; + + PRUint32 index; + for (index = 0; index < aNumStyleProperties; index ++) { + nsAutoString value; + if (aStyleProperties[index]) + cssDecl->GetPropertyValue(nsDependentString(NS_STATIC_CAST(PRUnichar*,aStyleProperties[index])), value); // Get property value + aStyleValues[index] = ::SysAllocString(value.get()); + } + + return S_OK; +} + + +ISimpleDOMNode* SimpleDOMNode::MakeSimpleDOMNode(nsIDOMNode *node) +{ + if (!node) + return NULL; + + ISimpleDOMNode *newNode = NULL; + + nsCOMPtr content(do_QueryInterface(node)); + nsCOMPtr doc; + + if (content) + content->GetDocument(*getter_AddRefs(doc)); + else { + // Get the document via QueryInterface, since there is no content node + doc = do_QueryInterface(node); + } + + if (!doc) + return NULL; + + nsCOMPtr shell; + doc->GetShellAt(0, getter_AddRefs(shell)); + if (!shell) + return NULL; + + nsCOMPtr accService(do_GetService("@mozilla.org/accessibilityService;1")); + if (!accService) + return NULL; + + nsCOMPtr nsAcc; + nsCOMPtr wr (getter_AddRefs(NS_GetWeakReference(shell))); + accService->GetAccessibleFor(wr, node, getter_AddRefs(nsAcc)); + if (nsAcc) { + nsCOMPtr nsAccDoc(do_QueryInterface(nsAcc)); + if (nsAccDoc) + newNode = new DocAccessible(nsAcc, node, mWnd); + else + newNode = new Accessible(nsAcc, node, mWnd); + } + else if (!content) { // We're on a the root frame + IAccessible * pAcc = NULL; + HRESULT hr = Accessible::AccessibleObjectFromWindow( mWnd, OBJID_CLIENT, IID_IAccessible, (void **) &pAcc ); + if (pAcc) { + ISimpleDOMNode *testNode; + pAcc->QueryInterface(IID_ISimpleDOMNode, (void**)&testNode); + newNode = testNode; + pAcc->Release(); + } + } + else + newNode = new SimpleDOMNode(nsnull, node, mWnd); + + if (newNode) + newNode->AddRef(); + + return newNode; +} + + +STDMETHODIMP SimpleDOMNode::get_parentNode(ISimpleDOMNode __RPC_FAR *__RPC_FAR *aNode) +{ + nsCOMPtr node; + mDOMNode->GetParentNode(getter_AddRefs(node)); + *aNode = MakeSimpleDOMNode(node); + + return S_OK; +} + +STDMETHODIMP SimpleDOMNode::get_firstChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR *aNode) +{ + nsCOMPtr node; + mDOMNode->GetFirstChild(getter_AddRefs(node)); + *aNode = MakeSimpleDOMNode(node); + + return S_OK; +} + +STDMETHODIMP SimpleDOMNode::get_lastChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR *aNode) +{ + nsCOMPtr node; + mDOMNode->GetLastChild(getter_AddRefs(node)); + *aNode = MakeSimpleDOMNode(node); + + return S_OK; +} + +STDMETHODIMP SimpleDOMNode::get_previousSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR *aNode) +{ + nsCOMPtr node; + mDOMNode->GetPreviousSibling(getter_AddRefs(node)); + *aNode = MakeSimpleDOMNode(node); + + return S_OK; +} + +STDMETHODIMP SimpleDOMNode::get_nextSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR *aNode) +{ + nsCOMPtr node; + mDOMNode->GetNextSibling(getter_AddRefs(node)); + *aNode = MakeSimpleDOMNode(node); + + return S_OK; +} + + + +//------- Helper methods --------- + +void SimpleDOMNode::GetElementAndContentFor(nsCOMPtr& aElement, nsCOMPtr &aContent) +{ + aElement = do_QueryInterface(mDOMNode); + aContent = do_QueryInterface(mDOMNode); +} + + +nsIDOMNode* SimpleDOMNode::GetRealDOMNode() +{ + return mDOMNode; +} \ No newline at end of file diff --git a/mozilla/widget/src/windows/SimpleDOMNode.h b/mozilla/widget/src/windows/SimpleDOMNode.h new file mode 100644 index 00000000000..37aa7b15adc --- /dev/null +++ b/mozilla/widget/src/windows/SimpleDOMNode.h @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Original Author: Aaron Leventhal + * + * Contributor(s): + */ + +/* For documentation of the accessibility architecture, + * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html + */ + +#ifndef _SimpleDOMNode_H_ +#define _SimpleDOMNode_H_ + +#include "nsCOMPtr.h" +#include "nsIAccessible.h" +#include "Accessible.h" +#include "nsIAccessibleEventListener.h" +#include "ISimpleDOMNode.h" +#include "ISimpleDOMDocument.h" +#include "nsIDOMElement.h" +#include "nsIContent.h" + +#include "nsString.h" + +class SimpleDOMNode : public ISimpleDOMNode +{ + public: // construction, destruction + SimpleDOMNode(nsIAccessible *, HWND); + SimpleDOMNode(nsIAccessible *, nsIDOMNode *, HWND); + virtual ~SimpleDOMNode(); + + public: // IUnknown methods - see iunknown.h for documentation + STDMETHODIMP_(ULONG) AddRef (); + STDMETHODIMP QueryInterface(REFIID, void**); + STDMETHODIMP_(ULONG) Release (); + + nsIDOMNode* GetRealDOMNode(); + + private: + void GetAccessibleFor(nsIDOMNode *node, nsIAccessible **newAcc); + ISimpleDOMNode* SimpleDOMNode::MakeSimpleDOMNode(nsIDOMNode *node); + NS_IMETHOD GetComputedStyleDeclaration(nsIDOMCSSStyleDeclaration **aCssDecl, PRUint32 *aLength); + + + public: + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_nodeInfo( + /* [out] */ BSTR __RPC_FAR *tagName, + /* [out] */ short __RPC_FAR *nameSpaceID, + /* [out] */ BSTR __RPC_FAR *nodeValue, + /* [out] */ unsigned int __RPC_FAR *numChildren, + /* [out][retval] */ unsigned short __RPC_FAR *nodeType); + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_attributes( + /* [in] */ unsigned short maxAttribs, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *attribNames, + /* [length_is][size_is][out] */ short __RPC_FAR *nameSpaceID, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *attribValues, + /* [out][retval] */ unsigned short __RPC_FAR *numAttribs); + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_computedStyle( + /* [in] */ unsigned short maxStyleProperties, + /* [in] */ boolean useAlternateView, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *styleProperties, + /* [length_is][size_is][out] */ BSTR __RPC_FAR *styleValues, + /* [out][retval] */ unsigned short __RPC_FAR *numStyleProperties); + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_computedStyleForProperties( + /* [in] */ unsigned short numStyleProperties, + /* [in] */ boolean useAlternateView, + /* [length_is][size_is][in] */ BSTR __RPC_FAR *styleProperties, + /* [length_is][size_is][out][retval] */ BSTR __RPC_FAR *styleValues); + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_parentNode(ISimpleDOMNode __RPC_FAR *__RPC_FAR *node); + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_firstChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR *node); + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_lastChild(ISimpleDOMNode __RPC_FAR *__RPC_FAR *node); + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_previousSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR *node); + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nextSibling(ISimpleDOMNode __RPC_FAR *__RPC_FAR *node); + + protected: + nsCOMPtr mDOMNode; + ULONG m_cRef; // the reference count + HWND mWnd; + + void GetElementAndContentFor(nsCOMPtr& aElement, nsCOMPtr& aContent); +}; + +#endif + diff --git a/mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.def b/mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.def new file mode 100644 index 00000000000..2b9854b7500 --- /dev/null +++ b/mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.def @@ -0,0 +1,7 @@ +LIBRARY ISimpleDOMDocumentMarshal.dll +DESCRIPTION 'ISimpleDOMDocument proxy/stub DLL - allows cross-process communication' +EXPORTS DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE + diff --git a/mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.idl b/mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.idl new file mode 100644 index 00000000000..6f9d3e5cc58 --- /dev/null +++ b/mozilla/widget/src/windows/expose/ISimpleDOMDocument/ISimpleDOMDocument.idl @@ -0,0 +1,108 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Author: Aaron Leventhal (aaronl@netscape.com) + */ + +cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") +cpp_quote("//") +cpp_quote("// ISimpleDOMDocument.h") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("//") +cpp_quote("// get_URL(out] BSTR *url)") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Get the internet URL associated with this document.") +cpp_quote("//") +cpp_quote("// get_title([out BSTR *title") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Get the document's title from the element") +cpp_quote("//") +cpp_quote("// get_mimeType([out BSTR *mimeType") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Get the registered mime type, such as text/html") +cpp_quote("//") +cpp_quote("// get_docType([out] BSTR *docType") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Get doctype associated with the <!DOCTYPE ..> element") +cpp_quote("//") +cpp_quote("// get_nameSpaceURIForID([in] short nameSpaceID, [out] BSTR *nameSpaceURI)") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Some of the methods for ISimpleDOMNode return a nameSpaceID (-1,0,1,2,3,....)") +cpp_quote("// This method returns the associated namespace URI for each ID.") +cpp_quote("//") +cpp_quote("// set_alternateViewMediaTypes([in] BSTR *commaSeparatedMediaType)") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// For style property retrieval on nsISimpleDOMNode elements, ") +cpp_quote("// set the additional alternate media types that properties are available for.") +cpp_quote("// [in] BSTR *commaSeparatedMediaTypes is a comma separate list, for example \"aural, braille\".") +cpp_quote("// The alternate media properties are requested with nsISimpleDOMNode::get_computedStyle.") +cpp_quote("// Note: setting this value on a document will increase memory overhead, and may create a small delay.") +cpp_quote("//") +cpp_quote("// W3C media Types:") +cpp_quote("// * all: Suitable for all devices. ") +cpp_quote("// * aural: Intended for speech synthesizers. See the section on aural style sheets for details. ") +cpp_quote("// * braille: Intended for braille tactile feedback devices. ") +cpp_quote("// * embossed: Intended for paged braille printers. ") +cpp_quote("// * handheld: Intended for handheld devices - typically small screen, monochrome, limited bandwidth. ") +cpp_quote("// * print: Intended for paged, opaque material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media. ") +cpp_quote("// * projection: Intended for projected presentations, for example projectors or print to transparencies. Please consult the section on paged media for information about formatting issues that are specific to paged media. ") +cpp_quote("// * screen: Intended primarily for color computer screens. ") +cpp_quote("// * tty: intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. Authors should not use pixel units with the tty media type. ") +cpp_quote("// * tv: Intended for television-type devices - low resolution, color, limited-scrollability screens, sound") +cpp_quote("// * See latest W3C CSS specs for complete list of media types") +cpp_quote("//") +cpp_quote("//") +cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") +cpp_quote("") +cpp_quote("") + +import "objidl.idl"; +import "oaidl.idl"; + + +const long DISPID_DOC_URL = -5904; +const long DISPID_DOC_TITLE = -5905; +const long DISPID_DOC_MIMETYPE = -5906; +const long DISPID_DOC_DOCTYPE = -5907; +const long DISPID_DOC_NAMESPACE = -5908; +const long DISPID_DOC_MEDIATYPES = -5909; + +[object, uuid(0D68D6D0-D93D-4d08-A30D-F00DD1F45B24)] +interface ISimpleDOMDocument : IUnknown +{ + [propget, id(DISPID_DOC_URL)] HRESULT URL( + [out, retval] BSTR * url + ); + [propget, id(DISPID_DOC_TITLE)] HRESULT title( + [out, retval] BSTR * title + ); + [propget, id(DISPID_DOC_MIMETYPE)] HRESULT mimeType( + [out, retval] BSTR * mimeType + ); + [propget, id(DISPID_DOC_DOCTYPE)] HRESULT docType( + [out, retval] BSTR * docType + ); + [propget, id(DISPID_DOC_NAMESPACE)] HRESULT nameSpaceURIForID( + [in] short nameSpaceID, + [out, retval] BSTR * nameSpaceURI + ); + [propput, id(DISPID_DOC_MEDIATYPES)] HRESULT alternateViewMediaTypes( + [in] BSTR * commaSeparatedMediaTypes + ); +} diff --git a/mozilla/widget/src/windows/expose/ISimpleDOMDocument/makefile.win b/mozilla/widget/src/windows/expose/ISimpleDOMDocument/makefile.win new file mode 100755 index 00000000000..dcfd900eee1 --- /dev/null +++ b/mozilla/widget/src/windows/expose/ISimpleDOMDocument/makefile.win @@ -0,0 +1,72 @@ +#!nmake +# +# The contents of this file are subject to the Netscape 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/NPL/ +# +# 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 Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# leaf@mozilla.org + +DEPTH=..\..\..\..\.. + +MAKE_OBJ_TYPE = DLL +MODULE = ISimpleDOMDocumentMarshal +DLL = .\$(OBJDIR)\$(MODULE).dll + +PROXYSTUBIDL = ISimpleDOMDocument.idl +LCFLAGS =-DWIN$(MOZ_BITS) -DREGISTER_PROXY_DLL -D_WIN$(MOZ_BITS)_WINNT=0x400 + +DEFFILE = ISimpleDOMDocument.def + +OBJS = \ + dlldata.obj \ + ISimpleDOMDocument_p.obj \ + ISimpleDOMDocument_i.obj \ + $(NULL) + +WIN_LIBS = \ + kernel$(MOZ_BITS).lib \ + rpcndr.lib \ + rpcns4.lib \ + rpcrt4.lib \ + uuid.lib \ + oleaut$(MOZ_BITS).lib \ + $(NULL) + +MIDL_GENERATED_FILES = \ + ..\..\ISimpleDOMDocument.h \ + ..\..\ISimpleDOMDocument_iid.h \ + ISimpleDOMDocument_p.c \ + ISimpleDOMDocument_i.c \ + dlldata.c \ + $(NULL) + +include <$(DEPTH)\config\rules.mak> + +install:: $(DLL) + $(MAKE_INSTALL) $(DLL) $(DIST)\bin + regsvr32 /s $(DIST)\bin\$(MODULE).dll + +$(MIDL_GENERATED_FILES): ISimpleDOMDocument.idl + midl ISimpleDOMDocument.idl + copy ISimpleDOMDocument.h ..\.. + copy ISimpleDOMDocument_i.c ..\..\ISimpleDOMDocument_iid.h + +export:: $(MIDL_GENERATED_FILES) + +clobber:: + rm -rf $(MIDL_GENERATED_FILES) + rm -rf $(DLL) diff --git a/mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.def b/mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.def new file mode 100644 index 00000000000..1cfdf1dfef1 --- /dev/null +++ b/mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.def @@ -0,0 +1,7 @@ +LIBRARY ISimpleDOMNodeMarshal.dll +DESCRIPTION 'ISimpleDOMNode proxy/stub DLL - enables cross-process communication' +EXPORTS DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE + diff --git a/mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.idl b/mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.idl new file mode 100644 index 00000000000..d37aeee891e --- /dev/null +++ b/mozilla/widget/src/windows/expose/ISimpleDOMNode/ISimpleDOMNode.idl @@ -0,0 +1,145 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape 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/NPL/ + * + * 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 Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Author: Aaron Leventhal (aaronl@netscape.com) + */ + +cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") +cpp_quote("//") +cpp_quote("// ISimpleDOMNode.h ") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("//") +cpp_quote("// get_nodeInfo(") +cpp_quote("// /* [out] */ BSTR *nodeName, // For elements, this is the tag name") +cpp_quote("// /* [out] */ short *nameSpaceID,") +cpp_quote("// /* [out] */ unsigned short *nodeType,") +cpp_quote("// /* [out] */ BSTR *nodeValue, ") +cpp_quote("// /* [out] */ unsigned int *numChildren); ") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Get the basic information about a node.") +cpp_quote("// The namespace ID can be mapped to an URI using nsISimpleDOMDocument::get_nameSpaceURIForID()") +cpp_quote("//") +cpp_quote("// get_attributes(") +cpp_quote("// /* [in] */ unsigned short maxAttribs,") +cpp_quote("// /* [out] */ unsigned short *numAttribs,") +cpp_quote("// /* [out] */ BSTR *attribNames,") +cpp_quote("// /* [out] */ short *nameSpaceID,") +cpp_quote("// /* [out] */ BSTR *attribValues);") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Returns 3 arrays - the attribute names and values, and a namespace ID for each") +cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace") +cpp_quote("//") +cpp_quote("// computedStyle( ") +cpp_quote("// /* [in] */ unsigned short maxStyleProperties,") +cpp_quote("// /* [out] */ unsigned short *numStyleProperties, ") +cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes") +cpp_quote("// /* [out] */ BSTR *styleProperties, ") +cpp_quote("// /* [out] */ BSTR *styleValues);") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Returns 2 arrays -- the style properties and their values") +cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)") +cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()") +cpp_quote("//") +cpp_quote("// computedStyleForProperties( ") +cpp_quote("// /* [in] */ unsigned short numStyleProperties, ") +cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes") +cpp_quote("// /* [in] */ BSTR *styleProperties, ") +cpp_quote("// /* [out] */ BSTR *styleValues);") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// Returns style property values for those properties in the styleProperties [in] array") +cpp_quote("// Returns 2 arrays -- the style properties and their values") +cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)") +cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()") +cpp_quote("//") +cpp_quote("// get_parentNode (/* [in] */ ISimpleDOMNode *newNodePtr);") +cpp_quote("// get_firstChild (/* [in] */ ISimpleDOMNode *newNodePtr);") +cpp_quote("// get_lastChild (/* [in] */ ISimpleDOMNode *newNodePtr);") +cpp_quote("// get_previousSibling(/* [in] */ ISimpleDOMNode *newNodePtr);") +cpp_quote("// get_nextSibling (/* [in] */ ISimpleDOMNode *newNodePtr);") +cpp_quote("// ---------------------------------------------------------------------------------------------------=") +cpp_quote("// DOM navigation - get a different node.") +cpp_quote("//") +cpp_quote("//") +cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") +cpp_quote("") +cpp_quote("") + +import "objidl.idl"; +import "oaidl.idl"; + +const long DISPID_NODE_NODEINFO = -5900; +const long DISPID_NODE_ATTRIBUTES = -5901; +const long DISPID_NODE_COMPSTYLE = -5902; +const long DISPID_NODE_COMPSTYLEFORPROPS = -5903; + +[object, uuid(96917748-8922-4fd9-8a73-d72e8aad671a)] +interface ISimpleDOMNode : IUnknown +{ + const unsigned short NODETYPE_ELEMENT = 1; + const unsigned short NODETYPE_ATTRIBUTE = 2; + const unsigned short NODETYPE_TEXT = 3; + const unsigned short NODETYPE_CDATA_SECTION = 4; + const unsigned short NODETYPE_ENTITY_REFERENCE = 5; + const unsigned short NODETYPE_ENTITY = 6; + const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7; + const unsigned short NODETYPE_COMMENT = 8; + const unsigned short NODETYPE_DOCUMENT = 9; + const unsigned short NODETYPE_DOCUMENT_TYPE = 10; + const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11; + const unsigned short NODETYPE_NOTATION = 12; + + [propget, id(DISPID_NODE_NODEINFO)] HRESULT nodeInfo( + [out] BSTR *nodeName, // for performance returns NULL for text nodes (true nodeName would be "#text") + [out] short *nameSpaceID, + [out] BSTR *nodeValue, + [out] unsigned int *numChildren, + [out, retval] unsigned short *nodeType + ); + + [propget, id(DISPID_NODE_ATTRIBUTES)] HRESULT attributes( + [in] unsigned short maxAttribs, + [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames, + [out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID, + [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues, + [out, retval] unsigned short *numAttribs + ); + + [propget, id(DISPID_NODE_COMPSTYLE)] HRESULT computedStyle( + [in] unsigned short maxStyleProperties, + [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes + [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties, + [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues, + [out, retval] unsigned short *numStyleProperties + ); + + [propget, id(DISPID_NODE_COMPSTYLEFORPROPS)] HRESULT computedStyleForProperties( + [in] unsigned short numStyleProperties, + [in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes + [in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties, + [out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues + ); + + [propget] HRESULT parentNode([out, retval] ISimpleDOMNode **node); + [propget] HRESULT firstChild([out, retval] ISimpleDOMNode **node); + [propget] HRESULT lastChild([out, retval] ISimpleDOMNode **node); + [propget] HRESULT previousSibling([out, retval] ISimpleDOMNode **node); + [propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node); +} + + diff --git a/mozilla/widget/src/windows/expose/ISimpleDOMNode/makefile.win b/mozilla/widget/src/windows/expose/ISimpleDOMNode/makefile.win new file mode 100755 index 00000000000..c77e3451947 --- /dev/null +++ b/mozilla/widget/src/windows/expose/ISimpleDOMNode/makefile.win @@ -0,0 +1,72 @@ +#!nmake +# +# The contents of this file are subject to the Netscape 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/NPL/ +# +# 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 Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# leaf@mozilla.org + +DEPTH=..\..\..\..\.. + +MAKE_OBJ_TYPE = DLL +MODULE = ISimpleDOMNodeMarshal +DLL = .\$(OBJDIR)\$(MODULE).dll + +PROXYSTUBIDL = ISimpleDOMNode.idl +LCFLAGS =-DWIN$(MOZ_BITS) -DREGISTER_PROXY_DLL -D_WIN$(MOZ_BITS)_WINNT=0x400 + +DEFFILE = ISimpleDOMNode.def + +OBJS = \ + dlldata.obj \ + ISimpleDOMNode_p.obj \ + ISimpleDOMNode_i.obj \ + $(NULL) + +WIN_LIBS = \ + kernel$(MOZ_BITS).lib \ + rpcndr.lib \ + rpcns4.lib \ + rpcrt4.lib \ + uuid.lib \ + oleaut$(MOZ_BITS).lib \ + $(NULL) + +MIDL_GENERATED_FILES = \ + ..\..\ISimpleDOMNode.h \ + ..\..\ISimpleDOMNode_iid.h \ + ISimpleDOMNode_p.c \ + ISimpleDOMNode_i.c \ + dlldata.c \ + $(NULL) + +include <$(DEPTH)\config\rules.mak> + +install:: $(DLL) + $(MAKE_INSTALL) $(DLL) $(DIST)\bin + regsvr32 /s $(DIST)\bin\$(MODULE).dll + +$(MIDL_GENERATED_FILES): ISimpleDOMNode.idl + midl ISimpleDOMNode.idl + copy ISimpleDOMNode.h ..\.. + copy ISimpleDOMNode_i.c ..\..\ISimpleDOMNode_iid.h + +export:: $(MIDL_GENERATED_FILES) + +clobber:: + rm -rf $(MIDL_GENERATED_FILES) + rm -rf $(DLL) diff --git a/mozilla/widget/src/windows/expose/makefile.win b/mozilla/widget/src/windows/expose/makefile.win new file mode 100755 index 00000000000..5c82c0926d1 --- /dev/null +++ b/mozilla/widget/src/windows/expose/makefile.win @@ -0,0 +1,25 @@ +#!nmake +# +# The contents of this file are subject to the Netscape 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/NPL/ +# +# 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 Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +DEPTH=..\..\..\.. + +DIRS=ISimpleDOMNode ISimpleDOMDocument + +include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpfe/global/resources/locale/en-US/mac/platformKeys.properties b/mozilla/xpfe/global/resources/locale/en-US/mac/platformKeys.properties new file mode 100644 index 00000000000..6ce22e40d87 --- /dev/null +++ b/mozilla/xpfe/global/resources/locale/en-US/mac/platformKeys.properties @@ -0,0 +1,18 @@ +#mac +#this file defines the on screen display names for the various modifier keys +#these are used in XP menus to show keyboard shortcuts + +#the shift key - open up arrow symbol (ctrl-e) +VK_SHIFT=\u05 + +#the command key - clover leaf symbol (ctrl-q) +VK_META=\u11 + +#the option/alt key - splitting tracks symbol (ctrl-g) +VK_ALT=\u07 + +#the control key. hat symbol (ctrl-f) +VK_CONTROL=\u06 + +#the seperator character used between modifiers (none on Mac OS) +MODIFIER_SEPARATOR= diff --git a/mozilla/xpfe/global/resources/locale/en-US/os2/platformKeys.properties b/mozilla/xpfe/global/resources/locale/en-US/os2/platformKeys.properties new file mode 100644 index 00000000000..9ebe95b9526 --- /dev/null +++ b/mozilla/xpfe/global/resources/locale/en-US/os2/platformKeys.properties @@ -0,0 +1,18 @@ +#default +#this file defines the on screen display names for the various modifier keys +#these are used in XP menus to show keyboard shortcuts + +#the shift key +VK_SHIFT=Shift + +#the command key +VK_META=Meta + +#the alt key +VK_ALT=Alt + +#the control key +VK_CONTROL=Ctrl + +#the seperator character used between modifiers +MODIFIER_SEPARATOR=+ diff --git a/mozilla/xpfe/global/resources/locale/en-US/unix/platformKeys.properties b/mozilla/xpfe/global/resources/locale/en-US/unix/platformKeys.properties new file mode 100644 index 00000000000..9ebe95b9526 --- /dev/null +++ b/mozilla/xpfe/global/resources/locale/en-US/unix/platformKeys.properties @@ -0,0 +1,18 @@ +#default +#this file defines the on screen display names for the various modifier keys +#these are used in XP menus to show keyboard shortcuts + +#the shift key +VK_SHIFT=Shift + +#the command key +VK_META=Meta + +#the alt key +VK_ALT=Alt + +#the control key +VK_CONTROL=Ctrl + +#the seperator character used between modifiers +MODIFIER_SEPARATOR=+ diff --git a/mozilla/xpfe/global/resources/locale/en-US/win/platformKeys.properties b/mozilla/xpfe/global/resources/locale/en-US/win/platformKeys.properties new file mode 100644 index 00000000000..9ebe95b9526 --- /dev/null +++ b/mozilla/xpfe/global/resources/locale/en-US/win/platformKeys.properties @@ -0,0 +1,18 @@ +#default +#this file defines the on screen display names for the various modifier keys +#these are used in XP menus to show keyboard shortcuts + +#the shift key +VK_SHIFT=Shift + +#the command key +VK_META=Meta + +#the alt key +VK_ALT=Alt + +#the control key +VK_CONTROL=Ctrl + +#the seperator character used between modifiers +MODIFIER_SEPARATOR=+