mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge with m-c. no hand edits
This commit is contained in:
commit
8f97a20153
@ -3,7 +3,7 @@
|
||||
# Filenames that should be ignored wherever they appear
|
||||
~$
|
||||
\.py(c|o)$
|
||||
(^|/)TAGS$
|
||||
(?i)(^|/)TAGS$
|
||||
(^|/)ID$
|
||||
(^|/)\.DS_Store$
|
||||
|
||||
|
@ -151,7 +151,7 @@ public:
|
||||
* Notify accessibility that anchor jump has been accomplished to the given
|
||||
* target. Used by layout.
|
||||
*/
|
||||
virtual nsresult NotifyOfAnchorJumpTo(nsIContent *aTarget) = 0;
|
||||
virtual void NotifyOfAnchorJumpTo(nsIContent *aTarget) = 0;
|
||||
|
||||
/**
|
||||
* Fire accessible event of the given type for the given target.
|
||||
|
@ -40,6 +40,8 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsAccessibleWrap.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsDocAccessibleWrap.h"
|
||||
@ -48,6 +50,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "prprf.h"
|
||||
#include "nsRoleMap.h"
|
||||
#include "nsRelUtils.h"
|
||||
#include "nsStateMap.h"
|
||||
|
||||
#include "nsMaiInterfaceComponent.h"
|
||||
@ -1155,7 +1158,7 @@ nsAccessibleWrap::FirePlatformEvent(nsAccEvent *aEvent)
|
||||
if (rootAccWrap && rootAccWrap->mActivated) {
|
||||
atk_focus_tracker_notify(atkObj);
|
||||
// Fire state change event for focus
|
||||
nsCOMPtr<nsIAccessibleEvent> stateChangeEvent =
|
||||
nsRefPtr<nsAccEvent> stateChangeEvent =
|
||||
new nsAccStateChangeEvent(accessible,
|
||||
nsIAccessibleStates::STATE_FOCUSED,
|
||||
PR_FALSE, PR_TRUE);
|
||||
@ -1383,7 +1386,7 @@ nsAccessibleWrap::FirePlatformEvent(nsAccEvent *aEvent)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAccessibleWrap::FireAtkStateChangeEvent(nsIAccessibleEvent *aEvent,
|
||||
nsAccessibleWrap::FireAtkStateChangeEvent(nsAccEvent *aEvent,
|
||||
AtkObject *aObject)
|
||||
{
|
||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_STATE_CHANGE\n"));
|
||||
@ -1425,7 +1428,7 @@ nsAccessibleWrap::FireAtkStateChangeEvent(nsIAccessibleEvent *aEvent,
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
|
||||
nsAccessibleWrap::FireAtkTextChangedEvent(nsAccEvent *aEvent,
|
||||
AtkObject *aObject)
|
||||
{
|
||||
MAI_LOG_DEBUG(("\n\nReceived: EVENT_TEXT_REMOVED/INSERTED\n"));
|
||||
@ -1443,8 +1446,7 @@ nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
|
||||
PRBool isInserted;
|
||||
event->IsInserted(&isInserted);
|
||||
|
||||
PRBool isFromUserInput;
|
||||
aEvent->GetIsFromUserInput(&isFromUserInput);
|
||||
PRBool isFromUserInput = aEvent->IsFromUserInput();
|
||||
|
||||
char *signal_name = g_strconcat(isInserted ? "text_changed::insert" : "text_changed::delete",
|
||||
isFromUserInput ? "" : kNonUserInputEvent, NULL);
|
||||
@ -1455,7 +1457,7 @@ nsAccessibleWrap::FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAccessibleWrap::FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
|
||||
nsAccessibleWrap::FireAtkShowHideEvent(nsAccEvent *aEvent,
|
||||
AtkObject *aObject, PRBool aIsAdded)
|
||||
{
|
||||
if (aIsAdded)
|
||||
@ -1467,8 +1469,7 @@ nsAccessibleWrap::FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
|
||||
AtkObject *parentObject = getParentCB(aObject);
|
||||
NS_ENSURE_STATE(parentObject);
|
||||
|
||||
PRBool isFromUserInput;
|
||||
aEvent->GetIsFromUserInput(&isFromUserInput);
|
||||
PRBool isFromUserInput = aEvent->IsFromUserInput();
|
||||
char *signal_name = g_strconcat(aIsAdded ? "children_changed::add" : "children_changed::remove",
|
||||
isFromUserInput ? "" : kNonUserInputEvent, NULL);
|
||||
g_signal_emit_by_name(parentObject, signal_name, indexInParent, aObject, NULL);
|
||||
|
@ -120,14 +120,10 @@ public:
|
||||
protected:
|
||||
virtual nsresult FirePlatformEvent(nsAccEvent *aEvent);
|
||||
|
||||
nsresult FireAtkStateChangeEvent(nsIAccessibleEvent *aEvent,
|
||||
AtkObject *aObject);
|
||||
nsresult FireAtkTextChangedEvent(nsIAccessibleEvent *aEvent,
|
||||
AtkObject *aObject);
|
||||
nsresult FireAtkPropChangedEvent(nsIAccessibleEvent *aEvent,
|
||||
AtkObject *aObject);
|
||||
nsresult FireAtkShowHideEvent(nsIAccessibleEvent *aEvent,
|
||||
AtkObject *aObject, PRBool aIsAdded);
|
||||
nsresult FireAtkStateChangeEvent(nsAccEvent *aEvent, AtkObject *aObject);
|
||||
nsresult FireAtkTextChangedEvent(nsAccEvent *aEvent, AtkObject *aObject);
|
||||
nsresult FireAtkShowHideEvent(nsAccEvent *aEvent, AtkObject *aObject,
|
||||
PRBool aIsAdded);
|
||||
|
||||
AtkObject *mAtkObject;
|
||||
|
||||
|
@ -40,9 +40,12 @@
|
||||
|
||||
#include "nsMaiInterfaceAction.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsRoleMap.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "nsIDOMDOMStringList.h"
|
||||
|
||||
void
|
||||
actionInterfaceInitCB(AtkActionIface *aIface)
|
||||
{
|
||||
|
@ -39,7 +39,11 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsMaiInterfaceComponent.h"
|
||||
|
||||
#include "nsAccessibleWrap.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMDocumentView.h"
|
||||
#include "nsIDOMAbstractView.h"
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
#include "nsMaiInterfaceTable.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsArrayUtils.h"
|
||||
|
||||
void
|
||||
|
@ -74,7 +74,8 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsRootAccessible.h \
|
||||
a11yGeneric.h \
|
||||
nsAccessible.h \
|
||||
nsAccessNode.h \
|
||||
$(NULL)
|
||||
|
||||
|
198
accessible/src/base/a11yGeneric.h
Normal file
198
accessible/src/base/a11yGeneric.h
Normal 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
|
@ -38,6 +38,9 @@
|
||||
|
||||
#include "nsARIAGridAccessible.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -42,15 +42,11 @@
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
||||
class nsAccessNode;
|
||||
class nsAccessible;
|
||||
class nsIAccessNode;
|
||||
|
||||
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessNode>
|
||||
nsAccessNodeHashtable;
|
||||
|
||||
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessible>
|
||||
nsAccessibleHashtable;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible cache utils
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Shutdown and removes the accessible from cache.
|
||||
|
@ -38,8 +38,14 @@
|
||||
|
||||
#include "nsAccEvent.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsXULTreeAccessible.h"
|
||||
#endif
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
@ -47,9 +53,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsXULTreeAccessible.h"
|
||||
#endif
|
||||
#include "nsIAccessibleText.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
@ -193,15 +197,10 @@ nsAccEvent::GetAccessibleByNode()
|
||||
if (!mNode)
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService =
|
||||
do_GetService("@mozilla.org/accessibilityService;1");
|
||||
if (!accService)
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mNode));
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
accService->GetAccessibleFor(DOMNode, getter_AddRefs(accessible));
|
||||
GetAccService()->GetAccessibleFor(DOMNode, getter_AddRefs(accessible));
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
// hack for xul tree table. We need a better way for firing delayed event
|
||||
|
@ -42,13 +42,14 @@
|
||||
#include "nsIAccessibleStates.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 "nsHTMLTableAccessible.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsAccessible.h"
|
||||
#include "nsARIAMap.h"
|
||||
#include "nsXULTreeGridAccessible.h"
|
||||
|
||||
#include "nsIDOMXULContainerElement.h"
|
||||
|
@ -37,8 +37,14 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDocAccessible.h"
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
|
||||
#include "nsAccCache.h"
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
#include "nsHashtable.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
@ -46,7 +52,6 @@
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIDOMCSSPrimitiveValue.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -43,58 +43,35 @@
|
||||
#ifndef _nsAccessNode_H_
|
||||
#define _nsAccessNode_H_
|
||||
|
||||
#include "nsAccCache.h"
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsIAccessNode.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
|
||||
#include "a11yGeneric.h"
|
||||
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
|
||||
class nsAccessNode;
|
||||
class nsApplicationAccessible;
|
||||
class nsDocAccessible;
|
||||
class nsIAccessibleDocument;
|
||||
class nsRootAccessible;
|
||||
|
||||
class nsIPresShell;
|
||||
class nsPresContext;
|
||||
class nsIAccessibleDocument;
|
||||
class nsIFrame;
|
||||
class nsIDOMNodeList;
|
||||
class nsRootAccessible;
|
||||
class nsApplicationAccessible;
|
||||
class nsIDocShellTreeItem;
|
||||
|
||||
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessNode>
|
||||
nsAccessNodeHashtable;
|
||||
|
||||
#define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.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 \
|
||||
{ /* 2b07e3d7-00b3-4379-aa0b-ea22e2c8ffda */ \
|
||||
0x2b07e3d7, \
|
||||
|
@ -253,33 +253,45 @@ nsAccessibilityService::ProcessDocLoadEvent(nsIWebProgress *aWebProgress,
|
||||
}
|
||||
|
||||
// nsIAccessibilityService
|
||||
nsresult
|
||||
void
|
||||
nsAccessibilityService::NotifyOfAnchorJumpTo(nsIContent *aTarget)
|
||||
{
|
||||
nsIDocument *document = aTarget->GetCurrentDoc();
|
||||
nsCOMPtr<nsIDOMNode> documentNode(do_QueryInterface(document));
|
||||
if (!documentNode)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> targetNode(do_QueryInterface(aTarget));
|
||||
|
||||
nsCOMPtr<nsIAccessible> targetAcc;
|
||||
GetAccessibleFor(targetNode, getter_AddRefs(targetAcc));
|
||||
|
||||
// Getting the targetAcc above will have ensured accessible doc creation.
|
||||
// XXX Bug 561683
|
||||
nsRefPtr<nsDocAccessible> accessibleDoc =
|
||||
nsAccessNode::GetDocAccessibleFor(documentNode);
|
||||
if (!accessibleDoc)
|
||||
return;
|
||||
|
||||
// If the jump target is not accessible then fire an event for nearest
|
||||
// accessible in parent chain.
|
||||
if (!targetAcc) {
|
||||
nsIDocument *document = aTarget->GetCurrentDoc();
|
||||
nsCOMPtr<nsIDOMNode> documentNode(do_QueryInterface(document));
|
||||
if (documentNode) {
|
||||
nsCOMPtr<nsIAccessibleDocument> accessibleDoc =
|
||||
nsAccessNode::GetDocAccessibleFor(documentNode);
|
||||
if (accessibleDoc)
|
||||
accessibleDoc->GetAccessibleInParentChain(targetNode, PR_TRUE,
|
||||
getter_AddRefs(targetAcc));
|
||||
}
|
||||
nsCOMPtr<nsIAccessNode> accNode = do_QueryInterface(targetAcc);
|
||||
accNode->GetDOMNode(getter_AddRefs(targetNode));
|
||||
}
|
||||
|
||||
if (targetAcc)
|
||||
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_SCROLLING_START,
|
||||
targetAcc);
|
||||
NS_ASSERTION(targetNode,
|
||||
"No accessible in parent chain!? Expect at least a document accessible.");
|
||||
if (!targetNode)
|
||||
return;
|
||||
|
||||
return NS_OK;
|
||||
// XXX note in rare cases the node could go away before we flush the queue,
|
||||
// for example if the node becomes inaccessible, or is removed from the DOM.
|
||||
accessibleDoc->FireDelayedAccessibleEvent(
|
||||
nsIAccessibleEvent::EVENT_SCROLLING_START,
|
||||
targetNode);
|
||||
}
|
||||
|
||||
// nsIAccessibilityService
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include "nsIAccessibilityService.h"
|
||||
|
||||
#include "a11yGeneric.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
@ -136,7 +137,7 @@ public:
|
||||
nsIContent *aContent,
|
||||
PRUint32 aChangeType);
|
||||
|
||||
virtual nsresult NotifyOfAnchorJumpTo(nsIContent *aTarget);
|
||||
virtual void NotifyOfAnchorJumpTo(nsIContent *aTarget);
|
||||
|
||||
virtual nsresult FireAccessibleEvent(PRUint32 aEvent, nsIAccessible *aTarget);
|
||||
|
||||
|
@ -41,9 +41,15 @@
|
||||
|
||||
#include "nsIXBLAccessible.h"
|
||||
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsAccessibleRelation.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsARIAMap.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsEventShell.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsRelUtils.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
@ -95,50 +101,6 @@
|
||||
#include "nsIDOMCharacterData.h"
|
||||
#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
|
||||
@ -824,12 +786,8 @@ NS_IMETHODIMP nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
focusedChild = this;
|
||||
}
|
||||
else if (gLastFocusedNode) {
|
||||
nsCOMPtr<nsIAccessibilityService> accService =
|
||||
do_GetService("@mozilla.org/accessibilityService;1");
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
accService->GetAccessibleFor(gLastFocusedNode,
|
||||
getter_AddRefs(focusedChild));
|
||||
GetAccService()->GetAccessibleFor(gLastFocusedNode,
|
||||
getter_AddRefs(focusedChild));
|
||||
if (focusedChild) {
|
||||
nsCOMPtr<nsIAccessible> 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<nsIAccessibilityService> accService = GetAccService();
|
||||
|
||||
nsCOMPtr<nsIDOMNode> relevantNode;
|
||||
accService->GetRelevantContentNodeFor(node, getter_AddRefs(relevantNode));
|
||||
GetAccService()->GetRelevantContentNodeFor(node,
|
||||
getter_AddRefs(relevantNode));
|
||||
if (!relevantNode) {
|
||||
NS_IF_ADDREF(*aChild = fallbackAnswer);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
accService->GetAccessibleFor(relevantNode, getter_AddRefs(accessible));
|
||||
GetAccService()->GetAccessibleFor(relevantNode, getter_AddRefs(accessible));
|
||||
if (!accessible) {
|
||||
// No accessible for the node with the point, so find the first
|
||||
// accessible in the DOM parent chain
|
||||
|
@ -41,33 +41,29 @@
|
||||
|
||||
#include "nsAccessNodeWrap.h"
|
||||
|
||||
#include "nsARIAMap.h"
|
||||
#include "nsEventShell.h"
|
||||
#include "nsRelUtils.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIAccessibleHyperLink.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
#include "nsIAccessibleValue.h"
|
||||
#include "nsIAccessibleRole.h"
|
||||
#include "nsIAccessibleStates.h"
|
||||
#include "nsIAccessibleEvent.h"
|
||||
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsIDOMDOMStringList.h"
|
||||
|
||||
class nsAccessible;
|
||||
class nsAccEvent;
|
||||
struct nsRoleMapEntry;
|
||||
|
||||
struct nsRect;
|
||||
class nsIContent;
|
||||
class nsIFrame;
|
||||
class nsIDOMNode;
|
||||
class nsIAtom;
|
||||
class nsIView;
|
||||
|
||||
typedef nsRefPtrHashtable<nsVoidPtrHashKey, nsAccessible>
|
||||
nsAccessibleHashtable;
|
||||
|
||||
// see nsAccessible::GetAttrValue
|
||||
#define NS_OK_NO_ARIA_VALUE \
|
||||
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 \
|
||||
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
|
||||
{
|
||||
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 \
|
||||
#define NS_ACCESSIBLE_IMPL_IID \
|
||||
{ /* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */ \
|
||||
0x133c8bf4, \
|
||||
0x4913, \
|
||||
@ -127,7 +102,7 @@ public:
|
||||
NS_DECL_NSIACCESSIBLEHYPERLINK
|
||||
NS_DECL_NSIACCESSIBLESELECTABLE
|
||||
NS_DECL_NSIACCESSIBLEVALUE
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_CID)
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_IID)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
@ -441,7 +416,7 @@ protected:
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsAccessible,
|
||||
NS_ACCESSIBLE_IMPL_CID)
|
||||
NS_ACCESSIBLE_IMPL_IID)
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "nsApplicationAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -38,18 +38,18 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIAccessibleDocument.h"
|
||||
#include "nsAccessibleWrap.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsHyperTextAccessibleWrap.h"
|
||||
|
||||
#include "nsIDOMNSHTMLElement.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsHyperTextAccessibleWrap.h"
|
||||
#include "nsILink.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -35,10 +35,13 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsCaretAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsIAccessibleEvent.h"
|
||||
|
||||
#include "nsCaret.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
|
@ -74,6 +74,10 @@
|
||||
|
||||
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsCoreUtils
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PRBool
|
||||
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;
|
||||
}
|
||||
|
@ -49,10 +49,15 @@
|
||||
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIArray.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIDOMDOMStringList.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
/**
|
||||
* Core utils.
|
||||
*/
|
||||
class nsCoreUtils
|
||||
{
|
||||
public:
|
||||
@ -468,132 +473,26 @@ public:
|
||||
static void GeneratePopupTree(nsIDOMNode *aNode, PRBool aIsAnon = PR_FALSE);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 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)
|
||||
* nsIDOMDOMStringList implementation.
|
||||
*/
|
||||
class nsAccessibleDOMStringList : public nsIDOMDOMStringList
|
||||
{
|
||||
public:
|
||||
nsAccessibleDOMStringList() {};
|
||||
virtual ~nsAccessibleDOMStringList() {};
|
||||
|
||||
#define NS_DECL_RUNNABLEMETHOD_HELPER(ClassType, Method) \
|
||||
void Revoke() \
|
||||
{ \
|
||||
NS_IF_RELEASE(mObj); \
|
||||
} \
|
||||
\
|
||||
protected: \
|
||||
virtual ~nsRunnableMethod_##Method() \
|
||||
{ \
|
||||
NS_IF_RELEASE(mObj); \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
ClassType *mObj; \
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMDOMSTRINGLIST
|
||||
|
||||
PRBool Add(const nsAString& aName) {
|
||||
return mNames.AppendElement(aName) != nsnull;
|
||||
}
|
||||
|
||||
#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) \
|
||||
\
|
||||
private:
|
||||
nsTArray<nsString> mNames;
|
||||
};
|
||||
|
||||
#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
|
||||
|
||||
|
@ -36,9 +36,14 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsAccCache.h"
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsICommandManager.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
@ -40,7 +40,9 @@
|
||||
#define _nsDocAccessible_H_
|
||||
|
||||
#include "nsHyperTextAccessibleWrap.h"
|
||||
#include "nsEventShell.h"
|
||||
#include "nsIAccessibleDocument.h"
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentObserver.h"
|
||||
#include "nsIEditor.h"
|
||||
|
@ -38,6 +38,8 @@
|
||||
|
||||
#include "nsEventShell.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -41,8 +41,9 @@
|
||||
|
||||
#include "nsAccEvent.h"
|
||||
|
||||
#include "a11yGeneric.h"
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
class nsIPersistentProperties;
|
||||
|
||||
|
@ -37,8 +37,10 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsOuterDocAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIAccessibleDocument.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIContent.h"
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccessNode.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -35,9 +35,11 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
#include "nsHTMLSelectAccessible.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
@ -38,7 +38,8 @@
|
||||
|
||||
#include "nsTextAttrs.h"
|
||||
|
||||
#include "nsAccessNode.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsHyperTextAccessibleWrap.h"
|
||||
|
||||
#include "gfxFont.h"
|
||||
|
@ -45,7 +45,6 @@ class nsHyperTextAccessible;
|
||||
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
|
||||
#include "nsIContent.h"
|
||||
#include "nsIFrame.h"
|
||||
|
@ -39,7 +39,9 @@
|
||||
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccessible.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIDOMXULLabeledControlEl.h"
|
||||
|
||||
|
@ -36,9 +36,13 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsRelUtils.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
|
@ -36,12 +36,13 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHTMLImageAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "imgIContainer.h"
|
||||
#include "imgIRequest.h"
|
||||
|
||||
#include "nsHTMLImageAccessible.h"
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIImageLoadingContent.h"
|
||||
#include "nsILink.h"
|
||||
|
@ -39,6 +39,8 @@
|
||||
|
||||
#include "nsHTMLImageMapAccessible.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -39,6 +39,8 @@
|
||||
|
||||
#include "nsHTMLLinkAccessible.h"
|
||||
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
#include "nsILink.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -36,10 +36,15 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsHTMLSelectAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsEventShell.h"
|
||||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -39,7 +39,11 @@
|
||||
|
||||
#include "nsHTMLTableAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsRelUtils.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
@ -48,8 +52,6 @@
|
||||
#include "nsISelection2.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
#include "nsIDOMHTMLTableElement.h"
|
||||
@ -57,7 +59,6 @@
|
||||
#include "nsIDOMHTMLTableSectionElem.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITableLayout.h"
|
||||
#include "nsITableCellLayout.h"
|
||||
#include "nsFrameSelection.h"
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "nsHTMLTextAccessible.h"
|
||||
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIFrame.h"
|
||||
#include "nsPresContext.h"
|
||||
|
@ -38,8 +38,10 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsHyperTextAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsTextAttrs.h"
|
||||
|
||||
#include "nsIClipboard.h"
|
||||
|
@ -43,14 +43,15 @@
|
||||
#ifndef _nsAccessibleWrap_H_
|
||||
#define _nsAccessibleWrap_H_
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
#include "nsTArray.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#include "nsAccessible.h"
|
||||
|
||||
struct AccessibleWrapper;
|
||||
struct objc_class;
|
||||
|
||||
@ -99,23 +100,10 @@ class nsAccessibleWrap : public nsAccessible
|
||||
|
||||
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
|
||||
// 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;
|
||||
}
|
||||
/**
|
||||
* Return true if the parent doesn't have children to expose to AT.
|
||||
*/
|
||||
PRBool AncestorIsFlat();
|
||||
|
||||
// Wrapper around our native object.
|
||||
AccessibleWrapper *mNativeWrapper;
|
||||
|
@ -309,3 +309,28 @@ nsAccessibleWrap::GetUnignoredParent()
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "nsAccessibleWrap.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define GET_NSIACCESSIBLETEXT \
|
||||
|
@ -37,12 +37,18 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsAccessNodeWrap.h"
|
||||
|
||||
#include "AccessibleApplication.h"
|
||||
#include "ISimpleDOMNode_i.c"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsRootAccessible.h"
|
||||
|
||||
#include "nsAttrName.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMNSHTMLElement.h"
|
||||
#include "nsIDOMViewCSS.h"
|
||||
@ -51,10 +57,7 @@
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "AccessibleApplication.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
|
||||
/// the accessible library and cached methods
|
||||
HINSTANCE nsAccessNodeWrap::gmAccLib = nsnull;
|
||||
|
@ -37,7 +37,11 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsAccessibleWrap.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
#include "nsIAccessibleDocument.h"
|
||||
#include "nsIAccessibleSelectable.h"
|
||||
|
@ -44,6 +44,8 @@
|
||||
#define _nsDocAccessibleWrap_H_
|
||||
|
||||
#include "ISimpleDOMDocument.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
#include "nsHyperTextAccessibleWrap.h"
|
||||
|
||||
#include "nsEventShell.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsHyperTextAccessibleWrap,
|
||||
nsHyperTextAccessible)
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "nsTextAccessibleWrap.h"
|
||||
#include "ISimpleDOMText_i.c"
|
||||
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
|
||||
#include "nsIFontMetrics.h"
|
||||
|
@ -38,6 +38,10 @@
|
||||
|
||||
#include "nsXFormsAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIDOMElement.h"
|
||||
@ -105,10 +109,6 @@ nsXFormsAccessible::GetBoundChildElementValue(const nsAString& aTagName,
|
||||
void
|
||||
nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
|
||||
{
|
||||
nsIAccessibilityService *accService = GetAccService();
|
||||
if (!accService)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> container(aContainerNode);
|
||||
if (!container)
|
||||
container = mDOMNode;
|
||||
@ -131,7 +131,8 @@ nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
|
||||
if (!child)
|
||||
continue;
|
||||
|
||||
accService->GetAttachedAccessibleFor(child, getter_AddRefs(accessible));
|
||||
GetAccService()->GetAttachedAccessibleFor(child,
|
||||
getter_AddRefs(accessible));
|
||||
if (!accessible)
|
||||
continue;
|
||||
|
||||
@ -337,9 +338,6 @@ nsXFormsSelectableAccessible::GetSelectedChildren(nsIArray **aAccessibles)
|
||||
do_CreateInstance(NS_ARRAY_CONTRACTID);
|
||||
NS_ENSURE_TRUE(accessibles, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsIAccessibilityService* accService = GetAccService();
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
nsresult rv;
|
||||
|
||||
if (mIsSelect1Element) {
|
||||
@ -352,7 +350,7 @@ nsXFormsSelectableAccessible::GetSelectedChildren(nsIArray **aAccessibles)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
accService->GetAccessibleFor(item, getter_AddRefs(accessible));
|
||||
GetAccService()->GetAccessibleFor(item, getter_AddRefs(accessible));
|
||||
NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE);
|
||||
|
||||
accessibles->AppendElement(accessible, PR_FALSE);
|
||||
@ -379,7 +377,7 @@ nsXFormsSelectableAccessible::GetSelectedChildren(nsIArray **aAccessibles)
|
||||
NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
accService->GetAccessibleFor(item, getter_AddRefs(accessible));
|
||||
GetAccService()->GetAccessibleFor(item, getter_AddRefs(accessible));
|
||||
NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE);
|
||||
|
||||
accessibles->AppendElement(accessible, PR_FALSE);
|
||||
@ -467,9 +465,6 @@ nsXFormsSelectableAccessible::RefSelection(PRInt32 aIndex,
|
||||
NS_ENSURE_ARG_POINTER(aAccessible);
|
||||
*aAccessible = nsnull;
|
||||
|
||||
nsIAccessibilityService* accService = GetAccService();
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
|
||||
nsresult rv;
|
||||
if (mIsSelect1Element) {
|
||||
if (aIndex != 0)
|
||||
@ -481,7 +476,7 @@ nsXFormsSelectableAccessible::RefSelection(PRInt32 aIndex,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (item)
|
||||
return accService->GetAccessibleFor(item, aAccessible);
|
||||
return GetAccService()->GetAccessibleFor(item, aAccessible);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -502,7 +497,7 @@ nsXFormsSelectableAccessible::RefSelection(PRInt32 aIndex,
|
||||
items->Item(aIndex, getter_AddRefs(item));
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
return accService->GetAccessibleFor(item, getter_AddRefs(accessible));
|
||||
return GetAccService()->GetAccessibleFor(item, getter_AddRefs(accessible));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -38,6 +38,8 @@
|
||||
|
||||
#include "nsXFormsFormControlsAccessible.h"
|
||||
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
// nsXFormsLabelAccessible
|
||||
|
||||
nsXFormsLabelAccessible::
|
||||
|
@ -38,7 +38,9 @@
|
||||
|
||||
#include "nsXULColorPickerAccessible.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
|
@ -40,9 +40,10 @@
|
||||
|
||||
#include "nsXULComboboxAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULComboboxAccessible
|
||||
|
@ -37,11 +37,16 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsXULFormControlAccessible.h"
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsAccTreeWalker.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsHTMLFormControlAccessible.h"
|
||||
#include "nsXULMenuAccessible.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMNSEditableElement.h"
|
||||
|
@ -40,10 +40,12 @@
|
||||
|
||||
#include "nsXULListboxAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
|
||||
#include "nsIDOMXULPopupElement.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULColumnsAccessible
|
||||
|
@ -37,6 +37,11 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXULMenuAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsXULFormControlAccessible.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIMutableArray.h"
|
||||
@ -50,7 +55,6 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsXULFormControlAccessible.h"
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
|
||||
|
@ -38,8 +38,11 @@
|
||||
|
||||
#include "nsXULSliderAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMDocumentXBL.h"
|
||||
#include "nsIFrame.h"
|
||||
|
||||
// nsXULSliderAccessible
|
||||
|
||||
|
@ -36,8 +36,12 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsXULTabAccessible.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -37,14 +37,19 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: alphabetically ordered
|
||||
// NOTE: groups are alphabetically ordered
|
||||
#include "nsXULTextAccessible.h"
|
||||
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsRelUtils.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
#include "nsIDOMXULDescriptionElement.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXULTextAccessible.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,11 @@
|
||||
|
||||
#include "nsXULTreeAccessible.h"
|
||||
|
||||
#include "nsAccCache.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsRelUtils.h"
|
||||
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
|
@ -38,8 +38,12 @@
|
||||
|
||||
#include "nsXULTreeGridAccessibleWrap.h"
|
||||
|
||||
#include "nsAccCache.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsEventShell.h"
|
||||
|
||||
#include "nsITreeSelection.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeGridAccessible
|
||||
|
@ -62,7 +62,8 @@
|
||||
gComputedStyle = document.defaultView.getComputedStyle(node, "");
|
||||
var defAttrs = {
|
||||
"font-style": gComputedStyle.fontStyle,
|
||||
"font-size": (MAC) ? "8pt" : "10pt",
|
||||
// The pt font size of the input element can vary by Linux distro.
|
||||
"font-size": (WIN ? "10pt" : (MAC ? "8pt" : function() { return true; })),
|
||||
"background-color": gComputedStyle.backgroundColor,
|
||||
"font-weight": equalsToNormal,
|
||||
"color": gComputedStyle.color,
|
||||
|
@ -86,9 +86,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
role: ROLE_PUSHBUTTON
|
||||
},
|
||||
{
|
||||
role: ROLE_PUSHBUTTON
|
||||
}
|
||||
|
@ -621,8 +621,9 @@ var allTabs = {
|
||||
|
||||
prefName: "browser.allTabs.previews",
|
||||
readPref: function allTabs_readPref() {
|
||||
var allTabsButton = document.getAnonymousElementByAttribute(
|
||||
gBrowser.tabContainer, "anonid", "alltabs-button");
|
||||
var allTabsButton = document.getElementById("alltabs-button");
|
||||
if (!allTabsButton)
|
||||
return;
|
||||
if (gPrefService.getBoolPref(this.prefName)) {
|
||||
allTabsButton.removeAttribute("type");
|
||||
allTabsButton.setAttribute("command", "Browser:ShowAllTabs");
|
||||
|
@ -13,10 +13,21 @@ tabbrowser {
|
||||
-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 {
|
||||
-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"] {
|
||||
-moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar");
|
||||
}
|
||||
@ -155,7 +166,7 @@ menuitem.spell-suggestion {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sidebar-box toolbarbutton.tabs-closebutton {
|
||||
#sidebar-header > .tabs-closebutton {
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
|
||||
|
@ -2196,15 +2196,15 @@ function losslessDecodeURI(aURI) {
|
||||
encodeURIComponent);
|
||||
} catch (e) {}
|
||||
|
||||
// Encode invisible characters (soft hyphen, zero-width space, BOM,
|
||||
// line and paragraph separator, word joiner, invisible times,
|
||||
// invisible separator, object replacement character) (bug 452979)
|
||||
value = value.replace(/[\v\x0c\x1c\x1d\x1e\x1f\u00ad\u200b\ufeff\u2028\u2029\u2060\u2062\u2063\ufffc]/g,
|
||||
// Encode invisible characters (line and paragraph separator,
|
||||
// object replacement character) (bug 452979)
|
||||
value = value.replace(/[\v\x0c\x1c\x1d\x1e\x1f\u2028\u2029\ufffc]/g,
|
||||
encodeURIComponent);
|
||||
|
||||
// Encode bidirectional formatting characters.
|
||||
// Encode default ignorable characters. (bug 546013)
|
||||
// This includes all bidirectional formatting characters.
|
||||
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
|
||||
value = value.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
|
||||
value = value.replace(/[\u00ad\u034f\u115f-\u1160\u17b4-\u17b5\u180b-\u180d\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]/g,
|
||||
encodeURIComponent);
|
||||
return value;
|
||||
}
|
||||
@ -3355,8 +3355,6 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
||||
|
||||
CombinedStopReload.init();
|
||||
|
||||
gHomeButton.updatePersonalToolbarStyle();
|
||||
|
||||
// Update the urlbar
|
||||
if (gURLBar) {
|
||||
URLBarSetURI();
|
||||
@ -3380,11 +3378,12 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
||||
// XXX Shouldn't have to do this, but I do
|
||||
if (!gCustomizeSheet)
|
||||
window.focus();
|
||||
|
||||
}
|
||||
|
||||
function BrowserToolboxCustomizeChange() {
|
||||
gHomeButton.updatePersonalToolbarStyle();
|
||||
|
||||
allTabs.readPref();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -563,7 +563,13 @@
|
||||
|
||||
<toolbar id="TabsToolbar"
|
||||
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">
|
||||
|
||||
<tabs id="tabbrowser-tabs"
|
||||
class="tabbrowser-tabs"
|
||||
context="tabContextMenu"
|
||||
@ -573,6 +579,34 @@
|
||||
tooltip="tabbrowser-tab-tooltip">
|
||||
<tab class="tabbrowser-tab" selected="true"/>
|
||||
</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>
|
||||
|
||||
<toolbarpalette id="BrowserToolbarPalette">
|
||||
@ -607,15 +641,6 @@
|
||||
ondragenter="bookmarksButtonObserver.onDragOver(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"
|
||||
label="&newNavigatorCmd.label;"
|
||||
command="key_newNavigator"
|
||||
|
@ -6,16 +6,8 @@
|
||||
-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 {
|
||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-close-tab-button");
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -24,15 +16,6 @@
|
||||
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 {
|
||||
background-color: white;
|
||||
}
|
||||
@ -41,10 +24,3 @@ tabpanels {
|
||||
position: relative;
|
||||
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
|
||||
|
@ -2457,17 +2457,6 @@
|
||||
command="cmd_newNavigatorTab"
|
||||
tooltiptext="&newTabButton.tooltip;"/>
|
||||
</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>
|
||||
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
@ -2525,10 +2514,6 @@
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox");
|
||||
</field>
|
||||
|
||||
<field name="mTabstripClosebutton">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "tabs-closebutton");
|
||||
</field>
|
||||
|
||||
<field name="_prefObserver"><![CDATA[({
|
||||
tabContainer: this,
|
||||
|
||||
@ -2618,7 +2603,9 @@
|
||||
this.setAttribute("closebuttons", "noclose");
|
||||
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>
|
||||
</method>
|
||||
|
||||
@ -2660,11 +2647,6 @@
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<field name="mAllTabsPopup">
|
||||
document.getAnonymousElementByAttribute(this,
|
||||
"anonid", "alltabs-popup");
|
||||
</field>
|
||||
|
||||
<field name="_animateElement">
|
||||
this.mTabstrip._scrollButtonDown;
|
||||
</field>
|
||||
@ -2780,6 +2762,12 @@
|
||||
this.mTabstrip.ensureElementIsVisible(t);
|
||||
]]></body>
|
||||
</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>
|
||||
|
||||
<handlers>
|
||||
@ -2852,8 +2840,6 @@
|
||||
pixelsToScroll = tabStrip.scrollIncrement * -1;
|
||||
break;
|
||||
case "scrollbutton-down":
|
||||
case "alltabs-button":
|
||||
case "newtab-button":
|
||||
pixelsToScroll = tabStrip.scrollIncrement;
|
||||
break;
|
||||
}
|
||||
@ -3078,59 +3064,54 @@
|
||||
<handlers>
|
||||
<handler event="click" button="0"><![CDATA[
|
||||
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") {
|
||||
let 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;
|
||||
// Reset the "ignored click" flag
|
||||
this._ignoredClick = 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).
|
||||
*/
|
||||
var self = this;
|
||||
var clickedOnce = false;
|
||||
function enableDblClick(event) {
|
||||
if (event.detail == 1 && !clickedOnce) {
|
||||
clickedOnce = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset the "ignored click" flag
|
||||
this._ignoredClick = 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);
|
||||
setTimeout(function() {
|
||||
self._blockDblClick = false;
|
||||
}, 0);
|
||||
tabContainer.removeEventListener("click", enableDblClick, false);
|
||||
}
|
||||
else // "tabs"
|
||||
bindingParent.tabbrowser.removeCurrentTab();
|
||||
tabContainer.addEventListener("click", enableDblClick, false);
|
||||
]]></handler>
|
||||
|
||||
<handler event="dblclick" button="0" phase="capturing">
|
||||
@ -3213,8 +3194,7 @@
|
||||
<method name="_menuItemOnCommand">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
var tabcontainer = document.getBindingParent(this);
|
||||
tabcontainer.selectedItem = aEvent.target.tab;
|
||||
gBrowser.selectedTab = aEvent.target.tab;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
@ -3263,7 +3243,7 @@
|
||||
|
||||
<method name="_updateTabsVisibilityStatus">
|
||||
<body><![CDATA[
|
||||
var tabContainer = document.getBindingParent(this);
|
||||
var tabContainer = gBrowser.tabContainer;
|
||||
// We don't want menu item decoration unless there is overflow.
|
||||
if (tabContainer.getAttribute("overflow") != "true")
|
||||
return;
|
||||
@ -3287,7 +3267,7 @@
|
||||
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"menuitem");
|
||||
|
||||
menuItem.setAttribute("class", "menuitem-iconic alltabs-item");
|
||||
menuItem.setAttribute("class", "menuitem-iconic alltabs-item menuitem-with-favicon");
|
||||
|
||||
this._setMenuitemAttributes(menuItem, aTab);
|
||||
|
||||
@ -3327,7 +3307,7 @@
|
||||
<handler event="popupshowing">
|
||||
<![CDATA[
|
||||
// set up the menu popup
|
||||
var tabcontainer = document.getBindingParent(this);
|
||||
var tabcontainer = gBrowser.tabContainer;
|
||||
var tabs = tabcontainer.childNodes;
|
||||
|
||||
// Listen for changes in the tab bar.
|
||||
@ -3351,7 +3331,7 @@
|
||||
menuItem.tab.mCorrespondingMenuitem = null;
|
||||
this.removeChild(menuItem);
|
||||
}
|
||||
var tabcontainer = document.getBindingParent(this);
|
||||
var tabcontainer = gBrowser.tabContainer;
|
||||
tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
|
||||
tabcontainer.removeEventListener("TabOpen", this, false);
|
||||
tabcontainer.removeEventListener("TabAttrModified", this, false);
|
||||
|
@ -1171,8 +1171,13 @@ BrowserGlue.prototype = {
|
||||
// If we are creating all Smart Bookmarks from ground up, add a
|
||||
// separator below them in the bookmarks menu.
|
||||
if (smartBookmarksCurrentVersion == 0 &&
|
||||
smartBookmarkItemIds.length == 0)
|
||||
bmsvc.insertSeparator(bmsvc.bookmarksMenuFolder, bookmarksMenuIndex);
|
||||
smartBookmarkItemIds.length == 0) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
<H1 LAST_MODIFIED="1177541029">Bookmarks</H1>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
@ -7,8 +7,6 @@
|
||||
<H1 LAST_MODIFIED="1177541029">Bookmarks</H1>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
@ -108,4 +108,4 @@ const SMART_BOOKMARKS_ON_MENU = 3; // Takes in count the additional separator.
|
||||
|
||||
// Default bookmarks constants.
|
||||
const DEFAULT_BOOKMARKS_ON_TOOLBAR = 2;
|
||||
const DEFAULT_BOOKMARKS_ON_MENU = 3;
|
||||
const DEFAULT_BOOKMARKS_ON_MENU = 1;
|
||||
|
@ -160,10 +160,10 @@ function testCanonicalBookmarks() {
|
||||
|
||||
// 6-2: the toolbar contents are imported to the places-toolbar folder,
|
||||
// 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
|
||||
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.title, "test");
|
||||
|
||||
|
@ -125,10 +125,10 @@ function database_check() {
|
||||
var result = hs.executeQuery(query, options);
|
||||
var rootNode = result.root;
|
||||
rootNode.containerOpen = true;
|
||||
do_check_eq(rootNode.childCount, 4);
|
||||
do_check_eq(rootNode.childCount, DEFAULT_BOOKMARKS_ON_MENU + 1);
|
||||
|
||||
// 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.title, "test");
|
||||
// add date
|
||||
|
@ -206,10 +206,10 @@ function testCanonicalBookmarks(aFolder) {
|
||||
|
||||
// 6-2: the toolbar folder and unfiled bookmarks folder imported to the
|
||||
// corresponding places folders
|
||||
do_check_eq(rootNode.childCount, 4);
|
||||
do_check_eq(rootNode.childCount, DEFAULT_BOOKMARKS_ON_MENU + 1);
|
||||
|
||||
// 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.title, "test");
|
||||
|
||||
|
@ -31,6 +31,8 @@
|
||||
<!ENTITY closeTab.label "Close Tab">
|
||||
<!ENTITY closeTab.accesskey "c">
|
||||
|
||||
<!ENTITY listAllTabs.label "List all tabs">
|
||||
|
||||
<!ENTITY tabCmd.label "New Tab">
|
||||
<!ENTITY tabCmd.accesskey "T">
|
||||
<!ENTITY tabCmd.commandkey "t">
|
||||
@ -209,7 +211,7 @@
|
||||
<!ENTITY viewSidebarMenu.accesskey "e">
|
||||
<!ENTITY viewCustomizeToolbar.label "Customize…">
|
||||
<!ENTITY viewCustomizeToolbar.accesskey "C">
|
||||
<!ENTITY viewTabsOnTop.label "Tabs on top">
|
||||
<!ENTITY viewTabsOnTop.label "Tabs on Top">
|
||||
<!ENTITY viewTabsOnTop.accesskey "T">
|
||||
|
||||
<!ENTITY historyMenu.label "History">
|
||||
|
@ -1,3 +1,2 @@
|
||||
<!ENTITY closeTab.label "Close Tab">
|
||||
<!ENTITY listAllTabs.label "List all tabs">
|
||||
<!ENTITY newTabButton.tooltip "Open a new tab">
|
||||
|
@ -7,10 +7,6 @@
|
||||
#define bookmarks_title 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_description Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
|
||||
|
||||
|
@ -61,10 +61,6 @@ template = '''#filter emptyLines
|
||||
#define bookmarks_title %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_description %s
|
||||
|
||||
|
@ -8,15 +8,12 @@
|
||||
<H1>@bookmarks_heading@</H1>
|
||||
|
||||
<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>
|
||||
<DD>@bookmarks_toolbarfolder_description@
|
||||
<DL><p>
|
||||
<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>
|
||||
</DL><p>
|
||||
<HR>
|
||||
<DT><H3 ID="rdf:#$ZvPhC3">@firefox_heading@</H3>
|
||||
<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>
|
||||
|
@ -1127,14 +1127,22 @@ statusbarpanel#statusbar-display {
|
||||
-moz-box-shadow: ThreeDShadow 0 -1px inset;
|
||||
}
|
||||
|
||||
.tabbrowser-tab {
|
||||
border: none !important;
|
||||
padding: 0 2px;
|
||||
#TabsToolbar > toolbarbutton,
|
||||
#TabsToolbar > toolbarpaletteitem > toolbarbutton {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.tabbrowser-tab {
|
||||
padding: 0 2px 2px;
|
||||
margin-bottom: 1px;
|
||||
min-height: 25px; /* reserve space for the sometimes hidden close button */
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
margin-bottom: 0px;
|
||||
margin-bottom: 0;
|
||||
padding-top: 2px; /* compensates the top margin of background tabs */
|
||||
padding-bottom: 3px; /* compensates the bottom margin of background tabs */
|
||||
min-height: 28px;
|
||||
}
|
||||
|
||||
.tab-icon-image {
|
||||
@ -1216,12 +1224,11 @@ statusbarpanel#statusbar-display {
|
||||
.tab-close-button > .toolbarbutton-icon {
|
||||
/* XXX Buttons have padding in widget/ that we don't want here but can't override with good CSS, so we must
|
||||
use evil CSS to give the impression of smaller content */
|
||||
margin: -3px !important;
|
||||
margin: -4px;
|
||||
}
|
||||
|
||||
.tab-close-button {
|
||||
padding: 0px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
}
|
||||
|
||||
@ -1236,17 +1243,21 @@ statusbarpanel#statusbar-display {
|
||||
}
|
||||
|
||||
/* Tabstrip new tab button */
|
||||
.tabs-newtab-button {
|
||||
.tabs-newtab-button,
|
||||
#TabsToolbar > #new-tab-button ,
|
||||
#TabsToolbar > #wrapper-new-tab-button > #new-tab-button {
|
||||
list-style-image: url("moz-icon://stock/gtk-add?size=menu");
|
||||
border: none;
|
||||
-moz-image-region: auto;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button {
|
||||
.tabs-newtab-button {
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.tabs-newtab-button > .toolbarbutton-icon {
|
||||
.tabs-newtab-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > #new-tab-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > #wrapper-new-tab-button > #new-tab-button > .toolbarbutton-icon {
|
||||
margin-top: -2px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
@ -1254,8 +1265,6 @@ statusbarpanel#statusbar-display {
|
||||
/* Tabstrip close button */
|
||||
.tabs-closebutton {
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
border: none;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.tabs-closebutton > .toolbarbutton-icon {
|
||||
@ -1282,20 +1291,16 @@ statusbarpanel#statusbar-display {
|
||||
-moz-transition: none;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button > .toolbarbutton-icon {
|
||||
#alltabs-button > .toolbarbutton-icon {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png");
|
||||
margin: 2px 0 1px;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker {
|
||||
#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker {
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button[type="menu"] > .toolbarbutton-icon {
|
||||
#alltabs-button[type="menu"] > .toolbarbutton-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -1314,7 +1319,7 @@ statusbarpanel#statusbar-display {
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
#sidebar-box .tabs-closebutton {
|
||||
#sidebar-header > .tabs-closebutton {
|
||||
margin-bottom: 0px !important;
|
||||
padding: 0px 2px 0px 2px !important;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox:-moz-lwtheme > .tabs-newtab-button {
|
||||
.tabs-newtab-button:-moz-lwtheme {
|
||||
width: auto;
|
||||
-moz-box-flex: 1;
|
||||
-moz-box-pack: start;
|
||||
@ -95,8 +95,11 @@
|
||||
}
|
||||
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext,
|
||||
.tabs-alltabs-button:-moz-lwtheme-darktext,
|
||||
.tabbrowser-tabs:-moz-lwtheme-darktext > .tabs-closebutton,
|
||||
#TabsToolbar > #new-tab-button:-moz-lwtheme-darktext,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button:-moz-lwtheme-darktext,
|
||||
#TabsToolbar > #alltabs-button:-moz-lwtheme-darktext,
|
||||
#TabsToolbar > toolbarpaletteitem > #alltabs-button:-moz-lwtheme-darktext,
|
||||
#tabs-closebutton:-moz-lwtheme-darktext,
|
||||
.tabbrowser-arrowscrollbox:-moz-lwtheme-darktext > .scrollbutton-up,
|
||||
.tabbrowser-arrowscrollbox:-moz-lwtheme-darktext > .scrollbutton-down,
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]) {
|
||||
@ -104,8 +107,11 @@
|
||||
}
|
||||
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext,
|
||||
.tabs-alltabs-button:-moz-lwtheme-brighttext,
|
||||
.tabbrowser-tabs:-moz-lwtheme-brighttext > .tabs-closebutton,
|
||||
#TabsToolbar > #new-tab-button:-moz-lwtheme-brighttext,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button:-moz-lwtheme-brighttext,
|
||||
#TabsToolbar > #alltabs-button:-moz-lwtheme-brighttext,
|
||||
#TabsToolbar > toolbarpaletteitem > #alltabs-button:-moz-lwtheme-brighttext,
|
||||
#tabs-closebutton:-moz-lwtheme-brighttext,
|
||||
.tabbrowser-arrowscrollbox:-moz-lwtheme-brighttext > .scrollbutton-up,
|
||||
.tabbrowser-arrowscrollbox:-moz-lwtheme-brighttext > .scrollbutton-down,
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]) {
|
||||
@ -1042,20 +1048,11 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
|
||||
.editBookmarkPanelHeaderButton,
|
||||
.editBookmarkPanelBottomButton {
|
||||
-moz-appearance: none;
|
||||
background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center;
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 20px;
|
||||
-moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-border-right-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15);
|
||||
-moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
@hudButton@
|
||||
padding: 0 9px;
|
||||
margin: 6px;
|
||||
min-width: 79px;
|
||||
min-height: 22px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.editBookmarkPanelHeaderButton:hover:active,
|
||||
@ -1130,18 +1127,11 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
}
|
||||
|
||||
#editBMPanel_folderMenuList {
|
||||
-moz-appearance: none;
|
||||
background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center;
|
||||
border: 3px solid;
|
||||
@hudButton@
|
||||
-moz-border-radius: 5px;
|
||||
-moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1);
|
||||
-moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15);
|
||||
-moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
margin: 0 3px !important;
|
||||
min-height: 22px;
|
||||
-moz-padding-start: 2px;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
#editBMPanel_folderMenuList:focus {
|
||||
@ -1265,21 +1255,14 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
|
||||
#editBookmarkPanel .expander-up,
|
||||
#editBookmarkPanel .expander-down {
|
||||
-moz-appearance: none;
|
||||
background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center;
|
||||
border: 3px solid;
|
||||
@hudButton@
|
||||
-moz-border-radius: 5px;
|
||||
-moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1);
|
||||
-moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15);
|
||||
-moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: 2px;
|
||||
padding: 0;
|
||||
-moz-padding-start: 4px;
|
||||
min-width: 10px;
|
||||
min-height: 22px;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
#editBookmarkPanel .expander-up:focus,
|
||||
@ -1528,7 +1511,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
}
|
||||
|
||||
.tabbrowser-tab,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button {
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
-moz-border-radius: 0 0 6px 6px;
|
||||
color: #222;
|
||||
@ -1547,7 +1530,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-bkgnd.png);
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button {
|
||||
.tabs-newtab-button {
|
||||
width: 34px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
@ -1605,6 +1588,11 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
#TabsToolbar > toolbarbutton,
|
||||
#TabsToolbar > toolbarpaletteitem > toolbarbutton {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tabbrowser-tabs {
|
||||
-moz-box-align: stretch;
|
||||
height: 25px;
|
||||
@ -1712,55 +1700,71 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
* Tabstrip New Tab & All Tabs Buttons
|
||||
*/
|
||||
|
||||
.tabbrowser-tabs > .tabs-newtab-button,
|
||||
.tabs-alltabs-button {
|
||||
#TabsToolbar > #new-tab-button,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button,
|
||||
#TabsToolbar > #alltabs-button,
|
||||
#TabsToolbar > toolbarpaletteitem > #alltabs-button {
|
||||
-moz-border-start: 2px solid;
|
||||
-moz-border-end: none;
|
||||
-moz-border-left-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
|
||||
-moz-border-right-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tabs-newtab-button > .toolbarbutton-icon,
|
||||
.tabs-alltabs-button > .toolbarbutton-icon {
|
||||
#TabsToolbar > #new-tab-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > #alltabs-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > toolbarpaletteitem > #alltabs-button > .toolbarbutton-icon {
|
||||
padding: 0;
|
||||
}
|
||||
.tabs-newtab-button {
|
||||
|
||||
.tabs-newtab-button,
|
||||
#TabsToolbar > #new-tab-button,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);
|
||||
-moz-image-region: rect(0, 18px, 20px, 0);
|
||||
}
|
||||
.tabs-newtab-button:hover {
|
||||
|
||||
.tabs-newtab-button:hover,
|
||||
#TabsToolbar > #new-tab-button:hover {
|
||||
-moz-image-region: rect(0, 36px, 20px, 18px);
|
||||
}
|
||||
.tabs-newtab-button:hover:active {
|
||||
|
||||
.tabs-newtab-button:hover:active,
|
||||
#TabsToolbar > #new-tab-button:hover:active {
|
||||
-moz-image-region: rect(0, 54px, 20px, 36px);
|
||||
}
|
||||
.tabs-alltabs-button {
|
||||
|
||||
#alltabs-button {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/alltabs-box-bkgnd-icon.png);
|
||||
-moz-image-region: rect(0, 22px, 20px, 0);
|
||||
}
|
||||
.tabs-alltabs-button:hover {
|
||||
|
||||
#alltabs-button:hover {
|
||||
-moz-image-region: rect(0, 44px, 20px, 22px);
|
||||
}
|
||||
.tabs-alltabs-button[type="menu"][open="true"],
|
||||
.tabs-alltabs-button:hover:active {
|
||||
|
||||
#alltabs-button[type="menu"][open="true"],
|
||||
#alltabs-button:hover:active {
|
||||
-moz-image-region: rect(0, 66px, 20px, 44px);
|
||||
}
|
||||
.tabbrowser-tabs > .tabs-newtab-button:hover,
|
||||
.tabs-alltabs-button:hover {
|
||||
|
||||
#TabsToolbar > #new-tab-button:hover,
|
||||
#TabsToolbar > #alltabs-button:hover {
|
||||
background-color: rgba(0,0,0,0.10);
|
||||
}
|
||||
.tabbrowser-tabs > .tabs-newtab-button:hover:active,
|
||||
.tabs-alltabs-button:hover:active {
|
||||
|
||||
#TabsToolbar > #new-tab-button:hover:active,
|
||||
#TabsToolbar > #alltabs-button:hover:active {
|
||||
background-color: rgba(0,0,0,0.20);
|
||||
}
|
||||
|
||||
.tabs-alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker,
|
||||
.tabs-alltabs-button > .toolbarbutton-text {
|
||||
#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button > .toolbarbutton-icon {
|
||||
#alltabs-button > .toolbarbutton-icon {
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
@ -1899,18 +1903,10 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
|
||||
/* Popup Buttons */
|
||||
#identity-popup-more-info-button {
|
||||
-moz-appearance: none;
|
||||
background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center;
|
||||
border: 3px solid;
|
||||
-moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1);
|
||||
-moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15);
|
||||
-moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
|
||||
-moz-border-radius: 20px;
|
||||
@hudButton@
|
||||
padding: 1px 9px;
|
||||
margin: 10px 0 0;
|
||||
min-height: 0px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#identity-popup-more-info-button > .button-box > .button-text {
|
||||
|
@ -1 +1,3 @@
|
||||
%include ../../../../toolkit/themes/pinstripe/global/shared.inc
|
||||
|
||||
%define hudButton -moz-appearance: none; background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center; border: 3px solid; -moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4); -moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1); -moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15); -moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4); -moz-border-radius: 20px; color: #fff;
|
||||
|
@ -49,24 +49,19 @@
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:-moz-lwtheme),
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:not(:-moz-lwtheme) {
|
||||
.tabbrowser-tab:not(:-moz-lwtheme):not([selected="true"]),
|
||||
.tabs-newtab-button:not(:-moz-lwtheme) {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.4) 1px, rgba(255,255,255,.4));
|
||||
text-shadow: 0 1px 0 rgba(255,255,255,.4);
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not(:-moz-lwtheme):not([selected="true"]):hover,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:not(:-moz-lwtheme):hover {
|
||||
.tabs-newtab-button:not(:-moz-lwtheme):hover {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.6) 1px, rgba(255,255,255,.6));
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
white 1px, white);
|
||||
}
|
||||
|
||||
#allTabs-panel,
|
||||
#ctrlTab-panel {
|
||||
background: transparent;
|
||||
|
@ -306,6 +306,18 @@ toolbar[mode="full"] .toolbarbutton-menubutton-button {
|
||||
min-width: 57px;
|
||||
}
|
||||
|
||||
#TabsToolbar > .toolbarbutton-1,
|
||||
#TabsToolbar > toolbarpaletteitem > .toolbarbutton-1 {
|
||||
-moz-appearance: toolbarbutton;
|
||||
margin: 0;
|
||||
padding: 3px;
|
||||
border: none !important;
|
||||
color: inherit !important;
|
||||
background: transparent !important;
|
||||
text-shadow: inherit !important;
|
||||
-moz-box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* unified back/forward button */
|
||||
|
||||
#back-button {
|
||||
@ -955,10 +967,10 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
|
||||
/* Tabs */
|
||||
.tabbrowser-tab,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button {
|
||||
.tabs-newtab-button {
|
||||
-moz-appearance: none;
|
||||
background: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.15) 1px, rgba(255,255,255,.15));
|
||||
rgba(50%,50%,50%,.1) 1px, rgba(50%,50%,50%,.1));
|
||||
background-position: -6px 0;
|
||||
-moz-background-size: 200%;
|
||||
margin: 0;
|
||||
@ -968,40 +980,46 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
}
|
||||
|
||||
.tabbrowser-tab:hover,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:hover {
|
||||
.tabs-newtab-button:hover {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.4) 1px, rgba(255,255,255,.4));
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:-moz-lwtheme-brighttext {
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(40%,40%,40%,.6) 1px, rgba(40%,40%,40%,.6));
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:-moz-lwtheme-brighttext:hover {
|
||||
.tabs-newtab-button:-moz-lwtheme-brighttext:hover {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(60%,60%,60%,.6) 1px, rgba(60%,60%,60%,.6));
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:-moz-lwtheme-darktext {
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.4) 1px, rgba(255,255,255,.4));
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover,
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button:-moz-lwtheme-darktext:hover {
|
||||
.tabs-newtab-button:-moz-lwtheme-darktext:hover {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.6) 1px, rgba(255,255,255,.6));
|
||||
}
|
||||
|
||||
.tabbrowser-tab[selected="true"] {
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px,
|
||||
rgba(255,255,255,.4) 1px, rgba(255,255,255,.4)),
|
||||
background-image: -moz-linear-gradient(left, transparent, transparent 1px, white 1px, white);
|
||||
color: black;
|
||||
}
|
||||
|
||||
#navigator-toolbox[tabsontop="true"] > #TabsToolbar > #tabbrowser-tabs > .tabbrowser-tab[selected="true"] {
|
||||
background-image: -moz-radial-gradient(center top, white, rgba(255,255,255,0) 60%),
|
||||
-moz-linear-gradient(left, transparent, transparent 1px,
|
||||
-moz-dialog 1px, -moz-dialog);
|
||||
background-position: center center, -6px 0;
|
||||
color: -moz-dialogText;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:-moz-lwtheme[selected="true"] {
|
||||
@ -1101,14 +1119,18 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
}
|
||||
|
||||
/* Tab scrollbox arrow, tabstrip new tab and all-tabs buttons */
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-system-metric(touch-enabled),
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-system-metric(touch-enabled),
|
||||
.tabs-alltabs-button:-moz-system-metric(touch-enabled) {
|
||||
min-width: .81cm;
|
||||
}
|
||||
|
||||
.tabs-newtab-button:-moz-system-metric(touch-enabled) {
|
||||
min-width: 1cm;
|
||||
@media all and (-moz-touch-enabled) {
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up,
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-down,
|
||||
#TabsToolbar > toolbarbutton,
|
||||
#TabsToolbar > toolbarpaletteitem > toolbarbutton {
|
||||
min-width: .81cm;
|
||||
}
|
||||
|
||||
.tabs-newtab-button {
|
||||
min-width: 1cm;
|
||||
}
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .scrollbutton-up,
|
||||
@ -1156,44 +1178,53 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-left.png");
|
||||
}
|
||||
|
||||
.tabs-newtab-button {
|
||||
.tabs-newtab-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > #new-tab-button > .toolbarbutton-icon,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button > .toolbarbutton-icon,
|
||||
#alltabs-button > .toolbarbutton-icon {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.tabs-newtab-button,
|
||||
#TabsToolbar > #new-tab-button,
|
||||
#TabsToolbar > toolbarpaletteitem > #new-tab-button {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);
|
||||
-moz-image-region: rect(0, 16px, 18px, 0);
|
||||
}
|
||||
|
||||
.tabs-newtab-button {
|
||||
width: 31px;
|
||||
}
|
||||
|
||||
.tabs-newtab-button:hover:active {
|
||||
-moz-image-region: rect(0, 32px, 18px, 16px);
|
||||
}
|
||||
|
||||
.tabbrowser-arrowscrollbox > .tabs-newtab-button {
|
||||
width: 31px;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button > .toolbarbutton-icon {
|
||||
#alltabs-button {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png");
|
||||
-moz-image-region: rect(0, 14px, 17px, 0);
|
||||
}
|
||||
|
||||
.tabs-alltabs-button:hover:active > .toolbarbutton-icon {
|
||||
#alltabs-button:hover:active {
|
||||
-moz-image-region: rect(0, 28px, 17px, 14px);
|
||||
}
|
||||
|
||||
.tabs-alltabs-button[type="menu"] > .toolbarbutton-icon {
|
||||
#alltabs-button[type="menu"] {
|
||||
list-style-image: url("chrome://browser/skin/mainwindow-dropdown-arrow.png");
|
||||
margin: 3px 0;
|
||||
-moz-image-region: rect(0, 13px, 11px, 0);
|
||||
}
|
||||
|
||||
.tabs-alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker {
|
||||
#alltabs-button[type="menu"] > .toolbarbutton-icon {
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabs-alltabs-button[type="menu"]:hover:active > .toolbarbutton-icon,
|
||||
.tabs-alltabs-button[type="menu"][open="true"] > .toolbarbutton-icon {
|
||||
#alltabs-button[type="menu"]:hover:active,
|
||||
#alltabs-button[type="menu"][open="true"] {
|
||||
-moz-image-region: rect(0, 26px, 11px, 13px);
|
||||
}
|
||||
|
||||
@ -1235,11 +1266,6 @@ richlistitem[type="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-i
|
||||
-moz-image-region: rect(0px, 42px, 14px, 28px);
|
||||
}
|
||||
|
||||
.tabbrowser-tabs > .tabs-closebutton {
|
||||
margin: 0;
|
||||
padding: 4px 2px 2px;
|
||||
}
|
||||
|
||||
#sidebar-header > .tabs-closebutton {
|
||||
list-style-image: url("chrome://global/skin/icons/closeSidebar.png");
|
||||
}
|
||||
|
@ -363,6 +363,8 @@ INTEL_CXX = @INTEL_CXX@
|
||||
|
||||
STL_FLAGS = @STL_FLAGS@
|
||||
WRAP_STL_INCLUDES = @WRAP_STL_INCLUDES@
|
||||
MOZ_MSVC_STL_WRAP__Throw= @MOZ_MSVC_STL_WRAP__Throw@
|
||||
MOZ_MSVC_STL_WRAP__RAISE= @MOZ_MSVC_STL_WRAP__RAISE@
|
||||
|
||||
HOST_CC = @HOST_CC@
|
||||
HOST_CXX = @HOST_CXX@
|
||||
|
@ -20,6 +20,7 @@ new
|
||||
algorithm
|
||||
deque
|
||||
iostream
|
||||
limits
|
||||
list
|
||||
map
|
||||
memory
|
||||
|
96
configure.in
96
configure.in
@ -713,28 +713,56 @@ EOF
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
if test "$ac_cv_have_std__Throw" = "no"; then
|
||||
AC_MSG_ERROR([Your MSVC/SDK doesn't export std::_Throw. This breaks assumptions in Gecko. Please file a bug describing this error along with your build configuration.])
|
||||
if test "$ac_cv_have_std__Throw" == "yes"; then
|
||||
AC_CACHE_CHECK(for |class __declspec(dllimport) exception| bug,
|
||||
ac_cv_have_dllimport_exception_bug,
|
||||
[
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
_SAVE_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
|
||||
AC_TRY_LINK([#include <vector>],
|
||||
[std::vector<int> v; return v.at(1);],
|
||||
ac_cv_have_dllimport_exception_bug="no",
|
||||
ac_cv_have_dllimport_exception_bug="yes")
|
||||
CXXFLAGS="$_SAVE_CXXFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_have_dllimport_exception_bug" = "no"; then
|
||||
WRAP_STL_INCLUDES=1
|
||||
MOZ_MSVC_STL_WRAP__Throw=1
|
||||
AC_DEFINE(MOZ_MSVC_STL_WRAP__Throw)
|
||||
fi
|
||||
else
|
||||
AC_CACHE_CHECK(for overridable _RAISE,
|
||||
ac_cv_have__RAISE,
|
||||
[
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
_SAVE_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
|
||||
AC_TRY_COMPILE([#include <xstddef>
|
||||
#undef _RAISE
|
||||
#define _RAISE(x) externallyDefinedFunction((x).what())
|
||||
#include <vector>
|
||||
],
|
||||
[std::vector<int> v; return v.at(1);],
|
||||
ac_cv_have__RAISE="no",
|
||||
ac_cv_have__RAISE="yes")
|
||||
CXXFLAGS="$_SAVE_CXXFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_have__RAISE" = "yes"; then
|
||||
WRAP_STL_INCLUDES=1
|
||||
MOZ_MSVC_STL_WRAP__RAISE=1
|
||||
AC_DEFINE(MOZ_MSVC_STL_WRAP__RAISE)
|
||||
else
|
||||
AC_MSG_ERROR([Gecko exception wrapping doesn't understand your your MSVC/SDK. Please file a bug describing this error and your build configuration.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for |class __declspec(dllimport) exception| bug,
|
||||
ac_cv_have_dllimport_exception_bug,
|
||||
[
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
_SAVE_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
|
||||
AC_TRY_LINK([#include <vector>],
|
||||
[std::vector<int> v; return v.at(1);],
|
||||
ac_cv_have_dllimport_exception_bug="no",
|
||||
ac_cv_have_dllimport_exception_bug="yes")
|
||||
CXXFLAGS="$_SAVE_CXXFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
if test "$ac_cv_have_dllimport_exception_bug" = "no"; then
|
||||
if test "$WRAP_STL_INCLUDES" = "1"; then
|
||||
STL_FLAGS='-D_HAS_EXCEPTIONS=0 -I$(DIST)/stl_wrappers'
|
||||
WRAP_STL_INCLUDES=1
|
||||
fi
|
||||
else
|
||||
# Check w32api version
|
||||
@ -846,6 +874,8 @@ AC_SUBST(INTEL_CXX)
|
||||
|
||||
AC_SUBST(STL_FLAGS)
|
||||
AC_SUBST(WRAP_STL_INCLUDES)
|
||||
AC_SUBST(MOZ_MSVC_STL_WRAP__Throw)
|
||||
AC_SUBST(MOZ_MSVC_STL_WRAP__RAISE)
|
||||
|
||||
dnl ========================================================
|
||||
dnl Checks for programs.
|
||||
@ -1973,6 +2003,26 @@ case "$target" in
|
||||
# fi
|
||||
;;
|
||||
|
||||
ia64*-hpux*)
|
||||
DLL_SUFFIX=".so"
|
||||
if test ! "$GNU_CC"; then
|
||||
DSO_LDOPTS='-b'
|
||||
DSO_CFLAGS=""
|
||||
DSO_PIC_CFLAGS=
|
||||
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
|
||||
else
|
||||
DSO_LDOPTS='-b -E'
|
||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
|
||||
MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
|
||||
fi
|
||||
MOZ_FIX_LINK_PATHS=
|
||||
SYSTEM_MAKEDEPEND=
|
||||
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
|
||||
AC_DEFINE(_LARGEFILE64_SOURCE)
|
||||
;;
|
||||
|
||||
*-hpux*)
|
||||
DLL_SUFFIX=".sl"
|
||||
if test ! "$GNU_CC"; then
|
||||
@ -6568,6 +6618,14 @@ fi
|
||||
|
||||
AC_SUBST(MOZ_NATIVE_SQLITE)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable help viewer (off by default)
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_HELP_VIEWER"; then
|
||||
dnl Do this if defined in confvars.sh
|
||||
AC_DEFINE(MOZ_HELP_VIEWER)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable safe browsing (anti-phishing)
|
||||
dnl ========================================================
|
||||
|
17
content/base/crashtests/558973.html
Normal file
17
content/base/crashtests/558973.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
|
||||
var child = document.createTextNode("a");
|
||||
|
||||
var attr = document.createAttribute("a");
|
||||
try {
|
||||
attr.appendChild(child);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
@ -61,3 +61,4 @@ load 490760-1.xhtml
|
||||
load 494810-1.html
|
||||
load 529670.html
|
||||
load 554230-1.xhtml
|
||||
load 558973.html
|
||||
|
@ -53,6 +53,7 @@ nsIContentIterator.h \
|
||||
nsContentErrors.h \
|
||||
nsContentPolicyUtils.h \
|
||||
nsContentUtils.h \
|
||||
nsIContentUtils.h \
|
||||
nsIDocument.h \
|
||||
nsIDocumentObserver.h \
|
||||
nsIMutationObserver.h \
|
||||
|
@ -583,8 +583,10 @@ public:
|
||||
static void UnregisterPrefCallback(const char *aPref,
|
||||
PrefChangedFunc aCallback,
|
||||
void * aClosure);
|
||||
static void AddBoolPrefVarCache(const char* aPref, PRBool* aVariable);
|
||||
static void AddIntPrefVarCache(const char* aPref, PRInt32* aVariable);
|
||||
static void AddBoolPrefVarCache(const char* aPref, PRBool* aVariable,
|
||||
PRBool aDefault = PR_FALSE);
|
||||
static void AddIntPrefVarCache(const char* aPref, PRInt32* aVariable,
|
||||
PRInt32 aDefault = 0);
|
||||
static nsIPrefBranch2 *GetPrefBranch()
|
||||
{
|
||||
return sPrefBranch;
|
||||
|
56
content/base/public/nsIContentUtils.h
Normal file
56
content/base/public/nsIContentUtils.h
Normal file
@ -0,0 +1,56 @@
|
||||
/* -*- 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 Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* 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 ***** */
|
||||
#ifndef nsIContentUtils_h__
|
||||
#define nsIContentUtils_h__
|
||||
|
||||
// C4EA618E-A3D9-4524-8EEA-E92F26FC44DB
|
||||
#define NS_ICONTENTUTILS_IID \
|
||||
{ 0xC4EA618E, 0xA3D9, 0x4524, \
|
||||
{ 0x8E, 0xEA, 0xE9, 0x2F, 0x26, 0xFC, 0x44, 0xDB } }
|
||||
|
||||
class nsIContentUtils : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTUTILS_IID)
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
virtual PRBool IsSafeToRunScript();
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentUtils, NS_ICONTENTUTILS_IID)
|
||||
|
||||
#endif /* nsIContentUtils_h__ */
|
@ -58,6 +58,7 @@
|
||||
#include "nsIObserver.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#ifdef MOZ_SMIL
|
||||
#include "nsSMILAnimationController.h"
|
||||
#endif // MOZ_SMIL
|
||||
@ -72,7 +73,6 @@ class nsIStyleRule;
|
||||
class nsICSSStyleSheet;
|
||||
class nsIViewManager;
|
||||
class nsIScriptGlobalObject;
|
||||
class nsPIDOMWindow;
|
||||
class nsIDOMEvent;
|
||||
class nsIDOMEventTarget;
|
||||
class nsIDeviceContext;
|
||||
@ -115,8 +115,8 @@ class Link;
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0x4a0c9bfa, 0xef60, 0x4bb2, \
|
||||
{ 0x87, 0x5e, 0xac, 0xdb, 0xe8, 0xfe, 0xa1, 0xb5 } }
|
||||
{ 0x56d981ce, 0x7f03, 0x4d90, \
|
||||
{ 0xb2, 0x40, 0x72, 0x08, 0xb6, 0x28, 0x73, 0x06 } }
|
||||
|
||||
// Flag for AddStyleSheet().
|
||||
#define NS_STYLESHEET_FROM_CATALOG (1 << 0)
|
||||
@ -633,7 +633,10 @@ public:
|
||||
/**
|
||||
* Return the window containing the document (the outer window).
|
||||
*/
|
||||
virtual nsPIDOMWindow *GetWindow() = 0;
|
||||
nsPIDOMWindow *GetWindow()
|
||||
{
|
||||
return mWindow ? mWindow->GetOuterWindow() : GetWindowInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the inner window used as the script compilation scope for
|
||||
@ -1348,6 +1351,9 @@ protected:
|
||||
|
||||
nsPropertyTable* GetExtraPropertyTable(PRUint16 aCategory);
|
||||
|
||||
// Never ever call this. Only call GetWindow!
|
||||
virtual nsPIDOMWindow *GetWindowInternal() = 0;
|
||||
|
||||
// Never ever call this. Only call GetInnerWindow!
|
||||
virtual nsPIDOMWindow *GetInnerWindowInternal() = 0;
|
||||
|
||||
|
@ -420,6 +420,10 @@ public:
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (IsNodeOfType(eDATA_NODE)) {
|
||||
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
|
||||
}
|
||||
|
||||
PRInt32 index = IndexOf(aOldChild);
|
||||
if (index == -1) {
|
||||
// aOldChild isn't one of our children.
|
||||
|
@ -47,10 +47,10 @@ interface nsIDOMRange;
|
||||
* of nodes within the document.
|
||||
*
|
||||
* @status FROZEN
|
||||
* @version 1.0
|
||||
* @version 1.1
|
||||
*/
|
||||
|
||||
[scriptable, uuid(B2C7ED59-8634-4352-9E37-5484C8B6E4E1)]
|
||||
[scriptable, uuid(24bb8c1c-407c-4a97-b652-af767d847716)]
|
||||
interface nsISelection : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -155,6 +155,27 @@ interface nsISelection : nsISupports
|
||||
*/
|
||||
void deleteFromDocument();
|
||||
|
||||
/**
|
||||
* Modifies the selection. Note that the parameters are case-insensitive.
|
||||
*
|
||||
* @param alter can be one of { "move", "extend" }
|
||||
* - "move" collapses the selection to the end of the selection and
|
||||
* applies the movement direction/granularity to the collapsed
|
||||
* selection.
|
||||
* - "extend" leaves the start of the selection unchanged, and applies
|
||||
* movement direction/granularity to the end of the selection.
|
||||
* @param direction can be one of { "forward", "backward", "left", "right" }
|
||||
* @param granularity can be one of { "character", "word",
|
||||
* "line", "lineboundary" }
|
||||
*
|
||||
* @returns NS_ERROR_NOT_IMPLEMENTED if the granularity is "sentence",
|
||||
* "sentenceboundary", "paragraph", "paragraphboundary", or
|
||||
* "documentboundary". Returns NS_ERROR_INVALID_ARG if alter, direction,
|
||||
* or granularity has an unrecognized value.
|
||||
*/
|
||||
void modify(in DOMString alter, in DOMString direction,
|
||||
in DOMString granularity);
|
||||
|
||||
/**
|
||||
* Modifies the cursor Bidi level after a change in keyboard direction
|
||||
* @param langRTL is PR_TRUE if the new language is right-to-left or
|
||||
|
@ -97,6 +97,7 @@ CPPSRCS = \
|
||||
nsDOMParser.cpp \
|
||||
nsDOMSerializer.cpp \
|
||||
nsDOMTokenList.cpp \
|
||||
nsDOMSettableTokenList.cpp \
|
||||
nsDocument.cpp \
|
||||
nsDocumentEncoder.cpp \
|
||||
nsDocumentFragment.cpp \
|
||||
|
@ -388,24 +388,7 @@ nsAttrValue::ToString(nsAString& aResult) const
|
||||
#endif
|
||||
case eEnum:
|
||||
{
|
||||
PRInt16 val = GetEnumValue();
|
||||
PRUint32 allEnumBits =
|
||||
cont ? cont->mEnumValue : static_cast<PRUint32>(GetIntInternal());
|
||||
const EnumTable* table = sEnumTableArray->
|
||||
ElementAt(allEnumBits & NS_ATTRVALUE_ENUMTABLEINDEX_MASK);
|
||||
while (table->tag) {
|
||||
if (table->value == val) {
|
||||
aResult.AssignASCII(table->tag);
|
||||
if (allEnumBits & NS_ATTRVALUE_ENUMTABLE_VALUE_NEEDS_TO_UPPER) {
|
||||
ToUpperCase(aResult);
|
||||
}
|
||||
return;
|
||||
}
|
||||
table++;
|
||||
}
|
||||
|
||||
NS_NOTREACHED("couldn't find value in EnumTable");
|
||||
|
||||
GetEnumString(aResult, PR_FALSE);
|
||||
break;
|
||||
}
|
||||
case ePercent:
|
||||
@ -470,6 +453,32 @@ nsAttrValue::GetColorValue(nscolor& aColor) const
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nsAttrValue::GetEnumString(nsAString& aResult, PRBool aRealTag) const
|
||||
{
|
||||
NS_PRECONDITION(Type() == eEnum, "wrong type");
|
||||
|
||||
PRUint32 allEnumBits =
|
||||
(BaseType() == eIntegerBase) ? static_cast<PRUint32>(GetIntInternal())
|
||||
: GetMiscContainer()->mEnumValue;
|
||||
PRInt16 val = allEnumBits >> NS_ATTRVALUE_ENUMTABLEINDEX_BITS;
|
||||
const EnumTable* table = sEnumTableArray->
|
||||
ElementAt(allEnumBits & NS_ATTRVALUE_ENUMTABLEINDEX_MASK);
|
||||
|
||||
while (table->tag) {
|
||||
if (table->value == val) {
|
||||
aResult.AssignASCII(table->tag);
|
||||
if (!aRealTag && allEnumBits & NS_ATTRVALUE_ENUMTABLE_VALUE_NEEDS_TO_UPPER) {
|
||||
ToUpperCase(aResult);
|
||||
}
|
||||
return;
|
||||
}
|
||||
table++;
|
||||
}
|
||||
|
||||
NS_NOTREACHED("couldn't find value in EnumTable");
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsAttrValue::GetAtomCount() const
|
||||
{
|
||||
@ -957,47 +966,59 @@ nsAttrValue::SetIntValueAndType(PRInt32 aValue, ValueType aType,
|
||||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAttrValue::GetEnumTableIndex(const EnumTable* aTable, PRInt16& aResult)
|
||||
{
|
||||
PRInt16 index = sEnumTableArray->IndexOf(aTable);
|
||||
if (index < 0) {
|
||||
index = sEnumTableArray->Length();
|
||||
NS_ASSERTION(index <= NS_ATTRVALUE_ENUMTABLEINDEX_MAXVALUE,
|
||||
"too many enum tables");
|
||||
if (!sEnumTableArray->AppendElement(aTable)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
aResult = index;
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAttrValue::ParseEnumValue(const nsAString& aValue,
|
||||
const EnumTable* aTable,
|
||||
PRBool aCaseSensitive)
|
||||
{
|
||||
ResetIfSet();
|
||||
const EnumTable* tableEntry = aTable;
|
||||
|
||||
while (aTable->tag) {
|
||||
if (aCaseSensitive ? aValue.EqualsASCII(aTable->tag) :
|
||||
aValue.LowerCaseEqualsASCII(aTable->tag)) {
|
||||
|
||||
// Find index of EnumTable
|
||||
PRInt16 index = sEnumTableArray->IndexOf(aTable);
|
||||
if (index < 0) {
|
||||
index = sEnumTableArray->Length();
|
||||
NS_ASSERTION(index <= NS_ATTRVALUE_ENUMTABLEINDEX_MAXVALUE,
|
||||
"too many enum tables");
|
||||
if (!sEnumTableArray->AppendElement(aTable)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
while (tableEntry->tag) {
|
||||
if (aCaseSensitive ? aValue.EqualsASCII(tableEntry->tag) :
|
||||
aValue.LowerCaseEqualsASCII(tableEntry->tag)) {
|
||||
PRInt16 index;
|
||||
if (!GetEnumTableIndex(aTable, index)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRInt32 value = (aTable->value << NS_ATTRVALUE_ENUMTABLEINDEX_BITS) +
|
||||
PRInt32 value = (tableEntry->value << NS_ATTRVALUE_ENUMTABLEINDEX_BITS) +
|
||||
index;
|
||||
|
||||
PRBool equals = aCaseSensitive || aValue.EqualsASCII(aTable->tag);
|
||||
PRBool equals = aCaseSensitive || aValue.EqualsASCII(tableEntry->tag);
|
||||
if (!equals) {
|
||||
nsAutoString tag;
|
||||
tag.AssignASCII(aTable->tag);
|
||||
tag.AssignASCII(tableEntry->tag);
|
||||
ToUpperCase(tag);
|
||||
if ((equals = tag.Equals(aValue))) {
|
||||
value |= NS_ATTRVALUE_ENUMTABLE_VALUE_NEEDS_TO_UPPER;
|
||||
}
|
||||
}
|
||||
SetIntValueAndType(value, eEnum, equals ? nsnull : &aValue);
|
||||
NS_ASSERTION(GetEnumValue() == aTable->value,
|
||||
NS_ASSERTION(GetEnumValue() == tableEntry->value,
|
||||
"failed to store enum properly");
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
aTable++;
|
||||
tableEntry++;
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user