This commit is contained in:
Jason Orendorff 2010-04-28 11:15:12 -05:00
commit d649fe8f15
932 changed files with 55248 additions and 65994 deletions

View File

@ -52,7 +52,6 @@ GRE_MODULE = 1
XPIDLSRCS = \ XPIDLSRCS = \
nsIAccessibleTypes.idl \ nsIAccessibleTypes.idl \
nsIAccessibilityService.idl \
nsIAccessibleRetrieval.idl \ nsIAccessibleRetrieval.idl \
nsIAccessible.idl \ nsIAccessible.idl \
nsIAccessibleApplication.idl \ nsIAccessibleApplication.idl \
@ -74,5 +73,9 @@ XPIDLSRCS = \
nsIXBLAccessible.idl \ nsIXBLAccessible.idl \
$(NULL) $(NULL)
EXPORTS = \
nsIAccessibilityService.h \
$(NULL)
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,177 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Eric Vaughan <evaughan@netscape.com> (original author)
* Alexander Surkov <surkov.alexander@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsIAccessibilityService_h_
#define _nsIAccessibilityService_h_
#include "nsISupports.h"
#include "nsIAccessibleRetrieval.h"
class nsIDocument;
class nsIFrame;
class nsObjectFrame;
class nsIContent;
#define NS_IACCESSIBILITYSERVICE_IID \
{0x33fa2a8d, 0x72e5, 0x4b8b, \
{0xbb, 0x17, 0x6b, 0x22, 0x79, 0x05, 0x5c, 0x6c} }
class nsIAccessibilityService : public nsIAccessibleRetrieval
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IACCESSIBILITYSERVICE_IID)
/**
* Creates accessible for the given DOM node or frame.
*/
virtual nsresult CreateOuterDocAccessible(nsIDOMNode *aNode,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTML4ButtonAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHyperTextAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLBRAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLButtonAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLLIAccessible(nsIFrame *aFrame,
nsIFrame *aBulletFrame,
const nsAString& aBulletText,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLCheckboxAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLComboboxAccessible(nsIDOMNode *aNode,
nsIWeakReference *aPresShell,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLGenericAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLGroupboxAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLHRAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLImageAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLLabelAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLListboxAccessible(nsIDOMNode *aNode,
nsIWeakReference *aPresShell,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLMediaAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLRadioButtonAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLSelectOptionAccessible(nsIDOMNode *aNode,
nsIAccessible *aAccParent,
nsIWeakReference *aPresShell,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLTableAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLTableCellAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLTextAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLTextFieldAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
virtual nsresult CreateHTMLCaptionAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) = 0;
/**
* Adds/remove ATK root accessible for gtk+ native window to/from children
* of the application accessible.
*/
virtual nsresult AddNativeRootAccessible(void *aAtkAccessible,
nsIAccessible **aAccessible) = 0;
virtual nsresult
RemoveNativeRootAccessible(nsIAccessible *aRootAccessible) = 0;
/**
* Used to describe sort of changes leading to accessible tree invalidation.
*/
enum {
NODE_APPEND = 0x01,
NODE_REMOVE = 0x02,
NODE_SIGNIFICANT_CHANGE = 0x03,
FRAME_SHOW = 0x04,
FRAME_HIDE = 0x05,
FRAME_SIGNIFICANT_CHANGE = 0x06
};
/**
* Invalidate the accessible tree when DOM tree or frame tree is changed.
*
* @param aPresShell [in] the presShell where changes occured
* @param aContent [in] the affected DOM content
* @param aChangeType [in] the change type (see constants declared above)
*/
virtual nsresult InvalidateSubtreeFor(nsIPresShell *aPresShell,
nsIContent *aContent,
PRUint32 aChangeType) = 0;
/**
* Notify accessibility that anchor jump has been accomplished to the given
* target. Used by layout.
*/
virtual nsresult NotifyOfAnchorJumpTo(nsIContent *aTarget) = 0;
/**
* Fire accessible event of the given type for the given target.
*
* @param aEvent [in] accessible event type
* @param aTarget [in] target of accessible event
*/
virtual nsresult FireAccessibleEvent(PRUint32 aEvent,
nsIAccessible *aTarget) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAccessibilityService,
NS_IACCESSIBILITYSERVICE_IID)
// for component registration
// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
#define NS_ACCESSIBILITY_SERVICE_CID \
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
extern nsresult
NS_GetAccessibilityService(nsIAccessibilityService** aResult);
#endif

View File

@ -1,125 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsIAccessibleRetrieval.idl"
interface nsIDocument;
interface nsIFrame;
interface nsObjectFrame;
interface nsIContent;
[uuid(4df7499d-d96e-48f8-a936-8a22ec0d4915)]
interface nsIAccessibilityService : nsIAccessibleRetrieval
{
nsIAccessible createOuterDocAccessible(in nsIDOMNode aNode);
nsIAccessible createHTML4ButtonAccessible(in nsIFrame aFrame);
nsIAccessible createHyperTextAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLBRAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLButtonAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLLIAccessible(in nsIFrame aFrame, in nsIFrame aBulletFrame, in AString aBulletText);
nsIAccessible createHTMLCheckboxAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
nsIAccessible createHTMLGenericAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLGroupboxAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLHRAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLImageAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLLabelAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
nsIAccessible createHTMLMediaAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLObjectFrameAccessible(in nsObjectFrame aFrame);
nsIAccessible createHTMLRadioButtonAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsIWeakReference aPresShell);
nsIAccessible createHTMLTableAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLTableCellAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLTextAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLTextFieldAccessible(in nsIFrame aFrame);
nsIAccessible createHTMLCaptionAccessible(in nsIFrame aFrame);
// For gtk+ native window accessible
nsIAccessible addNativeRootAccessible(in voidPtr aAtkAccessible);
void removeNativeRootAccessible(in nsIAccessible aRootAccessible);
/**
* Used to describe sort of changes leading to accessible tree invalidation.
*/
const unsigned long NODE_APPEND = 0x01;
const unsigned long NODE_REMOVE = 0x02;
const unsigned long NODE_SIGNIFICANT_CHANGE = 0x03;
const unsigned long FRAME_SHOW = 0x04;
const unsigned long FRAME_HIDE = 0x05;
const unsigned long FRAME_SIGNIFICANT_CHANGE = 0x06;
/**
* Invalidate the accessible tree when DOM tree or frame tree is changed.
*
* @param aPresShell [in] the presShell where changes occured
* @param aContent [in] the affected DOM content
* @param aChangeType [in] the change type (see constants declared above)
*/
void invalidateSubtreeFor(in nsIPresShell aPresShell, in nsIContent aContent,
in PRUint32 aChangeType);
/**
* Notify accessibility that anchor jump has been accomplished to the given
* target. Used by layout.
*/
void notifyOfAnchorJumpTo(in nsIContent aTarget);
/**
* Fire accessible event of the given type for the given target.
*
* @param aEvent [in] accessible event type
* @param aTarget [in] target of accessible event
*/
void fireAccessibleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
};
%{ C++
// for component registration
// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
#define NS_ACCESSIBILITY_SERVICE_CID \
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
extern nsresult
NS_GetAccessibilityService(nsIAccessibilityService** aResult);
%}

View File

@ -58,7 +58,7 @@ interface nsIDOMWindow;
* *
* @status UNDER_REVIEW * @status UNDER_REVIEW
*/ */
[scriptable, uuid(427597a3-1737-4743-bf43-2311a1ed5fbd)] [scriptable, uuid(471909e7-0ea4-4ce0-bf31-a1372b2b285c)]
interface nsIAccessibleDocument : nsISupports interface nsIAccessibleDocument : nsISupports
{ {
/** /**
@ -84,7 +84,7 @@ interface nsIAccessibleDocument : nsISupports
/** /**
* The nsIDOMDocument interface associated with this document. * The nsIDOMDocument interface associated with this document.
*/ */
readonly attribute nsIDOMDocument document; readonly attribute nsIDOMDocument DOMDocument;
/** /**
* The nsIDOMWindow that the document resides in. * The nsIDOMWindow that the document resides in.

View File

@ -40,6 +40,8 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsAccessibleWrap.h" #include "nsAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsApplicationAccessibleWrap.h" #include "nsApplicationAccessibleWrap.h"
#include "nsRootAccessible.h" #include "nsRootAccessible.h"
#include "nsDocAccessibleWrap.h" #include "nsDocAccessibleWrap.h"
@ -48,6 +50,7 @@
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "prprf.h" #include "prprf.h"
#include "nsRoleMap.h" #include "nsRoleMap.h"
#include "nsRelUtils.h"
#include "nsStateMap.h" #include "nsStateMap.h"
#include "nsMaiInterfaceComponent.h" #include "nsMaiInterfaceComponent.h"
@ -1155,7 +1158,7 @@ nsAccessibleWrap::FirePlatformEvent(nsAccEvent *aEvent)
if (rootAccWrap && rootAccWrap->mActivated) { if (rootAccWrap && rootAccWrap->mActivated) {
atk_focus_tracker_notify(atkObj); atk_focus_tracker_notify(atkObj);
// Fire state change event for focus // Fire state change event for focus
nsCOMPtr<nsIAccessibleEvent> stateChangeEvent = nsRefPtr<nsAccEvent> stateChangeEvent =
new nsAccStateChangeEvent(accessible, new nsAccStateChangeEvent(accessible,
nsIAccessibleStates::STATE_FOCUSED, nsIAccessibleStates::STATE_FOCUSED,
PR_FALSE, PR_TRUE); PR_FALSE, PR_TRUE);
@ -1383,7 +1386,7 @@ nsAccessibleWrap::FirePlatformEvent(nsAccEvent *aEvent)
} }
nsresult nsresult
nsAccessibleWrap::FireAtkStateChangeEvent(nsIAccessibleEvent *aEvent, nsAccessibleWrap::FireAtkStateChangeEvent(nsAccEvent *aEvent,
AtkObject *aObject) AtkObject *aObject)
{ {
MAI_LOG_DEBUG(("\n\nReceived: EVENT_STATE_CHANGE\n")); MAI_LOG_DEBUG(("\n\nReceived: EVENT_STATE_CHANGE\n"));
@ -1425,7 +1428,7 @@ nsAccessibleWrap::FireAtkStateChangeEvent(nsIAccessibleEvent *aEvent,
} }
nsresult nsresult
nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent, nsAccessibleWrap::FireAtkTextChangedEvent(nsAccEvent *aEvent,
AtkObject *aObject) AtkObject *aObject)
{ {
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TEXT_REMOVED/INSERTED\n")); MAI_LOG_DEBUG(("\n\nReceived: EVENT_TEXT_REMOVED/INSERTED\n"));
@ -1443,8 +1446,7 @@ nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
PRBool isInserted; PRBool isInserted;
event->IsInserted(&isInserted); event->IsInserted(&isInserted);
PRBool isFromUserInput; PRBool isFromUserInput = aEvent->IsFromUserInput();
aEvent->GetIsFromUserInput(&isFromUserInput);
char *signal_name = g_strconcat(isInserted ? "text_changed::insert" : "text_changed::delete", char *signal_name = g_strconcat(isInserted ? "text_changed::insert" : "text_changed::delete",
isFromUserInput ? "" : kNonUserInputEvent, NULL); isFromUserInput ? "" : kNonUserInputEvent, NULL);
@ -1455,7 +1457,7 @@ nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
} }
nsresult nsresult
nsAccessibleWrap::FireAtkShowHideEvent(nsIAccessibleEvent *aEvent, nsAccessibleWrap::FireAtkShowHideEvent(nsAccEvent *aEvent,
AtkObject *aObject, PRBool aIsAdded) AtkObject *aObject, PRBool aIsAdded)
{ {
if (aIsAdded) if (aIsAdded)
@ -1467,8 +1469,7 @@ nsAccessibleWrap::FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
AtkObject *parentObject = getParentCB(aObject); AtkObject *parentObject = getParentCB(aObject);
NS_ENSURE_STATE(parentObject); NS_ENSURE_STATE(parentObject);
PRBool isFromUserInput; PRBool isFromUserInput = aEvent->IsFromUserInput();
aEvent->GetIsFromUserInput(&isFromUserInput);
char *signal_name = g_strconcat(aIsAdded ? "children_changed::add" : "children_changed::remove", char *signal_name = g_strconcat(aIsAdded ? "children_changed::add" : "children_changed::remove",
isFromUserInput ? "" : kNonUserInputEvent, NULL); isFromUserInput ? "" : kNonUserInputEvent, NULL);
g_signal_emit_by_name(parentObject, signal_name, indexInParent, aObject, NULL); g_signal_emit_by_name(parentObject, signal_name, indexInParent, aObject, NULL);

View File

@ -120,14 +120,10 @@ public:
protected: protected:
virtual nsresult FirePlatformEvent(nsAccEvent *aEvent); virtual nsresult FirePlatformEvent(nsAccEvent *aEvent);
nsresult FireAtkStateChangeEvent(nsIAccessibleEvent *aEvent, nsresult FireAtkStateChangeEvent(nsAccEvent *aEvent, AtkObject *aObject);
AtkObject *aObject); nsresult FireAtkTextChangedEvent(nsAccEvent *aEvent, AtkObject *aObject);
nsresult FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent, nsresult FireAtkShowHideEvent(nsAccEvent *aEvent, AtkObject *aObject,
AtkObject *aObject); PRBool aIsAdded);
nsresult FireAtkPropChangedEvent(nsIAccessibleEvent *aEvent,
AtkObject *aObject);
nsresult FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
AtkObject *aObject, PRBool aIsAdded);
AtkObject *mAtkObject; AtkObject *mAtkObject;

View File

@ -40,9 +40,12 @@
#include "nsMaiInterfaceAction.h" #include "nsMaiInterfaceAction.h"
#include "nsAccUtils.h"
#include "nsRoleMap.h" #include "nsRoleMap.h"
#include "nsString.h" #include "nsString.h"
#include "nsIDOMDOMStringList.h"
void void
actionInterfaceInitCB(AtkActionIface *aIface) actionInterfaceInitCB(AtkActionIface *aIface)
{ {

View File

@ -39,7 +39,11 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsMaiInterfaceComponent.h" #include "nsMaiInterfaceComponent.h"
#include "nsAccessibleWrap.h" #include "nsAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMDocumentView.h" #include "nsIDOMDocumentView.h"
#include "nsIDOMAbstractView.h" #include "nsIDOMAbstractView.h"

View File

@ -40,6 +40,8 @@
#include "nsMaiInterfaceTable.h" #include "nsMaiInterfaceTable.h"
#include "nsAccUtils.h"
#include "nsArrayUtils.h" #include "nsArrayUtils.h"
void void

View File

@ -74,7 +74,8 @@ CPPSRCS = \
$(NULL) $(NULL)
EXPORTS = \ EXPORTS = \
nsRootAccessible.h \ a11yGeneric.h \
nsAccessible.h \
nsAccessNode.h \ nsAccessNode.h \
$(NULL) $(NULL)

View File

@ -0,0 +1,198 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Alexander Surkov <surkov.alexander@gmail.com> (original author)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _a11yGeneric_H_
#define _a11yGeneric_H_
#include "nsThreadUtils.h"
// What we want is: NS_INTERFACE_MAP_ENTRY(self) for static IID accessors,
// but some of our classes have an ambiguous base class of nsISupports which
// prevents this from working (the default macro converts it to nsISupports,
// then addrefs it, then returns it). Therefore, we expand the macro here and
// change it so that it works. Yuck.
#define NS_INTERFACE_MAP_STATIC_AMBIGUOUS(_class) \
if (aIID.Equals(NS_GET_IID(_class))) { \
NS_ADDREF(this); \
*aInstancePtr = this; \
return NS_OK; \
} else
#define NS_OK_DEFUNCT_OBJECT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x22)
#define NS_ENSURE_A11Y_SUCCESS(res, ret) \
PR_BEGIN_MACRO \
nsresult __rv = res; /* Don't evaluate |res| more than once */ \
if (NS_FAILED(__rv)) { \
NS_ENSURE_SUCCESS_BODY(res, ret) \
return ret; \
} \
if (__rv == NS_OK_DEFUNCT_OBJECT) \
return ret; \
PR_END_MACRO
////////////////////////////////////////////////////////////////////////////////
// nsRunnable helpers
////////////////////////////////////////////////////////////////////////////////
/**
* Use NS_DECL_RUNNABLEMETHOD_ macros to declare a runnable class for the given
* method of the given class. There are three macros:
* NS_DECL_RUNNABLEMETHOD(Class, Method)
* NS_DECL_RUNNABLEMETHOD_ARG1(Class, Method, Arg1Type)
* NS_DECL_RUNNABLEMETHOD_ARG2(Class, Method, Arg1Type, Arg2Type)
* Note Arg1Type and Arg2Type must be types which keeps the objects alive.
*
* Use NS_DISPATCH_RUNNABLEMETHOD_ macros to create an instance of declared
* runnable class and dispatch it to main thread. Availabe macros are:
* NS_DISPATCH_RUNNABLEMETHOD(Method, Object)
* NS_DISPATCH_RUNNABLEMETHOD_ARG1(Method, Object, Arg1)
* NS_DISPATCH_RUNNABLEMETHOD_ARG2(Method, Object, Arg1, Arg2)
*/
#define NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
void Revoke() \
{ \
NS_IF_RELEASE(mObj); \
} \
\
protected: \
virtual ~nsRunnableMethod_##Method() \
{ \
NS_IF_RELEASE(mObj); \
} \
\
private: \
ClassType *mObj; \
#define NS_DECL_RUNNABLEMETHOD(ClassType, Method) \
class nsRunnableMethod_##Method : public nsRunnable \
{ \
public: \
nsRunnableMethod_##Method(ClassType *aObj) : mObj(aObj) \
{ \
NS_IF_ADDREF(mObj); \
} \
\
NS_IMETHODIMP Run() \
{ \
if (!mObj) \
return NS_OK; \
(mObj-> Method)(); \
return NS_OK; \
} \
\
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
\
};
#define NS_DECL_RUNNABLEMETHOD_ARG1(ClassType, Method, Arg1Type) \
class nsRunnableMethod_##Method : public nsRunnable \
{ \
public: \
nsRunnableMethod_##Method(ClassType *aObj, Arg1Type aArg1) : \
mObj(aObj), mArg1(aArg1) \
{ \
NS_IF_ADDREF(mObj); \
} \
\
NS_IMETHODIMP Run() \
{ \
if (!mObj) \
return NS_OK; \
(mObj-> Method)(mArg1); \
return NS_OK; \
} \
\
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
Arg1Type mArg1; \
};
#define NS_DECL_RUNNABLEMETHOD_ARG2(ClassType, Method, Arg1Type, Arg2Type) \
class nsRunnableMethod_##Method : public nsRunnable \
{ \
public: \
\
nsRunnableMethod_##Method(ClassType *aObj, \
Arg1Type aArg1, Arg2Type aArg2) : \
mObj(aObj), mArg1(aArg1), mArg2(aArg2) \
{ \
NS_IF_ADDREF(mObj); \
} \
\
NS_IMETHODIMP Run() \
{ \
if (!mObj) \
return NS_OK; \
(mObj-> Method)(mArg1, mArg2); \
return NS_OK; \
} \
\
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
Arg1Type mArg1; \
Arg2Type mArg2; \
};
#define NS_DISPATCH_RUNNABLEMETHOD(Method, Obj) \
{ \
nsCOMPtr<nsIRunnable> runnable = \
new nsRunnableMethod_##Method(Obj); \
if (runnable) \
NS_DispatchToMainThread(runnable); \
}
#define NS_DISPATCH_RUNNABLEMETHOD_ARG1(Method, Obj, Arg1) \
{ \
nsCOMPtr<nsIRunnable> runnable = \
new nsRunnableMethod_##Method(Obj, Arg1); \
if (runnable) \
NS_DispatchToMainThread(runnable); \
}
#define NS_DISPATCH_RUNNABLEMETHOD_ARG2(Method, Obj, Arg1, Arg2) \
{ \
nsCOMPtr<nsIRunnable> runnable = \
new nsRunnableMethod_##Method(Obj, Arg1, Arg2); \
if (runnable) \
NS_DispatchToMainThread(runnable); \
}
#endif

View File

@ -38,6 +38,9 @@
#include "nsARIAGridAccessible.h" #include "nsARIAGridAccessible.h"
#include "nsAccUtils.h"
#include "nsIMutableArray.h"
#include "nsComponentManagerUtils.h" #include "nsComponentManagerUtils.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -765,7 +768,7 @@ nsresult
nsARIAGridAccessible::SetARIASelected(nsIAccessible *aAccessible, nsARIAGridAccessible::SetARIASelected(nsIAccessible *aAccessible,
PRBool aIsSelected, PRBool aNotify) PRBool aIsSelected, PRBool aNotify)
{ {
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible); nsRefPtr<nsAccessible> acc = do_QueryObject(aAccessible);
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
acc->GetDOMNode(getter_AddRefs(node)); acc->GetDOMNode(getter_AddRefs(node));
NS_ENSURE_STATE(node); NS_ENSURE_STATE(node);
@ -1097,7 +1100,7 @@ nsARIAGridCellAccessible::GetARIAState(PRUint32 *aState, PRUint32 *aExtraState)
if (nsAccUtils::Role(row) != nsIAccessibleRole::ROLE_ROW) if (nsAccUtils::Role(row) != nsIAccessibleRole::ROLE_ROW)
return NS_OK; return NS_OK;
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(row); nsRefPtr<nsAccessible> acc = do_QueryObject(row);
nsCOMPtr<nsIDOMNode> rowNode; nsCOMPtr<nsIDOMNode> rowNode;
acc->GetDOMNode(getter_AddRefs(rowNode)); acc->GetDOMNode(getter_AddRefs(rowNode));
NS_ENSURE_STATE(rowNode); NS_ENSURE_STATE(rowNode);

View File

@ -42,15 +42,11 @@
#include "nsRefPtrHashtable.h" #include "nsRefPtrHashtable.h"
#include "nsCycleCollectionParticipant.h" #include "nsCycleCollectionParticipant.h"
class nsAccessNode;
class nsAccessible;
class nsIAccessNode; class nsIAccessNode;
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessNode> ////////////////////////////////////////////////////////////////////////////////
nsAccessNodeHashtable; // Accessible cache utils
////////////////////////////////////////////////////////////////////////////////
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessible>
nsAccessibleHashtable;
/** /**
* Shutdown and removes the accessible from cache. * Shutdown and removes the accessible from cache.

View File

@ -38,8 +38,14 @@
#include "nsAccEvent.h" #include "nsAccEvent.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsApplicationAccessibleWrap.h" #include "nsApplicationAccessibleWrap.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsIAccessibleText.h"
#ifdef MOZ_XUL
#include "nsXULTreeAccessible.h"
#endif
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIEventStateManager.h" #include "nsIEventStateManager.h"
@ -47,9 +53,7 @@
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#ifdef MOZ_XUL #ifdef MOZ_XUL
#include "nsIDOMXULMultSelectCntrlEl.h" #include "nsIDOMXULMultSelectCntrlEl.h"
#include "nsXULTreeAccessible.h"
#endif #endif
#include "nsIAccessibleText.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIPresShell.h" #include "nsIPresShell.h"
#include "nsPresContext.h" #include "nsPresContext.h"
@ -193,15 +197,10 @@ nsAccEvent::GetAccessibleByNode()
if (!mNode) if (!mNode)
return nsnull; return nsnull;
nsCOMPtr<nsIAccessibilityService> accService =
do_GetService("@mozilla.org/accessibilityService;1");
if (!accService)
return nsnull;
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mNode)); nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mNode));
nsCOMPtr<nsIAccessible> accessible; nsCOMPtr<nsIAccessible> accessible;
accService->GetAccessibleFor(DOMNode, getter_AddRefs(accessible)); GetAccService()->GetAccessibleFor(DOMNode, getter_AddRefs(accessible));
#ifdef MOZ_XUL #ifdef MOZ_XUL
// hack for xul tree table. We need a better way for firing delayed event // hack for xul tree table. We need a better way for firing delayed event
@ -219,8 +218,7 @@ nsAccEvent::GetAccessibleByNode()
PRInt32 treeIndex = -1; PRInt32 treeIndex = -1;
multiSelect->GetCurrentIndex(&treeIndex); multiSelect->GetCurrentIndex(&treeIndex);
if (treeIndex >= 0) { if (treeIndex >= 0) {
nsRefPtr<nsXULTreeAccessible> treeAcc = nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(accessible);
nsAccUtils::QueryAccessibleTree(accessible);
if (treeAcc) if (treeAcc)
accessible = treeAcc->GetTreeItemAccessible(treeIndex); accessible = treeAcc->GetTreeItemAccessible(treeIndex);
} }

View File

@ -42,13 +42,14 @@
#include "nsIAccessibleStates.h" #include "nsIAccessibleStates.h"
#include "nsIAccessibleTypes.h" #include "nsIAccessibleTypes.h"
#include "nsAccessibilityService.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccessible.h"
#include "nsAccTreeWalker.h"
#include "nsARIAMap.h"
#include "nsDocAccessible.h"
#include "nsHyperTextAccessible.h" #include "nsHyperTextAccessible.h"
#include "nsHTMLTableAccessible.h" #include "nsHTMLTableAccessible.h"
#include "nsDocAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccTreeWalker.h"
#include "nsAccessible.h"
#include "nsARIAMap.h"
#include "nsXULTreeGridAccessible.h" #include "nsXULTreeGridAccessible.h"
#include "nsIDOMXULContainerElement.h" #include "nsIDOMXULContainerElement.h"
@ -528,7 +529,7 @@ nsAccUtils::GetMultiSelectableContainer(nsIDOMNode *aNode)
PRBool PRBool
nsAccUtils::IsARIASelected(nsIAccessible *aAccessible) nsAccUtils::IsARIASelected(nsIAccessible *aAccessible)
{ {
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible); nsRefPtr<nsAccessible> acc = do_QueryObject(aAccessible);
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
acc->GetDOMNode(getter_AddRefs(node)); acc->GetDOMNode(getter_AddRefs(node));
NS_ASSERTION(node, "No DOM node!"); NS_ASSERTION(node, "No DOM node!");
@ -686,11 +687,11 @@ nsAccUtils::GetScreenCoordsForParent(nsIAccessNode *aAccessNode)
if (accessible) { if (accessible) {
nsCOMPtr<nsIAccessible> parentAccessible; nsCOMPtr<nsIAccessible> parentAccessible;
accessible->GetParent(getter_AddRefs(parentAccessible)); accessible->GetParent(getter_AddRefs(parentAccessible));
parent = nsAccUtils::QueryAccessNode(parentAccessible); parent = do_QueryObject(parentAccessible);
} else { } else {
nsCOMPtr<nsIAccessNode> parentAccessNode; nsCOMPtr<nsIAccessNode> parentAccessNode;
aAccessNode->GetParentNode(getter_AddRefs(parentAccessNode)); aAccessNode->GetParentNode(getter_AddRefs(parentAccessNode));
parent = nsAccUtils::QueryAccessNode(parentAccessNode); parent = do_QueryObject(parentAccessNode);
} }
if (!parent) if (!parent)
@ -785,68 +786,6 @@ nsAccUtils::GetLiveAttrValue(PRUint32 aRule, nsAString& aValue)
return PR_FALSE; return PR_FALSE;
} }
already_AddRefed<nsAccessible>
nsAccUtils::QueryAccessible(nsIAccessible *aAccessible)
{
nsAccessible* acc = nsnull;
if (aAccessible)
CallQueryInterface(aAccessible, &acc);
return acc;
}
already_AddRefed<nsAccessible>
nsAccUtils::QueryAccessible(nsIAccessNode *aAccessNode)
{
nsAccessible* acc = nsnull;
if (aAccessNode)
CallQueryInterface(aAccessNode, &acc);
return acc;
}
already_AddRefed<nsHTMLTableAccessible>
nsAccUtils::QueryAccessibleTable(nsIAccessibleTable *aAccessibleTable)
{
nsHTMLTableAccessible* accessible = nsnull;
if (aAccessibleTable)
CallQueryInterface(aAccessibleTable, &accessible);
return accessible;
}
already_AddRefed<nsDocAccessible>
nsAccUtils::QueryAccessibleDocument(nsIAccessible *aAccessible)
{
nsDocAccessible* accessible = nsnull;
if (aAccessible)
CallQueryInterface(aAccessible, &accessible);
return accessible;
}
already_AddRefed<nsDocAccessible>
nsAccUtils::QueryAccessibleDocument(nsIAccessibleDocument *aAccessibleDocument)
{
nsDocAccessible* accessible = nsnull;
if (aAccessibleDocument)
CallQueryInterface(aAccessibleDocument, &accessible);
return accessible;
}
#ifdef MOZ_XUL
already_AddRefed<nsXULTreeAccessible>
nsAccUtils::QueryAccessibleTree(nsIAccessible *aAccessible)
{
nsXULTreeAccessible* accessible = nsnull;
if (aAccessible)
CallQueryInterface(aAccessible, &accessible);
return accessible;
}
#endif
#ifdef DEBUG_A11Y #ifdef DEBUG_A11Y
PRBool PRBool
@ -889,7 +828,7 @@ nsAccUtils::TextLength(nsIAccessible *aAccessible)
if (!IsText(aAccessible)) if (!IsText(aAccessible))
return 1; return 1;
nsRefPtr<nsAccessNode> accNode = nsAccUtils::QueryAccessNode(aAccessible); nsRefPtr<nsAccessNode> accNode = do_QueryObject(aAccessible);
nsIFrame *frame = accNode->GetFrame(); nsIFrame *frame = accNode->GetFrame();
if (frame && frame->GetType() == nsAccessibilityAtoms::textFrame) { if (frame && frame->GetType() == nsAccessibilityAtoms::textFrame) {
@ -908,7 +847,7 @@ nsAccUtils::TextLength(nsIAccessible *aAccessible)
// text. They don't have their own frame. // text. They don't have their own frame.
// XXX In the future, list bullets may have frame and anon content, so // XXX In the future, list bullets may have frame and anon content, so
// we should be able to remove this at that point // we should be able to remove this at that point
nsRefPtr<nsAccessible> acc(nsAccUtils::QueryAccessible(aAccessible)); nsRefPtr<nsAccessible> acc(do_QueryObject(aAccessible));
nsAutoString text; nsAutoString text;
acc->AppendTextTo(text, 0, PR_UINT32_MAX); // Get all the text acc->AppendTextTo(text, 0, PR_UINT32_MAX); // Get all the text

View File

@ -350,83 +350,6 @@ public:
return object; return object;
} }
/**
* Query nsAccessNode from the given nsIAccessible.
*/
static already_AddRefed<nsAccessNode>
QueryAccessNode(nsIAccessible *aAccessible)
{
nsAccessNode* accessNode = nsnull;
if (aAccessible)
CallQueryInterface(aAccessible, &accessNode);
return accessNode;
}
/**
* Query nsAccessNode from the given nsIAccessNode.
*/
static already_AddRefed<nsAccessNode>
QueryAccessNode(nsIAccessNode *aAccessNode)
{
nsAccessNode* accessNode = nsnull;
if (aAccessNode)
CallQueryInterface(aAccessNode, &accessNode);
return accessNode;
}
/**
* Query nsAccessNode from the given nsIAccessNode.
*/
static already_AddRefed<nsAccessNode>
QueryAccessNode(nsIAccessibleDocument *aAccessibleDocument)
{
nsAccessNode* accessNode = nsnull;
if (aAccessibleDocument)
CallQueryInterface(aAccessibleDocument, &accessNode);
return accessNode;
}
/**
* Query nsAccessible from the given nsIAccessible.
*/
static already_AddRefed<nsAccessible>
QueryAccessible(nsIAccessible *aAccessible);
/**
* Query nsAccessible from the given nsIAccessNode.
*/
static already_AddRefed<nsAccessible>
QueryAccessible(nsIAccessNode *aAccessNode);
/**
* Query nsHTMLTableAccessible from the given nsIAccessibleTable.
*/
static already_AddRefed<nsHTMLTableAccessible>
QueryAccessibleTable(nsIAccessibleTable *aAccessibleTable);
/**
* Query nsDocAccessible from the given nsIAccessible.
*/
static already_AddRefed<nsDocAccessible>
QueryAccessibleDocument(nsIAccessible *aAccessible);
/**
* Query nsDocAccessible from the given nsIAccessibleDocument.
*/
static already_AddRefed<nsDocAccessible>
QueryAccessibleDocument(nsIAccessibleDocument *aAccessibleDocument);
#ifdef MOZ_XUL
/**
* Query nsXULTreeAccessible from the given nsIAccessible.
*/
static already_AddRefed<nsXULTreeAccessible>
QueryAccessibleTree(nsIAccessible *aAccessible);
#endif
#ifdef DEBUG_A11Y #ifdef DEBUG_A11Y
/** /**
* Detect whether the given accessible object implements nsIAccessibleText, * Detect whether the given accessible object implements nsIAccessibleText,

View File

@ -37,8 +37,14 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsIAccessible.h" #include "nsIAccessible.h"
#include "nsAccCache.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsHashtable.h" #include "nsHashtable.h"
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsApplicationAccessibleWrap.h" #include "nsApplicationAccessibleWrap.h"
@ -46,7 +52,6 @@
#include "nsIDocShell.h" #include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h" #include "nsIDocShellTreeItem.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIDOMCSSStyleDeclaration.h"
#include "nsIDOMCSSPrimitiveValue.h" #include "nsIDOMCSSPrimitiveValue.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
@ -166,8 +171,7 @@ nsAccessNode::Init()
void* uniqueID; void* uniqueID;
GetUniqueID(&uniqueID); GetUniqueID(&uniqueID);
nsRefPtr<nsDocAccessible> docAcc = nsRefPtr<nsDocAccessible> docAcc = do_QueryObject(docAccessible);
nsAccUtils::QueryAccessibleDocument(docAccessible);
NS_ASSERTION(docAcc, "No nsDocAccessible for document accessible!"); NS_ASSERTION(docAcc, "No nsDocAccessible for document accessible!");
if (!docAcc->CacheAccessNode(uniqueID, this)) if (!docAcc->CacheAccessNode(uniqueID, this))

View File

@ -43,58 +43,35 @@
#ifndef _nsAccessNode_H_ #ifndef _nsAccessNode_H_
#define _nsAccessNode_H_ #define _nsAccessNode_H_
#include "nsAccCache.h"
#include "nsAccessibilityAtoms.h"
#include "nsCoreUtils.h"
#include "nsAccUtils.h"
#include "nsIAccessibleTypes.h"
#include "nsIAccessNode.h" #include "nsIAccessNode.h"
#include "nsIAccessibleTypes.h"
#include "a11yGeneric.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIDOMNode.h" #include "nsIDOMNode.h"
#include "nsINameSpaceManager.h" #include "nsINameSpaceManager.h"
#include "nsIStringBundle.h" #include "nsIStringBundle.h"
#include "nsRefPtrHashtable.h"
#include "nsWeakReference.h" #include "nsWeakReference.h"
#include "nsAccessibilityService.h"
class nsAccessNode;
class nsApplicationAccessible;
class nsDocAccessible;
class nsIAccessibleDocument;
class nsRootAccessible;
class nsIPresShell; class nsIPresShell;
class nsPresContext; class nsPresContext;
class nsIAccessibleDocument;
class nsIFrame; class nsIFrame;
class nsIDOMNodeList;
class nsRootAccessible;
class nsApplicationAccessible;
class nsIDocShellTreeItem; class nsIDocShellTreeItem;
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessNode>
nsAccessNodeHashtable;
#define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties" #define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties"
#define PLATFORM_KEYS_BUNDLE_URL "chrome://global-platform/locale/platformKeys.properties" #define PLATFORM_KEYS_BUNDLE_URL "chrome://global-platform/locale/platformKeys.properties"
// What we want is: NS_INTERFACE_MAP_ENTRY(self) for static IID accessors,
// but some of our classes have an ambiguous base class of nsISupports which
// prevents this from working (the default macro converts it to nsISupports,
// then addrefs it, then returns it). Therefore, we expand the macro here and
// change it so that it works. Yuck.
#define NS_INTERFACE_MAP_STATIC_AMBIGUOUS(_class) \
if (aIID.Equals(NS_GET_IID(_class))) { \
NS_ADDREF(this); \
*aInstancePtr = this; \
return NS_OK; \
} else
#define NS_OK_DEFUNCT_OBJECT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x22)
#define NS_ENSURE_A11Y_SUCCESS(res, ret) \
PR_BEGIN_MACRO \
nsresult __rv = res; /* Don't evaluate |res| more than once */ \
if (NS_FAILED(__rv)) { \
NS_ENSURE_SUCCESS_BODY(res, ret) \
return ret; \
} \
if (__rv == NS_OK_DEFUNCT_OBJECT) \
return ret; \
PR_END_MACRO
#define NS_ACCESSNODE_IMPL_CID \ #define NS_ACCESSNODE_IMPL_CID \
{ /* 2b07e3d7-00b3-4379-aa0b-ea22e2c8ffda */ \ { /* 2b07e3d7-00b3-4379-aa0b-ea22e2c8ffda */ \
0x2b07e3d7, \ 0x2b07e3d7, \

View File

@ -246,15 +246,14 @@ nsAccessibilityService::ProcessDocLoadEvent(nsIWebProgress *aWebProgress,
nsCOMPtr<nsIAccessible> accessible; nsCOMPtr<nsIAccessible> accessible;
GetAccessibleFor(docNode, getter_AddRefs(accessible)); GetAccessibleFor(docNode, getter_AddRefs(accessible));
nsRefPtr<nsDocAccessible> docAcc = nsRefPtr<nsDocAccessible> docAcc = do_QueryObject(accessible);
nsAccUtils::QueryAccessibleDocument(accessible);
NS_ENSURE_TRUE(docAcc,); NS_ENSURE_TRUE(docAcc,);
docAcc->FireDocLoadEvents(aEventType); docAcc->FireDocLoadEvents(aEventType);
} }
// nsIAccessibilityService // nsIAccessibilityService
NS_IMETHODIMP nsresult
nsAccessibilityService::NotifyOfAnchorJumpTo(nsIContent *aTarget) nsAccessibilityService::NotifyOfAnchorJumpTo(nsIContent *aTarget)
{ {
nsCOMPtr<nsIDOMNode> targetNode(do_QueryInterface(aTarget)); nsCOMPtr<nsIDOMNode> targetNode(do_QueryInterface(aTarget));
@ -284,7 +283,7 @@ nsAccessibilityService::NotifyOfAnchorJumpTo(nsIContent *aTarget)
} }
// nsIAccessibilityService // nsIAccessibilityService
NS_IMETHODIMP nsresult
nsAccessibilityService::FireAccessibleEvent(PRUint32 aEvent, nsAccessibilityService::FireAccessibleEvent(PRUint32 aEvent,
nsIAccessible *aTarget) nsIAccessible *aTarget)
{ {
@ -382,7 +381,7 @@ nsAccessibilityService::GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **a
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsIAccessibilityService // nsIAccessibilityService
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateOuterDocAccessible(nsIDOMNode* aDOMNode, nsAccessibilityService::CreateOuterDocAccessible(nsIDOMNode* aDOMNode,
nsIAccessible **aOuterDocAccessible) nsIAccessible **aOuterDocAccessible)
{ {
@ -464,7 +463,7 @@ nsAccessibilityService::CreateDocOrRootAccessible(nsIPresShell *aShell,
/** /**
* HTML widget creation * HTML widget creation
*/ */
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTML4ButtonAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTML4ButtonAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -481,7 +480,7 @@ nsAccessibilityService::CreateHTML4ButtonAccessible(nsIFrame *aFrame, nsIAccessi
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLButtonAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLButtonAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -569,7 +568,7 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame *aFrame,
return accessible.forget(); return accessible.forget();
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLLIAccessible(nsIFrame *aFrame, nsAccessibilityService::CreateHTMLLIAccessible(nsIFrame *aFrame,
nsIFrame *aBulletFrame, nsIFrame *aBulletFrame,
const nsAString& aBulletText, const nsAString& aBulletText,
@ -589,7 +588,7 @@ nsAccessibilityService::CreateHTMLLIAccessible(nsIFrame *aFrame,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHyperTextAccessible(nsIFrame *aFrame, nsIAccessible **aAccessible) nsAccessibilityService::CreateHyperTextAccessible(nsIFrame *aFrame, nsIAccessible **aAccessible)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -608,7 +607,7 @@ nsAccessibilityService::CreateHyperTextAccessible(nsIFrame *aFrame, nsIAccessibl
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -625,7 +624,7 @@ nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIFrame *aFrame, nsIAccess
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aPresShell, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aPresShell, nsIAccessible **_retval)
{ {
*_retval = new nsHTMLComboboxAccessible(aDOMNode, aPresShell); *_retval = new nsHTMLComboboxAccessible(aDOMNode, aPresShell);
@ -636,7 +635,7 @@ nsAccessibilityService::CreateHTMLComboboxAccessible(nsIDOMNode* aDOMNode, nsIWe
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLImageAccessible(nsIFrame *aFrame, nsAccessibilityService::CreateHTMLImageAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
@ -680,13 +679,13 @@ nsAccessibilityService::CreateHTMLImageAccessible(nsIFrame *aFrame,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLGenericAccessible(nsIFrame *aFrame, nsIAccessible **aAccessible) nsAccessibilityService::CreateHTMLGenericAccessible(nsIFrame *aFrame, nsIAccessible **aAccessible)
{ {
return CreateHyperTextAccessible(aFrame, aAccessible); return CreateHyperTextAccessible(aFrame, aAccessible);
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLGroupboxAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLGroupboxAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -703,7 +702,7 @@ nsAccessibilityService::CreateHTMLGroupboxAccessible(nsIFrame *aFrame, nsIAccess
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aPresShell, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aPresShell, nsIAccessible **_retval)
{ {
*_retval = new nsHTMLSelectListAccessible(aDOMNode, aPresShell); *_retval = new nsHTMLSelectListAccessible(aDOMNode, aPresShell);
@ -714,7 +713,7 @@ nsAccessibilityService::CreateHTMLListboxAccessible(nsIDOMNode* aDOMNode, nsIWea
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLMediaAccessible(nsIFrame *aFrame, nsAccessibilityService::CreateHTMLMediaAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
@ -744,7 +743,7 @@ nsAccessibilityService::CreateHTMLMediaAccessible(nsIFrame *aFrame,
* 3) An image or imagemap, where the image frame points back to * 3) An image or imagemap, where the image frame points back to
* the object element DOMNode * the object element DOMNode
*/ */
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame, nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
@ -793,7 +792,7 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -810,7 +809,7 @@ nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsIFrame *aFrame, nsIAcc
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode,
nsIAccessible *aParent, nsIAccessible *aParent,
nsIWeakReference* aPresShell, nsIWeakReference* aPresShell,
@ -824,7 +823,7 @@ nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLTableAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLTableAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -841,7 +840,7 @@ nsAccessibilityService::CreateHTMLTableAccessible(nsIFrame *aFrame, nsIAccessibl
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLTableCellAccessible(nsIFrame *aFrame, nsAccessibilityService::CreateHTMLTableCellAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
@ -859,7 +858,7 @@ nsAccessibilityService::CreateHTMLTableCellAccessible(nsIFrame *aFrame,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLTextAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLTextAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
*_retval = nsnull; *_retval = nsnull;
@ -879,7 +878,7 @@ nsAccessibilityService::CreateHTMLTextAccessible(nsIFrame *aFrame, nsIAccessible
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLTextFieldAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLTextFieldAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -896,7 +895,7 @@ nsAccessibilityService::CreateHTMLTextFieldAccessible(nsIFrame *aFrame, nsIAcces
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLLabelAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLLabelAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -913,7 +912,7 @@ nsAccessibilityService::CreateHTMLLabelAccessible(nsIFrame *aFrame, nsIAccessibl
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLHRAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLHRAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -930,7 +929,7 @@ nsAccessibilityService::CreateHTMLHRAccessible(nsIFrame *aFrame, nsIAccessible *
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLBRAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLBRAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -947,7 +946,7 @@ nsAccessibilityService::CreateHTMLBRAccessible(nsIFrame *aFrame, nsIAccessible *
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsresult
nsAccessibilityService::CreateHTMLCaptionAccessible(nsIFrame *aFrame, nsIAccessible **_retval) nsAccessibilityService::CreateHTMLCaptionAccessible(nsIFrame *aFrame, nsIAccessible **_retval)
{ {
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
@ -2026,7 +2025,9 @@ nsAccessibilityService::CreateAccessibleByType(nsIDOMNode *aNode,
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsIAccessibilityService (DON'T put methods here) // nsIAccessibilityService (DON'T put methods here)
NS_IMETHODIMP nsAccessibilityService::AddNativeRootAccessible(void * aAtkAccessible, nsIAccessible **aRootAccessible) nsresult
nsAccessibilityService::AddNativeRootAccessible(void *aAtkAccessible,
nsIAccessible **aRootAccessible)
{ {
#ifdef MOZ_ACCESSIBILITY_ATK #ifdef MOZ_ACCESSIBILITY_ATK
nsNativeRootAccessibleWrap* rootAccWrap = nsNativeRootAccessibleWrap* rootAccWrap =
@ -2047,7 +2048,8 @@ NS_IMETHODIMP nsAccessibilityService::AddNativeRootAccessible(void * aAtkAccessi
#endif #endif
} }
NS_IMETHODIMP nsAccessibilityService::RemoveNativeRootAccessible(nsIAccessible * aRootAccessible) nsresult
nsAccessibilityService::RemoveNativeRootAccessible(nsIAccessible *aRootAccessible)
{ {
#ifdef MOZ_ACCESSIBILITY_ATK #ifdef MOZ_ACCESSIBILITY_ATK
void* atkAccessible; void* atkAccessible;
@ -2066,7 +2068,7 @@ NS_IMETHODIMP nsAccessibilityService::RemoveNativeRootAccessible(nsIAccessible *
} }
// Called from layout when the frame tree owned by a node changes significantly // Called from layout when the frame tree owned by a node changes significantly
NS_IMETHODIMP nsresult
nsAccessibilityService::InvalidateSubtreeFor(nsIPresShell *aShell, nsAccessibilityService::InvalidateSubtreeFor(nsIPresShell *aShell,
nsIContent *aChangeContent, nsIContent *aChangeContent,
PRUint32 aChangeType) PRUint32 aChangeType)
@ -2083,8 +2085,7 @@ nsAccessibilityService::InvalidateSubtreeFor(nsIPresShell *aShell,
nsCOMPtr<nsIAccessibleDocument> accessibleDoc = nsCOMPtr<nsIAccessibleDocument> accessibleDoc =
nsAccessNode::GetDocAccessibleFor(aShell->GetDocument()); nsAccessNode::GetDocAccessibleFor(aShell->GetDocument());
nsRefPtr<nsDocAccessible> docAcc = nsRefPtr<nsDocAccessible> docAcc = do_QueryObject(accessibleDoc);
nsAccUtils::QueryAccessibleDocument(accessibleDoc);
if (docAcc) if (docAcc)
docAcc->InvalidateCacheSubtree(aChangeContent, aChangeType); docAcc->InvalidateCacheSubtree(aChangeContent, aChangeType);

View File

@ -41,6 +41,7 @@
#include "nsIAccessibilityService.h" #include "nsIAccessibilityService.h"
#include "a11yGeneric.h"
#include "nsCoreUtils.h" #include "nsCoreUtils.h"
#include "nsCOMArray.h" #include "nsCOMArray.h"
@ -71,10 +72,77 @@ public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLERETRIEVAL NS_DECL_NSIACCESSIBLERETRIEVAL
NS_DECL_NSIACCESSIBILITYSERVICE
NS_DECL_NSIOBSERVER NS_DECL_NSIOBSERVER
NS_DECL_NSIWEBPROGRESSLISTENER NS_DECL_NSIWEBPROGRESSLISTENER
// nsIAccessibilityService
virtual nsresult CreateOuterDocAccessible(nsIDOMNode *aNode,
nsIAccessible **aAccessible);
virtual nsresult CreateHTML4ButtonAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHyperTextAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLBRAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLButtonAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLLIAccessible(nsIFrame *aFrame,
nsIFrame *aBulletFrame,
const nsAString& aBulletText,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLCheckboxAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLComboboxAccessible(nsIDOMNode *aNode,
nsIWeakReference *aPresShell,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLGenericAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLGroupboxAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLHRAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLImageAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLLabelAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLListboxAccessible(nsIDOMNode *aNode,
nsIWeakReference *aPresShell,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLMediaAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLRadioButtonAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLSelectOptionAccessible(nsIDOMNode *aNode,
nsIAccessible *aAccParent,
nsIWeakReference *aPresShell,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLTableAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLTableCellAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLTextAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLTextFieldAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult CreateHTMLCaptionAccessible(nsIFrame *aFrame,
nsIAccessible **aAccessible);
virtual nsresult AddNativeRootAccessible(void *aAtkAccessible,
nsIAccessible **aAccessible);
virtual nsresult RemoveNativeRootAccessible(nsIAccessible *aRootAccessible);
virtual nsresult InvalidateSubtreeFor(nsIPresShell *aPresShell,
nsIContent *aContent,
PRUint32 aChangeType);
virtual nsresult NotifyOfAnchorJumpTo(nsIContent *aTarget);
virtual nsresult FireAccessibleEvent(PRUint32 aEvent, nsIAccessible *aTarget);
// nsAccessibiltiyService
/** /**
* Return presentation shell for the given node. * Return presentation shell for the given node.
* *

View File

@ -41,9 +41,15 @@
#include "nsIXBLAccessible.h" #include "nsIXBLAccessible.h"
#include "nsAccTreeWalker.h" #include "nsAccUtils.h"
#include "nsAccessibleRelation.h" #include "nsARIAMap.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsEventShell.h"
#include "nsAccessibilityService.h"
#include "nsAccTreeWalker.h"
#include "nsRelUtils.h"
#include "nsTextEquivUtils.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
@ -95,50 +101,6 @@
#include "nsIDOMCharacterData.h" #include "nsIDOMCharacterData.h"
#endif #endif
/**
* nsAccessibleDOMStringList implementation
*/
nsAccessibleDOMStringList::nsAccessibleDOMStringList()
{
}
nsAccessibleDOMStringList::~nsAccessibleDOMStringList()
{
}
NS_IMPL_ISUPPORTS1(nsAccessibleDOMStringList, nsIDOMDOMStringList)
NS_IMETHODIMP
nsAccessibleDOMStringList::Item(PRUint32 aIndex, nsAString& aResult)
{
if (aIndex >= mNames.Length()) {
SetDOMStringToNull(aResult);
} else {
aResult = mNames.ElementAt(aIndex);
}
return NS_OK;
}
NS_IMETHODIMP
nsAccessibleDOMStringList::GetLength(PRUint32 *aLength)
{
*aLength = mNames.Length();
return NS_OK;
}
NS_IMETHODIMP
nsAccessibleDOMStringList::Contains(const nsAString& aString, PRBool *aResult)
{
*aResult = mNames.Contains(aString);
return NS_OK;
}
/*
* Class nsAccessible
*/
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsAccessible. nsISupports // nsAccessible. nsISupports
@ -824,12 +786,8 @@ NS_IMETHODIMP nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
focusedChild = this; focusedChild = this;
} }
else if (gLastFocusedNode) { else if (gLastFocusedNode) {
nsCOMPtr<nsIAccessibilityService> accService = GetAccService()->GetAccessibleFor(gLastFocusedNode,
do_GetService("@mozilla.org/accessibilityService;1"); getter_AddRefs(focusedChild));
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
accService->GetAccessibleFor(gLastFocusedNode,
getter_AddRefs(focusedChild));
if (focusedChild) { if (focusedChild) {
nsCOMPtr<nsIAccessible> focusedParentAccessible; nsCOMPtr<nsIAccessible> focusedParentAccessible;
focusedChild->GetParent(getter_AddRefs(focusedParentAccessible)); focusedChild->GetParent(getter_AddRefs(focusedParentAccessible));
@ -891,17 +849,17 @@ nsAccessible::GetChildAtPoint(PRInt32 aX, PRInt32 aY, PRBool aDeepestChild,
} }
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(content)); nsCOMPtr<nsIDOMNode> node(do_QueryInterface(content));
nsCOMPtr<nsIAccessibilityService> accService = GetAccService();
nsCOMPtr<nsIDOMNode> relevantNode; nsCOMPtr<nsIDOMNode> relevantNode;
accService->GetRelevantContentNodeFor(node, getter_AddRefs(relevantNode)); GetAccService()->GetRelevantContentNodeFor(node,
getter_AddRefs(relevantNode));
if (!relevantNode) { if (!relevantNode) {
NS_IF_ADDREF(*aChild = fallbackAnswer); NS_IF_ADDREF(*aChild = fallbackAnswer);
return NS_OK; return NS_OK;
} }
nsCOMPtr<nsIAccessible> accessible; nsCOMPtr<nsIAccessible> accessible;
accService->GetAccessibleFor(relevantNode, getter_AddRefs(accessible)); GetAccService()->GetAccessibleFor(relevantNode, getter_AddRefs(accessible));
if (!accessible) { if (!accessible) {
// No accessible for the node with the point, so find the first // No accessible for the node with the point, so find the first
// accessible in the DOM parent chain // accessible in the DOM parent chain
@ -2894,7 +2852,7 @@ nsAccessible::GetParent()
docAccessible->GetAccessibleInParentChain(mDOMNode, PR_TRUE, docAccessible->GetAccessibleInParentChain(mDOMNode, PR_TRUE,
getter_AddRefs(parent)); getter_AddRefs(parent));
nsRefPtr<nsAccessible> parentAcc = nsAccUtils::QueryAccessible(parent); nsRefPtr<nsAccessible> parentAcc = do_QueryObject(parent);
#ifdef DEBUG #ifdef DEBUG
NS_ASSERTION(!parentAcc->IsDefunct(), "Defunct parent!"); NS_ASSERTION(!parentAcc->IsDefunct(), "Defunct parent!");

View File

@ -41,33 +41,29 @@
#include "nsAccessNodeWrap.h" #include "nsAccessNodeWrap.h"
#include "nsARIAMap.h"
#include "nsEventShell.h"
#include "nsRelUtils.h"
#include "nsTextEquivUtils.h"
#include "nsIAccessible.h" #include "nsIAccessible.h"
#include "nsIAccessibleHyperLink.h" #include "nsIAccessibleHyperLink.h"
#include "nsIAccessibleSelectable.h" #include "nsIAccessibleSelectable.h"
#include "nsIAccessibleValue.h" #include "nsIAccessibleValue.h"
#include "nsIAccessibleRole.h" #include "nsIAccessibleRole.h"
#include "nsIAccessibleStates.h" #include "nsIAccessibleStates.h"
#include "nsIAccessibleEvent.h"
#include "nsIDOMNodeList.h" #include "nsStringGlue.h"
#include "nsINameSpaceManager.h"
#include "nsWeakReference.h"
#include "nsString.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "nsIDOMDOMStringList.h"
class nsAccessible;
class nsAccEvent;
struct nsRoleMapEntry;
struct nsRect; struct nsRect;
class nsIContent; class nsIContent;
class nsIFrame; class nsIFrame;
class nsIDOMNode;
class nsIAtom; class nsIAtom;
class nsIView; class nsIView;
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessible>
nsAccessibleHashtable;
// see nsAccessible::GetAttrValue // see nsAccessible::GetAttrValue
#define NS_OK_NO_ARIA_VALUE \ #define NS_OK_NO_ARIA_VALUE \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x21) NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x21)
@ -80,29 +76,8 @@ NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x23)
#define NS_OK_NAME_FROM_TOOLTIP \ #define NS_OK_NAME_FROM_TOOLTIP \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x25) NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x25)
// Saves a data member -- if child count equals this value we haven't
// cached children or child count yet
enum { eChildCountUninitialized = -1 };
class nsAccessibleDOMStringList : public nsIDOMDOMStringList #define NS_ACCESSIBLE_IMPL_IID \
{
public:
nsAccessibleDOMStringList();
virtual ~nsAccessibleDOMStringList();
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMDOMSTRINGLIST
PRBool Add(const nsAString& aName) {
return mNames.AppendElement(aName) != nsnull;
}
private:
nsTArray<nsString> mNames;
};
#define NS_ACCESSIBLE_IMPL_CID \
{ /* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */ \ { /* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */ \
0x133c8bf4, \ 0x133c8bf4, \
0x4913, \ 0x4913, \
@ -127,7 +102,7 @@ public:
NS_DECL_NSIACCESSIBLEHYPERLINK NS_DECL_NSIACCESSIBLEHYPERLINK
NS_DECL_NSIACCESSIBLESELECTABLE NS_DECL_NSIACCESSIBLESELECTABLE
NS_DECL_NSIACCESSIBLEVALUE NS_DECL_NSIACCESSIBLEVALUE
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_CID) NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_IID)
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// nsAccessNode // nsAccessNode
@ -441,7 +416,7 @@ protected:
}; };
NS_DEFINE_STATIC_IID_ACCESSOR(nsAccessible, NS_DEFINE_STATIC_IID_ACCESSOR(nsAccessible,
NS_ACCESSIBLE_IMPL_CID) NS_ACCESSIBLE_IMPL_IID)
#endif #endif

View File

@ -43,6 +43,7 @@
#include "nsApplicationAccessible.h" #include "nsApplicationAccessible.h"
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsIComponentManager.h" #include "nsIComponentManager.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"

View File

@ -38,18 +38,18 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsBaseWidgetAccessible.h" #include "nsBaseWidgetAccessible.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsIAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsIAccessibleDocument.h" #include "nsAccUtils.h"
#include "nsAccessibleWrap.h"
#include "nsCoreUtils.h" #include "nsCoreUtils.h"
#include "nsHyperTextAccessibleWrap.h"
#include "nsIDOMNSHTMLElement.h" #include "nsIDOMNSHTMLElement.h"
#include "nsGUIEvent.h" #include "nsGUIEvent.h"
#include "nsHyperTextAccessibleWrap.h"
#include "nsILink.h" #include "nsILink.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsINameSpaceManager.h" #include "nsINameSpaceManager.h"
#include "nsIServiceManager.h"
#include "nsIURI.h" #include "nsIURI.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -35,10 +35,13 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessibilityService.h"
#include "nsCaretAccessible.h" #include "nsCaretAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsIAccessibleEvent.h" #include "nsIAccessibleEvent.h"
#include "nsCaret.h" #include "nsCaret.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMHTMLAnchorElement.h" #include "nsIDOMHTMLAnchorElement.h"

View File

@ -74,6 +74,10 @@
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID); static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
////////////////////////////////////////////////////////////////////////////////
// nsCoreUtils
////////////////////////////////////////////////////////////////////////////////
PRBool PRBool
nsCoreUtils::HasClickListener(nsIContent *aContent) nsCoreUtils::HasClickListener(nsIContent *aContent)
{ {
@ -1150,3 +1154,37 @@ nsCoreUtils::GeneratePopupTree(nsIDOMNode *aNode, PRBool aIsAnon)
} }
} }
} }
////////////////////////////////////////////////////////////////////////////////
// nsAccessibleDOMStringList
////////////////////////////////////////////////////////////////////////////////
NS_IMPL_ISUPPORTS1(nsAccessibleDOMStringList, nsIDOMDOMStringList)
NS_IMETHODIMP
nsAccessibleDOMStringList::Item(PRUint32 aIndex, nsAString& aResult)
{
if (aIndex >= mNames.Length())
SetDOMStringToNull(aResult);
else
aResult = mNames.ElementAt(aIndex);
return NS_OK;
}
NS_IMETHODIMP
nsAccessibleDOMStringList::GetLength(PRUint32 *aLength)
{
*aLength = mNames.Length();
return NS_OK;
}
NS_IMETHODIMP
nsAccessibleDOMStringList::Contains(const nsAString& aString, PRBool *aResult)
{
*aResult = mNames.Contains(aString);
return NS_OK;
}

View File

@ -49,10 +49,15 @@
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsIDocShellTreeItem.h" #include "nsIDocShellTreeItem.h"
#include "nsIArray.h" #include "nsIDOMCSSStyleDeclaration.h"
#include "nsIDOMDOMStringList.h"
#include "nsIMutableArray.h" #include "nsIMutableArray.h"
#include "nsPoint.h" #include "nsPoint.h"
#include "nsTArray.h"
/**
* Core utils.
*/
class nsCoreUtils class nsCoreUtils
{ {
public: public:
@ -468,132 +473,26 @@ public:
static void GeneratePopupTree(nsIDOMNode *aNode, PRBool aIsAnon = PR_FALSE); static void GeneratePopupTree(nsIDOMNode *aNode, PRBool aIsAnon = PR_FALSE);
}; };
////////////////////////////////////////////////////////////////////////////////
// nsRunnable helpers
////////////////////////////////////////////////////////////////////////////////
/** /**
* Use NS_DECL_RUNNABLEMETHOD_ macros to declare a runnable class for the given * nsIDOMDOMStringList implementation.
* method of the given class. There are three macros:
* NS_DECL_RUNNABLEMETHOD(Class, Method)
* NS_DECL_RUNNABLEMETHOD_ARG1(Class, Method, Arg1Type)
* NS_DECL_RUNNABLEMETHOD_ARG2(Class, Method, Arg1Type, Arg2Type)
* Note Arg1Type and Arg2Type must be types which keeps the objects alive.
*
* Use NS_DISPATCH_RUNNABLEMETHOD_ macros to create an instance of declared
* runnable class and dispatch it to main thread. Availabe macros are:
* NS_DISPATCH_RUNNABLEMETHOD(Method, Object)
* NS_DISPATCH_RUNNABLEMETHOD_ARG1(Method, Object, Arg1)
* NS_DISPATCH_RUNNABLEMETHOD_ARG2(Method, Object, Arg1, Arg2)
*/ */
class nsAccessibleDOMStringList : public nsIDOMDOMStringList
{
public:
nsAccessibleDOMStringList() {};
virtual ~nsAccessibleDOMStringList() {};
#define NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \ NS_DECL_ISUPPORTS
void Revoke() \ NS_DECL_NSIDOMDOMSTRINGLIST
{ \
NS_IF_RELEASE(mObj); \
} \
\
protected: \
virtual ~nsRunnableMethod_##Method() \
{ \
NS_IF_RELEASE(mObj); \
} \
\
private: \
ClassType *mObj; \
PRBool Add(const nsAString& aName) {
return mNames.AppendElement(aName) != nsnull;
}
#define NS_DECL_RUNNABLEMETHOD(ClassType, Method) \ private:
class nsRunnableMethod_##Method : public nsRunnable \ nsTArray<nsString> mNames;
{ \
public: \
nsRunnableMethod_##Method(ClassType *aObj) : mObj(aObj) \
{ \
NS_IF_ADDREF(mObj); \
} \
\
NS_IMETHODIMP Run() \
{ \
if (!mObj) \
return NS_OK; \
(mObj-> Method)(); \
return NS_OK; \
} \
\
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
\
}; };
#define NS_DECL_RUNNABLEMETHOD_ARG1(ClassType, Method, Arg1Type) \
class nsRunnableMethod_##Method : public nsRunnable \
{ \
public: \
nsRunnableMethod_##Method(ClassType *aObj, Arg1Type aArg1) : \
mObj(aObj), mArg1(aArg1) \
{ \
NS_IF_ADDREF(mObj); \
} \
\
NS_IMETHODIMP Run() \
{ \
if (!mObj) \
return NS_OK; \
(mObj-> Method)(mArg1); \
return NS_OK; \
} \
\
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
Arg1Type mArg1; \
};
#define NS_DECL_RUNNABLEMETHOD_ARG2(ClassType, Method, Arg1Type, Arg2Type) \
class nsRunnableMethod_##Method : public nsRunnable \
{ \
public: \
\
nsRunnableMethod_##Method(ClassType *aObj, \
Arg1Type aArg1, Arg2Type aArg2) : \
mObj(aObj), mArg1(aArg1), mArg2(aArg2) \
{ \
NS_IF_ADDREF(mObj); \
} \
\
NS_IMETHODIMP Run() \
{ \
if (!mObj) \
return NS_OK; \
(mObj-> Method)(mArg1, mArg2); \
return NS_OK; \
} \
\
NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
Arg1Type mArg1; \
Arg2Type mArg2; \
};
#define NS_DISPATCH_RUNNABLEMETHOD(Method, Obj) \
{ \
nsCOMPtr<nsIRunnable> runnable = \
new nsRunnableMethod_##Method(Obj); \
if (runnable) \
NS_DispatchToMainThread(runnable); \
}
#define NS_DISPATCH_RUNNABLEMETHOD_ARG1(Method, Obj, Arg1) \
{ \
nsCOMPtr<nsIRunnable> runnable = \
new nsRunnableMethod_##Method(Obj, Arg1); \
if (runnable) \
NS_DispatchToMainThread(runnable); \
}
#define NS_DISPATCH_RUNNABLEMETHOD_ARG2(Method, Obj, Arg1, Arg2) \
{ \
nsCOMPtr<nsIRunnable> runnable = \
new nsRunnableMethod_##Method(Obj, Arg1, Arg2); \
if (runnable) \
NS_DispatchToMainThread(runnable); \
}
#endif #endif

View File

@ -36,9 +36,14 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsRootAccessible.h" #include "nsAccCache.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsRootAccessible.h"
#include "nsTextEquivUtils.h"
#include "nsIMutableArray.h" #include "nsIMutableArray.h"
#include "nsICommandManager.h" #include "nsICommandManager.h"
#include "nsIDocShell.h" #include "nsIDocShell.h"
@ -474,17 +479,16 @@ NS_IMETHODIMP nsDocAccessible::GetWindow(nsIDOMWindow **aDOMWin)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP nsDocAccessible::GetDocument(nsIDOMDocument **aDOMDoc) NS_IMETHODIMP
nsDocAccessible::GetDOMDocument(nsIDOMDocument **aDOMDocument)
{ {
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(mDocument)); NS_ENSURE_ARG_POINTER(aDOMDocument);
*aDOMDoc = domDoc; *aDOMDocument = nsnull;
if (domDoc) { if (mDocument)
NS_ADDREF(*aDOMDoc); CallQueryInterface(mDocument, aDOMDocument);
return NS_OK;
}
return NS_ERROR_FAILURE; return NS_OK;
} }
// nsIAccessibleHyperText method // nsIAccessibleHyperText method
@ -667,8 +671,7 @@ void nsDocAccessible::ShutdownChildDocuments(nsIDocShellTreeItem *aStart)
nsCOMPtr<nsIAccessibleDocument> docAccessible = nsCOMPtr<nsIAccessibleDocument> docAccessible =
GetDocAccessibleFor(treeItemChild); GetDocAccessibleFor(treeItemChild);
if (docAccessible) { if (docAccessible) {
nsRefPtr<nsAccessNode> docAccNode = nsRefPtr<nsAccessNode> docAccNode = do_QueryObject(docAccessible);
nsAccUtils::QueryAccessNode(docAccessible);
docAccNode->Shutdown(); docAccNode->Shutdown();
} }
} }
@ -1667,8 +1670,7 @@ nsDocAccessible::ProcessPendingEvent(nsAccEvent *aEvent)
if (isAsync) { if (isAsync) {
// For asynch show, delayed invalidatation of parent's children // For asynch show, delayed invalidatation of parent's children
nsRefPtr<nsAccessible> containerAcc = nsRefPtr<nsAccessible> containerAcc = do_QueryObject(containerAccessible);
nsAccUtils::QueryAccessible(containerAccessible);
if (containerAcc) if (containerAcc)
containerAcc->InvalidateChildren(); containerAcc->InvalidateChildren();
@ -1703,8 +1705,7 @@ nsDocAccessible::ProcessPendingEvent(nsAccEvent *aEvent)
if (accessible) { if (accessible) {
if (eventType == nsIAccessibleEvent::EVENT_INTERNAL_LOAD) { if (eventType == nsIAccessibleEvent::EVENT_INTERNAL_LOAD) {
nsRefPtr<nsDocAccessible> docAcc = nsRefPtr<nsDocAccessible> docAcc = do_QueryObject(accessible);
nsAccUtils::QueryAccessibleDocument(accessible);
NS_ASSERTION(docAcc, "No doc accessible for doc load event"); NS_ASSERTION(docAcc, "No doc accessible for doc load event");
if (docAcc) if (docAcc)
@ -1935,8 +1936,7 @@ nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
containerAccessible = this; containerAccessible = this;
} }
nsRefPtr<nsAccessible> containerAcc = nsRefPtr<nsAccessible> containerAcc = do_QueryObject(containerAccessible);
nsAccUtils::QueryAccessible(containerAccessible);
containerAcc->InvalidateChildren(); containerAcc->InvalidateChildren();
return; return;
} }
@ -2028,8 +2028,7 @@ nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
if (!isAsynch) { if (!isAsynch) {
// DOM already updated with new objects -- invalidate parent's children now // DOM already updated with new objects -- invalidate parent's children now
// For asynch we must wait until layout updates before we invalidate the children // For asynch we must wait until layout updates before we invalidate the children
nsRefPtr<nsAccessible> containerAcc = nsRefPtr<nsAccessible> containerAcc = do_QueryObject(containerAccessible);
nsAccUtils::QueryAccessible(containerAccessible);
if (containerAcc) if (containerAcc)
containerAcc->InvalidateChildren(); containerAcc->InvalidateChildren();

View File

@ -40,7 +40,9 @@
#define _nsDocAccessible_H_ #define _nsDocAccessible_H_
#include "nsHyperTextAccessibleWrap.h" #include "nsHyperTextAccessibleWrap.h"
#include "nsEventShell.h"
#include "nsIAccessibleDocument.h" #include "nsIAccessibleDocument.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIDocumentObserver.h" #include "nsIDocumentObserver.h"
#include "nsIEditor.h" #include "nsIEditor.h"

View File

@ -38,6 +38,8 @@
#include "nsEventShell.h" #include "nsEventShell.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -41,8 +41,9 @@
#include "nsAccEvent.h" #include "nsAccEvent.h"
#include "a11yGeneric.h"
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "nsCoreUtils.h"
class nsIPersistentProperties; class nsIPersistentProperties;

View File

@ -37,8 +37,10 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsOuterDocAccessible.h" #include "nsOuterDocAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIAccessibleDocument.h" #include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsIContent.h" #include "nsIContent.h"
@ -121,7 +123,7 @@ nsOuterDocAccessible::CacheChildren()
nsCOMPtr<nsIAccessible> innerAccessible; nsCOMPtr<nsIAccessible> innerAccessible;
nsCOMPtr<nsIAccessibilityService> accService = GetAccService(); nsCOMPtr<nsIAccessibilityService> accService = GetAccService();
accService->GetAccessibleFor(innerNode, getter_AddRefs(innerAccessible)); accService->GetAccessibleFor(innerNode, getter_AddRefs(innerAccessible));
nsRefPtr<nsAccessible> innerAcc(nsAccUtils::QueryAccessible(innerAccessible)); nsRefPtr<nsAccessible> innerAcc(do_QueryObject(innerAccessible));
if (!innerAcc) if (!innerAcc)
return; return;

View File

@ -38,6 +38,7 @@
#include "nsRelUtils.h" #include "nsRelUtils.h"
#include "nsAccessibilityService.h"
#include "nsAccessNode.h" #include "nsAccessNode.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"

View File

@ -35,9 +35,11 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsApplicationAccessibleWrap.h" #include "nsApplicationAccessibleWrap.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsRelUtils.h"
#include "nsHTMLSelectAccessible.h" #include "nsHTMLSelectAccessible.h"
#include "nsIDocShell.h" #include "nsIDocShell.h"
@ -622,7 +624,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
nsCOMPtr<nsIDocument> doc(do_QueryInterface(aTargetNode)); nsCOMPtr<nsIDocument> doc(do_QueryInterface(aTargetNode));
nsCOMPtr<nsIAccessibleDocument> accDoc = GetDocAccessibleFor(doc); nsCOMPtr<nsIAccessibleDocument> accDoc = GetDocAccessibleFor(doc);
if (accDoc) { if (accDoc) {
nsRefPtr<nsAccessNode> docAccNode = nsAccUtils::QueryAccessNode(accDoc); nsRefPtr<nsAccessNode> docAccNode = do_QueryObject(accDoc);
docAccNode->Shutdown(); docAccNode->Shutdown();
} }
@ -649,14 +651,13 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
if (eventType.EqualsLiteral("popuphiding")) if (eventType.EqualsLiteral("popuphiding"))
return HandlePopupHidingEvent(aTargetNode, accessible); return HandlePopupHidingEvent(aTargetNode, accessible);
nsRefPtr<nsAccessible> acc(nsAccUtils::QueryAccessible(accessible)); nsRefPtr<nsAccessible> acc(do_QueryObject(accessible));
if (!acc) if (!acc)
return NS_OK; return NS_OK;
#ifdef MOZ_XUL #ifdef MOZ_XUL
if (isTree) { if (isTree) {
nsRefPtr<nsXULTreeAccessible> treeAcc = nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(accessible);
nsAccUtils::QueryAccessibleTree(accessible);
NS_ASSERTION(treeAcc, NS_ASSERTION(treeAcc,
"Accessible for xul:tree isn't nsXULTreeAccessible."); "Accessible for xul:tree isn't nsXULTreeAccessible.");
@ -720,8 +721,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
PRInt32 treeIndex = -1; PRInt32 treeIndex = -1;
multiSelect->GetCurrentIndex(&treeIndex); multiSelect->GetCurrentIndex(&treeIndex);
if (treeIndex >= 0) { if (treeIndex >= 0) {
nsRefPtr<nsXULTreeAccessible> treeAcc = nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(accessible);
nsAccUtils::QueryAccessibleTree(accessible);
if (treeAcc) { if (treeAcc) {
treeItemAccessible = treeAcc->GetTreeItemAccessible(treeIndex); treeItemAccessible = treeAcc->GetTreeItemAccessible(treeIndex);
if (treeItemAccessible) if (treeItemAccessible)
@ -832,8 +832,7 @@ nsresult nsRootAccessible::HandleEventWithTarget(nsIDOMEvent* aEvent,
return NS_OK; // Tree with nothing selected return NS_OK; // Tree with nothing selected
} }
#endif #endif
nsRefPtr<nsAccessNode> menuAccessNode = nsRefPtr<nsAccessNode> menuAccessNode = do_QueryObject(accessible);
nsAccUtils::QueryAccessNode(accessible);
nsIFrame* menuFrame = menuAccessNode->GetFrame(); nsIFrame* menuFrame = menuAccessNode->GetFrame();
NS_ENSURE_TRUE(menuFrame, NS_ERROR_FAILURE); NS_ENSURE_TRUE(menuFrame, NS_ERROR_FAILURE);
@ -1125,7 +1124,7 @@ nsRootAccessible::HandlePopupShownEvent(nsIAccessible *aAccessible)
PR_FALSE, PR_TRUE); PR_FALSE, PR_TRUE);
NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
nsRefPtr<nsAccessible> acc(nsAccUtils::QueryAccessible(comboboxAcc)); nsRefPtr<nsAccessible> acc(do_QueryObject(comboboxAcc));
nsEventShell::FireEvent(event); nsEventShell::FireEvent(event);
return NS_OK; return NS_OK;
} }

View File

@ -38,7 +38,8 @@
#include "nsTextAttrs.h" #include "nsTextAttrs.h"
#include "nsAccessNode.h" #include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsHyperTextAccessibleWrap.h" #include "nsHyperTextAccessibleWrap.h"
#include "gfxFont.h" #include "gfxFont.h"

View File

@ -45,7 +45,6 @@ class nsHyperTextAccessible;
#include "nsIDOMNode.h" #include "nsIDOMNode.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
#include "nsIDOMCSSStyleDeclaration.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIFrame.h" #include "nsIFrame.h"

View File

@ -39,7 +39,9 @@
#include "nsTextEquivUtils.h" #include "nsTextEquivUtils.h"
#include "nsAccessibilityService.h"
#include "nsAccessible.h" #include "nsAccessible.h"
#include "nsAccUtils.h"
#include "nsIDOMXULLabeledControlEl.h" #include "nsIDOMXULLabeledControlEl.h"
@ -334,7 +336,7 @@ nsTextEquivUtils::AppendFromValue(nsIAccessible *aAccessible,
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED; NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
} }
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible); nsRefPtr<nsAccessible> acc = do_QueryObject(aAccessible);
nsCOMPtr<nsIDOMNode> node; nsCOMPtr<nsIDOMNode> node;
acc->GetDOMNode(getter_AddRefs(node)); acc->GetDOMNode(getter_AddRefs(node));
NS_ENSURE_STATE(node); NS_ENSURE_STATE(node);

View File

@ -36,9 +36,13 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsAccessibilityAtoms.h"
#include "nsHTMLFormControlAccessible.h" #include "nsHTMLFormControlAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsRelUtils.h"
#include "nsTextEquivUtils.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMNSHTMLInputElement.h" #include "nsIDOMNSHTMLInputElement.h"
#include "nsIDOMHTMLInputElement.h" #include "nsIDOMHTMLInputElement.h"

View File

@ -36,12 +36,13 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsHTMLImageAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "imgIContainer.h" #include "imgIContainer.h"
#include "imgIRequest.h" #include "imgIRequest.h"
#include "nsHTMLImageAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIImageLoadingContent.h" #include "nsIImageLoadingContent.h"
#include "nsILink.h" #include "nsILink.h"

View File

@ -39,6 +39,8 @@
#include "nsHTMLImageMapAccessible.h" #include "nsHTMLImageMapAccessible.h"
#include "nsAccUtils.h"
#include "nsIDOMHTMLCollection.h" #include "nsIDOMHTMLCollection.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"

View File

@ -39,6 +39,8 @@
#include "nsHTMLLinkAccessible.h" #include "nsHTMLLinkAccessible.h"
#include "nsCoreUtils.h"
#include "nsILink.h" #include "nsILink.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -36,10 +36,15 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsHTMLSelectAccessible.h" #include "nsHTMLSelectAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsEventShell.h"
#include "nsIAccessibleEvent.h" #include "nsIAccessibleEvent.h"
#include "nsTextEquivUtils.h"
#include "nsCOMPtr.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsIComboboxControlFrame.h" #include "nsIComboboxControlFrame.h"
#include "nsIDocument.h" #include "nsIDocument.h"

View File

@ -39,7 +39,11 @@
#include "nsHTMLTableAccessible.h" #include "nsHTMLTableAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsRelUtils.h"
#include "nsTextEquivUtils.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
@ -48,8 +52,6 @@
#include "nsISelection2.h" #include "nsISelection2.h"
#include "nsISelectionPrivate.h" #include "nsISelectionPrivate.h"
#include "nsINameSpaceManager.h" #include "nsINameSpaceManager.h"
#include "nsIAccessibilityService.h"
#include "nsIDOMCSSStyleDeclaration.h"
#include "nsIDOMHTMLCollection.h" #include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLTableCellElement.h" #include "nsIDOMHTMLTableCellElement.h"
#include "nsIDOMHTMLTableElement.h" #include "nsIDOMHTMLTableElement.h"
@ -57,7 +59,6 @@
#include "nsIDOMHTMLTableSectionElem.h" #include "nsIDOMHTMLTableSectionElem.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIPresShell.h" #include "nsIPresShell.h"
#include "nsIServiceManager.h"
#include "nsITableLayout.h" #include "nsITableLayout.h"
#include "nsITableCellLayout.h" #include "nsITableCellLayout.h"
#include "nsFrameSelection.h" #include "nsFrameSelection.h"
@ -1502,7 +1503,7 @@ nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
nsCOMPtr<nsIAccessibleDocument> docAccessible = GetDocAccessible(); nsCOMPtr<nsIAccessibleDocument> docAccessible = GetDocAccessible();
NS_ENSURE_TRUE(docAccessible, NS_ERROR_FAILURE); NS_ENSURE_TRUE(docAccessible, NS_ERROR_FAILURE);
nsRefPtr<nsAccessNode> docAccessNode = nsAccUtils::QueryAccessNode(docAccessible); nsRefPtr<nsAccessNode> docAccessNode = do_QueryObject(docAccessible);
nsIFrame *docFrame = docAccessNode->GetFrame(); nsIFrame *docFrame = docAccessNode->GetFrame();
NS_ENSURE_TRUE(docFrame , NS_ERROR_FAILURE); NS_ENSURE_TRUE(docFrame , NS_ERROR_FAILURE);

View File

@ -40,6 +40,7 @@
#include "nsHTMLTextAccessible.h" #include "nsHTMLTextAccessible.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsTextEquivUtils.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsPresContext.h" #include "nsPresContext.h"

View File

@ -38,8 +38,10 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsHyperTextAccessible.h" #include "nsHyperTextAccessible.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsAccessibilityService.h" #include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsTextAttrs.h" #include "nsTextAttrs.h"
#include "nsIClipboard.h" #include "nsIClipboard.h"
@ -779,8 +781,7 @@ nsHyperTextAccessible::GetRelativeOffset(nsIPresShell *aPresShell,
nsresult rv; nsresult rv;
PRInt32 contentOffset = aFromOffset; PRInt32 contentOffset = aFromOffset;
if (nsAccUtils::IsText(aFromAccessible)) { if (nsAccUtils::IsText(aFromAccessible)) {
nsRefPtr<nsAccessNode> accessNode = nsRefPtr<nsAccessNode> accessNode = do_QueryObject(aFromAccessible);
nsAccUtils::QueryAccessNode(aFromAccessible);
nsIFrame *frame = accessNode->GetFrame(); nsIFrame *frame = accessNode->GetFrame();
NS_ENSURE_TRUE(frame, -1); NS_ENSURE_TRUE(frame, -1);
@ -974,8 +975,7 @@ nsresult nsHyperTextAccessible::GetTextHelper(EGetTextType aType, nsAccessibleTe
if (aBoundaryType == BOUNDARY_LINE_START && aOffset > 0 && aOffset == textLength) { if (aBoundaryType == BOUNDARY_LINE_START && aOffset > 0 && aOffset == textLength) {
// Asking for start of line, while on last character // Asking for start of line, while on last character
if (startAcc) { if (startAcc) {
nsRefPtr<nsAccessNode> startAccessNode = nsRefPtr<nsAccessNode> startAccessNode = do_QueryObject(startAcc);
nsAccUtils::QueryAccessNode(startAcc);
startFrame = startAccessNode->GetFrame(); startFrame = startAccessNode->GetFrame();
} }
} }

View File

@ -43,14 +43,15 @@
#ifndef _nsAccessibleWrap_H_ #ifndef _nsAccessibleWrap_H_
#define _nsAccessibleWrap_H_ #define _nsAccessibleWrap_H_
#include "nsAccessible.h"
#include "nsAccUtils.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsRect.h" #include "nsRect.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
#include "nsAccessible.h"
struct AccessibleWrapper; struct AccessibleWrapper;
struct objc_class; struct objc_class;
@ -99,23 +100,10 @@ class nsAccessibleWrap : public nsAccessible
virtual nsresult FirePlatformEvent(nsAccEvent *aEvent); virtual nsresult FirePlatformEvent(nsAccEvent *aEvent);
PRBool AncestorIsFlat() { /**
// we don't create a native object if we're child of a "flat" accessible; for example, on OS X buttons * Return true if the parent doesn't have children to expose to AT.
// shouldn't have any children, because that makes the OS confused. */
// PRBool AncestorIsFlat();
// to maintain a scripting environment where the XPCOM accessible hierarchy look the same
// on all platforms, we still let the C++ objects be created though.
nsAccessible* parent(GetParent());
while (parent) {
if (nsAccUtils::MustPrune(parent))
return PR_TRUE;
parent = parent->GetParent();
}
// no parent was flat
return PR_FALSE;
}
// Wrapper around our native object. // Wrapper around our native object.
AccessibleWrapper *mNativeWrapper; AccessibleWrapper *mNativeWrapper;

View File

@ -309,3 +309,28 @@ nsAccessibleWrap::GetUnignoredParent()
return outValue; return outValue;
} }
////////////////////////////////////////////////////////////////////////////////
// nsAccessibleWrap protected
PRBool
nsAccessibleWrap::AncestorIsFlat()
{
// We don't create a native object if we're child of a "flat" accessible;
// for example, on OS X buttons shouldn't have any children, because that
// makes the OS confused.
//
// To maintain a scripting environment where the XPCOM accessible hierarchy
// look the same on all platforms, we still let the C++ objects be created
// though.
nsAccessible* parent(GetParent());
while (parent) {
if (nsAccUtils::MustPrune(parent))
return PR_TRUE;
parent = parent->GetParent();
}
// no parent was flat
return PR_FALSE;
}

View File

@ -51,6 +51,7 @@
#include "nsAccessibleWrap.h" #include "nsAccessibleWrap.h"
#include "nsCOMPtr.h" #include "nsCOMPtr.h"
#include "nsIPersistentProperties2.h"
#include "nsString.h" #include "nsString.h"
#define GET_NSIACCESSIBLETEXT \ #define GET_NSIACCESSIBLETEXT \

View File

@ -37,12 +37,18 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsAccessNodeWrap.h" #include "nsAccessNodeWrap.h"
#include "AccessibleApplication.h"
#include "ISimpleDOMNode_i.c" #include "ISimpleDOMNode_i.c"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsIAccessible.h" #include "nsAccessibilityService.h"
#include "nsApplicationAccessibleWrap.h"
#include "nsCoreUtils.h"
#include "nsRootAccessible.h"
#include "nsAttrName.h" #include "nsAttrName.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIDOMCSSStyleDeclaration.h"
#include "nsIDOMNodeList.h" #include "nsIDOMNodeList.h"
#include "nsIDOMNSHTMLElement.h" #include "nsIDOMNSHTMLElement.h"
#include "nsIDOMViewCSS.h" #include "nsIDOMViewCSS.h"
@ -51,10 +57,7 @@
#include "nsIPrefService.h" #include "nsIPrefService.h"
#include "nsIPrefBranch.h" #include "nsIPrefBranch.h"
#include "nsPIDOMWindow.h" #include "nsPIDOMWindow.h"
#include "nsRootAccessible.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "AccessibleApplication.h"
#include "nsApplicationAccessibleWrap.h"
/// the accessible library and cached methods /// the accessible library and cached methods
HINSTANCE nsAccessNodeWrap::gmAccLib = nsnull; HINSTANCE nsAccessNodeWrap::gmAccLib = nsnull;

View File

@ -37,7 +37,11 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsAccessibleWrap.h" #include "nsAccessibleWrap.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsRelUtils.h"
#include "nsIAccessibleDocument.h" #include "nsIAccessibleDocument.h"
#include "nsIAccessibleSelectable.h" #include "nsIAccessibleSelectable.h"
@ -1751,7 +1755,7 @@ PRInt32 nsAccessibleWrap::GetChildIDFor(nsIAccessible* aAccessible)
HWND HWND
nsAccessibleWrap::GetHWNDFor(nsIAccessible *aAccessible) nsAccessibleWrap::GetHWNDFor(nsIAccessible *aAccessible)
{ {
nsRefPtr<nsAccessNode> accessNode = nsAccUtils::QueryAccessNode(aAccessible); nsRefPtr<nsAccessNode> accessNode = do_QueryObject(aAccessible);
if (!accessNode) if (!accessNode)
return 0; return 0;

View File

@ -44,6 +44,8 @@
#define _nsDocAccessibleWrap_H_ #define _nsDocAccessibleWrap_H_
#include "ISimpleDOMDocument.h" #include "ISimpleDOMDocument.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsIDocShellTreeItem.h" #include "nsIDocShellTreeItem.h"

View File

@ -40,6 +40,8 @@
#include "nsHyperTextAccessibleWrap.h" #include "nsHyperTextAccessibleWrap.h"
#include "nsEventShell.h"
NS_IMPL_ISUPPORTS_INHERITED0(nsHyperTextAccessibleWrap, NS_IMPL_ISUPPORTS_INHERITED0(nsHyperTextAccessibleWrap,
nsHyperTextAccessible) nsHyperTextAccessible)

View File

@ -40,6 +40,7 @@
#include "nsTextAccessibleWrap.h" #include "nsTextAccessibleWrap.h"
#include "ISimpleDOMText_i.c" #include "ISimpleDOMText_i.c"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsIFontMetrics.h" #include "nsIFontMetrics.h"

View File

@ -38,6 +38,10 @@
#include "nsXFormsAccessible.h" #include "nsXFormsAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsTextEquivUtils.h"
#include "nscore.h" #include "nscore.h"
#include "nsServiceManagerUtils.h" #include "nsServiceManagerUtils.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
@ -105,10 +109,6 @@ nsXFormsAccessible::GetBoundChildElementValue(const nsAString& aTagName,
void void
nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode) nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
{ {
nsIAccessibilityService *accService = GetAccService();
if (!accService)
return;
nsCOMPtr<nsIDOMNode> container(aContainerNode); nsCOMPtr<nsIDOMNode> container(aContainerNode);
if (!container) if (!container)
container = mDOMNode; container = mDOMNode;
@ -131,7 +131,8 @@ nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
if (!child) if (!child)
continue; continue;
accService->GetAttachedAccessibleFor(child, getter_AddRefs(accessible)); GetAccService()->GetAttachedAccessibleFor(child,
getter_AddRefs(accessible));
if (!accessible) if (!accessible)
continue; continue;
@ -337,9 +338,6 @@ nsXFormsSelectableAccessible::GetSelectedChildren(nsIArray **aAccessibles)
do_CreateInstance(NS_ARRAY_CONTRACTID); do_CreateInstance(NS_ARRAY_CONTRACTID);
NS_ENSURE_TRUE(accessibles, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(accessibles, NS_ERROR_OUT_OF_MEMORY);
nsIAccessibilityService* accService = GetAccService();
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
nsresult rv; nsresult rv;
if (mIsSelect1Element) { if (mIsSelect1Element) {
@ -352,7 +350,7 @@ nsXFormsSelectableAccessible::GetSelectedChildren(nsIArray **aAccessibles)
return NS_OK; return NS_OK;
nsCOMPtr<nsIAccessible> accessible; nsCOMPtr<nsIAccessible> accessible;
accService->GetAccessibleFor(item, getter_AddRefs(accessible)); GetAccService()->GetAccessibleFor(item, getter_AddRefs(accessible));
NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE); NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE);
accessibles->AppendElement(accessible, PR_FALSE); accessibles->AppendElement(accessible, PR_FALSE);
@ -379,7 +377,7 @@ nsXFormsSelectableAccessible::GetSelectedChildren(nsIArray **aAccessibles)
NS_ENSURE_TRUE(item, NS_ERROR_FAILURE); NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessible> accessible; nsCOMPtr<nsIAccessible> accessible;
accService->GetAccessibleFor(item, getter_AddRefs(accessible)); GetAccService()->GetAccessibleFor(item, getter_AddRefs(accessible));
NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE); NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE);
accessibles->AppendElement(accessible, PR_FALSE); accessibles->AppendElement(accessible, PR_FALSE);
@ -467,9 +465,6 @@ nsXFormsSelectableAccessible::RefSelection(PRInt32 aIndex,
NS_ENSURE_ARG_POINTER(aAccessible); NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull; *aAccessible = nsnull;
nsIAccessibilityService* accService = GetAccService();
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
nsresult rv; nsresult rv;
if (mIsSelect1Element) { if (mIsSelect1Element) {
if (aIndex != 0) if (aIndex != 0)
@ -481,7 +476,7 @@ nsXFormsSelectableAccessible::RefSelection(PRInt32 aIndex,
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
if (item) if (item)
return accService->GetAccessibleFor(item, aAccessible); return GetAccService()->GetAccessibleFor(item, aAccessible);
return NS_OK; return NS_OK;
} }
@ -502,7 +497,7 @@ nsXFormsSelectableAccessible::RefSelection(PRInt32 aIndex,
items->Item(aIndex, getter_AddRefs(item)); items->Item(aIndex, getter_AddRefs(item));
nsCOMPtr<nsIAccessible> accessible; nsCOMPtr<nsIAccessible> accessible;
return accService->GetAccessibleFor(item, getter_AddRefs(accessible)); return GetAccService()->GetAccessibleFor(item, getter_AddRefs(accessible));
} }
NS_IMETHODIMP NS_IMETHODIMP

View File

@ -38,6 +38,8 @@
#include "nsXFormsFormControlsAccessible.h" #include "nsXFormsFormControlsAccessible.h"
#include "nsTextEquivUtils.h"
// nsXFormsLabelAccessible // nsXFormsLabelAccessible
nsXFormsLabelAccessible:: nsXFormsLabelAccessible::

View File

@ -38,7 +38,9 @@
#include "nsXULColorPickerAccessible.h" #include "nsXULColorPickerAccessible.h"
#include "nsAccUtils.h"
#include "nsAccTreeWalker.h" #include "nsAccTreeWalker.h"
#include "nsCoreUtils.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"

View File

@ -40,9 +40,10 @@
#include "nsXULComboboxAccessible.h" #include "nsXULComboboxAccessible.h"
#include "nsAccessibilityService.h"
#include "nsIDOMXULMenuListElement.h" #include "nsIDOMXULMenuListElement.h"
#include "nsIDOMXULSelectCntrlItemEl.h" #include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsServiceManagerUtils.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsXULComboboxAccessible // nsXULComboboxAccessible

View File

@ -37,11 +37,16 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsXULFormControlAccessible.h" #include "nsXULFormControlAccessible.h"
#include "nsHTMLFormControlAccessible.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsAccUtils.h"
#include "nsAccTreeWalker.h" #include "nsAccTreeWalker.h"
#include "nsCoreUtils.h"
#include "nsRelUtils.h"
// NOTE: alphabetically ordered
#include "nsHTMLFormControlAccessible.h"
#include "nsXULMenuAccessible.h" #include "nsXULMenuAccessible.h"
#include "nsIDOMHTMLInputElement.h" #include "nsIDOMHTMLInputElement.h"
#include "nsIDOMNSEditableElement.h" #include "nsIDOMNSEditableElement.h"

View File

@ -40,10 +40,12 @@
#include "nsXULListboxAccessible.h" #include "nsXULListboxAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsIDOMXULPopupElement.h" #include "nsIDOMXULPopupElement.h"
#include "nsIDOMXULMultSelectCntrlEl.h" #include "nsIDOMXULMultSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h" #include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsServiceManagerUtils.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsXULColumnsAccessible // nsXULColumnsAccessible

View File

@ -37,6 +37,11 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "nsXULMenuAccessible.h" #include "nsXULMenuAccessible.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsXULFormControlAccessible.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
#include "nsIDOMXULElement.h" #include "nsIDOMXULElement.h"
#include "nsIMutableArray.h" #include "nsIMutableArray.h"
@ -50,7 +55,6 @@
#include "nsIPresShell.h" #include "nsIPresShell.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsGUIEvent.h" #include "nsGUIEvent.h"
#include "nsXULFormControlAccessible.h"
#include "nsILookAndFeel.h" #include "nsILookAndFeel.h"
#include "nsWidgetsCID.h" #include "nsWidgetsCID.h"

View File

@ -38,8 +38,11 @@
#include "nsXULSliderAccessible.h" #include "nsXULSliderAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMDocumentXBL.h" #include "nsIDOMDocumentXBL.h"
#include "nsIFrame.h"
// nsXULSliderAccessible // nsXULSliderAccessible

View File

@ -36,8 +36,12 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered
#include "nsXULTabAccessible.h" #include "nsXULTabAccessible.h"
#include "nsAccUtils.h"
#include "nsRelUtils.h"
// NOTE: alphabetically ordered
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"

View File

@ -37,14 +37,19 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
// NOTE: alphabetically ordered // NOTE: groups are alphabetically ordered
#include "nsXULTextAccessible.h"
#include "nsAccessibilityAtoms.h" #include "nsAccessibilityAtoms.h"
#include "nsCoreUtils.h" #include "nsAccUtils.h"
#include "nsBaseWidgetAccessible.h" #include "nsBaseWidgetAccessible.h"
#include "nsCoreUtils.h"
#include "nsRelUtils.h"
#include "nsTextEquivUtils.h"
#include "nsIDOMXULDescriptionElement.h" #include "nsIDOMXULDescriptionElement.h"
#include "nsINameSpaceManager.h" #include "nsINameSpaceManager.h"
#include "nsString.h" #include "nsString.h"
#include "nsXULTextAccessible.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"
/** /**

View File

@ -38,7 +38,11 @@
#include "nsXULTreeAccessible.h" #include "nsXULTreeAccessible.h"
#include "nsAccCache.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h" #include "nsDocAccessible.h"
#include "nsRelUtils.h"
#include "nsIDOMXULElement.h" #include "nsIDOMXULElement.h"
#include "nsIDOMXULMultSelectCntrlEl.h" #include "nsIDOMXULMultSelectCntrlEl.h"
@ -549,8 +553,7 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
// Remove accessible from document cache and tree cache. // Remove accessible from document cache and tree cache.
nsCOMPtr<nsIAccessibleDocument> docAccessible = GetDocAccessible(); nsCOMPtr<nsIAccessibleDocument> docAccessible = GetDocAccessible();
if (docAccessible) { if (docAccessible) {
nsRefPtr<nsDocAccessible> docAcc = nsRefPtr<nsDocAccessible> docAcc = do_QueryObject(docAccessible);
nsAccUtils::QueryAccessibleDocument(docAccessible);
docAcc->RemoveAccessNodeFromCache(accessible); docAcc->RemoveAccessNodeFromCache(accessible);
} }
@ -579,8 +582,7 @@ nsXULTreeAccessible::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
// Remove accessible from document cache and tree cache. // Remove accessible from document cache and tree cache.
nsCOMPtr<nsIAccessibleDocument> docAccessible = GetDocAccessible(); nsCOMPtr<nsIAccessibleDocument> docAccessible = GetDocAccessible();
if (docAccessible) { if (docAccessible) {
nsRefPtr<nsDocAccessible> docAcc = nsRefPtr<nsDocAccessible> docAcc = do_QueryObject(docAccessible);
nsAccUtils::QueryAccessibleDocument(docAccessible);
docAcc->RemoveAccessNodeFromCache(accessible); docAcc->RemoveAccessNodeFromCache(accessible);
} }
@ -837,8 +839,7 @@ nsXULTreeItemAccessibleBase::GetRelationByType(PRUint32 aRelationType,
if (parentIndex == -1) if (parentIndex == -1)
return nsRelUtils::AddTarget(aRelationType, aRelation, mParent); return nsRelUtils::AddTarget(aRelationType, aRelation, mParent);
nsRefPtr<nsXULTreeAccessible> treeAcc = nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(mParent);
nsAccUtils::QueryAccessibleTree(mParent);
nsAccessible *logicalParent = treeAcc->GetTreeItemAccessible(parentIndex); nsAccessible *logicalParent = treeAcc->GetTreeItemAccessible(parentIndex);
return nsRelUtils::AddTarget(aRelationType, aRelation, logicalParent); return nsRelUtils::AddTarget(aRelationType, aRelation, logicalParent);
@ -1106,8 +1107,7 @@ nsXULTreeItemAccessibleBase::GetSiblingAtOffset(PRInt32 aOffset,
if (aError) if (aError)
*aError = NS_OK; // fail peacefully *aError = NS_OK; // fail peacefully
nsRefPtr<nsXULTreeAccessible> treeAcc = nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(mParent);
nsAccUtils::QueryAccessibleTree(mParent);
if (!treeAcc) if (!treeAcc)
return nsnull; return nsnull;
@ -1290,8 +1290,7 @@ nsXULTreeColumnsAccessible::GetSiblingAtOffset(PRInt32 aOffset,
PRInt32 rowCount = 0; PRInt32 rowCount = 0;
treeView->GetRowCount(&rowCount); treeView->GetRowCount(&rowCount);
if (rowCount > 0 && aOffset <= rowCount) { if (rowCount > 0 && aOffset <= rowCount) {
nsRefPtr<nsXULTreeAccessible> treeAcc = nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(mParent);
nsAccUtils::QueryAccessibleTree(mParent);
if (treeAcc) if (treeAcc)
return treeAcc->GetTreeItemAccessible(aOffset - 1); return treeAcc->GetTreeItemAccessible(aOffset - 1);

View File

@ -38,8 +38,12 @@
#include "nsXULTreeGridAccessibleWrap.h" #include "nsXULTreeGridAccessibleWrap.h"
#include "nsAccCache.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsEventShell.h"
#include "nsITreeSelection.h" #include "nsITreeSelection.h"
#include "nsServiceManagerUtils.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsXULTreeGridAccessible // nsXULTreeGridAccessible

View File

@ -54,7 +54,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=441737
// Test for correct nsIDOMDocument retrieval. // Test for correct nsIDOMDocument retrieval.
var domDoc = null; var domDoc = null;
try { try {
domDoc = docAcc.document.QueryInterface(nsIDOMDocument); domDoc = docAcc.DOMDocument.QueryInterface(nsIDOMDocument);
} catch(e) {} } catch(e) {}
ok(domDoc, "no nsIDOMDocument for this doc accessible!"); ok(domDoc, "no nsIDOMDocument for this doc accessible!");
is(domDoc, document, "Document nodes do not match!"); is(domDoc, document, "Document nodes do not match!");

View File

@ -55,6 +55,9 @@
children: [ children: [
{ {
role: ROLE_TEXT_LEAF // HTML 5 placeholder attribute value role: ROLE_TEXT_LEAF // HTML 5 placeholder attribute value
},
{
role: ROLE_TEXT_LEAF // Text node for the node's value
} }
] ]
}, },
@ -125,6 +128,9 @@
children: [ children: [
{ {
role: ROLE_TEXT_LEAF // HTML 5 placeholder attribute value role: ROLE_TEXT_LEAF // HTML 5 placeholder attribute value
},
{
role: ROLE_TEXT_LEAF // Text node for the node's value
} }
] ]
}, },

View File

@ -86,9 +86,6 @@
} }
] ]
}, },
{
role: ROLE_PUSHBUTTON
},
{ {
role: ROLE_PUSHBUTTON role: ROLE_PUSHBUTTON
} }

View File

@ -621,8 +621,9 @@ var allTabs = {
prefName: "browser.allTabs.previews", prefName: "browser.allTabs.previews",
readPref: function allTabs_readPref() { readPref: function allTabs_readPref() {
var allTabsButton = document.getAnonymousElementByAttribute( var allTabsButton = document.getElementById("alltabs-button");
gBrowser.tabContainer, "anonid", "alltabs-button"); if (!allTabsButton)
return;
if (gPrefService.getBoolPref(this.prefName)) { if (gPrefService.getBoolPref(this.prefName)) {
allTabsButton.removeAttribute("type"); allTabsButton.removeAttribute("type");
allTabsButton.setAttribute("command", "Browser:ShowAllTabs"); allTabsButton.setAttribute("command", "Browser:ShowAllTabs");

View File

@ -13,10 +13,21 @@ tabbrowser {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs"); -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
} }
#tabbrowser-tabs:not([overflow="true"]) + #new-tab-button,
#tabbrowser-tabs[overflow="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
#TabsToolbar[currentset]:not([currentset*="tabbrowser-tabs,new-tab-button"]) > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
#navigator-toolbox[customizing="true"] > #TabsToolbar > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .tabs-newtab-button {
visibility: collapse;
}
.tabbrowser-tab { .tabbrowser-tab {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab"); -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab");
} }
#alltabs-popup {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
}
toolbar[printpreview="true"] { toolbar[printpreview="true"] {
-moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar"); -moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar");
} }
@ -155,7 +166,7 @@ menuitem.spell-suggestion {
font-weight: bold; font-weight: bold;
} }
#sidebar-box toolbarbutton.tabs-closebutton { #sidebar-header > .tabs-closebutton {
-moz-user-focus: normal; -moz-user-focus: normal;
} }

View File

@ -3355,8 +3355,6 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
CombinedStopReload.init(); CombinedStopReload.init();
gHomeButton.updatePersonalToolbarStyle();
// Update the urlbar // Update the urlbar
if (gURLBar) { if (gURLBar) {
URLBarSetURI(); URLBarSetURI();
@ -3380,11 +3378,12 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
// XXX Shouldn't have to do this, but I do // XXX Shouldn't have to do this, but I do
if (!gCustomizeSheet) if (!gCustomizeSheet)
window.focus(); window.focus();
} }
function BrowserToolboxCustomizeChange() { function BrowserToolboxCustomizeChange() {
gHomeButton.updatePersonalToolbarStyle(); gHomeButton.updatePersonalToolbarStyle();
allTabs.readPref();
} }
/** /**
@ -6316,6 +6315,11 @@ var gPluginHandler = {
link.href = gPluginHandler.crashReportHelpURL; link.href = gPluginHandler.crashReportHelpURL;
let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText"); let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText");
description.appendChild(link); description.appendChild(link);
// Remove the notfication when the page is reloaded.
doc.defaultView.top.addEventListener("unload", function() {
notificationBox.removeNotification(notification);
}, false);
} }
} }

View File

@ -563,7 +563,13 @@
<toolbar id="TabsToolbar" <toolbar id="TabsToolbar"
fullscreentoolbar="true" fullscreentoolbar="true"
customizable="true"
mode="icons" lockmode="true"
iconsize="small" defaulticonsize="small" lockiconsize="true"
context="toolbar-context-menu"
defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
collapsed="true"> collapsed="true">
<tabs id="tabbrowser-tabs" <tabs id="tabbrowser-tabs"
class="tabbrowser-tabs" class="tabbrowser-tabs"
context="tabContextMenu" context="tabContextMenu"
@ -573,6 +579,34 @@
tooltip="tabbrowser-tab-tooltip"> tooltip="tabbrowser-tab-tooltip">
<tab class="tabbrowser-tab" selected="true"/> <tab class="tabbrowser-tab" selected="true"/>
</tabs> </tabs>
<toolbarbutton id="new-tab-button"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"
tooltiptext="&newTabButton.tooltip;"
ondrop="newTabButtonObserver.onDrop(event)"
ondragover="newTabButtonObserver.onDragOver(event)"
ondragenter="newTabButtonObserver.onDragOver(event)"
ondragleave="newTabButtonObserver.onDragLeave(event)"
removable="true"/>
<toolbarbutton id="alltabs-button"
class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
type="menu"
label="&listAllTabs.label;"
tooltiptext="&listAllTabs.label;"
removable="true">
<menupopup id="alltabs-popup"
position="after_end"/>
</toolbarbutton>
<toolbarbutton id="tabs-closebutton"
class="close-button tabs-closebutton"
command="cmd_close"
label="&closeTab.label;"
tooltiptext="&closeTab.label;"/>
</toolbar> </toolbar>
<toolbarpalette id="BrowserToolbarPalette"> <toolbarpalette id="BrowserToolbarPalette">
@ -607,15 +641,6 @@
ondragenter="bookmarksButtonObserver.onDragOver(event)" ondragenter="bookmarksButtonObserver.onDragOver(event)"
ondragleave="bookmarksButtonObserver.onDragLeave(event)"/> ondragleave="bookmarksButtonObserver.onDragLeave(event)"/>
<toolbarbutton id="new-tab-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"
tooltiptext="&newTabButton.tooltip;"
ondrop="newTabButtonObserver.onDrop(event)"
ondragover="newTabButtonObserver.onDragOver(event)"
ondragenter="newTabButtonObserver.onDragOver(event)"
ondragleave="newTabButtonObserver.onDragLeave(event)"/>
<toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional" <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&newNavigatorCmd.label;" label="&newNavigatorCmd.label;"
command="key_newNavigator" command="key_newNavigator"

View File

@ -78,7 +78,7 @@
<script type="application/javascript" <script type="application/javascript"
src="chrome://browser/content/places/treeView.js"/> src="chrome://browser/content/places/treeView.js"/>
<script type="application/javascript"><![CDATA[ <script type="application/javascript"><![CDATA[
Components.utils.import("resource://gre/modules/utils.js"); Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
Components.utils.import("resource:///modules/PlacesUIUtils.jsm"); Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
]]></script> ]]></script>
#endif #endif

View File

@ -6,16 +6,8 @@
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox"); -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox");
} }
.tabs-alltabs-popup {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
}
.tab-close-button,
.tabs-closebutton {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-close-tab-button");
}
.tab-close-button { .tab-close-button {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-close-tab-button");
display: none; display: none;
} }
@ -24,15 +16,6 @@
display: -moz-box; display: -moz-box;
} }
.tabbrowser-tabs:not([overflow="true"]) > .tabs-newtab-button,
.tabbrowser-tabs[overflow="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button {
visibility: collapse;
}
.tabs-newtab-button > .toolbarbutton-text {
display: none;
}
tabpanels { tabpanels {
background-color: white; background-color: white;
} }
@ -41,10 +24,3 @@ tabpanels {
position: relative; position: relative;
z-index: 1; z-index: 1;
} }
%ifdef MOZ_WIDGET_GTK2
/* Favicons override the "images-in-menus" metric in xul.css */
.alltabs-item > .menu-iconic-left {
visibility: inherit;
}
%endif

View File

@ -2457,17 +2457,6 @@
command="cmd_newNavigatorTab" command="cmd_newNavigatorTab"
tooltiptext="&newTabButton.tooltip;"/> tooltiptext="&newTabButton.tooltip;"/>
</xul:arrowscrollbox> </xul:arrowscrollbox>
<xul:toolbarbutton class="tabs-newtab-button" anonid="newtab-button"
command="cmd_newNavigatorTab"
tooltiptext="&newTabButton.tooltip;"/>
<xul:toolbarbutton class="tabs-alltabs-button" anonid="alltabs-button"
type="menu"
tooltiptext="&listAllTabs.label;">
<xul:menupopup class="tabs-alltabs-popup" anonid="alltabs-popup"
position="after_end"/>
</xul:toolbarbutton>
<xul:toolbarbutton anonid="tabs-closebutton"
class="close-button tabs-closebutton"/>
</content> </content>
<implementation implements="nsIDOMEventListener"> <implementation implements="nsIDOMEventListener">
@ -2525,10 +2514,6 @@
document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox"); document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox");
</field> </field>
<field name="mTabstripClosebutton">
document.getAnonymousElementByAttribute(this, "anonid", "tabs-closebutton");
</field>
<field name="_prefObserver"><![CDATA[({ <field name="_prefObserver"><![CDATA[({
tabContainer: this, tabContainer: this,
@ -2618,7 +2603,9 @@
this.setAttribute("closebuttons", "noclose"); this.setAttribute("closebuttons", "noclose");
break; break;
} }
this.mTabstripClosebutton.collapsed = this.mCloseButtons != 3; var tabstripClosebutton = document.getElementById("tabs-closebutton");
if (tabstripClosebutton && tabstripClosebutton.parentNode == this._container)
tabstripClosebutton.collapsed = this.mCloseButtons != 3;
]]></body> ]]></body>
</method> </method>
@ -2660,11 +2647,6 @@
]]></body> ]]></body>
</method> </method>
<field name="mAllTabsPopup">
document.getAnonymousElementByAttribute(this,
"anonid", "alltabs-popup");
</field>
<field name="_animateElement"> <field name="_animateElement">
this.mTabstrip._scrollButtonDown; this.mTabstrip._scrollButtonDown;
</field> </field>
@ -2780,6 +2762,12 @@
this.mTabstrip.ensureElementIsVisible(t); this.mTabstrip.ensureElementIsVisible(t);
]]></body> ]]></body>
</method> </method>
<!-- Deprecated stuff, implemented for backwards compatibility. -->
<property name="mTabstripClosebutton" readonly="true"
onget="return document.getElementById('tabs-closebutton');"/>
<property name="mAllTabsPopup" readonly="true"
onget="return document.getElementById('alltabs-popup');"/>
</implementation> </implementation>
<handlers> <handlers>
@ -2852,8 +2840,6 @@
pixelsToScroll = tabStrip.scrollIncrement * -1; pixelsToScroll = tabStrip.scrollIncrement * -1;
break; break;
case "scrollbutton-down": case "scrollbutton-down":
case "alltabs-button":
case "newtab-button":
pixelsToScroll = tabStrip.scrollIncrement; pixelsToScroll = tabStrip.scrollIncrement;
break; break;
} }
@ -3078,59 +3064,54 @@
<handlers> <handlers>
<handler event="click" button="0"><![CDATA[ <handler event="click" button="0"><![CDATA[
var bindingParent = document.getBindingParent(this); var bindingParent = document.getBindingParent(this);
var tabContainer = bindingParent.parentNode;
/* The only sequence in which a second click event (i.e. dblclik)
* can be dispatched on an in-tab close button is when it is shown
* after the first click (i.e. the first click event was dispatched
* on the tab). This happens when we show the close button only on
* the active tab. (bug 352021)
* The only sequence in which a third click event can be dispatched
* on an in-tab close button is when the tab was opened with a
* double click on the tabbar. (bug 378344)
* In both cases, it is most likely that the close button area has
* been accidentally clicked, therefore we do not close the tab.
*
* We don't want to ignore processing of more than one click event,
* though, since the user might actually be repeatedly clicking to
* close many tabs at once.
*/
if (event.detail > 1 && !this._ignoredClick) {
this._ignoredClick = true;
return;
}
if (bindingParent.localName == "tab") { // Reset the "ignored click" flag
let tabContainer = bindingParent.parentNode; this._ignoredClick = false;
/* The only sequence in which a second click event (i.e. dblclik)
* can be dispatched on an in-tab close button is when it is shown tabContainer.tabbrowser.removeTab(bindingParent);
* after the first click (i.e. the first click event was dispatched this._blockDblClick = true;
* on the tab). This happens when we show the close button only on
* the active tab. (bug 352021) /* XXXmano hack (see bug 343628):
* The only sequence in which a third click event can be dispatched * Since we're removing the event target, if the user
* on an in-tab close button is when the tab was opened with a * double-clicks this button, the dblclick event will be dispatched
* double click on the tabbar. (bug 378344) * with the tabbar as its event target (and explicit/originalTarget),
* In both cases, it is most likely that the close button area has * which treats that as a mouse gesture for opening a new tab.
* been accidentally clicked, therefore we do not close the tab. * In this context, we're manually blocking the dblclick event
* * (see dblclick handler).
* We don't want to ignore processing of more than one click event, */
* though, since the user might actually be repeatedly clicking to var self = this;
* close many tabs at once. var clickedOnce = false;
*/ function enableDblClick(event) {
if (event.detail > 1 && !this._ignoredClick) { if (event.detail == 1 && !clickedOnce) {
this._ignoredClick = true; clickedOnce = true;
return; return;
} }
setTimeout(function() {
// Reset the "ignored click" flag self._blockDblClick = false;
this._ignoredClick = false; }, 0);
tabContainer.removeEventListener("click", enableDblClick, false);
tabContainer.tabbrowser.removeTab(bindingParent);
this._blockDblClick = true;
/* XXXmano hack (see bug 343628):
* Since we're removing the event target, if the user
* double-clicks this button, the dblclick event will be dispatched
* with the tabbar as its event target (and explicit/originalTarget),
* which treats that as a mouse gesture for opening a new tab.
* In this context, we're manually blocking the dblclick event
* (see dblclick handler).
*/
let self = this;
let clickedOnce = false;
function enableDblClick(event) {
if (event.detail == 1 && !clickedOnce) {
clickedOnce = true;
return;
}
setTimeout(function() {
self._blockDblClick = false;
}, 0);
tabContainer.removeEventListener("click", enableDblClick, false);
}
tabContainer.addEventListener("click", enableDblClick, false);
} }
else // "tabs" tabContainer.addEventListener("click", enableDblClick, false);
bindingParent.tabbrowser.removeCurrentTab();
]]></handler> ]]></handler>
<handler event="dblclick" button="0" phase="capturing"> <handler event="dblclick" button="0" phase="capturing">
@ -3213,8 +3194,7 @@
<method name="_menuItemOnCommand"> <method name="_menuItemOnCommand">
<parameter name="aEvent"/> <parameter name="aEvent"/>
<body><![CDATA[ <body><![CDATA[
var tabcontainer = document.getBindingParent(this); gBrowser.selectedTab = aEvent.target.tab;
tabcontainer.selectedItem = aEvent.target.tab;
]]></body> ]]></body>
</method> </method>
@ -3263,7 +3243,7 @@
<method name="_updateTabsVisibilityStatus"> <method name="_updateTabsVisibilityStatus">
<body><![CDATA[ <body><![CDATA[
var tabContainer = document.getBindingParent(this); var tabContainer = gBrowser.tabContainer;
// We don't want menu item decoration unless there is overflow. // We don't want menu item decoration unless there is overflow.
if (tabContainer.getAttribute("overflow") != "true") if (tabContainer.getAttribute("overflow") != "true")
return; return;
@ -3287,7 +3267,7 @@
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"menuitem"); "menuitem");
menuItem.setAttribute("class", "menuitem-iconic alltabs-item"); menuItem.setAttribute("class", "menuitem-iconic alltabs-item menuitem-with-favicon");
this._setMenuitemAttributes(menuItem, aTab); this._setMenuitemAttributes(menuItem, aTab);
@ -3327,7 +3307,7 @@
<handler event="popupshowing"> <handler event="popupshowing">
<![CDATA[ <![CDATA[
// set up the menu popup // set up the menu popup
var tabcontainer = document.getBindingParent(this); var tabcontainer = gBrowser.tabContainer;
var tabs = tabcontainer.childNodes; var tabs = tabcontainer.childNodes;
// Listen for changes in the tab bar. // Listen for changes in the tab bar.
@ -3351,7 +3331,7 @@
menuItem.tab.mCorrespondingMenuitem = null; menuItem.tab.mCorrespondingMenuitem = null;
this.removeChild(menuItem); this.removeChild(menuItem);
} }
var tabcontainer = document.getBindingParent(this); var tabcontainer = gBrowser.tabContainer;
tabcontainer.mTabstrip.removeEventListener("scroll", this, false); tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
tabcontainer.removeEventListener("TabOpen", this, false); tabcontainer.removeEventListener("TabOpen", this, false);
tabcontainer.removeEventListener("TabAttrModified", this, false); tabcontainer.removeEventListener("TabAttrModified", this, false);

View File

@ -18,7 +18,6 @@ browser.jar:
content/browser/aboutRobots-icon-rtl.png (content/aboutRobots-icon-rtl.png) content/browser/aboutRobots-icon-rtl.png (content/aboutRobots-icon-rtl.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png) content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/aboutRobots-widget-right.png (content/aboutRobots-widget-right.png) content/browser/aboutRobots-widget-right.png (content/aboutRobots-widget-right.png)
* content/browser/aboutSupport.xhtml (content/aboutSupport.xhtml)
* content/browser/browser.css (content/browser.css) * content/browser/browser.css (content/browser.css)
* content/browser/browser.js (content/browser.js) * content/browser/browser.js (content/browser.js)
* content/browser/browser.xul (content/browser.xul) * content/browser/browser.xul (content/browser.xul)

View File

@ -96,8 +96,6 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT }, nsIAboutModule::ALLOW_SCRIPT },
{ "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml", { "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml",
nsIAboutModule::ALLOW_SCRIPT }, nsIAboutModule::ALLOW_SCRIPT },
{ "support", "chrome://browser/content/aboutSupport.xhtml",
nsIAboutModule::ALLOW_SCRIPT },
}; };
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap); static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);

View File

@ -189,11 +189,6 @@ static const nsModuleComponentInfo components[] =
NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore",
AboutRedirector::Create }, AboutRedirector::Create },
{ "about:support",
NS_BROWSER_ABOUT_REDIRECTOR_CID,
NS_ABOUT_MODULE_CONTRACTID_PREFIX "support",
AboutRedirector::Create },
#ifndef WINCE #ifndef WINCE
{ "Profile Migrator", { "Profile Migrator",

View File

@ -764,7 +764,7 @@ BrowserGlue.prototype = {
// from bookmarks.html, we will try to restore from JSON // from bookmarks.html, we will try to restore from JSON
if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) { if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) {
// get latest JSON backup // get latest JSON backup
Cu.import("resource://gre/modules/utils.js"); Cu.import("resource://gre/modules/PlacesUtils.jsm");
var bookmarksBackupFile = PlacesUtils.backups.getMostRecent("json"); var bookmarksBackupFile = PlacesUtils.backups.getMostRecent("json");
if (bookmarksBackupFile) { if (bookmarksBackupFile) {
// restore from JSON backup // restore from JSON backup
@ -894,7 +894,7 @@ BrowserGlue.prototype = {
* Backup bookmarks if needed. * Backup bookmarks if needed.
*/ */
_backupBookmarks: function BG__backupBookmarks() { _backupBookmarks: function BG__backupBookmarks() {
Cu.import("resource://gre/modules/utils.js"); Cu.import("resource://gre/modules/PlacesUtils.jsm");
let lastBackupFile = PlacesUtils.backups.getMostRecent(); let lastBackupFile = PlacesUtils.backups.getMostRecent();
@ -1171,8 +1171,13 @@ BrowserGlue.prototype = {
// If we are creating all Smart Bookmarks from ground up, add a // If we are creating all Smart Bookmarks from ground up, add a
// separator below them in the bookmarks menu. // separator below them in the bookmarks menu.
if (smartBookmarksCurrentVersion == 0 && if (smartBookmarksCurrentVersion == 0 &&
smartBookmarkItemIds.length == 0) smartBookmarkItemIds.length == 0) {
bmsvc.insertSeparator(bmsvc.bookmarksMenuFolder, bookmarksMenuIndex); let id = bmsvc.getIdForItemAt(bmsvc.bookmarksMenuFolder,
bookmarksMenuIndex);
// Don't add a separator if the menu was empty or there is one already.
if (id != -1 && bmsvc.getItemType(id) != bmsvc.TYPE_SEPARATOR)
bmsvc.insertSeparator(bmsvc.bookmarksMenuFolder, bookmarksMenuIndex);
}
} }
}; };

View File

@ -1181,7 +1181,7 @@ PlacesController.prototype = {
copiedFolders.push(node); copiedFolders.push(node);
function generateChunk(type, overrideURI) { function generateChunk(type, overrideURI) {
let suffix = i < (nodes.length - 1) ? NEWLINE : ""; let suffix = i < (nodes.length - 1) ? PlacesUtils.endl : "";
let uri = overrideURI; let uri = overrideURI;
if (PlacesUtils.nodeIsLivemarkContainer(node)) if (PlacesUtils.nodeIsLivemarkContainer(node))

View File

@ -58,7 +58,7 @@
var Ci = Components.interfaces; var Ci = Components.interfaces;
var Cr = Components.results; var Cr = Components.results;
Components.utils.import("resource://gre/modules/utils.js"); Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
Components.utils.import("resource:///modules/PlacesUIUtils.jsm"); Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
]]></script> ]]></script>
<script type="application/javascript" <script type="application/javascript"

View File

@ -55,19 +55,10 @@ XPCOMUtils.defineLazyGetter(this, "Services", function() {
}); });
XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() { XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() {
Cu.import("resource://gre/modules/utils.js"); Cu.import("resource://gre/modules/PlacesUtils.jsm");
return PlacesUtils; return PlacesUtils;
}); });
#ifdef XP_MACOSX
// On Mac OSX, the transferable system converts "\r\n" to "\n\n", where we
// really just want "\n".
const NEWLINE= "\n";
#else
// On other platforms, the transferable system converts "\r\n" to "\n".
const NEWLINE = "\r\n";
#endif
var PlacesUIUtils = { var PlacesUIUtils = {
ORGANIZER_LEFTPANE_VERSION: 6, ORGANIZER_LEFTPANE_VERSION: 6,
ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder", ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder",

View File

@ -57,7 +57,7 @@ XPCOMUtils.defineLazyGetter(this, "Services", function() {
}); });
XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() { XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() {
Cu.import("resource://gre/modules/utils.js"); Cu.import("resource://gre/modules/PlacesUtils.jsm");
return PlacesUtils; return PlacesUtils;
}); });

View File

@ -7,8 +7,6 @@
<H1 LAST_MODIFIED="1177541029">Bookmarks</H1> <H1 LAST_MODIFIED="1177541029">Bookmarks</H1>
<DL><p> <DL><p>
<DT><A HREF="https://en-US.add-ons.mozilla.com/en-US/firefox/bookmarks/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M%2F3AAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAPkSURBVHjaYmAAgrjyOnOGiKxqxT9%2F%2FvwHCCCGuNJKLpAo49KTL%2F5%2F%2F8PMABBADJFZFWwXnn%2F%2FDxJYeOLNf0aQ9AIg48%2Ff%2Fwwfvv1hAAggZpBAYlWdnrqJLcPVE4e%2Bsuy7%2FfH%2F%2B88%2FGdjY2Bj%2BcCqHMey6%2Ben%2F379%2F%2F%2F8B6unZ9ew%2Fy54jV249f6%2Bm9uXnX4Y9qyaoAAQAhAB7%2FwEAAAAAY3h%2BG1RdbeMMCgkB9%2Fr%2BAPL2%2FAC3vsyi5NG6YQFcbnwdZ3F44uru9gAAAQAAUjEVALPT7wDu9v4A5erz%2FgL19vr16PD6AAUHBgDu9PwA%2F%2F8AAO%2F2%2FgD0%2BP0A7e7x8QPYzsX38vj9g%2BPk6hkLFiAxy%2BP4AeHj5%2FXFtp9GonxaagII7AawXyprpf%2F%2FZ5L5%2Fe%2Fv9%2B%2Fff91ZN7nrG0icJSqrkknJxHm1h5Nl0J8%2F%2Fxg%2B%2FwDa%2Febzv39%2FWKQ2TG97ycIvq%2Bvn52oVxMHGxHDj8RcGQT4uEGZyCct98e3LL3YmJ2enNYxAi%2B48%2B8QQaizGIMLFBLaSlYWZgYWDWZaJhY2V%2BcvPfwz%2BeiIMf%2F%2F%2BY9CV4GAQ42Zh%2BPPvP8O%2Fv%2F%2BZmG7cff7u49c%2FDNtufGZgYmJiOHLvG8Pt1z8Yfv3%2Bz%2FDn19%2B3TCd2LNV7%2F%2FU3w7vPvxkWnHzDcOPFd4ZvQBPv3L79aM%2BS3nfMN88d%2BfyXkW0Lq6BiGAs7J8fHT9%2F%2FXTy%2BY82Lp0cdb5889hcgQJNU85JYFMXP%2B5aHqRmmZJ9kKMGAEBgtDCYYY6BFa%2BlrPc6yRf0LYYtZzG4YaNGibUNJVLuIcBNUTLMQM8ZoppdiaXnf9Xlf5z4ounDu4p57f%2Ff8Pt50SH9ZEfUuLehy93yMRBNroVAg6PV2yBbO9c94tK5v7suF3%2FlMs1o8oU27ltvIMic7fJv7uuqLJGa2UpPxlCILICBtGz1pYWooakeoDaTFgBtNWm04zl%2Fkbs53FnZ%2FZO%2BldGbFP5aaP50cj41pigi8XFjF2zp8ivpgsFMFHp0GgrQZL4DuYGCE6f3pzoBnUwRB8sYi4QGKHf7b5d8HiHWpMBsPvLKDeFiHmVEPBN0yMJyMIUhfb6gXbMkr4xtq1J6Z36eLpmiDH508LNShbDzB4kTIATguNsBqA1CHElJDhGdCGWsDkYY%2FTJh3lUelu384yTlzrtgDWVaggvG8qhDnYcEwwWi0wET%2FTNTh9Gh%2FvVn7v%2B2I%2BHlpWXS59ORgfOr7UGRkVNMUAWPtCMnHdbjjATFNKJeKpdLZYQY0crDzLUvfbHxdqfllj6a7p2VVjUqyGhYwPpZFqxYlf6hZ%2F7X3c736%2Fv4LV1blv94gEvsAAAAASUVORK5CYII%3D" ID="rdf:#$CnoJ1">Get Bookmark Add-ons</A>
<HR>
<DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3> <DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3>
<DL><p> <DL><p>
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A> <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A>

View File

@ -7,8 +7,6 @@
<H1 LAST_MODIFIED="1177541029">Bookmarks</H1> <H1 LAST_MODIFIED="1177541029">Bookmarks</H1>
<DL><p> <DL><p>
<DT><A HREF="https://en-US.add-ons.mozilla.com/en-US/firefox/bookmarks/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M%2F3AAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAPkSURBVHjaYmAAgrjyOnOGiKxqxT9%2F%2FvwHCCCGuNJKLpAo49KTL%2F5%2F%2F8PMABBADJFZFWwXnn%2F%2FDxJYeOLNf0aQ9AIg48%2Ff%2Fwwfvv1hAAggZpBAYlWdnrqJLcPVE4e%2Bsuy7%2FfH%2F%2B88%2FGdjY2Bj%2BcCqHMey6%2Ben%2F379%2F%2F%2F8B6unZ9ew%2Fy54jV249f6%2Bm9uXnX4Y9qyaoAAQAhAB7%2FwEAAAAAY3h%2BG1RdbeMMCgkB9%2Fr%2BAPL2%2FAC3vsyi5NG6YQFcbnwdZ3F44uru9gAAAQAAUjEVALPT7wDu9v4A5erz%2FgL19vr16PD6AAUHBgDu9PwA%2F%2F8AAO%2F2%2FgD0%2BP0A7e7x8QPYzsX38vj9g%2BPk6hkLFiAxy%2BP4AeHj5%2FXFtp9GonxaagII7AawXyprpf%2F%2FZ5L5%2Fe%2Fv9%2B%2Fff91ZN7nrG0icJSqrkknJxHm1h5Nl0J8%2F%2Fxg%2B%2FwDa%2Febzv39%2FWKQ2TG97ycIvq%2Bvn52oVxMHGxHDj8RcGQT4uEGZyCct98e3LL3YmJ2enNYxAi%2B48%2B8QQaizGIMLFBLaSlYWZgYWDWZaJhY2V%2BcvPfwz%2BeiIMf%2F%2F%2BY9CV4GAQ42Zh%2BPPvP8O%2Fv%2F%2BZmG7cff7u49c%2FDNtufGZgYmJiOHLvG8Pt1z8Yfv3%2Bz%2FDn19%2B3TCd2LNV7%2F%2FU3w7vPvxkWnHzDcOPFd4ZvQBPv3L79aM%2BS3nfMN88d%2BfyXkW0Lq6BiGAs7J8fHT9%2F%2FXTy%2BY82Lp0cdb5889hcgQJNU85JYFMXP%2B5aHqRmmZJ9kKMGAEBgtDCYYY6BFa%2BlrPc6yRf0LYYtZzG4YaNGibUNJVLuIcBNUTLMQM8ZoppdiaXnf9Xlf5z4ounDu4p57f%2Ff8Pt50SH9ZEfUuLehy93yMRBNroVAg6PV2yBbO9c94tK5v7suF3%2FlMs1o8oU27ltvIMic7fJv7uuqLJGa2UpPxlCILICBtGz1pYWooakeoDaTFgBtNWm04zl%2Fkbs53FnZ%2FZO%2BldGbFP5aaP50cj41pigi8XFjF2zp8ivpgsFMFHp0GgrQZL4DuYGCE6f3pzoBnUwRB8sYi4QGKHf7b5d8HiHWpMBsPvLKDeFiHmVEPBN0yMJyMIUhfb6gXbMkr4xtq1J6Z36eLpmiDH508LNShbDzB4kTIATguNsBqA1CHElJDhGdCGWsDkYY%2FTJh3lUelu384yTlzrtgDWVaggvG8qhDnYcEwwWi0wET%2FTNTh9Gh%2FvVn7v%2B2I%2BHlpWXS59ORgfOr7UGRkVNMUAWPtCMnHdbjjATFNKJeKpdLZYQY0crDzLUvfbHxdqfllj6a7p2VVjUqyGhYwPpZFqxYlf6hZ%2F7X3c736%2Fv4LV1blv94gEvsAAAAASUVORK5CYII%3D" ID="rdf:#$CnoJ1">Get Bookmark Add-ons</A>
<HR>
<DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3> <DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3>
<DL><p> <DL><p>
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A> <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A>

View File

@ -108,4 +108,4 @@ const SMART_BOOKMARKS_ON_MENU = 3; // Takes in count the additional separator.
// Default bookmarks constants. // Default bookmarks constants.
const DEFAULT_BOOKMARKS_ON_TOOLBAR = 2; const DEFAULT_BOOKMARKS_ON_TOOLBAR = 2;
const DEFAULT_BOOKMARKS_ON_MENU = 3; const DEFAULT_BOOKMARKS_ON_MENU = 1;

View File

@ -45,7 +45,6 @@ const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
const DESCRIPTION_ANNO = "bookmarkProperties/description"; const DESCRIPTION_ANNO = "bookmarkProperties/description";
const POST_DATA_ANNO = "bookmarkProperties/POSTData"; const POST_DATA_ANNO = "bookmarkProperties/POSTData";
Components.utils.import("resource://gre/modules/utils.js");
do_check_eq(typeof PlacesUtils, "object"); do_check_eq(typeof PlacesUtils, "object");
// main // main
@ -161,10 +160,10 @@ function testCanonicalBookmarks() {
// 6-2: the toolbar contents are imported to the places-toolbar folder, // 6-2: the toolbar contents are imported to the places-toolbar folder,
// the separator above it is removed. // the separator above it is removed.
do_check_eq(rootNode.childCount, 4); do_check_eq(rootNode.childCount, DEFAULT_BOOKMARKS_ON_MENU + 1);
// get test folder // get test folder
var testFolder = rootNode.getChild(3); var testFolder = rootNode.getChild(DEFAULT_BOOKMARKS_ON_MENU);
do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER); do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER);
do_check_eq(testFolder.title, "test"); do_check_eq(testFolder.title, "test");

View File

@ -36,8 +36,6 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
Components.utils.import("resource://gre/modules/utils.js");
const bmsvc = PlacesUtils.bookmarks; const bmsvc = PlacesUtils.bookmarks;
const testFolderId = PlacesUtils.bookmarksMenuFolderId; const testFolderId = PlacesUtils.bookmarksMenuFolderId;

View File

@ -125,10 +125,10 @@ function database_check() {
var result = hs.executeQuery(query, options); var result = hs.executeQuery(query, options);
var rootNode = result.root; var rootNode = result.root;
rootNode.containerOpen = true; rootNode.containerOpen = true;
do_check_eq(rootNode.childCount, 4); do_check_eq(rootNode.childCount, DEFAULT_BOOKMARKS_ON_MENU + 1);
// get test folder // get test folder
var testFolder = rootNode.getChild(3); var testFolder = rootNode.getChild(DEFAULT_BOOKMARKS_ON_MENU);
do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER); do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER);
do_check_eq(testFolder.title, "test"); do_check_eq(testFolder.title, "test");
// add date // add date

View File

@ -353,9 +353,6 @@ var successAndFailedObserver = {
// Index of the currently running test. See doNextTest(). // Index of the currently running test. See doNextTest().
var currTestIndex = -1; var currTestIndex = -1;
// Need JSON import/export in toolkit/components/places/src/utils.js
Components.utils.import("resource://gre/modules/utils.js");
var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]. var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService); getService(Ci.nsINavBookmarksService);

View File

@ -206,10 +206,10 @@ function testCanonicalBookmarks(aFolder) {
// 6-2: the toolbar folder and unfiled bookmarks folder imported to the // 6-2: the toolbar folder and unfiled bookmarks folder imported to the
// corresponding places folders // corresponding places folders
do_check_eq(rootNode.childCount, 4); do_check_eq(rootNode.childCount, DEFAULT_BOOKMARKS_ON_MENU + 1);
// get test folder // get test folder
var testFolder = rootNode.getChild(3); var testFolder = rootNode.getChild(DEFAULT_BOOKMARKS_ON_MENU);
do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER); do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER);
do_check_eq(testFolder.title, "test"); do_check_eq(testFolder.title, "test");

View File

@ -49,6 +49,8 @@ _BROWSER_TEST_FILES = \
browser_privatebrowsing_beforeunload.js \ browser_privatebrowsing_beforeunload.js \
browser_privatebrowsing_certexceptionsui.js \ browser_privatebrowsing_certexceptionsui.js \
browser_privatebrowsing_commandline_toggle.js \ browser_privatebrowsing_commandline_toggle.js \
browser_privatebrowsing_contextmenu_blockimage.js \
browser_privatebrowsing_cookieacceptdialog.js \
browser_privatebrowsing_crh.js \ browser_privatebrowsing_crh.js \
browser_privatebrowsing_downloadmonitor.js \ browser_privatebrowsing_downloadmonitor.js \
browser_privatebrowsing_fastswitch.js \ browser_privatebrowsing_fastswitch.js \

View File

@ -43,7 +43,7 @@ function test() {
let pb = Cc["@mozilla.org/privatebrowsing;1"]. let pb = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService); getService(Ci.nsIPrivateBrowsingService);
const TEST_URI = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/ctxmenu.html"; const TEST_URI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/ctxmenu.html";
waitForExplicitFinish(); waitForExplicitFinish();

View File

@ -1639,13 +1639,14 @@ SessionStoreService.prototype = {
// get the domain for each URL // get the domain for each URL
function extractHosts(aEntry) { function extractHosts(aEntry) {
if (/^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.test(aEntry.url)) { var match;
if (!hosts[RegExp.$1] && _this._checkPrivacyLevel(_this._getURIFromString(aEntry.url).schemeIs("https"))) { if ((match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url)) != null) {
hosts[RegExp.$1] = true; if (!hosts[match[1]] && _this._checkPrivacyLevel(_this._getURIFromString(aEntry.url).schemeIs("https"))) {
hosts[match[1]] = true;
} }
} }
else if (/^file:\/\/([^\/]*)/.test(aEntry.url)) { else if ((match = /^file:\/\/([^\/]*)/.exec(aEntry.url)) != null) {
hosts[RegExp.$1] = true; hosts[match[1]] = true;
} }
if (aEntry.children) { if (aEntry.children) {
aEntry.children.forEach(extractHosts); aEntry.children.forEach(extractHosts);
@ -2374,8 +2375,9 @@ SessionStoreService.prototype = {
} }
}, 0); }, 0);
} }
if (aData.scroll && /(\d+),(\d+)/.test(aData.scroll)) { var match;
aContent.scrollTo(RegExp.$1, RegExp.$2); if (aData.scroll && (match = /(\d+),(\d+)/.exec(aData.scroll)) != null) {
aContent.scrollTo(match[1], match[2]);
} }
Array.forEach(aContent.document.styleSheets, function(aSS) { Array.forEach(aContent.document.styleSheets, function(aSS) {
aSS.disabled = aSS.title && aSS.title != selectedPageStyle; aSS.disabled = aSS.title && aSS.title != selectedPageStyle;

View File

@ -31,6 +31,8 @@
<!ENTITY closeTab.label "Close Tab"> <!ENTITY closeTab.label "Close Tab">
<!ENTITY closeTab.accesskey "c"> <!ENTITY closeTab.accesskey "c">
<!ENTITY listAllTabs.label "List all tabs">
<!ENTITY tabCmd.label "New Tab"> <!ENTITY tabCmd.label "New Tab">
<!ENTITY tabCmd.accesskey "T"> <!ENTITY tabCmd.accesskey "T">
<!ENTITY tabCmd.commandkey "t"> <!ENTITY tabCmd.commandkey "t">

View File

@ -1,3 +1,2 @@
<!ENTITY closeTab.label "Close Tab"> <!ENTITY closeTab.label "Close Tab">
<!ENTITY listAllTabs.label "List all tabs">
<!ENTITY newTabButton.tooltip "Open a new tab"> <!ENTITY newTabButton.tooltip "Open a new tab">

View File

@ -7,10 +7,6 @@
#define bookmarks_title Bookmarks #define bookmarks_title Bookmarks
#define bookmarks_heading Bookmarks #define bookmarks_heading Bookmarks
# LOCALIZATION NOTE (bookmarks_addons):
# link title for https://en-US.add-ons.mozilla.com/en-US/firefox/bookmarks/
#define bookmarks_addons Get Bookmark Add-ons
#define bookmarks_toolbarfolder Bookmarks Toolbar Folder #define bookmarks_toolbarfolder Bookmarks Toolbar Folder
#define bookmarks_toolbarfolder_description Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar #define bookmarks_toolbarfolder_description Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar

View File

@ -61,10 +61,6 @@ template = '''#filter emptyLines
#define bookmarks_title %s #define bookmarks_title %s
#define bookmarks_heading %s #define bookmarks_heading %s
# LOCALIZATION NOTE (bookmarks_addons):
# link title for https://en-US.add-ons.mozilla.com/en-US/firefox/bookmarks/
#define bookmarks_addons %s
#define bookmarks_toolbarfolder %s #define bookmarks_toolbarfolder %s
#define bookmarks_toolbarfolder_description %s #define bookmarks_toolbarfolder_description %s

View File

@ -8,15 +8,12 @@
<H1>@bookmarks_heading@</H1> <H1>@bookmarks_heading@</H1>
<DL><p> <DL><p>
<DT><A HREF="https://addons.mozilla.org/@AB_CD@/firefox/bookmarks/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M%2F3AAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAPkSURBVHjaYmAAgrjyOnOGiKxqxT9%2F%2FvwHCCCGuNJKLpAo49KTL%2F5%2F%2F8PMABBADJFZFWwXnn%2F%2FDxJYeOLNf0aQ9AIg48%2Ff%2Fwwfvv1hAAggZpBAYlWdnrqJLcPVE4e%2Bsuy7%2FfH%2F%2B88%2FGdjY2Bj%2BcCqHMey6%2Ben%2F379%2F%2F%2F8B6unZ9ew%2Fy54jV249f6%2Bm9uXnX4Y9qyaoAAQAhAB7%2FwEAAAAAY3h%2BG1RdbeMMCgkB9%2Fr%2BAPL2%2FAC3vsyi5NG6YQFcbnwdZ3F44uru9gAAAQAAUjEVALPT7wDu9v4A5erz%2FgL19vr16PD6AAUHBgDu9PwA%2F%2F8AAO%2F2%2FgD0%2BP0A7e7x8QPYzsX38vj9g%2BPk6hkLFiAxy%2BP4AeHj5%2FXFtp9GonxaagII7AawXyprpf%2F%2FZ5L5%2Fe%2Fv9%2B%2Fff91ZN7nrG0icJSqrkknJxHm1h5Nl0J8%2F%2Fxg%2B%2FwDa%2Febzv39%2FWKQ2TG97ycIvq%2Bvn52oVxMHGxHDj8RcGQT4uEGZyCct98e3LL3YmJ2enNYxAi%2B48%2B8QQaizGIMLFBLaSlYWZgYWDWZaJhY2V%2BcvPfwz%2BeiIMf%2F%2F%2BY9CV4GAQ42Zh%2BPPvP8O%2Fv%2F%2BZmG7cff7u49c%2FDNtufGZgYmJiOHLvG8Pt1z8Yfv3%2Bz%2FDn19%2B3TCd2LNV7%2F%2FU3w7vPvxkWnHzDcOPFd4ZvQBPv3L79aM%2BS3nfMN88d%2BfyXkW0Lq6BiGAs7J8fHT9%2F%2FXTy%2BY82Lp0cdb5889hcgQJNU85JYFMXP%2B5aHqRmmZJ9kKMGAEBgtDCYYY6BFa%2BlrPc6yRf0LYYtZzG4YaNGibUNJVLuIcBNUTLMQM8ZoppdiaXnf9Xlf5z4ounDu4p57f%2Ff8Pt50SH9ZEfUuLehy93yMRBNroVAg6PV2yBbO9c94tK5v7suF3%2FlMs1o8oU27ltvIMic7fJv7uuqLJGa2UpPxlCILICBtGz1pYWooakeoDaTFgBtNWm04zl%2Fkbs53FnZ%2FZO%2BldGbFP5aaP50cj41pigi8XFjF2zp8ivpgsFMFHp0GgrQZL4DuYGCE6f3pzoBnUwRB8sYi4QGKHf7b5d8HiHWpMBsPvLKDeFiHmVEPBN0yMJyMIUhfb6gXbMkr4xtq1J6Z36eLpmiDH508LNShbDzB4kTIATguNsBqA1CHElJDhGdCGWsDkYY%2FTJh3lUelu384yTlzrtgDWVaggvG8qhDnYcEwwWi0wET%2FTNTh9Gh%2FvVn7v%2B2I%2BHlpWXS59ORgfOr7UGRkVNMUAWPtCMnHdbjjATFNKJeKpdLZYQY0crDzLUvfbHxdqfllj6a7p2VVjUqyGhYwPpZFqxYlf6hZ%2F7X3c736%2Fv4LV1blv94gEvsAAAAASUVORK5CYII%3D" ID="rdf:#$CnoJ1">@bookmarks_addons@</A>
<HR>
<DT><H3 PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$FvPhC3">@bookmarks_toolbarfolder@</H3> <DT><H3 PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$FvPhC3">@bookmarks_toolbarfolder@</H3>
<DD>@bookmarks_toolbarfolder_description@ <DD>@bookmarks_toolbarfolder_description@
<DL><p> <DL><p>
<DT><A HREF="http://www.mozilla.com/@AB_CD@/firefox/central/" ID="rdf:#$GvPhC3">@getting_started@</A> <DT><A HREF="http://www.mozilla.com/@AB_CD@/firefox/central/" ID="rdf:#$GvPhC3">@getting_started@</A>
<DT><A HREF="http://fxfeeds.mozilla.com/@AB_CD@/firefox/livebookmarks/" FEEDURL="http://fxfeeds.mozilla.com/@AB_CD@/firefox/headlines.xml" ID="rdf:#$HvPhC3">@latest_headlines@</A> <DT><A HREF="http://fxfeeds.mozilla.com/@AB_CD@/firefox/livebookmarks/" FEEDURL="http://fxfeeds.mozilla.com/@AB_CD@/firefox/headlines.xml" ID="rdf:#$HvPhC3">@latest_headlines@</A>
</DL><p> </DL><p>
<HR>
<DT><H3 ID="rdf:#$ZvPhC3">@firefox_heading@</H3> <DT><H3 ID="rdf:#$ZvPhC3">@firefox_heading@</H3>
<DL><p> <DL><p>
<DT><A HREF="http://www.mozilla.com/@AB_CD@/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">@firefox_help@</A> <DT><A HREF="http://www.mozilla.com/@AB_CD@/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">@firefox_help@</A>

View File

@ -7,7 +7,6 @@
locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd) locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd)
locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd) locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd)
locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd) locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd)
locale/browser/aboutSupport.dtd (%chrome/browser/aboutSupport.dtd)
locale/browser/credits.dtd (%chrome/browser/credits.dtd) locale/browser/credits.dtd (%chrome/browser/credits.dtd)
* locale/browser/browser.dtd (%chrome/browser/browser.dtd) * locale/browser/browser.dtd (%chrome/browser/browser.dtd)
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd) locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)

Some files were not shown because too many files have changed in this diff Show More