mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
Merge from mozilla-central to jsdbg2.
This commit is contained in:
commit
993a33736b
@ -67,6 +67,8 @@
|
||||
#include "nsMaiInterfaceDocument.h"
|
||||
#include "nsMaiInterfaceImage.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
nsAccessibleWrap::EAvailableAtkSignals nsAccessibleWrap::gAvailableAtkSignals =
|
||||
eUnknown;
|
||||
|
||||
@ -826,21 +828,20 @@ getAttributesCB(AtkObject *aAtkObj)
|
||||
AtkObject *
|
||||
getParentCB(AtkObject *aAtkObj)
|
||||
{
|
||||
if (!aAtkObj->accessible_parent) {
|
||||
nsAccessibleWrap *accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (!accWrap) {
|
||||
return nsnull;
|
||||
}
|
||||
if (!aAtkObj->accessible_parent) {
|
||||
nsAccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (!accWrap)
|
||||
return nsnull;
|
||||
|
||||
nsAccessible* accParent = accWrap->GetParent();
|
||||
if (!accParent)
|
||||
return nsnull;
|
||||
nsAccessible* accParent = accWrap->Parent();
|
||||
if (!accParent)
|
||||
return nsnull;
|
||||
|
||||
AtkObject *parent = nsAccessibleWrap::GetAtkObject(accParent);
|
||||
if (parent)
|
||||
atk_object_set_parent(aAtkObj, parent);
|
||||
}
|
||||
return aAtkObj->accessible_parent;
|
||||
AtkObject* parent = nsAccessibleWrap::GetAtkObject(accParent);
|
||||
if (parent)
|
||||
atk_object_set_parent(aAtkObj, parent);
|
||||
}
|
||||
return aAtkObj->accessible_parent;
|
||||
}
|
||||
|
||||
gint
|
||||
@ -893,10 +894,9 @@ getIndexInParentCB(AtkObject *aAtkObj)
|
||||
return -1;
|
||||
}
|
||||
|
||||
nsAccessible *parent = accWrap->GetParent();
|
||||
if (!parent) {
|
||||
nsAccessible* parent = accWrap->Parent();
|
||||
if (!parent)
|
||||
return -1; // No parent
|
||||
}
|
||||
|
||||
return parent->GetIndexOfEmbeddedChild(accWrap);
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
|
||||
if (!keyBinding.IsEmpty()) {
|
||||
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
|
||||
|
||||
nsAccessible* parent = acc->GetParent();
|
||||
nsAccessible* parent = acc->Parent();
|
||||
PRUint32 role = parent ? parent->Role() : 0;
|
||||
if (role == nsIAccessibleRole::ROLE_PARENT_MENUITEM ||
|
||||
role == nsIAccessibleRole::ROLE_MENUITEM ||
|
||||
@ -141,7 +141,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
|
||||
|
||||
keysInHierarchyStr.Insert(str, 0);
|
||||
}
|
||||
} while ((parent = parent->GetParent()) &&
|
||||
} while ((parent = parent->Parent()) &&
|
||||
parent->Role() != nsIAccessibleRole::ROLE_MENUBAR);
|
||||
|
||||
keyBindingsStr.Append(';');
|
||||
|
@ -312,7 +312,7 @@ AccHideEvent::
|
||||
AccHideEvent(nsAccessible* aTarget, nsINode* aTargetNode) :
|
||||
AccMutationEvent(::nsIAccessibleEvent::EVENT_HIDE, aTarget, aTargetNode)
|
||||
{
|
||||
mParent = mAccessible->GetParent();
|
||||
mParent = mAccessible->Parent();
|
||||
mNextSibling = mAccessible->NextSibling();
|
||||
mPrevSibling = mAccessible->PrevSibling();
|
||||
}
|
||||
|
@ -39,11 +39,13 @@
|
||||
|
||||
#include "States.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
AccGroupInfo::AccGroupInfo(nsAccessible* aItem, PRUint32 aRole) :
|
||||
mPosInSet(0), mSetSize(0), mParent(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(AccGroupInfo);
|
||||
nsAccessible* parent = aItem->GetParent();
|
||||
nsAccessible* parent = aItem->Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
|
@ -87,7 +87,12 @@ EXPORTS = \
|
||||
nsAccessible.h \
|
||||
nsAccessNode.h \
|
||||
nsARIAMap.h \
|
||||
States.h \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS_NAMESPACES = mozilla/a11y
|
||||
|
||||
EXPORTS_mozilla/a11y = \
|
||||
States.h \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
|
@ -374,8 +374,8 @@ NotificationController::CoalesceEvents()
|
||||
return;
|
||||
}
|
||||
} else if (tailEvent->mEventType == nsIAccessibleEvent::EVENT_SHOW) {
|
||||
if (thisEvent->mAccessible->GetParent() ==
|
||||
tailEvent->mAccessible->GetParent()) {
|
||||
if (thisEvent->mAccessible->Parent() ==
|
||||
tailEvent->mAccessible->Parent()) {
|
||||
tailEvent->mEventRule = thisEvent->mEventRule;
|
||||
|
||||
// Coalesce text change events for show events.
|
||||
|
@ -42,6 +42,8 @@
|
||||
|
||||
#include <prtypes.h>
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
namespace states {
|
||||
|
||||
/**
|
||||
@ -303,7 +305,9 @@ namespace states {
|
||||
* @see EXPANDED and COLLAPSED states.
|
||||
*/
|
||||
const PRUint64 EXPANDABLE = ((PRUint64) 0x1) << 46;
|
||||
}
|
||||
} // namespace states
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -69,11 +69,9 @@ void
|
||||
TextUpdater::DoUpdate(const nsAString& aNewText, const nsAString& aOldText,
|
||||
PRUint32 aSkipStart)
|
||||
{
|
||||
nsAccessible* parent = mTextLeaf->GetParent();
|
||||
if (!parent) {
|
||||
NS_ERROR("No parent for text leaf!");
|
||||
nsAccessible* parent = mTextLeaf->Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
}
|
||||
|
||||
mHyperText = parent->AsHyperText();
|
||||
if (!mHyperText) {
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include "nsAccUtils.h"
|
||||
#include "States.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
bool
|
||||
filters::GetSelected(nsAccessible* aAccessible)
|
||||
{
|
||||
|
@ -45,6 +45,8 @@
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsARIAGridAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -830,7 +832,7 @@ nsARIAGridAccessible::SetARIASelected(nsAccessible *aAccessible,
|
||||
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
|
||||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
|
||||
role == nsIAccessibleRole::ROLE_COLUMNHEADER) {
|
||||
nsAccessible *row = aAccessible->GetParent();
|
||||
nsAccessible* row = aAccessible->Parent();
|
||||
|
||||
if (row && row->Role() == nsIAccessibleRole::ROLE_ROW &&
|
||||
nsAccUtils::IsARIASelected(row)) {
|
||||
@ -949,11 +951,11 @@ nsARIAGridCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
||||
NS_ENSURE_ARG_POINTER(aTable);
|
||||
*aTable = nsnull;
|
||||
|
||||
nsAccessible* thisRow = GetParent();
|
||||
nsAccessible* thisRow = Parent();
|
||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = thisRow->GetParent();
|
||||
nsAccessible* table = thisRow->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
@ -975,7 +977,7 @@ nsARIAGridCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
@ -1003,11 +1005,11 @@ nsARIAGridCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = row->GetParent();
|
||||
nsAccessible* table = row->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
@ -1096,7 +1098,7 @@ nsARIAGridCellAccessible::IsSelected(PRBool *aIsSelected)
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible *row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
@ -1120,7 +1122,7 @@ nsARIAGridCellAccessible::ApplyARIAState(PRUint64* aState)
|
||||
return;
|
||||
|
||||
// Check aria-selected="true" on the row.
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return;
|
||||
|
||||
@ -1144,7 +1146,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
|
||||
|
||||
// Expose "table-cell-index" attribute.
|
||||
|
||||
nsAccessible* thisRow = GetParent();
|
||||
nsAccessible* thisRow = Parent();
|
||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
@ -1162,7 +1164,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
|
||||
colCount++;
|
||||
}
|
||||
|
||||
nsAccessible* table = thisRow->GetParent();
|
||||
nsAccessible* table = thisRow->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -45,6 +45,8 @@
|
||||
#include "nsAccessibilityAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
/**
|
||||
* This list of WAI-defined roles are currently hardcoded.
|
||||
* Eventually we will most likely be loading an RDF resource that contains this information
|
||||
|
@ -57,6 +57,8 @@
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccDocManager
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -57,6 +57,8 @@
|
||||
#include "nsWhitespaceTokenizer.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
void
|
||||
nsAccUtils::GetAccAttr(nsIPersistentProperties *aAttributes,
|
||||
nsIAtom *aAttrName, nsAString& aAttrValue)
|
||||
@ -108,7 +110,7 @@ nsAccUtils::GetDefaultLevel(nsAccessible *aAccessible)
|
||||
return 1;
|
||||
|
||||
if (role == nsIAccessibleRole::ROLE_ROW) {
|
||||
nsAccessible *parent = aAccessible->GetParent();
|
||||
nsAccessible* parent = aAccessible->Parent();
|
||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
||||
// It is a row inside flatten treegrid. Group level is always 1 until it
|
||||
// is overriden by aria-level attribute.
|
||||
@ -338,7 +340,7 @@ nsAccUtils::GetAncestorWithRole(nsAccessible *aDescendant, PRUint32 aRole)
|
||||
{
|
||||
nsAccessible *document = aDescendant->GetDocAccessible();
|
||||
nsAccessible *parent = aDescendant;
|
||||
while ((parent = parent->GetParent())) {
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 testRole = parent->Role();
|
||||
if (testRole == aRole)
|
||||
return parent;
|
||||
@ -359,7 +361,7 @@ nsAccUtils::GetSelectableContainer(nsAccessible* aAccessible, PRUint64 aState)
|
||||
return nsnull;
|
||||
|
||||
nsAccessible* parent = aAccessible;
|
||||
while ((parent = parent->GetParent()) && !parent->IsSelect()) {
|
||||
while ((parent = parent->Parent()) && !parent->IsSelect()) {
|
||||
if (Role(parent) == nsIAccessibleRole::ROLE_PANE)
|
||||
return nsnull;
|
||||
}
|
||||
@ -420,7 +422,7 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
|
||||
if (textAcc)
|
||||
return textAcc;
|
||||
|
||||
} while (accessible = accessible->GetParent());
|
||||
} while (accessible = accessible->Parent());
|
||||
|
||||
NS_NOTREACHED("We must reach document accessible implementing nsIAccessibleText!");
|
||||
return nsnull;
|
||||
|
@ -108,6 +108,8 @@
|
||||
#include "mozilla/FunctionTimer.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessibilityService
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -108,6 +108,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -421,8 +422,10 @@ NS_IMETHODIMP
|
||||
nsAccessible::GetParent(nsIAccessible **aParent)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_IF_ADDREF(*aParent = GetParent());
|
||||
NS_IF_ADDREF(*aParent = Parent());
|
||||
return *aParent ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@ -721,22 +724,33 @@ nsAccessible::NativeState()
|
||||
|
||||
/* readonly attribute boolean focusedChild; */
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
{
|
||||
nsAccessible *focusedChild = nsnull;
|
||||
if (gLastFocusedNode == mContent) {
|
||||
focusedChild = this;
|
||||
}
|
||||
else if (gLastFocusedNode) {
|
||||
focusedChild = GetAccService()->GetAccessible(gLastFocusedNode);
|
||||
if (focusedChild && focusedChild->GetParent() != this)
|
||||
focusedChild = nsnull;
|
||||
}
|
||||
nsAccessible::GetFocusedChild(nsIAccessible** aChild)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aChild);
|
||||
*aChild = nsnull;
|
||||
|
||||
NS_IF_ADDREF(*aFocusedChild = focusedChild);
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_IF_ADDREF(*aChild = FocusedChild());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAccessible*
|
||||
nsAccessible::FocusedChild()
|
||||
{
|
||||
if (!gLastFocusedNode)
|
||||
return nsnull;
|
||||
if (gLastFocusedNode == mContent)
|
||||
return this;
|
||||
|
||||
nsAccessible* focusedChild = GetDocAccessible()->GetAccessible(gLastFocusedNode);
|
||||
if (!focusedChild || focusedChild->Parent() != this)
|
||||
return nsnull;
|
||||
|
||||
return focusedChild;
|
||||
}
|
||||
|
||||
// nsAccessible::ChildAtPoint()
|
||||
nsAccessible*
|
||||
nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
||||
@ -819,7 +833,7 @@ nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
||||
// ensure obtained accessible is a child of this accessible.
|
||||
nsAccessible* child = accessible;
|
||||
while (true) {
|
||||
nsAccessible* parent = child->GetParent();
|
||||
nsAccessible* parent = child->Parent();
|
||||
if (!parent) {
|
||||
// Reached the top of the hierarchy. These bounds were inside an
|
||||
// accessible that is not a descendant of this one.
|
||||
@ -2140,9 +2154,8 @@ nsAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
nsIView *view = frame->GetViewExternal();
|
||||
if (view) {
|
||||
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
||||
if (scrollFrame || view->GetWidget() || !frame->GetParent()) {
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
||||
}
|
||||
if (scrollFrame || view->GetWidget() || !frame->GetParent())
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, Parent());
|
||||
}
|
||||
}
|
||||
|
||||
@ -2615,7 +2628,7 @@ nsAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset,
|
||||
|
||||
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
|
||||
aText += kForcedNewLineChar;
|
||||
} else if (nsAccUtils::MustPrune(GetParent())) {
|
||||
} else if (nsAccUtils::MustPrune(Parent())) {
|
||||
// Expose the embedded object accessible as imaginary embedded object
|
||||
// character if its parent hypertext accessible doesn't expose children to
|
||||
// AT.
|
||||
@ -3257,16 +3270,18 @@ nsAccessible::GetLevelInternal()
|
||||
{
|
||||
PRInt32 level = nsAccUtils::GetDefaultLevel(this);
|
||||
|
||||
PRUint32 role = Role();
|
||||
nsAccessible* parent = GetParent();
|
||||
if (!IsBoundToParent())
|
||||
return level;
|
||||
|
||||
PRUint32 role = Role();
|
||||
if (role == nsIAccessibleRole::ROLE_OUTLINEITEM) {
|
||||
// Always expose 'level' attribute for 'outlineitem' accessible. The number
|
||||
// of nested 'grouping' accessibles containing 'outlineitem' accessible is
|
||||
// its level.
|
||||
level = 1;
|
||||
|
||||
while (parent) {
|
||||
nsAccessible* parent = this;
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 parentRole = parent->Role();
|
||||
|
||||
if (parentRole == nsIAccessibleRole::ROLE_OUTLINE)
|
||||
@ -3274,7 +3289,6 @@ nsAccessible::GetLevelInternal()
|
||||
if (parentRole == nsIAccessibleRole::ROLE_GROUPING)
|
||||
++ level;
|
||||
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
} else if (role == nsIAccessibleRole::ROLE_LISTITEM) {
|
||||
@ -3285,8 +3299,8 @@ nsAccessible::GetLevelInternal()
|
||||
|
||||
// Calculate 'level' attribute based on number of parent listitems.
|
||||
level = 0;
|
||||
|
||||
while (parent) {
|
||||
nsAccessible* parent = this;
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 parentRole = parent->Role();
|
||||
|
||||
if (parentRole == nsIAccessibleRole::ROLE_LISTITEM)
|
||||
@ -3294,23 +3308,20 @@ nsAccessible::GetLevelInternal()
|
||||
else if (parentRole != nsIAccessibleRole::ROLE_LIST)
|
||||
break;
|
||||
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
if (level == 0) {
|
||||
// If this listitem is on top of nested lists then expose 'level'
|
||||
// attribute.
|
||||
nsAccessible* parent(GetParent());
|
||||
parent = Parent();
|
||||
PRInt32 siblingCount = parent->GetChildCount();
|
||||
for (PRInt32 siblingIdx = 0; siblingIdx < siblingCount; siblingIdx++) {
|
||||
nsAccessible* sibling = parent->GetChildAt(siblingIdx);
|
||||
|
||||
nsCOMPtr<nsIAccessible> siblingChild;
|
||||
sibling->GetLastChild(getter_AddRefs(siblingChild));
|
||||
if (nsAccUtils::Role(siblingChild) == nsIAccessibleRole::ROLE_LIST) {
|
||||
level = 1;
|
||||
break;
|
||||
}
|
||||
nsAccessible* siblingChild = sibling->LastChild();
|
||||
if (siblingChild &&
|
||||
siblingChild->Role() == nsIAccessibleRole::ROLE_LIST)
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
++ level; // level is 1-index based
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define _nsAccessible_H_
|
||||
|
||||
#include "nsAccessNodeWrap.h"
|
||||
#include "States.h"
|
||||
#include "mozilla/a11y/States.h"
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIAccessibleHyperLink.h"
|
||||
@ -217,6 +217,11 @@ public:
|
||||
virtual nsAccessible* ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
||||
EWhichChildAtPoint aWhichChild);
|
||||
|
||||
/**
|
||||
* Return the focused child if any.
|
||||
*/
|
||||
virtual nsAccessible* FocusedChild();
|
||||
|
||||
/**
|
||||
* Return calculated group level based on accessible hierarchy.
|
||||
*/
|
||||
@ -279,7 +284,7 @@ public:
|
||||
/**
|
||||
* Return parent accessible.
|
||||
*/
|
||||
nsAccessible* GetParent() const { return mParent; }
|
||||
nsAccessible* Parent() const { return mParent; }
|
||||
|
||||
/**
|
||||
* Return child accessible at the given index.
|
||||
@ -307,12 +312,20 @@ public:
|
||||
PRBool HasChildren() { return !!GetChildAt(0); }
|
||||
|
||||
/**
|
||||
* Return next/previous sibling of the accessible.
|
||||
* Return first/last/next/previous sibling of the accessible.
|
||||
*/
|
||||
inline nsAccessible* NextSibling() const
|
||||
{ return GetSiblingAtOffset(1); }
|
||||
inline nsAccessible* PrevSibling() const
|
||||
{ return GetSiblingAtOffset(-1); }
|
||||
inline nsAccessible* FirstChild()
|
||||
{ return GetChildCount() != 0 ? GetChildAt(0) : nsnull; }
|
||||
inline nsAccessible* LastChild()
|
||||
{
|
||||
PRUint32 childCount = GetChildCount();
|
||||
return childCount != 0 ? GetChildAt(childCount - 1) : nsnull;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return embedded accessible children count.
|
||||
@ -445,7 +458,7 @@ public:
|
||||
// Perhaps we can get information about invalid links from the cache
|
||||
// In the mean time authors can use role="link" aria-invalid="true"
|
||||
// to force it for links they internally know to be invalid
|
||||
return (0 == (State() & states::INVALID));
|
||||
return (0 == (State() & mozilla::a11y::states::INVALID));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "mozilla/Services.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
nsApplicationAccessible::nsApplicationAccessible() :
|
||||
nsAccessibleWrap(nsnull, nsnull)
|
||||
{
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsLeafAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -234,8 +236,8 @@ nsLinkableAccessible::BindToParent(nsAccessible* aParent,
|
||||
// on non accessible node in parent chain but this node is skipped when tree
|
||||
// is traversed.
|
||||
nsAccessible* walkUpAcc = this;
|
||||
while ((walkUpAcc = walkUpAcc->GetParent()) && !walkUpAcc->IsDoc()) {
|
||||
if (walkUpAcc && walkUpAcc->Role() == nsIAccessibleRole::ROLE_LINK &&
|
||||
while ((walkUpAcc = walkUpAcc->Parent()) && !walkUpAcc->IsDoc()) {
|
||||
if (walkUpAcc->Role() == nsIAccessibleRole::ROLE_LINK &&
|
||||
walkUpAcc->State() & states::LINKED) {
|
||||
mIsLink = PR_TRUE;
|
||||
mActionAcc = walkUpAcc;
|
||||
|
@ -78,6 +78,7 @@
|
||||
#endif
|
||||
|
||||
namespace dom = mozilla::dom;
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static member initialization
|
||||
@ -349,18 +350,15 @@ nsDocAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
nsAccessible*
|
||||
nsDocAccessible::FocusedChild()
|
||||
{
|
||||
// XXXndeakin P3 accessibility shouldn't be caching the focus
|
||||
if (!gLastFocusedNode) {
|
||||
*aFocusedChild = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Return an accessible for the current global focus, which does not have to
|
||||
// be contained within the current document.
|
||||
NS_IF_ADDREF(*aFocusedChild = GetAccService()->GetAccessible(gLastFocusedNode));
|
||||
return NS_OK;
|
||||
return gLastFocusedNode ? GetAccService()->GetAccessible(gLastFocusedNode) :
|
||||
nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessible::TakeFocus()
|
||||
@ -581,7 +579,7 @@ nsDocAccessible::GetAccessible(nsINode* aNode) const
|
||||
// It will assert if not all the children were created
|
||||
// when they were first cached, and no invalidation
|
||||
// ever corrected parent accessible's child cache.
|
||||
nsAccessible* parent(accessible->GetParent());
|
||||
nsAccessible* parent = accessible->Parent();
|
||||
if (parent)
|
||||
parent->TestChildCache(accessible);
|
||||
#endif
|
||||
@ -1487,8 +1485,8 @@ nsDocAccessible::NotifyOfInitialUpdate()
|
||||
// a problem then consider to keep event processing per tab document.
|
||||
if (!IsRoot()) {
|
||||
nsRefPtr<AccEvent> reorderEvent =
|
||||
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, GetParent(),
|
||||
eAutoDetect, AccEvent::eCoalesceFromSameSubtree);
|
||||
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, Parent(), eAutoDetect,
|
||||
AccEvent::eCoalesceFromSameSubtree);
|
||||
ParentDocument()->FireDelayedAccessibleEvent(reorderEvent);
|
||||
}
|
||||
}
|
||||
@ -1817,7 +1815,7 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
|
||||
if (ancestor == this)
|
||||
break;
|
||||
|
||||
ancestor = ancestor->GetParent();
|
||||
ancestor = ancestor->Parent();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1902,7 +1900,7 @@ nsDocAccessible::UpdateTreeInternal(nsAccessible* aChild, bool aIsInsert)
|
||||
// The accessible parent may differ from container accessible if
|
||||
// the parent doesn't have own DOM node like list accessible for HTML
|
||||
// selects.
|
||||
nsAccessible* parent = aChild->GetParent();
|
||||
nsAccessible* parent = aChild->Parent();
|
||||
NS_ASSERTION(parent, "No accessible parent?!");
|
||||
if (parent)
|
||||
parent->RemoveChild(aChild);
|
||||
|
@ -94,7 +94,6 @@ public:
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
NS_IMETHOD GetAttributes(nsIPersistentProperties **aAttributes);
|
||||
NS_IMETHOD GetFocusedChild(nsIAccessible **aFocusedChild);
|
||||
NS_IMETHOD TakeFocus(void);
|
||||
|
||||
// nsIScrollPositionListener
|
||||
@ -114,6 +113,7 @@ public:
|
||||
|
||||
// nsAccessible
|
||||
virtual void Description(nsString& aDescription);
|
||||
virtual nsAccessible* FocusedChild();
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
virtual void ApplyARIAState(PRUint64* aState);
|
||||
|
@ -42,6 +42,8 @@
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsOuterDocAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -86,6 +86,7 @@
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsISupports
|
||||
@ -699,14 +700,14 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
||||
// is active.
|
||||
return;
|
||||
} else {
|
||||
nsAccessible *containerAccessible = accessible->GetParent();
|
||||
if (!containerAccessible)
|
||||
nsAccessible* container = accessible->Parent();
|
||||
if (!container)
|
||||
return;
|
||||
// It is not top level menuitem
|
||||
// Only fire focus event if it is not inside collapsed popup
|
||||
// and not a listitem of a combo box
|
||||
if (containerAccessible->State() & states::COLLAPSED) {
|
||||
nsAccessible *containerParent = containerAccessible->GetParent();
|
||||
if (container->State() & states::COLLAPSED) {
|
||||
nsAccessible* containerParent = container->Parent();
|
||||
if (!containerParent)
|
||||
return;
|
||||
if (containerParent->Role() != nsIAccessibleRole::ROLE_COMBOBOX) {
|
||||
@ -796,7 +797,7 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
|
||||
// If ancestor chain of accessibles is not completely visible,
|
||||
// don't use this one. This happens for example if it's inside
|
||||
// a background tab (tabbed browsing)
|
||||
nsAccessible *parent = accDoc->GetParent();
|
||||
nsAccessible* parent = accDoc->Parent();
|
||||
while (parent) {
|
||||
if (parent->State() & states::INVISIBLE)
|
||||
return nsnull;
|
||||
@ -804,7 +805,7 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
|
||||
if (parent == this)
|
||||
break; // Don't check past original root accessible we started with
|
||||
|
||||
parent = parent->GetParent();
|
||||
parent = parent->Parent();
|
||||
}
|
||||
|
||||
NS_ADDREF(aStart);
|
||||
@ -878,7 +879,7 @@ nsRootAccessible::HandlePopupShownEvent(nsAccessible* aAccessible)
|
||||
|
||||
if (role == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
|
||||
// Fire expanded state change event for comboboxes and autocompeletes.
|
||||
nsAccessible* combobox = aAccessible->GetParent();
|
||||
nsAccessible* combobox = aAccessible->Parent();
|
||||
if (!combobox)
|
||||
return;
|
||||
|
||||
@ -914,7 +915,7 @@ nsRootAccessible::HandlePopupHidingEvent(nsINode* aNode,
|
||||
aAccessible->Role() != nsIAccessibleRole::ROLE_COMBOBOX_LIST)
|
||||
return;
|
||||
|
||||
nsAccessible* combobox = aAccessible->GetParent();
|
||||
nsAccessible* combobox = aAccessible->Parent();
|
||||
if (!combobox)
|
||||
return;
|
||||
|
||||
|
@ -60,6 +60,8 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITextControlFrame.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLCheckboxAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -407,8 +409,9 @@ nsHTMLTextFieldAccessible::GetNameInternal(nsAString& aName)
|
||||
// This means we're part of another control, so use parent accessible for name.
|
||||
// This ensures that a textbox inside of a XUL widget gets
|
||||
// an accessible name.
|
||||
nsAccessible* parent = GetParent();
|
||||
parent->GetName(aName);
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent)
|
||||
parent->GetName(aName);
|
||||
}
|
||||
|
||||
if (!aName.IsEmpty())
|
||||
@ -452,7 +455,7 @@ nsHTMLTextFieldAccessible::NativeState()
|
||||
state |= states::PROTECTED;
|
||||
}
|
||||
else {
|
||||
nsAccessible* parent = GetParent();
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
||||
state |= states::HASPOPUP;
|
||||
}
|
||||
@ -650,7 +653,7 @@ nsHTMLLegendAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
||||
// Look for groupbox parent
|
||||
nsAccessible* groupbox = GetParent();
|
||||
nsAccessible* groupbox = Parent();
|
||||
|
||||
if (groupbox && groupbox->Role() == nsIAccessibleRole::ROLE_GROUPING) {
|
||||
// XXX: if group box exposes more than one relation of the given type
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLImageAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -45,6 +45,8 @@
|
||||
#include "nsEventStates.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLLinkAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -57,6 +57,8 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIMutableArray.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLSelectListAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -300,7 +302,7 @@ nsHTMLSelectOptionAccessible::NativeState()
|
||||
// visibility implementation unless they get reimplemented in layout
|
||||
state &= ~states::OFFSCREEN;
|
||||
// <select> is not collapsed: compare bounds to calculate OFFSCREEN
|
||||
nsAccessible* listAcc = GetParent();
|
||||
nsAccessible* listAcc = Parent();
|
||||
if (listAcc) {
|
||||
PRInt32 optionX, optionY, optionWidth, optionHeight;
|
||||
PRInt32 listX, listY, listWidth, listHeight;
|
||||
@ -382,8 +384,9 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::DoAction(PRUint8 index)
|
||||
if (!newHTMLOption)
|
||||
return NS_ERROR_FAILURE;
|
||||
// Clear old selection
|
||||
nsAccessible* parent = GetParent();
|
||||
NS_ASSERTION(parent, "No parent!");
|
||||
nsAccessible* parent = Parent();
|
||||
if (!parent)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIContent> oldHTMLOptionContent =
|
||||
GetFocusedOption(parent->GetContent());
|
||||
@ -891,7 +894,7 @@ void nsHTMLComboboxListAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBo
|
||||
{
|
||||
*aBoundingFrame = nsnull;
|
||||
|
||||
nsAccessible* comboAcc = GetParent();
|
||||
nsAccessible* comboAcc = Parent();
|
||||
if (!comboAcc)
|
||||
return;
|
||||
|
||||
|
@ -66,6 +66,8 @@
|
||||
#include "nsLayoutErrors.h"
|
||||
#include "nsArrayUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLTableCellAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -266,7 +268,7 @@ already_AddRefed<nsIAccessibleTable>
|
||||
nsHTMLTableCellAccessible::GetTableAccessible()
|
||||
{
|
||||
nsAccessible* parent = this;
|
||||
while ((parent = parent->GetParent())) {
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 role = parent->Role();
|
||||
if (role == nsIAccessibleRole::ROLE_TABLE ||
|
||||
role == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
||||
@ -1528,8 +1530,9 @@ nsHTMLCaptionAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
aRelation);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR)
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, Parent());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLTextAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -66,6 +66,8 @@
|
||||
#include "nsTextFragment.h"
|
||||
#include "gfxSkipChars.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -621,9 +623,9 @@ nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
|
||||
}
|
||||
|
||||
// From the descendant, go up and get the immediate child of this hypertext
|
||||
nsAccessible *childAccAtOffset = nsnull;
|
||||
nsAccessible* childAccAtOffset = nsnull;
|
||||
while (descendantAcc) {
|
||||
nsAccessible *parentAcc = descendantAcc->GetParent();
|
||||
nsAccessible* parentAcc = descendantAcc->Parent();
|
||||
if (parentAcc == this) {
|
||||
childAccAtOffset = descendantAcc;
|
||||
break;
|
||||
|
@ -52,6 +52,8 @@
|
||||
|
||||
#include "nsRootAccessible.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
// These constants are only defined in OS X SDK 10.4, so we define them in order
|
||||
// to be able to use for earlier OS versions.
|
||||
const NSString *kInstanceDescriptionAttribute = @"AXDescription"; // NSAccessibilityDescriptionAttribute
|
||||
@ -334,9 +336,7 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
|
||||
if (mIsExpired)
|
||||
return nil;
|
||||
|
||||
nsCOMPtr<nsIAccessible> focusedGeckoChild;
|
||||
mGeckoAccessible->GetFocusedChild (getter_AddRefs (focusedGeckoChild));
|
||||
|
||||
nsAccessible* focusedGeckoChild = mGeckoAccessible->FocusedChild();
|
||||
if (focusedGeckoChild) {
|
||||
mozAccessible *focusedChild = GetNativeFromGeckoAccessible(focusedGeckoChild);
|
||||
if (focusedChild)
|
||||
|
@ -41,6 +41,8 @@
|
||||
|
||||
#include "nsObjCExceptions.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
extern const NSString *kInstanceDescriptionAttribute; // NSAccessibilityDescriptionAttribute
|
||||
extern const NSString *kTopLevelUIElementAttribute; // NSAccessibilityTopLevelUIElementAttribute
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#import "mozTextAccessible.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
extern const NSString *kInstanceDescriptionAttribute; // NSAccessibilityDescriptionAttribute
|
||||
extern const NSString *kTopLevelUIElementAttribute; // NSAccessibilityTopLevelUIElementAttribute
|
||||
|
||||
|
@ -86,7 +86,7 @@ class nsAccessibleWrap : public nsAccessible
|
||||
PRInt32 GetUnignoredChildCount(PRBool aDeepCount);
|
||||
|
||||
PRBool HasPopup () {
|
||||
return (NativeState() & states::HASPOPUP);
|
||||
return (NativeState() & mozilla::a11y::states::HASPOPUP);
|
||||
}
|
||||
|
||||
// return this accessible's all children, adhering to "flat" accessibles by not returning their children.
|
||||
|
@ -285,7 +285,7 @@ nsAccessibleWrap::GetUnignoredChildren(nsTArray<nsRefPtr<nsAccessibleWrap> > &aC
|
||||
already_AddRefed<nsIAccessible>
|
||||
nsAccessibleWrap::GetUnignoredParent()
|
||||
{
|
||||
nsAccessibleWrap *parentWrap = static_cast<nsAccessibleWrap*>(GetParent());
|
||||
nsAccessibleWrap* parentWrap = static_cast<nsAccessibleWrap*>(Parent());
|
||||
if (!parentWrap)
|
||||
return nsnull;
|
||||
|
||||
@ -313,12 +313,12 @@ nsAccessibleWrap::AncestorIsFlat()
|
||||
// look the same on all platforms, we still let the C++ objects be created
|
||||
// though.
|
||||
|
||||
nsAccessible* parent(GetParent());
|
||||
nsAccessible* parent = Parent();
|
||||
while (parent) {
|
||||
if (nsAccUtils::MustPrune(parent))
|
||||
return PR_TRUE;
|
||||
|
||||
parent = parent->GetParent();
|
||||
parent = parent->Parent();
|
||||
}
|
||||
// no parent was flat
|
||||
return PR_FALSE;
|
||||
|
@ -50,6 +50,8 @@
|
||||
#include "nsIDOMCSSPrimitiveValue.h"
|
||||
#include "nsIDOMNSRGBAColor.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
enum {
|
||||
IA2AlphaShift = 24,
|
||||
IA2RedShift = 16,
|
||||
|
@ -61,9 +61,6 @@
|
||||
#include "OLEIDL.H"
|
||||
#include "OLEACC.H"
|
||||
#include <winuser.h>
|
||||
#ifndef WINABLEAPI
|
||||
#include <winable.h>
|
||||
#endif
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsICrashReporter.h"
|
||||
#endif
|
||||
|
@ -67,6 +67,8 @@
|
||||
#include "nsEventMap.h"
|
||||
#include "nsArrayUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
/* For documentation of the accessibility architecture,
|
||||
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
|
||||
*/
|
||||
@ -214,7 +216,7 @@ __try {
|
||||
}
|
||||
}
|
||||
|
||||
nsAccessible* xpParentAcc = GetParent();
|
||||
nsAccessible* xpParentAcc = Parent();
|
||||
if (!xpParentAcc) {
|
||||
if (IsApplication())
|
||||
return S_OK;
|
||||
@ -374,7 +376,7 @@ __try {
|
||||
// a ROLE_OUTLINEITEM for consistency and compatibility.
|
||||
// We need this because ARIA has a role of "row" for both grid and treegrid
|
||||
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
||||
nsAccessible* xpParent = GetParent();
|
||||
nsAccessible* xpParent = Parent();
|
||||
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
||||
msaaRole = ROLE_SYSTEM_OUTLINEITEM;
|
||||
}
|
||||
@ -522,8 +524,7 @@ __try {
|
||||
VariantInit(pvarChild);
|
||||
|
||||
// Return the current IAccessible child that has focus
|
||||
nsCOMPtr<nsIAccessible> focusedAccessible;
|
||||
GetFocusedChild(getter_AddRefs(focusedAccessible));
|
||||
nsAccessible* focusedAccessible = FocusedChild();
|
||||
if (focusedAccessible == this) {
|
||||
pvarChild->vt = VT_I4;
|
||||
pvarChild->lVal = CHILDID_SELF;
|
||||
@ -1160,7 +1161,7 @@ __try {
|
||||
// Special case, if there is a ROLE_ROW inside of a ROLE_TREE_TABLE, then call
|
||||
// the IA2 role a ROLE_OUTLINEITEM.
|
||||
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
||||
nsAccessible* xpParent = GetParent();
|
||||
nsAccessible* xpParent = Parent();
|
||||
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
||||
*aRole = ROLE_SYSTEM_OUTLINEITEM;
|
||||
}
|
||||
@ -1768,12 +1769,12 @@ nsAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
|
||||
|
||||
// Check whether the accessible for the given ID is a child of ARIA
|
||||
// document.
|
||||
nsAccessible* parent = child ? child->GetParent() : nsnull;
|
||||
nsAccessible* parent = child ? child->Parent() : nsnull;
|
||||
while (parent && parent != document) {
|
||||
if (parent == this)
|
||||
return child;
|
||||
|
||||
parent = parent->GetParent();
|
||||
parent = parent->Parent();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,6 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <winuser.h>
|
||||
#ifndef WINABLEAPI
|
||||
#include <winable.h>
|
||||
#endif
|
||||
#include "AccessibleEventId.h"
|
||||
|
||||
const PRUint32 kEVENT_WIN_UNKNOWN = 0x00000000;
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
#include "States.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLWin32ObjectOwnerAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "nsIXFormsUtilityService.h"
|
||||
#include "nsIPlaintextEditor.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXFormsAccessibleBase
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include "States.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXFormsLabelAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
#include "States.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXFormsDropmarkerWidgetAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -39,6 +39,8 @@
|
||||
|
||||
#include "States.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULAlertAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -46,6 +46,7 @@
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULColorPickerTileAccessible
|
||||
|
@ -47,6 +47,8 @@
|
||||
#include "nsIDOMXULMenuListElement.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULComboboxAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -62,6 +62,8 @@
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsITextControlFrame.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULButtonAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -573,8 +575,9 @@ nsXULToolbarButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
||||
PRInt32 setSize = 0;
|
||||
PRInt32 posInSet = 0;
|
||||
|
||||
nsAccessible* parent(GetParent());
|
||||
NS_ENSURE_TRUE(parent,);
|
||||
nsAccessible* parent = Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
PRInt32 childCount = parent->GetChildCount();
|
||||
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
|
@ -48,6 +48,8 @@
|
||||
#include "nsIDOMXULMultSelectCntrlEl.h"
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULColumnsAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -998,11 +1000,11 @@ nsXULListCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* thisRow = GetParent();
|
||||
nsAccessible* thisRow = Parent();
|
||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = thisRow->GetParent();
|
||||
nsAccessible* table = thisRow->Parent();
|
||||
if (!table || table->Role() != nsIAccessibleRole::ROLE_TABLE)
|
||||
return NS_OK;
|
||||
|
||||
@ -1019,7 +1021,7 @@ nsXULListCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
@ -1048,11 +1050,11 @@ nsXULListCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = row->GetParent();
|
||||
nsAccessible* table = row->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
@ -332,8 +332,8 @@ nsXULMenuitemAccessible::NativeState()
|
||||
|
||||
// Is collapsed?
|
||||
PRBool isCollapsed = PR_FALSE;
|
||||
nsAccessible* parentAcc = GetParent();
|
||||
if (parentAcc->State() & states::INVISIBLE)
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->State() & states::INVISIBLE)
|
||||
isCollapsed = PR_TRUE;
|
||||
|
||||
if (isSelected) {
|
||||
@ -342,11 +342,12 @@ nsXULMenuitemAccessible::NativeState()
|
||||
// Selected and collapsed?
|
||||
if (isCollapsed) {
|
||||
// Set selected option offscreen/invisible according to combobox state
|
||||
nsAccessible* grandParentAcc = parentAcc->GetParent();
|
||||
NS_ENSURE_TRUE(grandParentAcc, state);
|
||||
NS_ASSERTION(grandParentAcc->Role() == nsIAccessibleRole::ROLE_COMBOBOX,
|
||||
nsAccessible* grandParent = parent->Parent();
|
||||
if (!grandParent)
|
||||
return state;
|
||||
NS_ASSERTION(grandParent->Role() == nsIAccessibleRole::ROLE_COMBOBOX,
|
||||
"grandparent of combobox listitem is not combobox");
|
||||
PRUint64 grandParentState = grandParentAcc->State();
|
||||
PRUint64 grandParentState = grandParent->State();
|
||||
state &= ~(states::OFFSCREEN | states::INVISIBLE);
|
||||
state |= (grandParentState & states::OFFSCREEN) |
|
||||
(grandParentState & states::INVISIBLE) |
|
||||
@ -404,7 +405,7 @@ nsXULMenuitemAccessible::AccessKey() const
|
||||
|
||||
PRUint32 modifierKey = 0;
|
||||
|
||||
nsAccessible* parentAcc = GetParent();
|
||||
nsAccessible* parentAcc = Parent();
|
||||
if (parentAcc) {
|
||||
if (parentAcc->NativeRole() == nsIAccessibleRole::ROLE_MENUBAR) {
|
||||
// If top level menu item, add Alt+ or whatever modifier text to string
|
||||
@ -639,8 +640,9 @@ nsXULMenupopupAccessible::NativeState()
|
||||
PRBool isActive = mContent->HasAttr(kNameSpaceID_None,
|
||||
nsAccessibilityAtoms::menuactive);
|
||||
if (!isActive) {
|
||||
nsAccessible* parent(GetParent());
|
||||
NS_ENSURE_TRUE(parent, state);
|
||||
nsAccessible* parent = Parent();
|
||||
if (!parent)
|
||||
return state;
|
||||
|
||||
nsIContent *parentContent = parnet->GetContent();
|
||||
NS_ENSURE_TRUE(parentContent, state);
|
||||
@ -685,7 +687,7 @@ nsXULMenupopupAccessible::NativeRole()
|
||||
|
||||
if (role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
|
||||
// Some widgets like the search bar have several popups, owned by buttons.
|
||||
nsAccessible* grandParent = mParent->GetParent();
|
||||
nsAccessible* grandParent = mParent->Parent();
|
||||
if (grandParent &&
|
||||
grandParent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
||||
return nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
||||
|
@ -45,6 +45,8 @@
|
||||
#include "nsIDOMDocumentXBL.h"
|
||||
#include "nsIFrame.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULSliderAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -50,6 +50,8 @@
|
||||
#include "nsIDOMXULSelectCntrlItemEl.h"
|
||||
#include "nsIDOMXULRelatedElement.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTabAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include "nsString.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTextAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -98,7 +100,7 @@ nsXULTextAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
// Caption is the label for groupbox
|
||||
nsIContent *parent = mContent->GetParent();
|
||||
if (parent && parent->Tag() == nsAccessibilityAtoms::caption) {
|
||||
nsAccessible* parent = GetParent();
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_GROUPING)
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, parent);
|
||||
}
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -200,17 +202,11 @@ nsXULTreeAccessible::NativeRole()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeAccessible: nsIAccessible implementation
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
nsAccessible*
|
||||
nsXULTreeAccessible::FocusedChild()
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFocusedChild);
|
||||
*aFocusedChild = nsnull;
|
||||
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (gLastFocusedNode != mContent)
|
||||
return NS_OK;
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelect =
|
||||
do_QueryInterface(mContent);
|
||||
@ -218,10 +214,10 @@ nsXULTreeAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
PRInt32 row = -1;
|
||||
multiSelect->GetCurrentIndex(&row);
|
||||
if (row >= 0)
|
||||
NS_IF_ADDREF(*aFocusedChild = GetTreeItemAccessible(row));
|
||||
return GetTreeItemAccessible(row);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -661,17 +657,11 @@ NS_IMPL_RELEASE_INHERITED(nsXULTreeItemAccessibleBase, nsAccessible)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeItemAccessibleBase: nsIAccessible implementation
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeItemAccessibleBase::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
nsAccessible*
|
||||
nsXULTreeItemAccessibleBase::FocusedChild()
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFocusedChild);
|
||||
*aFocusedChild = nsnull;
|
||||
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (gLastFocusedNode != mContent)
|
||||
return NS_OK;
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelect =
|
||||
do_QueryInterface(mContent);
|
||||
@ -680,10 +670,10 @@ nsXULTreeItemAccessibleBase::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
PRInt32 row = -1;
|
||||
multiSelect->GetCurrentIndex(&row);
|
||||
if (row == mRow)
|
||||
NS_ADDREF(*aFocusedChild = this);
|
||||
return this;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -1225,7 +1215,7 @@ nsXULTreeColumnsAccessible::GetSiblingAtOffset(PRInt32 aOffset,
|
||||
PRInt32 rowCount = 0;
|
||||
treeView->GetRowCount(&rowCount);
|
||||
if (rowCount > 0 && aOffset <= rowCount) {
|
||||
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(GetParent());
|
||||
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(Parent());
|
||||
|
||||
if (treeAcc)
|
||||
return treeAcc->GetTreeItemAccessible(aOffset - 1);
|
||||
|
@ -76,7 +76,6 @@ public:
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
NS_IMETHOD GetFocusedChild(nsIAccessible **aFocusedChild);
|
||||
|
||||
// nsAccessNode
|
||||
virtual bool IsDefunct() const;
|
||||
@ -87,6 +86,7 @@ public:
|
||||
virtual PRUint64 NativeState();
|
||||
virtual nsAccessible* ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
||||
EWhichChildAtPoint aWhichChild);
|
||||
virtual nsAccessible* FocusedChild();
|
||||
|
||||
virtual nsAccessible* GetChildAt(PRUint32 aIndex);
|
||||
virtual PRInt32 GetChildCount();
|
||||
@ -182,8 +182,6 @@ public:
|
||||
nsAccessibleWrap)
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetFocusedChild(nsIAccessible **aFocusedChild);
|
||||
|
||||
NS_IMETHOD GetBounds(PRInt32 *aX, PRInt32 *aY,
|
||||
PRInt32 *aWidth, PRInt32 *aHeight);
|
||||
|
||||
@ -209,6 +207,7 @@ public:
|
||||
// nsAccessible
|
||||
virtual PRUint64 NativeState();
|
||||
virtual PRInt32 IndexInParent() const;
|
||||
virtual nsAccessible* FocusedChild();
|
||||
|
||||
// nsXULTreeItemAccessibleBase
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_XULTREEITEMBASEACCESSIBLE_IMPL_CID)
|
||||
|
@ -47,6 +47,8 @@
|
||||
|
||||
#include "nsITreeSelection.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeGridAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -848,13 +850,10 @@ NS_IMPL_RELEASE_INHERITED(nsXULTreeGridCellAccessible, nsLeafAccessible)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeGridCellAccessible: nsIAccessible implementation
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridCellAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
||||
nsAccessible*
|
||||
nsXULTreeGridCellAccessible::FocusedChild()
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFocusedChild);
|
||||
*aFocusedChild = nsnull;
|
||||
|
||||
return IsDefunct() ? NS_ERROR_FAILURE : NS_OK;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -1016,7 +1015,10 @@ nsXULTreeGridCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
||||
if (IsDefunct())
|
||||
return NS_OK;
|
||||
|
||||
CallQueryInterface(mParent->GetParent(), aTable);
|
||||
nsAccessible* grandParent = mParent->Parent();
|
||||
if (grandParent)
|
||||
CallQueryInterface(grandParent, aTable);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1171,9 +1173,12 @@ nsXULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAtt
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// "table-cell-index" attribute
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
mParent->GetParent(getter_AddRefs(accessible));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAccessible = do_QueryInterface(accessible);
|
||||
nsAccessible* grandParent = mParent->Parent();
|
||||
if (!grandParent)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAccessible =
|
||||
do_QueryInterface(static_cast<nsIAccessible*>(grandParent));
|
||||
|
||||
// XXX - temp fix for crash bug 516047
|
||||
if (!tableAccessible)
|
||||
@ -1308,7 +1313,7 @@ nsXULTreeGridCellAccessible::GetSiblingAtOffset(PRInt32 aOffset,
|
||||
if (!columnAtOffset)
|
||||
return nsnull;
|
||||
|
||||
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(GetParent());
|
||||
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(Parent());
|
||||
return rowAcc->GetCellAccessible(columnAtOffset);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,6 @@ public:
|
||||
nsLeafAccessible)
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetFocusedChild(nsIAccessible **aFocusedChild);
|
||||
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
NS_IMETHOD GetBounds(PRInt32 *aX, PRInt32 *aY,
|
||||
@ -162,6 +161,7 @@ public:
|
||||
virtual bool IsPrimaryForNode() const;
|
||||
|
||||
// nsAccessible
|
||||
virtual nsAccessible* FocusedChild();
|
||||
virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
|
@ -762,6 +762,12 @@ function synthClick(aNodeOrID, aCheckerOrEventSeq, aEventType)
|
||||
synthesizeMouse(this.DOMNode, 1, 1, {});
|
||||
}
|
||||
|
||||
this.finalCheck = function synthClick_finalCheck()
|
||||
{
|
||||
// Scroll top window back.
|
||||
window.top.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
this.getID = function synthClick_getID()
|
||||
{
|
||||
return prettyName(aNodeOrID) + " click";
|
||||
|
@ -103,13 +103,15 @@
|
||||
{
|
||||
this.type = EVENT_NAME_CHANGE;
|
||||
|
||||
this.target getter = function()
|
||||
function targetGetter()
|
||||
{
|
||||
var acc = getAccessible(gTree);
|
||||
|
||||
var tableAcc = getAccessible(acc, [nsIAccessibleTable]);
|
||||
return tableAcc.getCellAt(aRow, aCol);
|
||||
}
|
||||
Object.defineProperty(this, "target", { get: targetGetter });
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return aMsg + "name changed";
|
||||
|
@ -235,7 +235,7 @@
|
||||
};
|
||||
|
||||
if (LINUX || SOLARIS)
|
||||
tree.children[2].children[0].\(subsubmenuTree);
|
||||
tree.children[2].children[0].children.push(subsubmenuTree);
|
||||
else
|
||||
tree.children[2].children[0].children[0].children[0].children.push(subsubmenuTree);
|
||||
|
||||
|
@ -376,12 +376,12 @@
|
||||
{ INTERNAL_FRAME: [
|
||||
{ DOCUMENT: [
|
||||
{ ENTRY: [ ] }
|
||||
] };
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(this.containerNode, tree);
|
||||
}
|
||||
|
||||
this.getID() = function changeSrc_getID()
|
||||
this.getID = function changeSrc_getID()
|
||||
{
|
||||
return "change src on iframe";
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ include $(topsrcdir)/config/config.mk
|
||||
PARALLEL_DIRS = \
|
||||
base \
|
||||
components \
|
||||
devtools \
|
||||
fuel \
|
||||
locales \
|
||||
themes \
|
||||
|
@ -1,213 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1311096050000">
|
||||
<emItems>
|
||||
<emItem blockID="i41" id="{99079a25-328f-4bd4-be04-00955acaa0a7}">
|
||||
<versionRange minVersion="0.1" maxVersion="4.3.0.00" severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i8" id="{B13721C7-F507-4982-B2E5-502A71474FED}">
|
||||
<versionRange minVersion=" " severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i38" id="{B7082FAA-CB62-4872-9106-E42DD88EDE45}">
|
||||
<versionRange minVersion="0.1" maxVersion="3.3.0.*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
<versionRange minVersion="3.3.1" maxVersion="*">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="5.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i19" id="{46551EC9-40F0-4e47-8E18-8E5CF550CFB8}">
|
||||
<versionRange minVersion="1.1b1" maxVersion="1.1b1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i16" id="{27182e60-b5f3-411c-b545-b44205977502}">
|
||||
<versionRange minVersion="1.0" maxVersion="1.0">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i39" id="{c2d64ff7-0ab8-4263-89c9-ea3b0f8f050c}">
|
||||
<versionRange minVersion="0.1" maxVersion="4.3.0.00" severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
|
||||
</emItem>
|
||||
<emItem blockID="i1" id="mozilla_cc@internetdownloadmanager.com">
|
||||
<versionRange minVersion="2.1" maxVersion="3.3">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
<versionRange minVersion=" " maxVersion="6.9.8">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i18" id="msntoolbar@msn.com">
|
||||
<versionRange minVersion=" " maxVersion="6.*">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i13" id="{E8E88AB0-7182-11DF-904E-6045E0D72085}">
|
||||
</emItem>
|
||||
<emItem blockID="i4" id="{4B3803EA-5230-4DC3-A7FC-33638F3D3542}">
|
||||
<versionRange minVersion="1.2" maxVersion="1.2">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i40" id="{28387537-e3f9-4ed7-860c-11e69af4a8a0}">
|
||||
<versionRange minVersion="0.1" maxVersion="4.3.0.00" severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i23" id="firefox@bandoo.com">
|
||||
<versionRange minVersion="5.0" maxVersion="5.0" severity="1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i22" id="ShopperReports@ShopperReports.com">
|
||||
<versionRange minVersion="3.1.22.0" maxVersion="3.1.22.0">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i2" id="fdm_ffext@freedownloadmanager.org">
|
||||
<versionRange minVersion="1.0" maxVersion="1.3.1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i5" id="support@daemon-tools.cc">
|
||||
<versionRange minVersion=" " maxVersion="1.0.0.5">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i6" id="{3f963a5b-e555-4543-90e2-c3908898db71}">
|
||||
<versionRange minVersion=" " maxVersion="8.5">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i12" id="masterfiler@gmail.com">
|
||||
<versionRange severity="3">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i20" id="{AB2CE124-6272-4b12-94A9-7303C7397BD1}">
|
||||
<versionRange minVersion="0.1" maxVersion="5.2.0.7164" severity="1">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i11" id="yslow@yahoo-inc.com">
|
||||
<versionRange minVersion="2.0.5" maxVersion="2.0.5">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.5.7" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i17" id="{3252b9ae-c69a-4eaf-9502-dc9c1f6c009e}">
|
||||
<versionRange minVersion="2.2" maxVersion="2.2">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i3" id="langpack-vi-VN@firefox.mozilla.org">
|
||||
<versionRange minVersion="2.0" maxVersion="2.0">
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i7" id="{2224e955-00e9-4613-a844-ce69fccaae91}">
|
||||
</emItem>
|
||||
<emItem blockID="i24" id="{6E19037A-12E3-4295-8915-ED48BC341614}">
|
||||
<versionRange minVersion="0.1" maxVersion="1.3.328.4" severity="1">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.7a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i15" id="personas@christopher.beard">
|
||||
<versionRange minVersion="1.6" maxVersion="1.6">
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.6" maxVersion="3.6.*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</emItem>
|
||||
<emItem blockID="i21" id="support@update-firefox.com">
|
||||
</emItem>
|
||||
</emItems>
|
||||
|
||||
<pluginItems>
|
||||
<pluginItem blockID="p26">
|
||||
<match name="name" exp="^Yahoo Application State Plugin$" /> <match name="description" exp="^Yahoo Application State Plugin$" /> <match name="filename" exp="npYState.dll" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="3.*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p27">
|
||||
<match name="name" exp="QuickTime Plug-in 7[.]1[.]" /> <match name="filename" exp="npqtplugin.?[.]dll" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0a1" maxVersion="3.*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p28">
|
||||
<match name="filename" exp="NPFFAddOn.dll" /> <versionRange >
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p31">
|
||||
<match name="filename" exp="NPMySrch.dll" /> <versionRange >
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p32">
|
||||
<match name="filename" exp="npViewpoint.dll" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.0" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p33">
|
||||
<match name="name" exp="[0-6]\.0\.[01]\d{2}\.\d+" /> <match name="filename" exp="npdeploytk.dll" /> <versionRange severity="1">
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
<pluginItem blockID="p34">
|
||||
<match name="filename" exp="[Nn][Pp][Jj][Pp][Ii]1[56]0_[0-9]+\.[Dd][Ll][Ll]" /> <versionRange >
|
||||
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
|
||||
<versionRange minVersion="3.6a1pre" maxVersion="*" />
|
||||
</targetApplication>
|
||||
</versionRange>
|
||||
</pluginItem>
|
||||
</pluginItems>
|
||||
|
||||
<gfxItems>
|
||||
<gfxBlacklistEntry blockID="g35">
|
||||
<os>WINNT 6.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<devices>
|
||||
<device>0x0a6c</device>
|
||||
</devices>
|
||||
<feature>DIRECT2D</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>8.17.12.5896</driverVersion>
|
||||
<driverVersionComparator>LESS_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
<gfxBlacklistEntry blockID="g36">
|
||||
<os>WINNT 6.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<devices>
|
||||
<device>0x0a6c</device>
|
||||
</devices>
|
||||
<feature>DIRECT3D_9_LAYERS</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>8.17.12.5896</driverVersion>
|
||||
<driverVersionComparator>LESS_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
<gfxBlacklistEntry blockID="g37">
|
||||
<os>WINNT 5.1</os>
|
||||
<vendor>0x10de</vendor>
|
||||
<feature>DIRECT3D_9_LAYERS</feature>
|
||||
<featureStatus>BLOCKED_DRIVER_VERSION</featureStatus>
|
||||
<driverVersion>7.0.0.0</driverVersion>
|
||||
<driverVersionComparator>GREATER_THAN_OR_EQUAL</driverVersionComparator>
|
||||
</gfxBlacklistEntry>
|
||||
</gfxItems>
|
||||
|
||||
|
||||
</blocklist>
|
@ -97,13 +97,13 @@ function _handleEvent(aEvent) {
|
||||
|
||||
// Methods that impact a browser. Put into single object for organization.
|
||||
let BrowserHelper = {
|
||||
onOpen: function(aBrowser) {
|
||||
onOpen: function NP_BH_onOpen(aBrowser) {
|
||||
// If the tab is in the focused window, leave priority as it is
|
||||
if (aBrowser.ownerDocument.defaultView != _lastFocusedWindow)
|
||||
this.decreasePriority(aBrowser);
|
||||
},
|
||||
|
||||
onSelect: function(aBrowser) {
|
||||
onSelect: function NP_BH_onSelect(aBrowser) {
|
||||
let windowEntry = WindowHelper.getEntry(aBrowser.ownerDocument.defaultView);
|
||||
if (windowEntry.lastSelectedBrowser)
|
||||
this.decreasePriority(windowEntry.lastSelectedBrowser);
|
||||
@ -113,16 +113,16 @@ let BrowserHelper = {
|
||||
},
|
||||
|
||||
// Auxiliary methods
|
||||
getLoadgroup: function(aBrowser) {
|
||||
getLoadgroup: function NP_BH_getLoadgroup(aBrowser) {
|
||||
return aBrowser.webNavigation.QueryInterface(Ci.nsIDocumentLoader)
|
||||
.loadGroup.QueryInterface(Ci.nsISupportsPriority);
|
||||
},
|
||||
|
||||
increasePriority: function(aBrowser) {
|
||||
increasePriority: function NP_BH_increasePriority(aBrowser) {
|
||||
this.getLoadgroup(aBrowser).adjustPriority(PRIORITY_DELTA);
|
||||
},
|
||||
|
||||
decreasePriority: function(aBrowser) {
|
||||
decreasePriority: function NP_BH_decreasePriority(aBrowser) {
|
||||
this.getLoadgroup(aBrowser).adjustPriority(PRIORITY_DELTA * -1);
|
||||
}
|
||||
};
|
||||
@ -130,7 +130,7 @@ let BrowserHelper = {
|
||||
|
||||
// Methods that impact a window. Put into single object for organization.
|
||||
let WindowHelper = {
|
||||
addWindow: function(aWindow) {
|
||||
addWindow: function NP_WH_addWindow(aWindow) {
|
||||
// Build internal data object
|
||||
_windows.push({ window: aWindow, lastSelectedBrowser: null });
|
||||
|
||||
@ -153,7 +153,7 @@ let WindowHelper = {
|
||||
BrowserHelper.onSelect(aWindow.gBrowser.selectedBrowser);
|
||||
},
|
||||
|
||||
removeWindow: function(aWindow) {
|
||||
removeWindow: function NP_WH_removeWindow(aWindow) {
|
||||
if (aWindow == _lastFocusedWindow)
|
||||
_lastFocusedWindow = null;
|
||||
|
||||
@ -169,7 +169,7 @@ let WindowHelper = {
|
||||
});
|
||||
},
|
||||
|
||||
onActivate: function(aWindow, aHasFocus) {
|
||||
onActivate: function NP_WH_onActivate(aWindow, aHasFocus) {
|
||||
// If this window was the last focused window, we don't need to do anything
|
||||
if (aWindow == _lastFocusedWindow)
|
||||
return;
|
||||
@ -181,7 +181,7 @@ let WindowHelper = {
|
||||
this.increasePriority(aWindow);
|
||||
},
|
||||
|
||||
handleFocusedWindow: function(aWindow) {
|
||||
handleFocusedWindow: function NP_WH_handleFocusedWindow(aWindow) {
|
||||
// If we have a last focused window, we need to deprioritize it first
|
||||
if (_lastFocusedWindow)
|
||||
this.decreasePriority(_lastFocusedWindow);
|
||||
@ -191,23 +191,23 @@ let WindowHelper = {
|
||||
},
|
||||
|
||||
// Auxiliary methods
|
||||
increasePriority: function(aWindow) {
|
||||
increasePriority: function NP_WH_increasePriority(aWindow) {
|
||||
aWindow.gBrowser.browsers.forEach(function(aBrowser) {
|
||||
BrowserHelper.increasePriority(aBrowser);
|
||||
});
|
||||
},
|
||||
|
||||
decreasePriority: function(aWindow) {
|
||||
decreasePriority: function NP_WH_decreasePriority(aWindow) {
|
||||
aWindow.gBrowser.browsers.forEach(function(aBrowser) {
|
||||
BrowserHelper.decreasePriority(aBrowser);
|
||||
});
|
||||
},
|
||||
|
||||
getEntry: function(aWindow) {
|
||||
getEntry: function NP_WH_getEntry(aWindow) {
|
||||
return _windows[this.getEntryIndex(aWindow)];
|
||||
},
|
||||
|
||||
getEntryIndex: function(aWindow) {
|
||||
getEntryIndex: function NP_WH_getEntryAtIndex(aWindow) {
|
||||
// Assumes that every object has a unique window & it's in the array
|
||||
for (let i = 0; i < _windows.length; i++)
|
||||
if (_windows[i].window == aWindow)
|
||||
|
@ -63,10 +63,6 @@ tabbrowser {
|
||||
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
|
||||
}
|
||||
|
||||
.tabbrowser-tabs[drag] > .tabbrowser-tab {
|
||||
pointer-events: none; /* suppress tooltips */
|
||||
}
|
||||
|
||||
.tabbrowser-tabs[drag] > .tabbrowser-tab[selected] {
|
||||
z-index: 2; /* ensure selected tab stays on top despite -moz-transform */
|
||||
}
|
||||
|
@ -355,6 +355,9 @@ const gSessionHistoryObserver = {
|
||||
var fwdCommand = document.getElementById("Browser:Forward");
|
||||
fwdCommand.setAttribute("disabled", "true");
|
||||
|
||||
// Hide session restore button on about:home
|
||||
window.messageManager.sendAsyncMessage("Browser:HideSessionRestoreButton");
|
||||
|
||||
if (gURLBar) {
|
||||
// Clear undo history of the URL bar
|
||||
gURLBar.editor.transactionManager.clear()
|
||||
|
@ -51,3 +51,13 @@ addMessageListener("WebNavigation:LoadURI", function (message) {
|
||||
|
||||
webNavigation.loadURI(message.json.uri, flags, null, null, null);
|
||||
});
|
||||
|
||||
addMessageListener("Browser:HideSessionRestoreButton", function (message) {
|
||||
// Hide session restore button on about:home
|
||||
let doc = content.document;
|
||||
let container;
|
||||
if (doc.documentURI.toLowerCase() == "about:home" &&
|
||||
(container = doc.getElementById("sessionRestoreContainer"))){
|
||||
container.hidden = true;
|
||||
}
|
||||
});
|
||||
|
@ -528,6 +528,7 @@ Highlighter.prototype = {
|
||||
*/
|
||||
var InspectorUI = {
|
||||
browser: null,
|
||||
tools: {},
|
||||
showTextNodesWithWhitespace: false,
|
||||
inspecting: false,
|
||||
treeLoaded: false,
|
||||
@ -859,6 +860,13 @@ var InspectorUI = {
|
||||
delete this.domplateUtils;
|
||||
}
|
||||
|
||||
this.saveToolState(this.winID);
|
||||
this.toolsDo(function IUI_toolsHide(aTool) {
|
||||
if (aTool.panel) {
|
||||
aTool.panel.hidePopup();
|
||||
}
|
||||
});
|
||||
|
||||
this.inspectCmd.setAttribute("checked", false);
|
||||
this.browser = this.win = null; // null out references to browser and window
|
||||
this.winID = null;
|
||||
@ -880,6 +888,7 @@ var InspectorUI = {
|
||||
*/
|
||||
startInspecting: function IUI_startInspecting()
|
||||
{
|
||||
document.getElementById("inspector-inspect-toolbutton").checked = true;
|
||||
this.attachPageListeners();
|
||||
this.inspecting = true;
|
||||
this.highlighter.veilTransparentBox.removeAttribute("locked");
|
||||
@ -895,6 +904,7 @@ var InspectorUI = {
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById("inspector-inspect-toolbutton").checked = false;
|
||||
this.detachPageListeners();
|
||||
this.inspecting = false;
|
||||
if (this.highlighter.node) {
|
||||
@ -926,6 +936,11 @@ var InspectorUI = {
|
||||
}
|
||||
this.ioBox.select(this.selection, true, true, aScroll);
|
||||
}
|
||||
this.toolsDo(function IUI_toolsOnSelect(aTool) {
|
||||
if (aTool.panel.state == "open") {
|
||||
aTool.onSelect.apply(aTool.context, [aNode]);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
@ -974,6 +989,7 @@ var InspectorUI = {
|
||||
}, INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||
} else {
|
||||
this.openInspectorUI();
|
||||
this.restoreToolState(winID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1222,7 +1238,113 @@ var InspectorUI = {
|
||||
}
|
||||
this._log("END TRACE");
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an external tool with the inspector.
|
||||
*
|
||||
* aRegObj = {
|
||||
* id: "toolname",
|
||||
* context: myTool,
|
||||
* label: "Button label",
|
||||
* icon: "chrome://somepath.png",
|
||||
* tooltiptext: "Button tooltip",
|
||||
* accesskey: "S",
|
||||
* onSelect: object.method,
|
||||
* onShow: object.method,
|
||||
* onHide: object.method,
|
||||
* panel: myTool.panel
|
||||
* }
|
||||
*
|
||||
* @param aRegObj
|
||||
*/
|
||||
registerTool: function IUI_RegisterTool(aRegObj) {
|
||||
if (this.tools[aRegObj.id]) {
|
||||
return;
|
||||
} else {
|
||||
let id = aRegObj.id;
|
||||
let buttonId = "inspector-" + id + "-toolbutton";
|
||||
aRegObj.buttonId = buttonId;
|
||||
|
||||
aRegObj.panel.addEventListener("popuphiding",
|
||||
function IUI_toolPanelHiding() {
|
||||
btn.setAttribute("checked", "false");
|
||||
}, false);
|
||||
aRegObj.panel.addEventListener("popupshowing",
|
||||
function IUI_toolPanelShowing() {
|
||||
btn.setAttribute("checked", "true");
|
||||
}, false);
|
||||
|
||||
this.tools[id] = aRegObj;
|
||||
}
|
||||
|
||||
let toolbar = document.getElementById("inspector-toolbar");
|
||||
let btn = document.createElement("toolbarbutton");
|
||||
btn.setAttribute("id", aRegObj.buttonId);
|
||||
btn.setAttribute("label", aRegObj.label);
|
||||
btn.setAttribute("tooltiptext", aRegObj.tooltiptext);
|
||||
btn.setAttribute("accesskey", aRegObj.accesskey);
|
||||
btn.setAttribute("class", "toolbarbutton-text");
|
||||
btn.setAttribute("image", aRegObj.icon || "");
|
||||
toolbar.appendChild(btn);
|
||||
|
||||
btn.addEventListener("click",
|
||||
function IUI_ToolButtonClick(aEvent) {
|
||||
if (btn.getAttribute("checked") == "true") {
|
||||
aRegObj.onHide.apply(aRegObj.context);
|
||||
} else {
|
||||
aRegObj.onShow.apply(aRegObj.context, [InspectorUI.selection]);
|
||||
aRegObj.onSelect.apply(aRegObj.context, [InspectorUI.selection]);
|
||||
}
|
||||
}, false);
|
||||
},
|
||||
|
||||
/**
|
||||
* Save a list of open tools to the inspector store.
|
||||
*
|
||||
* @param aWinID The ID of the window used to save the associated tools
|
||||
*/
|
||||
saveToolState: function IUI_saveToolState(aWinID)
|
||||
{
|
||||
let openTools = {};
|
||||
this.toolsDo(function IUI_toolsSetId(aTool) {
|
||||
if (aTool.panel.state == "open") {
|
||||
openTools[aTool.id] = true;
|
||||
}
|
||||
});
|
||||
InspectorStore.setValue(aWinID, "openTools", openTools);
|
||||
},
|
||||
|
||||
/**
|
||||
* Restore tools previously save using saveToolState().
|
||||
*
|
||||
* @param aWinID The ID of the window to which the associated tools are to be
|
||||
* restored.
|
||||
*/
|
||||
restoreToolState: function IUI_restoreToolState(aWinID)
|
||||
{
|
||||
let openTools = InspectorStore.getValue(aWinID, "openTools");
|
||||
InspectorUI.selection = InspectorUI.selection;
|
||||
if (openTools) {
|
||||
this.toolsDo(function IUI_toolsOnShow(aTool) {
|
||||
if (aTool.id in openTools) {
|
||||
aTool.onShow.apply(aTool.context, [InspectorUI.selection]);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Loop through all registered tools and pass each into the provided function
|
||||
*
|
||||
* @param aFunction The function to which each tool is to be passed
|
||||
*/
|
||||
toolsDo: function IUI_toolsDo(aFunction)
|
||||
{
|
||||
for each (let tool in this.tools) {
|
||||
aFunction(tool);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* The Inspector store is used for storing data specific to each tab window.
|
||||
@ -1357,4 +1479,3 @@ var InspectorStore = {
|
||||
XPCOMUtils.defineLazyGetter(InspectorUI, "inspectCmd", function () {
|
||||
return document.getElementById("Tools:Inspect");
|
||||
});
|
||||
|
||||
|
@ -2456,7 +2456,7 @@
|
||||
<body><![CDATA[
|
||||
event.stopPropagation();
|
||||
var tab = document.tooltipNode;
|
||||
if (tab.localName != "tab") {
|
||||
if (tab.localName != "tab" || this.tabContainer.draggedTab) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
@ -3813,6 +3813,19 @@
|
||||
if (!tab || !tab._fullyOpen || tab.closing)
|
||||
return;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (event.altKey) {
|
||||
#else
|
||||
if (event.ctrlKey) {
|
||||
#endif
|
||||
let dt = event.dataTransfer;
|
||||
let spec = this.tabbrowser.getBrowserForTab(tab).currentURI.spec;
|
||||
dt.setData("text/x-moz-url", spec);
|
||||
let favicon = document.getAnonymousElementByAttribute(tab, "class", "tab-icon-image");
|
||||
dt.setDragImage(favicon, 16, 16);
|
||||
return;
|
||||
}
|
||||
|
||||
this.setAttribute("drag", "move");
|
||||
this.draggedTab = tab;
|
||||
tab.setAttribute("dragged", "true");
|
||||
|
@ -526,12 +526,15 @@ let Utils = {
|
||||
// Pass as many arguments as you want, it'll print them all.
|
||||
trace: function Utils_trace() {
|
||||
var text = this.expandArgumentsForLog(arguments);
|
||||
// cut off the first two lines of the stack trace, because they're just this function.
|
||||
let stack = Error().stack.replace(/^.*?\n.*?\n/, "");
|
||||
|
||||
// cut off the first line of the stack trace, because that's just this function.
|
||||
let stack = Error().stack.split("\n").slice(1);
|
||||
|
||||
// if the caller was assert, cut out the line for the assert function as well.
|
||||
if (this.trace.caller.name == 'Utils_assert')
|
||||
stack = stack.replace(/^.*?\n/, "");
|
||||
this.log('trace: ' + text + '\n' + stack);
|
||||
if (stack[0].indexOf("Utils_assert(") == 0)
|
||||
stack.splice(0, 1);
|
||||
|
||||
this.log('trace: ' + text + '\n' + stack.join("\n"));
|
||||
},
|
||||
|
||||
// ----------
|
||||
@ -560,10 +563,10 @@ let Utils = {
|
||||
else
|
||||
text = "tabview assert: " + label;
|
||||
|
||||
// cut off the first two lines of the stack trace, because they're just this function.
|
||||
text += Error().stack.replace(/^.*?\n.*?\n/, "");
|
||||
// cut off the first line of the stack trace, because that's just this function.
|
||||
let stack = Error().stack.split("\n").slice(1);
|
||||
|
||||
throw text;
|
||||
throw text + "\n" + stack.join("\n");
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1003,6 +1003,9 @@ let UI = {
|
||||
[
|
||||
#ifdef XP_UNIX
|
||||
"redo",
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
"fullScreen",
|
||||
#endif
|
||||
"closeWindow", "tabview", "undoCloseTab", "undoCloseWindow",
|
||||
"privatebrowsing"
|
||||
|
@ -54,6 +54,7 @@ _BROWSER_FILES = \
|
||||
browser_inspector_treePanel_output.js \
|
||||
browser_inspector_treePanel_input.html \
|
||||
browser_inspector_treePanel_result.html \
|
||||
browser_inspector_registertools.js \
|
||||
browser_inspector_bug_665880.js \
|
||||
$(NULL)
|
||||
|
||||
|
@ -0,0 +1,275 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* ***** 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 Inspector Highlighter Tests.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* The Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Michael Ratcliffe <mratcliffe@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
let doc;
|
||||
let h1;
|
||||
let tool1;
|
||||
let tool2;
|
||||
let tool3;
|
||||
|
||||
function createDocument()
|
||||
{
|
||||
let div = doc.createElement("div");
|
||||
let h1 = doc.createElement("h1");
|
||||
let p1 = doc.createElement("p");
|
||||
let p2 = doc.createElement("p");
|
||||
let div2 = doc.createElement("div");
|
||||
let p3 = doc.createElement("p");
|
||||
doc.title = "Inspector Tree Selection Test";
|
||||
h1.textContent = "Inspector Tree Selection Test";
|
||||
p1.textContent = "This is some example text";
|
||||
p2.textContent = "Lorem ipsum dolor sit amet, consectetur adipisicing " +
|
||||
"elit, sed do eiusmod tempor incididunt ut labore et dolore magna " +
|
||||
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco " +
|
||||
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
|
||||
"dolor in reprehenderit in voluptate velit esse cillum dolore eu " +
|
||||
"fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " +
|
||||
"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
|
||||
p3.textContent = "Lorem ipsum dolor sit amet, consectetur adipisicing " +
|
||||
"elit, sed do eiusmod tempor incididunt ut labore et dolore magna " +
|
||||
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco " +
|
||||
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
|
||||
"dolor in reprehenderit in voluptate velit esse cillum dolore eu " +
|
||||
"fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " +
|
||||
"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
|
||||
div.appendChild(h1);
|
||||
div.appendChild(p1);
|
||||
div.appendChild(p2);
|
||||
div2.appendChild(p3);
|
||||
doc.body.appendChild(div);
|
||||
doc.body.appendChild(div2);
|
||||
setupHighlighterTests();
|
||||
}
|
||||
|
||||
function setupHighlighterTests()
|
||||
{
|
||||
h1 = doc.querySelectorAll("h1")[0];
|
||||
ok(h1, "we have the header node");
|
||||
Services.obs.addObserver(inspectorOpen, "inspector-opened", false);
|
||||
InspectorUI.toggleInspectorUI();
|
||||
}
|
||||
|
||||
function inspectorOpen()
|
||||
{
|
||||
info("we received the inspector-opened notification");
|
||||
Services.obs.removeObserver(inspectorOpen, "inspector-opened", false);
|
||||
Services.obs.addObserver(startToolTests, "inspector-highlighting", false);
|
||||
let rect = h1.getBoundingClientRect();
|
||||
executeSoon(function() {
|
||||
EventUtils.synthesizeMouse(h1, 2, 2, {type: "mousemove"}, content);
|
||||
});
|
||||
}
|
||||
|
||||
function startToolTests(evt)
|
||||
{
|
||||
info("we received the inspector-highlighting notification");
|
||||
Services.obs.removeObserver(startToolTests, "inspector-highlighting", false);
|
||||
InspectorUI.stopInspecting();
|
||||
|
||||
info("Getting InspectorUI.tools");
|
||||
let tools = InspectorUI.tools;
|
||||
tool1 = InspectorUI.tools["tool_1"];
|
||||
tool2 = InspectorUI.tools["tool_2"];
|
||||
tool3 = InspectorUI.tools["tool_3"];
|
||||
|
||||
info("Checking panel states 1");
|
||||
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
|
||||
|
||||
info("Calling show method for all tools");
|
||||
tool1.onShow.apply(tool1.context, [h1]);
|
||||
tool2.onShow.apply(tool2.context, [h1]);
|
||||
tool3.onShow.apply(tool3.context, [h1]);
|
||||
|
||||
info("Checking panel states 2");
|
||||
ok(tool1.context.panelIsOpen, "Panel 1 is open");
|
||||
ok(tool2.context.panelIsOpen, "Panel 2 is open");
|
||||
ok(tool3.context.panelIsOpen, "Panel 3 is open");
|
||||
|
||||
info("Calling selectNode method for all tools");
|
||||
tool1.onSelect.apply(tool1.context, [h1]);
|
||||
tool2.onSelect.apply(tool2.context, [h1]);
|
||||
tool3.onSelect.apply(tool3.context, [h1]);
|
||||
|
||||
info("Calling hide method for all tools");
|
||||
tool1.onHide.apply(tool1.context, [h1]);
|
||||
tool2.onHide.apply(tool2.context, [h1]);
|
||||
tool3.onHide.apply(tool3.context, [h1]);
|
||||
|
||||
info("Checking panel states 3");
|
||||
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
|
||||
|
||||
info("Showing tools 1 & 3");
|
||||
tool1.onShow.apply(tool1.context, [h1]);
|
||||
tool3.onShow.apply(tool3.context, [h1]);
|
||||
|
||||
info("Checking panel states 4");
|
||||
ok(tool1.context.panelIsOpen, "Panel 1 is open");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsOpen, "Panel 3 is open");
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
waitForFocus(testSecondTab, content);
|
||||
}, true);
|
||||
|
||||
content.location = "data:text/html,registertool new tab test for inspector";
|
||||
}
|
||||
|
||||
function testSecondTab()
|
||||
{
|
||||
info("Opened second tab");
|
||||
info("Checking panel states 5");
|
||||
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
|
||||
|
||||
info("Closing current tab");
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
info("Checking panel states 6");
|
||||
ok(tool1.context.panelIsOpen, "Panel 1 is open");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsOpen, "Panel 3 is open");
|
||||
|
||||
executeSoon(finishUp);
|
||||
}
|
||||
|
||||
function finishUp() {
|
||||
InspectorUI.closeInspectorUI(true);
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
waitForExplicitFinish();
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
doc = content.document;
|
||||
waitForFocus(registerTools, content);
|
||||
}, true);
|
||||
|
||||
content.location = "data:text/html,registertool tests for inspector";
|
||||
}
|
||||
|
||||
function registerTools()
|
||||
{
|
||||
createDocument();
|
||||
registerTool(new testTool("tool_1", "Tool 1", "Tool 1 tooltip", "I"));
|
||||
registerTool(new testTool("tool_2", "Tool 2", "Tool 2 tooltip", "J"));
|
||||
registerTool(new testTool("tool_3", "Tool 3", "Tool 3 tooltip", "K"));
|
||||
}
|
||||
|
||||
function registerTool(aTool)
|
||||
{
|
||||
InspectorUI.registerTool({
|
||||
id: aTool.id,
|
||||
label: aTool.label,
|
||||
tooltiptext: aTool.tooltip,
|
||||
accesskey: aTool.accesskey,
|
||||
context: aTool,
|
||||
onSelect: aTool.selectNode,
|
||||
onShow: aTool.show,
|
||||
onHide: aTool.hide,
|
||||
panel: aTool.panel
|
||||
});
|
||||
}
|
||||
|
||||
// Tool Object
|
||||
function testTool(aToolId, aLabel, aTooltip, aAccesskey)
|
||||
{
|
||||
this.id = aToolId;
|
||||
this.label = aLabel;
|
||||
this.tooltip = aTooltip;
|
||||
this.accesskey = aAccesskey
|
||||
this.panel = this.createPanel();
|
||||
}
|
||||
|
||||
testTool.prototype = {
|
||||
get panelIsOpen()
|
||||
{
|
||||
return this.panel.state == "open" || this.panel.state == "showing";
|
||||
},
|
||||
|
||||
get panelIsClosed()
|
||||
{
|
||||
return this.panel.state == "closed" || this.panel.state == "hiding";
|
||||
},
|
||||
|
||||
selectNode: function BIR_selectNode(aNode) {
|
||||
is(InspectorUI.selection, aNode,
|
||||
"selectNode: currently selected node was passed: " + this.id);
|
||||
},
|
||||
|
||||
show: function BIR_show(aNode) {
|
||||
this.panel.openPopup(gBrowser.selectedBrowser,
|
||||
"end_before", 0, 20, false, false);
|
||||
is(InspectorUI.selection, aNode,
|
||||
"show: currently selected node was passed: " + this.id);
|
||||
},
|
||||
|
||||
hide: function BIR_hide() {
|
||||
info(this.id + " hide");
|
||||
this.panel.hidePopup();
|
||||
},
|
||||
|
||||
createPanel: function BIR_createPanel() {
|
||||
let popupSet = document.getElementById("mainPopupSet");
|
||||
let ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
let panel = this.panel = document.createElementNS(ns, "panel");
|
||||
panel.setAttribute("orient", "vertical");
|
||||
panel.setAttribute("noautofocus", "true");
|
||||
panel.setAttribute("noautohide", "true");
|
||||
panel.setAttribute("titlebar", "normal");
|
||||
panel.setAttribute("close", "true");
|
||||
panel.setAttribute("label", "Panel for " + this.id);
|
||||
panel.setAttribute("width", 200);
|
||||
panel.setAttribute("height", 400);
|
||||
popupSet.appendChild(panel);
|
||||
|
||||
ok(panel.parentNode == popupSet, "Panel created and appended successfully");
|
||||
return panel;
|
||||
},
|
||||
};
|
@ -25,7 +25,7 @@ function onTabViewWindowLoaded() {
|
||||
|
||||
// create a group item
|
||||
let groupItem = createGroupItemWithBlankTabs(window, 300, 300, 400, 1);
|
||||
groupItemId = groupItem.id;
|
||||
let groupItemId = groupItem.id;
|
||||
is(groupItem.getChildren().length, 1, "The new group has a tab item");
|
||||
// start the tests
|
||||
waitForFocus(function() {
|
||||
|
@ -93,5 +93,3 @@ browser.jar:
|
||||
# the following files are browser-specific overrides
|
||||
* content/browser/license.html (/toolkit/content/license.html)
|
||||
% override chrome://global/content/license.html chrome://browser/content/license.html
|
||||
# XXXkhuey This really should live in browser/, but it's too late in the release cycle to move
|
||||
+ content/browser/NetworkPanel.xhtml (/toolkit/components/console/hudservice/NetworkPanel.xhtml)
|
||||
|
@ -47,8 +47,6 @@ endif
|
||||
|
||||
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
|
||||
|
||||
tier_app_dirs += toolkit/components/console/hudservice
|
||||
|
||||
ifdef MOZ_SERVICES_SYNC
|
||||
tier_app_dirs += services
|
||||
endif
|
||||
|
@ -250,7 +250,7 @@ SessionStartup.prototype = {
|
||||
/* ........ Public API ................*/
|
||||
|
||||
/**
|
||||
* Get the session state as a string
|
||||
* Get the session state as a jsval
|
||||
*/
|
||||
get state() {
|
||||
return this._initialState;
|
||||
|
@ -116,7 +116,7 @@ const CAPABILITIES = [
|
||||
// These keys are for internal use only - they shouldn't be part of the JSON
|
||||
// that gets saved to disk nor part of the strings returned by the API.
|
||||
const INTERNAL_KEYS = ["_tabStillLoading", "_hosts", "_formDataSaved",
|
||||
"_shouldRestore"];
|
||||
"_shouldRestore", "_host", "_scheme"];
|
||||
|
||||
// These are tab events that we listen to.
|
||||
const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide",
|
||||
@ -185,7 +185,7 @@ SessionStoreService.prototype = {
|
||||
|
||||
// xul:tab attributes to (re)store (extensions might want to hook in here);
|
||||
// the favicon is always saved for the about:sessionrestore page
|
||||
xulAttributes: ["image"],
|
||||
xulAttributes: {"image": true},
|
||||
|
||||
// set default load state
|
||||
_loadState: STATE_STOPPED,
|
||||
@ -498,6 +498,7 @@ SessionStoreService.prototype = {
|
||||
// quit-application notification so the browser is about to exit.
|
||||
if (this._loadState == STATE_QUITTING)
|
||||
return;
|
||||
this._lastSessionState = null;
|
||||
let openWindows = {};
|
||||
this._forEachBrowserWindow(function(aWindow) {
|
||||
Array.forEach(aWindow.gBrowser.tabs, function(aTab) {
|
||||
@ -1426,10 +1427,10 @@ SessionStoreService.prototype = {
|
||||
},
|
||||
|
||||
persistTabAttribute: function sss_persistTabAttribute(aName) {
|
||||
if (this.xulAttributes.indexOf(aName) != -1)
|
||||
if (aName in this.xulAttributes)
|
||||
return; // this attribute is already being tracked
|
||||
|
||||
this.xulAttributes.push(aName);
|
||||
this.xulAttributes[aName] = true;
|
||||
this.saveStateDelayed();
|
||||
},
|
||||
|
||||
@ -1736,12 +1737,10 @@ SessionStoreService.prototype = {
|
||||
else if (tabData.disallow)
|
||||
delete tabData.disallow;
|
||||
|
||||
if (this.xulAttributes.length > 0) {
|
||||
tabData.attributes = {};
|
||||
Array.forEach(aTab.attributes, function(aAttr) {
|
||||
if (this.xulAttributes.indexOf(aAttr.name) > -1)
|
||||
tabData.attributes[aAttr.name] = aAttr.value;
|
||||
}, this);
|
||||
tabData.attributes = {};
|
||||
for (let name in this.xulAttributes) {
|
||||
if (aTab.hasAttribute(name))
|
||||
tabData.attributes[name] = aTab.getAttribute(name);
|
||||
}
|
||||
|
||||
if (aTab.__SS_extdata)
|
||||
@ -1770,7 +1769,15 @@ SessionStoreService.prototype = {
|
||||
_serializeHistoryEntry:
|
||||
function sss_serializeHistoryEntry(aEntry, aFullData, aIsPinned) {
|
||||
var entry = { url: aEntry.URI.spec };
|
||||
|
||||
|
||||
try {
|
||||
entry._host = aEntry.URI.host;
|
||||
entry._scheme = aEntry.URI.scheme;
|
||||
}
|
||||
catch (ex) {
|
||||
// We just won't attempt to get cookies for this entry.
|
||||
}
|
||||
|
||||
if (aEntry.title && aEntry.title != entry.url) {
|
||||
entry.title = aEntry.title;
|
||||
}
|
||||
@ -2178,21 +2185,20 @@ SessionStoreService.prototype = {
|
||||
*/
|
||||
_extractHostsForCookies:
|
||||
function sss__extractHostsForCookies(aEntry, aHosts, aCheckPrivacy, aIsPinned) {
|
||||
let match;
|
||||
|
||||
if ((match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url)) != null) {
|
||||
if (!aHosts[match[1]] &&
|
||||
(!aCheckPrivacy ||
|
||||
this._checkPrivacyLevel(this._getURIFromString(aEntry.url).schemeIs("https"),
|
||||
aIsPinned))) {
|
||||
// By setting this to true or false, we can determine when looking at
|
||||
// the host in _updateCookies if we should check for privacy.
|
||||
aHosts[match[1]] = aIsPinned;
|
||||
}
|
||||
// _host and _scheme may not be set (for about: urls for example), in which
|
||||
// case testing _scheme will be sufficient.
|
||||
if (/https?/.test(aEntry._scheme) && !aHosts[aEntry._host] &&
|
||||
(!aCheckPrivacy ||
|
||||
this._checkPrivacyLevel(aEntry._scheme == "https", aIsPinned))) {
|
||||
// By setting this to true or false, we can determine when looking at
|
||||
// the host in _updateCookies if we should check for privacy.
|
||||
aHosts[aEntry._host] = aIsPinned;
|
||||
}
|
||||
else if ((match = /^file:\/\/([^\/]*)/.exec(aEntry.url)) != null) {
|
||||
aHosts[match[1]] = true;
|
||||
else if (aEntry._scheme == "file") {
|
||||
aHosts[aEntry._host] = true;
|
||||
}
|
||||
|
||||
if (aEntry.children) {
|
||||
aEntry.children.forEach(function(entry) {
|
||||
this._extractHostsForCookies(entry, aHosts, aCheckPrivacy, aIsPinned);
|
||||
@ -2741,6 +2747,9 @@ SessionStoreService.prototype = {
|
||||
else
|
||||
tabbrowser.showTab(tab);
|
||||
|
||||
for (let name in tabData.attributes)
|
||||
this.xulAttributes[name] = true;
|
||||
|
||||
tabData._tabStillLoading = true;
|
||||
|
||||
// keep the data around to prevent dataloss in case
|
||||
@ -2856,9 +2865,8 @@ SessionStoreService.prototype = {
|
||||
CAPABILITIES.forEach(function(aCapability) {
|
||||
browser.docShell["allow" + aCapability] = disallow.indexOf(aCapability) == -1;
|
||||
});
|
||||
Array.filter(tab.attributes, function(aAttr) {
|
||||
return (_this.xulAttributes.indexOf(aAttr.name) > -1);
|
||||
}).forEach(tab.removeAttribute, tab);
|
||||
for (let name in this.xulAttributes)
|
||||
tab.removeAttribute(name);
|
||||
for (let name in tabData.attributes)
|
||||
tab.setAttribute(name, tabData.attributes[name]);
|
||||
|
||||
|
35
testing/sisyphus/bin/dateparse.pl → browser/devtools/Makefile.in
Executable file → Normal file
35
testing/sisyphus/bin/dateparse.pl → browser/devtools/Makefile.in
Executable file → Normal file
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/perl -w
|
||||
# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
@ -13,14 +12,15 @@
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Automated Testing Code.
|
||||
# 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) 2008
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Bob Clary <bob@bclary.com>
|
||||
# Contributor(s):
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -36,14 +36,21 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
use Date::Parse;
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
if (@ARGV == 0)
|
||||
{
|
||||
die "usage: dateparse.pl datestring";
|
||||
}
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
my $datestring = $ARGV[0];
|
||||
my $time = str2time($datestring);
|
||||
print($time);
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
DIRS = \
|
||||
webconsole \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
# DIRS += test # no tests yet
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
2
browser/devtools/jar.mn
Normal file
2
browser/devtools/jar.mn
Normal file
@ -0,0 +1,2 @@
|
||||
browser.jar:
|
||||
content/browser/NetworkPanel.xhtml (webconsole/NetworkPanel.xhtml)
|
@ -1730,7 +1730,7 @@ HUD_SERVICE.prototype =
|
||||
hud.consoleWindowUnregisterOnHide = false;
|
||||
|
||||
// Remove the HUDBox and the consolePanel if the Web Console is inside a
|
||||
// floating xul:panel.
|
||||
// floating panel.
|
||||
hud.HUDBox.parentNode.removeChild(hud.HUDBox);
|
||||
if (hud.consolePanel) {
|
||||
hud.consolePanel.parentNode.removeChild(hud.consolePanel);
|
||||
@ -2505,20 +2505,20 @@ HUD_SERVICE.prototype =
|
||||
let outputNode = this.hudReferences[hudId].outputNode;
|
||||
|
||||
let chromeDocument = outputNode.ownerDocument;
|
||||
let msgNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
|
||||
let msgNode = chromeDocument.createElementNS(XUL_NS, "hbox");
|
||||
|
||||
let methodNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let methodNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||
methodNode.setAttribute("value", aActivityObject.method);
|
||||
methodNode.classList.add("webconsole-msg-body-piece");
|
||||
msgNode.appendChild(methodNode);
|
||||
|
||||
let linkNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
|
||||
let linkNode = chromeDocument.createElementNS(XUL_NS, "hbox");
|
||||
linkNode.setAttribute("flex", "1");
|
||||
linkNode.classList.add("webconsole-msg-body-piece");
|
||||
linkNode.classList.add("webconsole-msg-link");
|
||||
msgNode.appendChild(linkNode);
|
||||
|
||||
let urlNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let urlNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||
urlNode.setAttribute("crop", "center");
|
||||
urlNode.setAttribute("flex", "1");
|
||||
urlNode.setAttribute("title", aActivityObject.url);
|
||||
@ -2528,7 +2528,7 @@ HUD_SERVICE.prototype =
|
||||
urlNode.classList.add("webconsole-msg-url");
|
||||
linkNode.appendChild(urlNode);
|
||||
|
||||
let statusNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let statusNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||
statusNode.setAttribute("value", "");
|
||||
statusNode.classList.add("hud-clickable");
|
||||
statusNode.classList.add("webconsole-msg-body-piece");
|
||||
@ -3040,7 +3040,7 @@ HeadsUpDisplay.prototype = {
|
||||
*/
|
||||
get tab()
|
||||
{
|
||||
// TODO: we should only keep a reference to the xul:tab object and use
|
||||
// TODO: we should only keep a reference to the tab object and use
|
||||
// getters to determine the rest of objects we need - the chrome window,
|
||||
// document, etc. We should simplify the entire code to use only a single
|
||||
// tab object ref. See bug 656231.
|
||||
@ -3136,12 +3136,15 @@ HeadsUpDisplay.prototype = {
|
||||
|
||||
panel.addEventListener("popupshown", onPopupShown,false);
|
||||
|
||||
let onPopupHiding = (function HUD_onPopupHiding(aEvent) {
|
||||
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
|
||||
if (aEvent.target != panel) {
|
||||
return;
|
||||
}
|
||||
|
||||
panel.removeEventListener("popuphiding", onPopupHiding, false);
|
||||
panel.removeEventListener("popuphidden", onPopupHidden, false);
|
||||
if (panel.parentNode) {
|
||||
panel.parentNode.removeChild(panel);
|
||||
}
|
||||
|
||||
let width = 0;
|
||||
try {
|
||||
@ -3149,12 +3152,15 @@ HeadsUpDisplay.prototype = {
|
||||
}
|
||||
catch (ex) { }
|
||||
|
||||
if (width > -1) {
|
||||
if (width > 0) {
|
||||
Services.prefs.setIntPref("devtools.webconsole.width", panel.clientWidth);
|
||||
}
|
||||
|
||||
Services.prefs.setIntPref("devtools.webconsole.top", panel.popupBoxObject.y);
|
||||
Services.prefs.setIntPref("devtools.webconsole.left", panel.popupBoxObject.x);
|
||||
/*
|
||||
* Removed because of bug 674562
|
||||
* Services.prefs.setIntPref("devtools.webconsole.top", panel.panelBox.y);
|
||||
* Services.prefs.setIntPref("devtools.webconsole.left", panel.panelBox.x);
|
||||
*/
|
||||
|
||||
// Make sure we are not going to close again, drop the hudId reference of
|
||||
// the panel.
|
||||
@ -3170,19 +3176,6 @@ HeadsUpDisplay.prototype = {
|
||||
this.consolePanel = null;
|
||||
}).bind(this);
|
||||
|
||||
panel.addEventListener("popuphiding", onPopupHiding, false);
|
||||
|
||||
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
|
||||
if (aEvent.target != panel) {
|
||||
return;
|
||||
}
|
||||
|
||||
panel.removeEventListener("popuphidden", onPopupHidden, false);
|
||||
if (panel.parentNode) {
|
||||
panel.parentNode.removeChild(panel);
|
||||
}
|
||||
}).bind(this);
|
||||
|
||||
panel.addEventListener("popuphidden", onPopupHidden, false);
|
||||
|
||||
let lastIndex = -1;
|
||||
@ -3249,10 +3242,14 @@ HeadsUpDisplay.prototype = {
|
||||
positionConsole: function HUD_positionConsole(aPosition)
|
||||
{
|
||||
if (!(aPosition in this.positions)) {
|
||||
throw new Error("Incorrect argument: " + aPosition + ". Cannot position Web Console");
|
||||
throw new Error("Incorrect argument: " + aPosition +
|
||||
". Cannot position Web Console");
|
||||
}
|
||||
|
||||
if (aPosition == "window") {
|
||||
let closeButton = this.consoleFilterToolbar.
|
||||
querySelector(".webconsole-close-button");
|
||||
closeButton.setAttribute("hidden", "true");
|
||||
this.createOwnWindowPanel();
|
||||
this.positionMenuitems.window.setAttribute("checked", true);
|
||||
if (this.positionMenuitems.last) {
|
||||
@ -3308,6 +3305,10 @@ HeadsUpDisplay.prototype = {
|
||||
this.outputNode.ensureIndexIsVisible(lastIndex);
|
||||
}
|
||||
|
||||
let closeButton = this.consoleFilterToolbar.
|
||||
getElementsByClassName("webconsole-close-button")[0];
|
||||
closeButton.removeAttribute("hidden");
|
||||
|
||||
this.uiInOwnWindow = false;
|
||||
if (this.consolePanel) {
|
||||
this.HUDBox.removeAttribute("flex");
|
||||
@ -3584,7 +3585,7 @@ HeadsUpDisplay.prototype = {
|
||||
* Creates the UI for re-positioning the console
|
||||
*
|
||||
* @return nsIDOMNode
|
||||
* The xul:toolbarbutton which holds the menu that allows the user to
|
||||
* The toolbarbutton which holds the menu that allows the user to
|
||||
* change the console position.
|
||||
*/
|
||||
createPositionUI: function HUD_createPositionUI()
|
||||
@ -5396,22 +5397,22 @@ ConsoleUtils = {
|
||||
// Make the icon container, which is a vertical box. Its purpose is to
|
||||
// ensure that the icon stays anchored at the top of the message even for
|
||||
// long multi-line messages.
|
||||
let iconContainer = aDocument.createElementNS(XUL_NS, "xul:vbox");
|
||||
let iconContainer = aDocument.createElementNS(XUL_NS, "vbox");
|
||||
iconContainer.classList.add("webconsole-msg-icon-container");
|
||||
|
||||
// Make the icon node. It's sprited and the actual region of the image is
|
||||
// determined by CSS rules.
|
||||
let iconNode = aDocument.createElementNS(XUL_NS, "xul:image");
|
||||
let iconNode = aDocument.createElementNS(XUL_NS, "image");
|
||||
iconNode.classList.add("webconsole-msg-icon");
|
||||
iconContainer.appendChild(iconNode);
|
||||
|
||||
// Make the spacer that positions the icon.
|
||||
let spacer = aDocument.createElementNS(XUL_NS, "xul:spacer");
|
||||
let spacer = aDocument.createElementNS(XUL_NS, "spacer");
|
||||
spacer.setAttribute("flex", "1");
|
||||
iconContainer.appendChild(spacer);
|
||||
|
||||
// Create the message body, which contains the actual text of the message.
|
||||
let bodyNode = aDocument.createElementNS(XUL_NS, "xul:description");
|
||||
let bodyNode = aDocument.createElementNS(XUL_NS, "description");
|
||||
bodyNode.setAttribute("flex", "1");
|
||||
bodyNode.classList.add("webconsole-msg-body");
|
||||
|
||||
@ -5425,15 +5426,15 @@ ConsoleUtils = {
|
||||
|
||||
bodyNode.appendChild(aBody);
|
||||
|
||||
let repeatContainer = aDocument.createElementNS(XUL_NS, "xul:hbox");
|
||||
let repeatContainer = aDocument.createElementNS(XUL_NS, "hbox");
|
||||
repeatContainer.setAttribute("align", "start");
|
||||
let repeatNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let repeatNode = aDocument.createElementNS(XUL_NS, "label");
|
||||
repeatNode.setAttribute("value", "1");
|
||||
repeatNode.classList.add("webconsole-msg-repeat");
|
||||
repeatContainer.appendChild(repeatNode);
|
||||
|
||||
// Create the timestamp.
|
||||
let timestampNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let timestampNode = aDocument.createElementNS(XUL_NS, "label");
|
||||
timestampNode.classList.add("webconsole-timestamp");
|
||||
let timestamp = ConsoleUtils.timestamp();
|
||||
let timestampString = ConsoleUtils.timestampString(timestamp);
|
||||
@ -5448,7 +5449,7 @@ ConsoleUtils = {
|
||||
}
|
||||
|
||||
// Create the containing node and append all its elements to it.
|
||||
let node = aDocument.createElementNS(XUL_NS, "xul:richlistitem");
|
||||
let node = aDocument.createElementNS(XUL_NS, "richlistitem");
|
||||
node.clipboardText = aClipboardText;
|
||||
node.classList.add("hud-msg-node");
|
||||
|
||||
@ -5523,7 +5524,7 @@ ConsoleUtils = {
|
||||
createLocationNode:
|
||||
function ConsoleUtils_createLocationNode(aDocument, aSourceURL,
|
||||
aSourceLine) {
|
||||
let locationNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let locationNode = aDocument.createElementNS(XUL_NS, "label");
|
||||
|
||||
// Create the text, which consists of an abbreviated version of the URL
|
||||
// plus an optional line number.
|
||||
@ -5662,7 +5663,7 @@ ConsoleUtils = {
|
||||
function ConsoleUtils_filterRepeatedConsole(aNode, aOutput) {
|
||||
let lastMessage = aOutput.lastChild;
|
||||
|
||||
// childNodes[2] is the xul:description element
|
||||
// childNodes[2] is the description element
|
||||
if (lastMessage &&
|
||||
aNode.childNodes[2].textContent ==
|
||||
lastMessage.childNodes[2].textContent) {
|
@ -21,6 +21,7 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
# David Dahl <ddahl@mozilla.com>
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -36,14 +37,15 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_JS_MODULES = HUDService.jsm \
|
||||
EXTRA_JS_MODULES = \
|
||||
HUDService.jsm \
|
||||
PropertyPanel.jsm \
|
||||
NetworkHelper.jsm \
|
||||
AutocompletePopup.jsm \
|
||||
@ -51,7 +53,7 @@ EXTRA_JS_MODULES = HUDService.jsm \
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
ifneq (mobile,$(MOZ_BUILD_APP))
|
||||
DIRS += tests
|
||||
DIRS += test
|
||||
endif
|
||||
endif
|
||||
|
@ -36,15 +36,13 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../../..
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = test_hudservice
|
||||
|
||||
DIRS = browser
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -21,6 +21,7 @@
|
||||
# David Dahl <ddahl@mozilla.com>
|
||||
# Patrick Walton <pcwalton@mozilla.com>
|
||||
# Mihai Șucan <mihai.sucan@gmail.com>
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
@ -36,11 +37,11 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../../../..
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = toolkit/components/console/hudservice/tests/browser
|
||||
relativesrcdir = browser/devtools/webconsole/test/browser
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_REPLACED_API_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console-replaced-api.html";
|
||||
const TEST_REPLACED_API_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console-replaced-api.html";
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
@ -41,7 +41,7 @@
|
||||
// Tests that the page's resources are displayed in the console as they're
|
||||
// loaded
|
||||
|
||||
const TEST_NETWORK_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network.html" + "?_date=" + Date.now();
|
||||
const TEST_NETWORK_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-network.html" + "?_date=" + Date.now();
|
||||
|
||||
function test() {
|
||||
addTab("data:text/html,Web Console basic network logging test");
|
@ -39,7 +39,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// Tests that the console object still exists after a page reload.
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
||||
|
||||
// Tests that the input field is focused when the console is opened.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -41,7 +41,7 @@
|
||||
// Tests to ensure that errors don't appear when the console is closed while a
|
||||
// completion is being performed.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
||||
|
||||
// Tests that errors still show up in the Web Console after a page reload.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-error.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-error.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
||||
|
||||
// Tests that console groups behave properly.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -12,7 +12,7 @@
|
||||
|
||||
Cu.import("resource:///modules/HUDService.jsm");
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -10,7 +10,7 @@
|
||||
|
||||
// Tests that the Web Console close button functions.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -41,7 +41,7 @@
|
||||
// Tests that exceptions thrown by content don't show up twice in the Web
|
||||
// Console.
|
||||
|
||||
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-duplicate-error.html";
|
||||
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-duplicate-error.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_DUPLICATE_ERROR_URI);
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
let HUD, inputNode;
|
||||
|
@ -12,7 +12,7 @@
|
||||
// Tests that the Web Console limits the number of lines displayed according to
|
||||
// the user's preferences.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
@ -36,7 +36,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-585956-console-trace.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-585956-console-trace.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user