mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central to services-central.
This commit is contained in:
commit
9d0322788a
@ -826,21 +826,20 @@ getAttributesCB(AtkObject *aAtkObj)
|
|||||||
AtkObject *
|
AtkObject *
|
||||||
getParentCB(AtkObject *aAtkObj)
|
getParentCB(AtkObject *aAtkObj)
|
||||||
{
|
{
|
||||||
if (!aAtkObj->accessible_parent) {
|
if (!aAtkObj->accessible_parent) {
|
||||||
nsAccessibleWrap *accWrap = GetAccessibleWrap(aAtkObj);
|
nsAccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
||||||
if (!accWrap) {
|
if (!accWrap)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
|
||||||
|
|
||||||
nsAccessible* accParent = accWrap->GetParent();
|
nsAccessible* accParent = accWrap->Parent();
|
||||||
if (!accParent)
|
if (!accParent)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
AtkObject *parent = nsAccessibleWrap::GetAtkObject(accParent);
|
AtkObject* parent = nsAccessibleWrap::GetAtkObject(accParent);
|
||||||
if (parent)
|
if (parent)
|
||||||
atk_object_set_parent(aAtkObj, parent);
|
atk_object_set_parent(aAtkObj, parent);
|
||||||
}
|
}
|
||||||
return aAtkObj->accessible_parent;
|
return aAtkObj->accessible_parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
@ -893,10 +892,9 @@ getIndexInParentCB(AtkObject *aAtkObj)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAccessible *parent = accWrap->GetParent();
|
nsAccessible* parent = accWrap->Parent();
|
||||||
if (!parent) {
|
if (!parent)
|
||||||
return -1; // No parent
|
return -1; // No parent
|
||||||
}
|
|
||||||
|
|
||||||
return parent->GetIndexOfEmbeddedChild(accWrap);
|
return parent->GetIndexOfEmbeddedChild(accWrap);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
|
|||||||
if (!keyBinding.IsEmpty()) {
|
if (!keyBinding.IsEmpty()) {
|
||||||
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
|
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
|
||||||
|
|
||||||
nsAccessible* parent = acc->GetParent();
|
nsAccessible* parent = acc->Parent();
|
||||||
PRUint32 role = parent ? parent->Role() : 0;
|
PRUint32 role = parent ? parent->Role() : 0;
|
||||||
if (role == nsIAccessibleRole::ROLE_PARENT_MENUITEM ||
|
if (role == nsIAccessibleRole::ROLE_PARENT_MENUITEM ||
|
||||||
role == nsIAccessibleRole::ROLE_MENUITEM ||
|
role == nsIAccessibleRole::ROLE_MENUITEM ||
|
||||||
@ -141,7 +141,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
|
|||||||
|
|
||||||
keysInHierarchyStr.Insert(str, 0);
|
keysInHierarchyStr.Insert(str, 0);
|
||||||
}
|
}
|
||||||
} while ((parent = parent->GetParent()) &&
|
} while ((parent = parent->Parent()) &&
|
||||||
parent->Role() != nsIAccessibleRole::ROLE_MENUBAR);
|
parent->Role() != nsIAccessibleRole::ROLE_MENUBAR);
|
||||||
|
|
||||||
keyBindingsStr.Append(';');
|
keyBindingsStr.Append(';');
|
||||||
|
@ -312,7 +312,7 @@ AccHideEvent::
|
|||||||
AccHideEvent(nsAccessible* aTarget, nsINode* aTargetNode) :
|
AccHideEvent(nsAccessible* aTarget, nsINode* aTargetNode) :
|
||||||
AccMutationEvent(::nsIAccessibleEvent::EVENT_HIDE, aTarget, aTargetNode)
|
AccMutationEvent(::nsIAccessibleEvent::EVENT_HIDE, aTarget, aTargetNode)
|
||||||
{
|
{
|
||||||
mParent = mAccessible->GetParent();
|
mParent = mAccessible->Parent();
|
||||||
mNextSibling = mAccessible->NextSibling();
|
mNextSibling = mAccessible->NextSibling();
|
||||||
mPrevSibling = mAccessible->PrevSibling();
|
mPrevSibling = mAccessible->PrevSibling();
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ AccGroupInfo::AccGroupInfo(nsAccessible* aItem, PRUint32 aRole) :
|
|||||||
mPosInSet(0), mSetSize(0), mParent(nsnull)
|
mPosInSet(0), mSetSize(0), mParent(nsnull)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(AccGroupInfo);
|
MOZ_COUNT_CTOR(AccGroupInfo);
|
||||||
nsAccessible* parent = aItem->GetParent();
|
nsAccessible* parent = aItem->Parent();
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -374,8 +374,8 @@ NotificationController::CoalesceEvents()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (tailEvent->mEventType == nsIAccessibleEvent::EVENT_SHOW) {
|
} else if (tailEvent->mEventType == nsIAccessibleEvent::EVENT_SHOW) {
|
||||||
if (thisEvent->mAccessible->GetParent() ==
|
if (thisEvent->mAccessible->Parent() ==
|
||||||
tailEvent->mAccessible->GetParent()) {
|
tailEvent->mAccessible->Parent()) {
|
||||||
tailEvent->mEventRule = thisEvent->mEventRule;
|
tailEvent->mEventRule = thisEvent->mEventRule;
|
||||||
|
|
||||||
// Coalesce text change events for show events.
|
// Coalesce text change events for show events.
|
||||||
|
@ -69,11 +69,9 @@ void
|
|||||||
TextUpdater::DoUpdate(const nsAString& aNewText, const nsAString& aOldText,
|
TextUpdater::DoUpdate(const nsAString& aNewText, const nsAString& aOldText,
|
||||||
PRUint32 aSkipStart)
|
PRUint32 aSkipStart)
|
||||||
{
|
{
|
||||||
nsAccessible* parent = mTextLeaf->GetParent();
|
nsAccessible* parent = mTextLeaf->Parent();
|
||||||
if (!parent) {
|
if (!parent)
|
||||||
NS_ERROR("No parent for text leaf!");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
mHyperText = parent->AsHyperText();
|
mHyperText = parent->AsHyperText();
|
||||||
if (!mHyperText) {
|
if (!mHyperText) {
|
||||||
|
@ -830,7 +830,7 @@ nsARIAGridAccessible::SetARIASelected(nsAccessible *aAccessible,
|
|||||||
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
|
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
|
||||||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
|
role == nsIAccessibleRole::ROLE_ROWHEADER ||
|
||||||
role == nsIAccessibleRole::ROLE_COLUMNHEADER) {
|
role == nsIAccessibleRole::ROLE_COLUMNHEADER) {
|
||||||
nsAccessible *row = aAccessible->GetParent();
|
nsAccessible* row = aAccessible->Parent();
|
||||||
|
|
||||||
if (row && row->Role() == nsIAccessibleRole::ROLE_ROW &&
|
if (row && row->Role() == nsIAccessibleRole::ROLE_ROW &&
|
||||||
nsAccUtils::IsARIASelected(row)) {
|
nsAccUtils::IsARIASelected(row)) {
|
||||||
@ -949,11 +949,11 @@ nsARIAGridCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
|||||||
NS_ENSURE_ARG_POINTER(aTable);
|
NS_ENSURE_ARG_POINTER(aTable);
|
||||||
*aTable = nsnull;
|
*aTable = nsnull;
|
||||||
|
|
||||||
nsAccessible* thisRow = GetParent();
|
nsAccessible* thisRow = Parent();
|
||||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsAccessible* table = thisRow->GetParent();
|
nsAccessible* table = thisRow->Parent();
|
||||||
if (!table)
|
if (!table)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -975,7 +975,7 @@ nsARIAGridCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsAccessible* row = GetParent();
|
nsAccessible* row = Parent();
|
||||||
if (!row)
|
if (!row)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -1003,11 +1003,11 @@ nsARIAGridCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsAccessible* row = GetParent();
|
nsAccessible* row = Parent();
|
||||||
if (!row)
|
if (!row)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsAccessible* table = row->GetParent();
|
nsAccessible* table = row->Parent();
|
||||||
if (!table)
|
if (!table)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -1096,7 +1096,7 @@ nsARIAGridCellAccessible::IsSelected(PRBool *aIsSelected)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsAccessible *row = GetParent();
|
nsAccessible* row = Parent();
|
||||||
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -1120,7 +1120,7 @@ nsARIAGridCellAccessible::ApplyARIAState(PRUint64* aState)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Check aria-selected="true" on the row.
|
// Check aria-selected="true" on the row.
|
||||||
nsAccessible* row = GetParent();
|
nsAccessible* row = Parent();
|
||||||
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1144,7 +1144,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
|
|||||||
|
|
||||||
// Expose "table-cell-index" attribute.
|
// Expose "table-cell-index" attribute.
|
||||||
|
|
||||||
nsAccessible* thisRow = GetParent();
|
nsAccessible* thisRow = Parent();
|
||||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -1162,7 +1162,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
|
|||||||
colCount++;
|
colCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAccessible* table = thisRow->GetParent();
|
nsAccessible* table = thisRow->Parent();
|
||||||
if (!table)
|
if (!table)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ nsAccUtils::GetDefaultLevel(nsAccessible *aAccessible)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (role == nsIAccessibleRole::ROLE_ROW) {
|
if (role == nsIAccessibleRole::ROLE_ROW) {
|
||||||
nsAccessible *parent = aAccessible->GetParent();
|
nsAccessible* parent = aAccessible->Parent();
|
||||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
if (parent && parent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
||||||
// It is a row inside flatten treegrid. Group level is always 1 until it
|
// It is a row inside flatten treegrid. Group level is always 1 until it
|
||||||
// is overriden by aria-level attribute.
|
// is overriden by aria-level attribute.
|
||||||
@ -338,7 +338,7 @@ nsAccUtils::GetAncestorWithRole(nsAccessible *aDescendant, PRUint32 aRole)
|
|||||||
{
|
{
|
||||||
nsAccessible *document = aDescendant->GetDocAccessible();
|
nsAccessible *document = aDescendant->GetDocAccessible();
|
||||||
nsAccessible *parent = aDescendant;
|
nsAccessible *parent = aDescendant;
|
||||||
while ((parent = parent->GetParent())) {
|
while ((parent = parent->Parent())) {
|
||||||
PRUint32 testRole = parent->Role();
|
PRUint32 testRole = parent->Role();
|
||||||
if (testRole == aRole)
|
if (testRole == aRole)
|
||||||
return parent;
|
return parent;
|
||||||
@ -359,7 +359,7 @@ nsAccUtils::GetSelectableContainer(nsAccessible* aAccessible, PRUint64 aState)
|
|||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
nsAccessible* parent = aAccessible;
|
nsAccessible* parent = aAccessible;
|
||||||
while ((parent = parent->GetParent()) && !parent->IsSelect()) {
|
while ((parent = parent->Parent()) && !parent->IsSelect()) {
|
||||||
if (Role(parent) == nsIAccessibleRole::ROLE_PANE)
|
if (Role(parent) == nsIAccessibleRole::ROLE_PANE)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
@ -420,7 +420,7 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
|
|||||||
if (textAcc)
|
if (textAcc)
|
||||||
return textAcc;
|
return textAcc;
|
||||||
|
|
||||||
} while (accessible = accessible->GetParent());
|
} while (accessible = accessible->Parent());
|
||||||
|
|
||||||
NS_NOTREACHED("We must reach document accessible implementing nsIAccessibleText!");
|
NS_NOTREACHED("We must reach document accessible implementing nsIAccessibleText!");
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
@ -421,8 +421,10 @@ NS_IMETHODIMP
|
|||||||
nsAccessible::GetParent(nsIAccessible **aParent)
|
nsAccessible::GetParent(nsIAccessible **aParent)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(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;
|
return *aParent ? NS_OK : NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,7 +731,7 @@ nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
|||||||
}
|
}
|
||||||
else if (gLastFocusedNode) {
|
else if (gLastFocusedNode) {
|
||||||
focusedChild = GetAccService()->GetAccessible(gLastFocusedNode);
|
focusedChild = GetAccService()->GetAccessible(gLastFocusedNode);
|
||||||
if (focusedChild && focusedChild->GetParent() != this)
|
if (focusedChild && focusedChild->Parent() != this)
|
||||||
focusedChild = nsnull;
|
focusedChild = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -819,7 +821,7 @@ nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
|||||||
// ensure obtained accessible is a child of this accessible.
|
// ensure obtained accessible is a child of this accessible.
|
||||||
nsAccessible* child = accessible;
|
nsAccessible* child = accessible;
|
||||||
while (true) {
|
while (true) {
|
||||||
nsAccessible* parent = child->GetParent();
|
nsAccessible* parent = child->Parent();
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
// Reached the top of the hierarchy. These bounds were inside an
|
// Reached the top of the hierarchy. These bounds were inside an
|
||||||
// accessible that is not a descendant of this one.
|
// accessible that is not a descendant of this one.
|
||||||
@ -2140,9 +2142,8 @@ nsAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||||||
nsIView *view = frame->GetViewExternal();
|
nsIView *view = frame->GetViewExternal();
|
||||||
if (view) {
|
if (view) {
|
||||||
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
||||||
if (scrollFrame || view->GetWidget() || !frame->GetParent()) {
|
if (scrollFrame || view->GetWidget() || !frame->GetParent())
|
||||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
return nsRelUtils::AddTarget(aRelationType, aRelation, Parent());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2615,7 +2616,7 @@ nsAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset,
|
|||||||
|
|
||||||
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
|
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
|
||||||
aText += kForcedNewLineChar;
|
aText += kForcedNewLineChar;
|
||||||
} else if (nsAccUtils::MustPrune(GetParent())) {
|
} else if (nsAccUtils::MustPrune(Parent())) {
|
||||||
// Expose the embedded object accessible as imaginary embedded object
|
// Expose the embedded object accessible as imaginary embedded object
|
||||||
// character if its parent hypertext accessible doesn't expose children to
|
// character if its parent hypertext accessible doesn't expose children to
|
||||||
// AT.
|
// AT.
|
||||||
@ -3257,16 +3258,18 @@ nsAccessible::GetLevelInternal()
|
|||||||
{
|
{
|
||||||
PRInt32 level = nsAccUtils::GetDefaultLevel(this);
|
PRInt32 level = nsAccUtils::GetDefaultLevel(this);
|
||||||
|
|
||||||
PRUint32 role = Role();
|
if (!IsBoundToParent())
|
||||||
nsAccessible* parent = GetParent();
|
return level;
|
||||||
|
|
||||||
|
PRUint32 role = Role();
|
||||||
if (role == nsIAccessibleRole::ROLE_OUTLINEITEM) {
|
if (role == nsIAccessibleRole::ROLE_OUTLINEITEM) {
|
||||||
// Always expose 'level' attribute for 'outlineitem' accessible. The number
|
// Always expose 'level' attribute for 'outlineitem' accessible. The number
|
||||||
// of nested 'grouping' accessibles containing 'outlineitem' accessible is
|
// of nested 'grouping' accessibles containing 'outlineitem' accessible is
|
||||||
// its level.
|
// its level.
|
||||||
level = 1;
|
level = 1;
|
||||||
|
|
||||||
while (parent) {
|
nsAccessible* parent = this;
|
||||||
|
while ((parent = parent->Parent())) {
|
||||||
PRUint32 parentRole = parent->Role();
|
PRUint32 parentRole = parent->Role();
|
||||||
|
|
||||||
if (parentRole == nsIAccessibleRole::ROLE_OUTLINE)
|
if (parentRole == nsIAccessibleRole::ROLE_OUTLINE)
|
||||||
@ -3274,7 +3277,6 @@ nsAccessible::GetLevelInternal()
|
|||||||
if (parentRole == nsIAccessibleRole::ROLE_GROUPING)
|
if (parentRole == nsIAccessibleRole::ROLE_GROUPING)
|
||||||
++ level;
|
++ level;
|
||||||
|
|
||||||
parent = parent->GetParent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (role == nsIAccessibleRole::ROLE_LISTITEM) {
|
} else if (role == nsIAccessibleRole::ROLE_LISTITEM) {
|
||||||
@ -3285,8 +3287,8 @@ nsAccessible::GetLevelInternal()
|
|||||||
|
|
||||||
// Calculate 'level' attribute based on number of parent listitems.
|
// Calculate 'level' attribute based on number of parent listitems.
|
||||||
level = 0;
|
level = 0;
|
||||||
|
nsAccessible* parent = this;
|
||||||
while (parent) {
|
while ((parent = parent->Parent())) {
|
||||||
PRUint32 parentRole = parent->Role();
|
PRUint32 parentRole = parent->Role();
|
||||||
|
|
||||||
if (parentRole == nsIAccessibleRole::ROLE_LISTITEM)
|
if (parentRole == nsIAccessibleRole::ROLE_LISTITEM)
|
||||||
@ -3294,23 +3296,20 @@ nsAccessible::GetLevelInternal()
|
|||||||
else if (parentRole != nsIAccessibleRole::ROLE_LIST)
|
else if (parentRole != nsIAccessibleRole::ROLE_LIST)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
parent = parent->GetParent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (level == 0) {
|
if (level == 0) {
|
||||||
// If this listitem is on top of nested lists then expose 'level'
|
// If this listitem is on top of nested lists then expose 'level'
|
||||||
// attribute.
|
// attribute.
|
||||||
nsAccessible* parent(GetParent());
|
parent = Parent();
|
||||||
PRInt32 siblingCount = parent->GetChildCount();
|
PRInt32 siblingCount = parent->GetChildCount();
|
||||||
for (PRInt32 siblingIdx = 0; siblingIdx < siblingCount; siblingIdx++) {
|
for (PRInt32 siblingIdx = 0; siblingIdx < siblingCount; siblingIdx++) {
|
||||||
nsAccessible* sibling = parent->GetChildAt(siblingIdx);
|
nsAccessible* sibling = parent->GetChildAt(siblingIdx);
|
||||||
|
|
||||||
nsCOMPtr<nsIAccessible> siblingChild;
|
nsAccessible* siblingChild = sibling->LastChild();
|
||||||
sibling->GetLastChild(getter_AddRefs(siblingChild));
|
if (siblingChild &&
|
||||||
if (nsAccUtils::Role(siblingChild) == nsIAccessibleRole::ROLE_LIST) {
|
siblingChild->Role() == nsIAccessibleRole::ROLE_LIST)
|
||||||
level = 1;
|
return 1;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
++ level; // level is 1-index based
|
++ level; // level is 1-index based
|
||||||
|
@ -279,7 +279,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Return parent accessible.
|
* Return parent accessible.
|
||||||
*/
|
*/
|
||||||
nsAccessible* GetParent() const { return mParent; }
|
nsAccessible* Parent() const { return mParent; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return child accessible at the given index.
|
* Return child accessible at the given index.
|
||||||
@ -307,12 +307,20 @@ public:
|
|||||||
PRBool HasChildren() { return !!GetChildAt(0); }
|
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
|
inline nsAccessible* NextSibling() const
|
||||||
{ return GetSiblingAtOffset(1); }
|
{ return GetSiblingAtOffset(1); }
|
||||||
inline nsAccessible* PrevSibling() const
|
inline nsAccessible* PrevSibling() const
|
||||||
{ return GetSiblingAtOffset(-1); }
|
{ 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.
|
* Return embedded accessible children count.
|
||||||
|
@ -234,8 +234,8 @@ nsLinkableAccessible::BindToParent(nsAccessible* aParent,
|
|||||||
// on non accessible node in parent chain but this node is skipped when tree
|
// on non accessible node in parent chain but this node is skipped when tree
|
||||||
// is traversed.
|
// is traversed.
|
||||||
nsAccessible* walkUpAcc = this;
|
nsAccessible* walkUpAcc = this;
|
||||||
while ((walkUpAcc = walkUpAcc->GetParent()) && !walkUpAcc->IsDoc()) {
|
while ((walkUpAcc = walkUpAcc->Parent()) && !walkUpAcc->IsDoc()) {
|
||||||
if (walkUpAcc && walkUpAcc->Role() == nsIAccessibleRole::ROLE_LINK &&
|
if (walkUpAcc->Role() == nsIAccessibleRole::ROLE_LINK &&
|
||||||
walkUpAcc->State() & states::LINKED) {
|
walkUpAcc->State() & states::LINKED) {
|
||||||
mIsLink = PR_TRUE;
|
mIsLink = PR_TRUE;
|
||||||
mActionAcc = walkUpAcc;
|
mActionAcc = walkUpAcc;
|
||||||
|
@ -581,7 +581,7 @@ nsDocAccessible::GetAccessible(nsINode* aNode) const
|
|||||||
// It will assert if not all the children were created
|
// It will assert if not all the children were created
|
||||||
// when they were first cached, and no invalidation
|
// when they were first cached, and no invalidation
|
||||||
// ever corrected parent accessible's child cache.
|
// ever corrected parent accessible's child cache.
|
||||||
nsAccessible* parent(accessible->GetParent());
|
nsAccessible* parent = accessible->Parent();
|
||||||
if (parent)
|
if (parent)
|
||||||
parent->TestChildCache(accessible);
|
parent->TestChildCache(accessible);
|
||||||
#endif
|
#endif
|
||||||
@ -1487,8 +1487,8 @@ nsDocAccessible::NotifyOfInitialUpdate()
|
|||||||
// a problem then consider to keep event processing per tab document.
|
// a problem then consider to keep event processing per tab document.
|
||||||
if (!IsRoot()) {
|
if (!IsRoot()) {
|
||||||
nsRefPtr<AccEvent> reorderEvent =
|
nsRefPtr<AccEvent> reorderEvent =
|
||||||
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, GetParent(),
|
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, Parent(), eAutoDetect,
|
||||||
eAutoDetect, AccEvent::eCoalesceFromSameSubtree);
|
AccEvent::eCoalesceFromSameSubtree);
|
||||||
ParentDocument()->FireDelayedAccessibleEvent(reorderEvent);
|
ParentDocument()->FireDelayedAccessibleEvent(reorderEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1817,7 +1817,7 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
|
|||||||
if (ancestor == this)
|
if (ancestor == this)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ancestor = ancestor->GetParent();
|
ancestor = ancestor->Parent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1902,7 +1902,7 @@ nsDocAccessible::UpdateTreeInternal(nsAccessible* aChild, bool aIsInsert)
|
|||||||
// The accessible parent may differ from container accessible if
|
// The accessible parent may differ from container accessible if
|
||||||
// the parent doesn't have own DOM node like list accessible for HTML
|
// the parent doesn't have own DOM node like list accessible for HTML
|
||||||
// selects.
|
// selects.
|
||||||
nsAccessible* parent = aChild->GetParent();
|
nsAccessible* parent = aChild->Parent();
|
||||||
NS_ASSERTION(parent, "No accessible parent?!");
|
NS_ASSERTION(parent, "No accessible parent?!");
|
||||||
if (parent)
|
if (parent)
|
||||||
parent->RemoveChild(aChild);
|
parent->RemoveChild(aChild);
|
||||||
|
@ -699,14 +699,14 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||||||
// is active.
|
// is active.
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
nsAccessible *containerAccessible = accessible->GetParent();
|
nsAccessible* container = accessible->Parent();
|
||||||
if (!containerAccessible)
|
if (!container)
|
||||||
return;
|
return;
|
||||||
// It is not top level menuitem
|
// It is not top level menuitem
|
||||||
// Only fire focus event if it is not inside collapsed popup
|
// Only fire focus event if it is not inside collapsed popup
|
||||||
// and not a listitem of a combo box
|
// and not a listitem of a combo box
|
||||||
if (containerAccessible->State() & states::COLLAPSED) {
|
if (container->State() & states::COLLAPSED) {
|
||||||
nsAccessible *containerParent = containerAccessible->GetParent();
|
nsAccessible* containerParent = container->Parent();
|
||||||
if (!containerParent)
|
if (!containerParent)
|
||||||
return;
|
return;
|
||||||
if (containerParent->Role() != nsIAccessibleRole::ROLE_COMBOBOX) {
|
if (containerParent->Role() != nsIAccessibleRole::ROLE_COMBOBOX) {
|
||||||
@ -796,7 +796,7 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
|
|||||||
// If ancestor chain of accessibles is not completely visible,
|
// If ancestor chain of accessibles is not completely visible,
|
||||||
// don't use this one. This happens for example if it's inside
|
// don't use this one. This happens for example if it's inside
|
||||||
// a background tab (tabbed browsing)
|
// a background tab (tabbed browsing)
|
||||||
nsAccessible *parent = accDoc->GetParent();
|
nsAccessible* parent = accDoc->Parent();
|
||||||
while (parent) {
|
while (parent) {
|
||||||
if (parent->State() & states::INVISIBLE)
|
if (parent->State() & states::INVISIBLE)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
@ -804,7 +804,7 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
|
|||||||
if (parent == this)
|
if (parent == this)
|
||||||
break; // Don't check past original root accessible we started with
|
break; // Don't check past original root accessible we started with
|
||||||
|
|
||||||
parent = parent->GetParent();
|
parent = parent->Parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ADDREF(aStart);
|
NS_ADDREF(aStart);
|
||||||
@ -878,7 +878,7 @@ nsRootAccessible::HandlePopupShownEvent(nsAccessible* aAccessible)
|
|||||||
|
|
||||||
if (role == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
|
if (role == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
|
||||||
// Fire expanded state change event for comboboxes and autocompeletes.
|
// Fire expanded state change event for comboboxes and autocompeletes.
|
||||||
nsAccessible* combobox = aAccessible->GetParent();
|
nsAccessible* combobox = aAccessible->Parent();
|
||||||
if (!combobox)
|
if (!combobox)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -914,7 +914,7 @@ nsRootAccessible::HandlePopupHidingEvent(nsINode* aNode,
|
|||||||
aAccessible->Role() != nsIAccessibleRole::ROLE_COMBOBOX_LIST)
|
aAccessible->Role() != nsIAccessibleRole::ROLE_COMBOBOX_LIST)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsAccessible* combobox = aAccessible->GetParent();
|
nsAccessible* combobox = aAccessible->Parent();
|
||||||
if (!combobox)
|
if (!combobox)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -407,8 +407,9 @@ nsHTMLTextFieldAccessible::GetNameInternal(nsAString& aName)
|
|||||||
// This means we're part of another control, so use parent accessible for name.
|
// 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
|
// This ensures that a textbox inside of a XUL widget gets
|
||||||
// an accessible name.
|
// an accessible name.
|
||||||
nsAccessible* parent = GetParent();
|
nsAccessible* parent = Parent();
|
||||||
parent->GetName(aName);
|
if (parent)
|
||||||
|
parent->GetName(aName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!aName.IsEmpty())
|
if (!aName.IsEmpty())
|
||||||
@ -452,7 +453,7 @@ nsHTMLTextFieldAccessible::NativeState()
|
|||||||
state |= states::PROTECTED;
|
state |= states::PROTECTED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsAccessible* parent = GetParent();
|
nsAccessible* parent = Parent();
|
||||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
if (parent && parent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
||||||
state |= states::HASPOPUP;
|
state |= states::HASPOPUP;
|
||||||
}
|
}
|
||||||
@ -650,7 +651,7 @@ nsHTMLLegendAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||||||
|
|
||||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
||||||
// Look for groupbox parent
|
// Look for groupbox parent
|
||||||
nsAccessible* groupbox = GetParent();
|
nsAccessible* groupbox = Parent();
|
||||||
|
|
||||||
if (groupbox && groupbox->Role() == nsIAccessibleRole::ROLE_GROUPING) {
|
if (groupbox && groupbox->Role() == nsIAccessibleRole::ROLE_GROUPING) {
|
||||||
// XXX: if group box exposes more than one relation of the given type
|
// XXX: if group box exposes more than one relation of the given type
|
||||||
|
@ -300,7 +300,7 @@ nsHTMLSelectOptionAccessible::NativeState()
|
|||||||
// visibility implementation unless they get reimplemented in layout
|
// visibility implementation unless they get reimplemented in layout
|
||||||
state &= ~states::OFFSCREEN;
|
state &= ~states::OFFSCREEN;
|
||||||
// <select> is not collapsed: compare bounds to calculate OFFSCREEN
|
// <select> is not collapsed: compare bounds to calculate OFFSCREEN
|
||||||
nsAccessible* listAcc = GetParent();
|
nsAccessible* listAcc = Parent();
|
||||||
if (listAcc) {
|
if (listAcc) {
|
||||||
PRInt32 optionX, optionY, optionWidth, optionHeight;
|
PRInt32 optionX, optionY, optionWidth, optionHeight;
|
||||||
PRInt32 listX, listY, listWidth, listHeight;
|
PRInt32 listX, listY, listWidth, listHeight;
|
||||||
@ -382,8 +382,9 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::DoAction(PRUint8 index)
|
|||||||
if (!newHTMLOption)
|
if (!newHTMLOption)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
// Clear old selection
|
// Clear old selection
|
||||||
nsAccessible* parent = GetParent();
|
nsAccessible* parent = Parent();
|
||||||
NS_ASSERTION(parent, "No parent!");
|
if (!parent)
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
nsCOMPtr<nsIContent> oldHTMLOptionContent =
|
nsCOMPtr<nsIContent> oldHTMLOptionContent =
|
||||||
GetFocusedOption(parent->GetContent());
|
GetFocusedOption(parent->GetContent());
|
||||||
@ -891,7 +892,7 @@ void nsHTMLComboboxListAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBo
|
|||||||
{
|
{
|
||||||
*aBoundingFrame = nsnull;
|
*aBoundingFrame = nsnull;
|
||||||
|
|
||||||
nsAccessible* comboAcc = GetParent();
|
nsAccessible* comboAcc = Parent();
|
||||||
if (!comboAcc)
|
if (!comboAcc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ already_AddRefed<nsIAccessibleTable>
|
|||||||
nsHTMLTableCellAccessible::GetTableAccessible()
|
nsHTMLTableCellAccessible::GetTableAccessible()
|
||||||
{
|
{
|
||||||
nsAccessible* parent = this;
|
nsAccessible* parent = this;
|
||||||
while ((parent = parent->GetParent())) {
|
while ((parent = parent->Parent())) {
|
||||||
PRUint32 role = parent->Role();
|
PRUint32 role = parent->Role();
|
||||||
if (role == nsIAccessibleRole::ROLE_TABLE ||
|
if (role == nsIAccessibleRole::ROLE_TABLE ||
|
||||||
role == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
role == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
||||||
@ -1528,8 +1528,9 @@ nsHTMLCaptionAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||||||
aRelation);
|
aRelation);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR)
|
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
||||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
return nsRelUtils::AddTarget(aRelationType, aRelation, Parent());
|
||||||
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -621,9 +621,9 @@ nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// From the descendant, go up and get the immediate child of this hypertext
|
// From the descendant, go up and get the immediate child of this hypertext
|
||||||
nsAccessible *childAccAtOffset = nsnull;
|
nsAccessible* childAccAtOffset = nsnull;
|
||||||
while (descendantAcc) {
|
while (descendantAcc) {
|
||||||
nsAccessible *parentAcc = descendantAcc->GetParent();
|
nsAccessible* parentAcc = descendantAcc->Parent();
|
||||||
if (parentAcc == this) {
|
if (parentAcc == this) {
|
||||||
childAccAtOffset = descendantAcc;
|
childAccAtOffset = descendantAcc;
|
||||||
break;
|
break;
|
||||||
|
@ -285,7 +285,7 @@ nsAccessibleWrap::GetUnignoredChildren(nsTArray<nsRefPtr<nsAccessibleWrap> > &aC
|
|||||||
already_AddRefed<nsIAccessible>
|
already_AddRefed<nsIAccessible>
|
||||||
nsAccessibleWrap::GetUnignoredParent()
|
nsAccessibleWrap::GetUnignoredParent()
|
||||||
{
|
{
|
||||||
nsAccessibleWrap *parentWrap = static_cast<nsAccessibleWrap*>(GetParent());
|
nsAccessibleWrap* parentWrap = static_cast<nsAccessibleWrap*>(Parent());
|
||||||
if (!parentWrap)
|
if (!parentWrap)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
@ -313,12 +313,12 @@ nsAccessibleWrap::AncestorIsFlat()
|
|||||||
// look the same on all platforms, we still let the C++ objects be created
|
// look the same on all platforms, we still let the C++ objects be created
|
||||||
// though.
|
// though.
|
||||||
|
|
||||||
nsAccessible* parent(GetParent());
|
nsAccessible* parent = Parent();
|
||||||
while (parent) {
|
while (parent) {
|
||||||
if (nsAccUtils::MustPrune(parent))
|
if (nsAccUtils::MustPrune(parent))
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
|
|
||||||
parent = parent->GetParent();
|
parent = parent->Parent();
|
||||||
}
|
}
|
||||||
// no parent was flat
|
// no parent was flat
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
@ -61,9 +61,6 @@
|
|||||||
#include "OLEIDL.H"
|
#include "OLEIDL.H"
|
||||||
#include "OLEACC.H"
|
#include "OLEACC.H"
|
||||||
#include <winuser.h>
|
#include <winuser.h>
|
||||||
#ifndef WINABLEAPI
|
|
||||||
#include <winable.h>
|
|
||||||
#endif
|
|
||||||
#ifdef MOZ_CRASHREPORTER
|
#ifdef MOZ_CRASHREPORTER
|
||||||
#include "nsICrashReporter.h"
|
#include "nsICrashReporter.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -214,7 +214,7 @@ __try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAccessible* xpParentAcc = GetParent();
|
nsAccessible* xpParentAcc = Parent();
|
||||||
if (!xpParentAcc) {
|
if (!xpParentAcc) {
|
||||||
if (IsApplication())
|
if (IsApplication())
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@ -374,7 +374,7 @@ __try {
|
|||||||
// a ROLE_OUTLINEITEM for consistency and compatibility.
|
// a ROLE_OUTLINEITEM for consistency and compatibility.
|
||||||
// We need this because ARIA has a role of "row" for both grid and treegrid
|
// We need this because ARIA has a role of "row" for both grid and treegrid
|
||||||
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
||||||
nsAccessible* xpParent = GetParent();
|
nsAccessible* xpParent = Parent();
|
||||||
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
||||||
msaaRole = ROLE_SYSTEM_OUTLINEITEM;
|
msaaRole = ROLE_SYSTEM_OUTLINEITEM;
|
||||||
}
|
}
|
||||||
@ -1160,7 +1160,7 @@ __try {
|
|||||||
// Special case, if there is a ROLE_ROW inside of a ROLE_TREE_TABLE, then call
|
// Special case, if there is a ROLE_ROW inside of a ROLE_TREE_TABLE, then call
|
||||||
// the IA2 role a ROLE_OUTLINEITEM.
|
// the IA2 role a ROLE_OUTLINEITEM.
|
||||||
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
||||||
nsAccessible* xpParent = GetParent();
|
nsAccessible* xpParent = Parent();
|
||||||
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
||||||
*aRole = ROLE_SYSTEM_OUTLINEITEM;
|
*aRole = ROLE_SYSTEM_OUTLINEITEM;
|
||||||
}
|
}
|
||||||
@ -1768,12 +1768,12 @@ nsAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
|
|||||||
|
|
||||||
// Check whether the accessible for the given ID is a child of ARIA
|
// Check whether the accessible for the given ID is a child of ARIA
|
||||||
// document.
|
// document.
|
||||||
nsAccessible* parent = child ? child->GetParent() : nsnull;
|
nsAccessible* parent = child ? child->Parent() : nsnull;
|
||||||
while (parent && parent != document) {
|
while (parent && parent != document) {
|
||||||
if (parent == this)
|
if (parent == this)
|
||||||
return child;
|
return child;
|
||||||
|
|
||||||
parent = parent->GetParent();
|
parent = parent->Parent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include <winuser.h>
|
#include <winuser.h>
|
||||||
#ifndef WINABLEAPI
|
|
||||||
#include <winable.h>
|
|
||||||
#endif
|
|
||||||
#include "AccessibleEventId.h"
|
#include "AccessibleEventId.h"
|
||||||
|
|
||||||
const PRUint32 kEVENT_WIN_UNKNOWN = 0x00000000;
|
const PRUint32 kEVENT_WIN_UNKNOWN = 0x00000000;
|
||||||
|
@ -573,8 +573,9 @@ nsXULToolbarButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||||||
PRInt32 setSize = 0;
|
PRInt32 setSize = 0;
|
||||||
PRInt32 posInSet = 0;
|
PRInt32 posInSet = 0;
|
||||||
|
|
||||||
nsAccessible* parent(GetParent());
|
nsAccessible* parent = Parent();
|
||||||
NS_ENSURE_TRUE(parent,);
|
if (!parent)
|
||||||
|
return;
|
||||||
|
|
||||||
PRInt32 childCount = parent->GetChildCount();
|
PRInt32 childCount = parent->GetChildCount();
|
||||||
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
|
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||||
|
@ -998,11 +998,11 @@ nsXULListCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsAccessible* thisRow = GetParent();
|
nsAccessible* thisRow = Parent();
|
||||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsAccessible* table = thisRow->GetParent();
|
nsAccessible* table = thisRow->Parent();
|
||||||
if (!table || table->Role() != nsIAccessibleRole::ROLE_TABLE)
|
if (!table || table->Role() != nsIAccessibleRole::ROLE_TABLE)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -1019,7 +1019,7 @@ nsXULListCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsAccessible* row = GetParent();
|
nsAccessible* row = Parent();
|
||||||
if (!row)
|
if (!row)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
@ -1048,11 +1048,11 @@ nsXULListCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
nsAccessible* row = GetParent();
|
nsAccessible* row = Parent();
|
||||||
if (!row)
|
if (!row)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsAccessible* table = row->GetParent();
|
nsAccessible* table = row->Parent();
|
||||||
if (!table)
|
if (!table)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
@ -332,8 +332,8 @@ nsXULMenuitemAccessible::NativeState()
|
|||||||
|
|
||||||
// Is collapsed?
|
// Is collapsed?
|
||||||
PRBool isCollapsed = PR_FALSE;
|
PRBool isCollapsed = PR_FALSE;
|
||||||
nsAccessible* parentAcc = GetParent();
|
nsAccessible* parent = Parent();
|
||||||
if (parentAcc->State() & states::INVISIBLE)
|
if (parent && parent->State() & states::INVISIBLE)
|
||||||
isCollapsed = PR_TRUE;
|
isCollapsed = PR_TRUE;
|
||||||
|
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
@ -342,11 +342,12 @@ nsXULMenuitemAccessible::NativeState()
|
|||||||
// Selected and collapsed?
|
// Selected and collapsed?
|
||||||
if (isCollapsed) {
|
if (isCollapsed) {
|
||||||
// Set selected option offscreen/invisible according to combobox state
|
// Set selected option offscreen/invisible according to combobox state
|
||||||
nsAccessible* grandParentAcc = parentAcc->GetParent();
|
nsAccessible* grandParent = parent->Parent();
|
||||||
NS_ENSURE_TRUE(grandParentAcc, state);
|
if (!grandParent)
|
||||||
NS_ASSERTION(grandParentAcc->Role() == nsIAccessibleRole::ROLE_COMBOBOX,
|
return state;
|
||||||
|
NS_ASSERTION(grandParent->Role() == nsIAccessibleRole::ROLE_COMBOBOX,
|
||||||
"grandparent of combobox listitem is not combobox");
|
"grandparent of combobox listitem is not combobox");
|
||||||
PRUint64 grandParentState = grandParentAcc->State();
|
PRUint64 grandParentState = grandParent->State();
|
||||||
state &= ~(states::OFFSCREEN | states::INVISIBLE);
|
state &= ~(states::OFFSCREEN | states::INVISIBLE);
|
||||||
state |= (grandParentState & states::OFFSCREEN) |
|
state |= (grandParentState & states::OFFSCREEN) |
|
||||||
(grandParentState & states::INVISIBLE) |
|
(grandParentState & states::INVISIBLE) |
|
||||||
@ -404,7 +405,7 @@ nsXULMenuitemAccessible::AccessKey() const
|
|||||||
|
|
||||||
PRUint32 modifierKey = 0;
|
PRUint32 modifierKey = 0;
|
||||||
|
|
||||||
nsAccessible* parentAcc = GetParent();
|
nsAccessible* parentAcc = Parent();
|
||||||
if (parentAcc) {
|
if (parentAcc) {
|
||||||
if (parentAcc->NativeRole() == nsIAccessibleRole::ROLE_MENUBAR) {
|
if (parentAcc->NativeRole() == nsIAccessibleRole::ROLE_MENUBAR) {
|
||||||
// If top level menu item, add Alt+ or whatever modifier text to string
|
// 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,
|
PRBool isActive = mContent->HasAttr(kNameSpaceID_None,
|
||||||
nsAccessibilityAtoms::menuactive);
|
nsAccessibilityAtoms::menuactive);
|
||||||
if (!isActive) {
|
if (!isActive) {
|
||||||
nsAccessible* parent(GetParent());
|
nsAccessible* parent = Parent();
|
||||||
NS_ENSURE_TRUE(parent, state);
|
if (!parent)
|
||||||
|
return state;
|
||||||
|
|
||||||
nsIContent *parentContent = parnet->GetContent();
|
nsIContent *parentContent = parnet->GetContent();
|
||||||
NS_ENSURE_TRUE(parentContent, state);
|
NS_ENSURE_TRUE(parentContent, state);
|
||||||
@ -685,7 +687,7 @@ nsXULMenupopupAccessible::NativeRole()
|
|||||||
|
|
||||||
if (role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
|
if (role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
|
||||||
// Some widgets like the search bar have several popups, owned by buttons.
|
// Some widgets like the search bar have several popups, owned by buttons.
|
||||||
nsAccessible* grandParent = mParent->GetParent();
|
nsAccessible* grandParent = mParent->Parent();
|
||||||
if (grandParent &&
|
if (grandParent &&
|
||||||
grandParent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
grandParent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
||||||
return nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
return nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
||||||
|
@ -98,7 +98,7 @@ nsXULTextAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||||||
// Caption is the label for groupbox
|
// Caption is the label for groupbox
|
||||||
nsIContent *parent = mContent->GetParent();
|
nsIContent *parent = mContent->GetParent();
|
||||||
if (parent && parent->Tag() == nsAccessibilityAtoms::caption) {
|
if (parent && parent->Tag() == nsAccessibilityAtoms::caption) {
|
||||||
nsAccessible* parent = GetParent();
|
nsAccessible* parent = Parent();
|
||||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_GROUPING)
|
if (parent && parent->Role() == nsIAccessibleRole::ROLE_GROUPING)
|
||||||
return nsRelUtils::AddTarget(aRelationType, aRelation, parent);
|
return nsRelUtils::AddTarget(aRelationType, aRelation, parent);
|
||||||
}
|
}
|
||||||
|
@ -1225,7 +1225,7 @@ nsXULTreeColumnsAccessible::GetSiblingAtOffset(PRInt32 aOffset,
|
|||||||
PRInt32 rowCount = 0;
|
PRInt32 rowCount = 0;
|
||||||
treeView->GetRowCount(&rowCount);
|
treeView->GetRowCount(&rowCount);
|
||||||
if (rowCount > 0 && aOffset <= rowCount) {
|
if (rowCount > 0 && aOffset <= rowCount) {
|
||||||
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(GetParent());
|
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(Parent());
|
||||||
|
|
||||||
if (treeAcc)
|
if (treeAcc)
|
||||||
return treeAcc->GetTreeItemAccessible(aOffset - 1);
|
return treeAcc->GetTreeItemAccessible(aOffset - 1);
|
||||||
|
@ -1016,7 +1016,10 @@ nsXULTreeGridCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
|||||||
if (IsDefunct())
|
if (IsDefunct())
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
CallQueryInterface(mParent->GetParent(), aTable);
|
nsAccessible* grandParent = mParent->Parent();
|
||||||
|
if (grandParent)
|
||||||
|
CallQueryInterface(grandParent, aTable);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1171,9 +1174,12 @@ nsXULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAtt
|
|||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
// "table-cell-index" attribute
|
// "table-cell-index" attribute
|
||||||
nsCOMPtr<nsIAccessible> accessible;
|
nsAccessible* grandParent = mParent->Parent();
|
||||||
mParent->GetParent(getter_AddRefs(accessible));
|
if (!grandParent)
|
||||||
nsCOMPtr<nsIAccessibleTable> tableAccessible = do_QueryInterface(accessible);
|
return NS_OK;
|
||||||
|
|
||||||
|
nsCOMPtr<nsIAccessibleTable> tableAccessible =
|
||||||
|
do_QueryInterface(static_cast<nsIAccessible*>(grandParent));
|
||||||
|
|
||||||
// XXX - temp fix for crash bug 516047
|
// XXX - temp fix for crash bug 516047
|
||||||
if (!tableAccessible)
|
if (!tableAccessible)
|
||||||
@ -1308,7 +1314,7 @@ nsXULTreeGridCellAccessible::GetSiblingAtOffset(PRInt32 aOffset,
|
|||||||
if (!columnAtOffset)
|
if (!columnAtOffset)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(GetParent());
|
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(Parent());
|
||||||
return rowAcc->GetCellAccessible(columnAtOffset);
|
return rowAcc->GetCellAccessible(columnAtOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -762,6 +762,12 @@ function synthClick(aNodeOrID, aCheckerOrEventSeq, aEventType)
|
|||||||
synthesizeMouse(this.DOMNode, 1, 1, {});
|
synthesizeMouse(this.DOMNode, 1, 1, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.finalCheck = function synthClick_finalCheck()
|
||||||
|
{
|
||||||
|
// Scroll top window back.
|
||||||
|
window.top.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
this.getID = function synthClick_getID()
|
this.getID = function synthClick_getID()
|
||||||
{
|
{
|
||||||
return prettyName(aNodeOrID) + " click";
|
return prettyName(aNodeOrID) + " click";
|
||||||
|
@ -103,13 +103,15 @@
|
|||||||
{
|
{
|
||||||
this.type = EVENT_NAME_CHANGE;
|
this.type = EVENT_NAME_CHANGE;
|
||||||
|
|
||||||
this.target getter = function()
|
function targetGetter()
|
||||||
{
|
{
|
||||||
var acc = getAccessible(gTree);
|
var acc = getAccessible(gTree);
|
||||||
|
|
||||||
var tableAcc = getAccessible(acc, [nsIAccessibleTable]);
|
var tableAcc = getAccessible(acc, [nsIAccessibleTable]);
|
||||||
return tableAcc.getCellAt(aRow, aCol);
|
return tableAcc.getCellAt(aRow, aCol);
|
||||||
}
|
}
|
||||||
|
Object.defineProperty(this, "target", { get: targetGetter });
|
||||||
|
|
||||||
this.getID = function getID()
|
this.getID = function getID()
|
||||||
{
|
{
|
||||||
return aMsg + "name changed";
|
return aMsg + "name changed";
|
||||||
|
@ -235,7 +235,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (LINUX || SOLARIS)
|
if (LINUX || SOLARIS)
|
||||||
tree.children[2].children[0].\(subsubmenuTree);
|
tree.children[2].children[0].children.push(subsubmenuTree);
|
||||||
else
|
else
|
||||||
tree.children[2].children[0].children[0].children[0].children.push(subsubmenuTree);
|
tree.children[2].children[0].children[0].children[0].children.push(subsubmenuTree);
|
||||||
|
|
||||||
|
@ -376,12 +376,12 @@
|
|||||||
{ INTERNAL_FRAME: [
|
{ INTERNAL_FRAME: [
|
||||||
{ DOCUMENT: [
|
{ DOCUMENT: [
|
||||||
{ ENTRY: [ ] }
|
{ ENTRY: [ ] }
|
||||||
] };
|
] }
|
||||||
] };
|
] };
|
||||||
testAccessibleTree(this.containerNode, tree);
|
testAccessibleTree(this.containerNode, tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getID() = function changeSrc_getID()
|
this.getID = function changeSrc_getID()
|
||||||
{
|
{
|
||||||
return "change src on iframe";
|
return "change src on iframe";
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ include $(topsrcdir)/config/config.mk
|
|||||||
PARALLEL_DIRS = \
|
PARALLEL_DIRS = \
|
||||||
base \
|
base \
|
||||||
components \
|
components \
|
||||||
|
devtools \
|
||||||
fuel \
|
fuel \
|
||||||
locales \
|
locales \
|
||||||
themes \
|
themes \
|
||||||
|
@ -843,6 +843,7 @@ var BookmarksEventHandler = {
|
|||||||
var PlacesMenuDNDHandler = {
|
var PlacesMenuDNDHandler = {
|
||||||
_springLoadDelay: 350, // milliseconds
|
_springLoadDelay: 350, // milliseconds
|
||||||
_loadTimer: null,
|
_loadTimer: null,
|
||||||
|
_closerTimer: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the user enters the <menu> element during a drag.
|
* Called when the user enters the <menu> element during a drag.
|
||||||
@ -854,13 +855,18 @@ var PlacesMenuDNDHandler = {
|
|||||||
if (!this._isStaticContainer(event.target))
|
if (!this._isStaticContainer(event.target))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._loadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
let ip = new InsertionPoint(PlacesUtils.bookmarksMenuFolderId,
|
||||||
this._loadTimer.initWithCallback(function() {
|
PlacesUtils.bookmarks.DEFAULT_INDEX,
|
||||||
PlacesMenuDNDHandler._loadTimer = null;
|
Ci.nsITreeView.DROP_ON);
|
||||||
event.target.lastChild.setAttribute("autoopened", "true");
|
if (ip && PlacesControllerDragHelper.canDrop(ip, event.dataTransfer)) {
|
||||||
event.target.lastChild.showPopup(event.target.lastChild);
|
this._loadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||||
}, this._springLoadDelay, Ci.nsITimer.TYPE_ONE_SHOT);
|
this._loadTimer.initWithCallback(function() {
|
||||||
event.preventDefault();
|
PlacesMenuDNDHandler._loadTimer = null;
|
||||||
|
event.target.lastChild.setAttribute("autoopened", "true");
|
||||||
|
event.target.lastChild.showPopup(event.target.lastChild);
|
||||||
|
}, this._springLoadDelay, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -878,8 +884,9 @@ var PlacesMenuDNDHandler = {
|
|||||||
this._loadTimer.cancel();
|
this._loadTimer.cancel();
|
||||||
this._loadTimer = null;
|
this._loadTimer = null;
|
||||||
}
|
}
|
||||||
let closeTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
this._closeTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||||
closeTimer.initWithCallback(function() {
|
this._closeTimer.initWithCallback(function() {
|
||||||
|
this._closeTimer = null;
|
||||||
let node = PlacesControllerDragHelper.currentDropTarget;
|
let node = PlacesControllerDragHelper.currentDropTarget;
|
||||||
let inHierarchy = false;
|
let inHierarchy = false;
|
||||||
while (node && !inHierarchy) {
|
while (node && !inHierarchy) {
|
||||||
|
@ -13,6 +13,7 @@ tabbrowser {
|
|||||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
|
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabbrowser-tabs[drag=detach][closebuttons=hidden] > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
|
||||||
#tabbrowser-tabs:not([overflow="true"]) + #new-tab-button,
|
#tabbrowser-tabs:not([overflow="true"]) + #new-tab-button,
|
||||||
#tabbrowser-tabs[overflow="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
|
#tabbrowser-tabs[overflow="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
|
||||||
#TabsToolbar[currentset]:not([currentset*="tabbrowser-tabs,new-tab-button"]) > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
|
#TabsToolbar[currentset]:not([currentset*="tabbrowser-tabs,new-tab-button"]) > #tabbrowser-tabs > .tabbrowser-arrowscrollbox > .tabs-newtab-button,
|
||||||
@ -62,6 +63,35 @@ tabbrowser {
|
|||||||
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
|
display: block; /* position:fixed already does this (bug 579776), but let's be explicit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tabs[drag] > .tabbrowser-tab[selected] {
|
||||||
|
z-index: 2; /* ensure selected tab stays on top despite -moz-transform */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tabs[drag] > .tabbrowser-tab[dragged] {
|
||||||
|
-moz-transition: 0s; /* suppress opening animation when reattaching tab */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* visibility: collapse might collapse the tab bar, so we use this instead */
|
||||||
|
.tabbrowser-tabs[drag=detach] > .tabbrowser-tab[dragged]:not(:only-child) {
|
||||||
|
min-width: 0 !important;
|
||||||
|
max-width: 0 !important;
|
||||||
|
border: 0 !important;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
-moz-transition: max-width 150ms ease-out;
|
||||||
|
}
|
||||||
|
.tabbrowser-tabs[drag=detach] > .tabbrowser-tab[dragged]:only-child {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tabs[drag=move] > .tabbrowser-tab[fadein]:not([dragged]) {
|
||||||
|
-moz-transition: -moz-transform 200ms ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tabs[drag=finish] > .tabbrowser-tab[dragged][fadein] {
|
||||||
|
-moz-transition: -moz-transform 100ms ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
#alltabs-popup {
|
#alltabs-popup {
|
||||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
|
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
|
||||||
}
|
}
|
||||||
|
@ -399,6 +399,24 @@
|
|||||||
</panel>
|
</panel>
|
||||||
|
|
||||||
<tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
|
<tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
|
||||||
|
|
||||||
|
<tooltip id="back-button-tooltip">
|
||||||
|
<label value="&backButton.tooltip;"/>
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
<label value="&backForwardButtonMenuMac.tooltip;"/>
|
||||||
|
#else
|
||||||
|
<label value="&backForwardButtonMenu.tooltip;"/>
|
||||||
|
#endif
|
||||||
|
</tooltip>
|
||||||
|
|
||||||
|
<tooltip id="forward-button-tooltip">
|
||||||
|
<label value="&forwardButton.tooltip;"/>
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
<label value="&backForwardButtonMenuMac.tooltip;"/>
|
||||||
|
#else
|
||||||
|
<label value="&backForwardButtonMenu.tooltip;"/>
|
||||||
|
#endif
|
||||||
|
</tooltip>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||||
@ -468,12 +486,12 @@
|
|||||||
label="&backCmd.label;"
|
label="&backCmd.label;"
|
||||||
command="Browser:BackOrBackDuplicate"
|
command="Browser:BackOrBackDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"
|
onclick="checkForMiddleClick(this, event);"
|
||||||
tooltiptext="&backButton.tooltip;"/>
|
tooltip="back-button-tooltip"/>
|
||||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||||
label="&forwardCmd.label;"
|
label="&forwardCmd.label;"
|
||||||
command="Browser:ForwardOrForwardDuplicate"
|
command="Browser:ForwardOrForwardDuplicate"
|
||||||
onclick="checkForMiddleClick(this, event);"
|
onclick="checkForMiddleClick(this, event);"
|
||||||
tooltiptext="&forwardButton.tooltip;"/>
|
tooltip="forward-button-tooltip"/>
|
||||||
</toolbaritem>
|
</toolbaritem>
|
||||||
|
|
||||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
||||||
|
@ -528,6 +528,7 @@ Highlighter.prototype = {
|
|||||||
*/
|
*/
|
||||||
var InspectorUI = {
|
var InspectorUI = {
|
||||||
browser: null,
|
browser: null,
|
||||||
|
tools: {},
|
||||||
showTextNodesWithWhitespace: false,
|
showTextNodesWithWhitespace: false,
|
||||||
inspecting: false,
|
inspecting: false,
|
||||||
treeLoaded: false,
|
treeLoaded: false,
|
||||||
@ -859,6 +860,13 @@ var InspectorUI = {
|
|||||||
delete this.domplateUtils;
|
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.inspectCmd.setAttribute("checked", false);
|
||||||
this.browser = this.win = null; // null out references to browser and window
|
this.browser = this.win = null; // null out references to browser and window
|
||||||
this.winID = null;
|
this.winID = null;
|
||||||
@ -880,6 +888,7 @@ var InspectorUI = {
|
|||||||
*/
|
*/
|
||||||
startInspecting: function IUI_startInspecting()
|
startInspecting: function IUI_startInspecting()
|
||||||
{
|
{
|
||||||
|
document.getElementById("inspector-inspect-toolbutton").checked = true;
|
||||||
this.attachPageListeners();
|
this.attachPageListeners();
|
||||||
this.inspecting = true;
|
this.inspecting = true;
|
||||||
this.highlighter.veilTransparentBox.removeAttribute("locked");
|
this.highlighter.veilTransparentBox.removeAttribute("locked");
|
||||||
@ -895,6 +904,7 @@ var InspectorUI = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById("inspector-inspect-toolbutton").checked = false;
|
||||||
this.detachPageListeners();
|
this.detachPageListeners();
|
||||||
this.inspecting = false;
|
this.inspecting = false;
|
||||||
if (this.highlighter.node) {
|
if (this.highlighter.node) {
|
||||||
@ -926,6 +936,11 @@ var InspectorUI = {
|
|||||||
}
|
}
|
||||||
this.ioBox.select(this.selection, true, true, aScroll);
|
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);
|
}, INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||||
} else {
|
} else {
|
||||||
this.openInspectorUI();
|
this.openInspectorUI();
|
||||||
|
this.restoreToolState(winID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1222,7 +1238,113 @@ var InspectorUI = {
|
|||||||
}
|
}
|
||||||
this._log("END TRACE");
|
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.
|
* The Inspector store is used for storing data specific to each tab window.
|
||||||
@ -1357,4 +1479,3 @@ var InspectorStore = {
|
|||||||
XPCOMUtils.defineLazyGetter(InspectorUI, "inspectCmd", function () {
|
XPCOMUtils.defineLazyGetter(InspectorUI, "inspectCmd", function () {
|
||||||
return document.getElementById("Tools:Inspect");
|
return document.getElementById("Tools:Inspect");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -38,6 +38,16 @@ tabpanels {
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-drag-preview {
|
||||||
|
background: -moz-element(#content) left top;
|
||||||
|
background-clip: content-box;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-drag-panel[target] > .tab-drag-preview {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-drop-indicator {
|
.tab-drop-indicator {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -526,12 +526,15 @@ let Utils = {
|
|||||||
// Pass as many arguments as you want, it'll print them all.
|
// Pass as many arguments as you want, it'll print them all.
|
||||||
trace: function Utils_trace() {
|
trace: function Utils_trace() {
|
||||||
var text = this.expandArgumentsForLog(arguments);
|
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 the caller was assert, cut out the line for the assert function as well.
|
||||||
if (this.trace.caller.name == 'Utils_assert')
|
if (stack[0].indexOf("Utils_assert(") == 0)
|
||||||
stack = stack.replace(/^.*?\n/, "");
|
stack.splice(0, 1);
|
||||||
this.log('trace: ' + text + '\n' + stack);
|
|
||||||
|
this.log('trace: ' + text + '\n' + stack.join("\n"));
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
@ -560,10 +563,10 @@ let Utils = {
|
|||||||
else
|
else
|
||||||
text = "tabview assert: " + label;
|
text = "tabview assert: " + label;
|
||||||
|
|
||||||
// cut off the first two lines of the stack trace, because they're just this function.
|
// cut off the first line of the stack trace, because that's just this function.
|
||||||
text += Error().stack.replace(/^.*?\n.*?\n/, "");
|
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
|
#ifdef XP_UNIX
|
||||||
"redo",
|
"redo",
|
||||||
|
#endif
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
"fullScreen",
|
||||||
#endif
|
#endif
|
||||||
"closeWindow", "tabview", "undoCloseTab", "undoCloseWindow",
|
"closeWindow", "tabview", "undoCloseTab", "undoCloseWindow",
|
||||||
"privatebrowsing"
|
"privatebrowsing"
|
||||||
|
@ -54,6 +54,7 @@ _BROWSER_FILES = \
|
|||||||
browser_inspector_treePanel_output.js \
|
browser_inspector_treePanel_output.js \
|
||||||
browser_inspector_treePanel_input.html \
|
browser_inspector_treePanel_input.html \
|
||||||
browser_inspector_treePanel_result.html \
|
browser_inspector_treePanel_result.html \
|
||||||
|
browser_inspector_registertools.js \
|
||||||
browser_inspector_bug_665880.js \
|
browser_inspector_bug_665880.js \
|
||||||
$(NULL)
|
$(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
|
// create a group item
|
||||||
let groupItem = createGroupItemWithBlankTabs(window, 300, 300, 400, 1);
|
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");
|
is(groupItem.getChildren().length, 1, "The new group has a tab item");
|
||||||
// start the tests
|
// start the tests
|
||||||
waitForFocus(function() {
|
waitForFocus(function() {
|
||||||
|
@ -42,8 +42,6 @@
|
|||||||
// Services = object with smart getters for common XPCOM services
|
// Services = object with smart getters for common XPCOM services
|
||||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
|
|
||||||
|
|
||||||
var gBidiUI = false;
|
var gBidiUI = false;
|
||||||
|
|
||||||
function getBrowserURL()
|
function getBrowserURL()
|
||||||
|
@ -93,5 +93,3 @@ browser.jar:
|
|||||||
# the following files are browser-specific overrides
|
# the following files are browser-specific overrides
|
||||||
* content/browser/license.html (/toolkit/content/license.html)
|
* content/browser/license.html (/toolkit/content/license.html)
|
||||||
% override chrome://global/content/license.html chrome://browser/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 += $(MOZ_BRANDING_DIRECTORY)
|
||||||
|
|
||||||
tier_app_dirs += toolkit/components/console/hudservice
|
|
||||||
|
|
||||||
ifdef MOZ_SERVICES_SYNC
|
ifdef MOZ_SERVICES_SYNC
|
||||||
tier_app_dirs += services
|
tier_app_dirs += services
|
||||||
endif
|
endif
|
||||||
|
@ -1396,17 +1396,13 @@ let PlacesControllerDragHelper = {
|
|||||||
|
|
||||||
// Urls can be dropped on any insertionpoint.
|
// Urls can be dropped on any insertionpoint.
|
||||||
// XXXmano: remember that this method is called for each dragover event!
|
// XXXmano: remember that this method is called for each dragover event!
|
||||||
// Thus we shouldn't use unwrapNodes here at all if possible.
|
// Thus we shouldn't use unwrapNodes here at all if possible. I think it
|
||||||
// I think it would be OK to accept bogus data here (e.g. text which was
|
// would be OK to accept bogus data here (this is not in our control and
|
||||||
// somehow wrapped as TAB_DROP_TYPE, this is not in our control, and
|
// will just case the actual drop to be a no-op) and only rule out valid
|
||||||
// will just case the actual drop to be a no-op), and only rule out valid
|
|
||||||
// expected cases, which are either unsupported flavors, or items which
|
// expected cases, which are either unsupported flavors, or items which
|
||||||
// cannot be dropped in the current insertionpoint. The last case will
|
// cannot be dropped in the current insertionpoint. The last case will
|
||||||
// likely force us to use unwrapNodes for the private data types of
|
// likely force us to use unwrapNodes for the private data types of
|
||||||
// places.
|
// places.
|
||||||
if (flavor == TAB_DROP_TYPE)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
let data = dt.mozGetDataAt(flavor, i);
|
let data = dt.mozGetDataAt(flavor, i);
|
||||||
let dragged;
|
let dragged;
|
||||||
try {
|
try {
|
||||||
@ -1520,21 +1516,8 @@ let PlacesControllerDragHelper = {
|
|||||||
|
|
||||||
let data = dt.mozGetDataAt(flavor, i);
|
let data = dt.mozGetDataAt(flavor, i);
|
||||||
let unwrapped;
|
let unwrapped;
|
||||||
if (flavor != TAB_DROP_TYPE) {
|
// There's only ever one in the D&D case.
|
||||||
// There's only ever one in the D&D case.
|
unwrapped = PlacesUtils.unwrapNodes(data, flavor)[0];
|
||||||
unwrapped = PlacesUtils.unwrapNodes(data, flavor)[0];
|
|
||||||
}
|
|
||||||
else if (data instanceof XULElement && data.localName == "tab" &&
|
|
||||||
data.ownerDocument.defaultView instanceof ChromeWindow) {
|
|
||||||
let uri = data.linkedBrowser.currentURI;
|
|
||||||
let spec = uri ? uri.spec : "about:blank";
|
|
||||||
let title = data.label;
|
|
||||||
unwrapped = { uri: spec,
|
|
||||||
title: data.label,
|
|
||||||
type: PlacesUtils.TYPE_X_MOZ_URL};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
throw("bogus data was passed as a tab")
|
|
||||||
|
|
||||||
let index = insertionPoint.index;
|
let index = insertionPoint.index;
|
||||||
|
|
||||||
@ -1588,7 +1571,6 @@ let PlacesControllerDragHelper = {
|
|||||||
PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR,
|
PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR,
|
||||||
PlacesUtils.TYPE_X_MOZ_PLACE,
|
PlacesUtils.TYPE_X_MOZ_PLACE,
|
||||||
PlacesUtils.TYPE_X_MOZ_URL,
|
PlacesUtils.TYPE_X_MOZ_URL,
|
||||||
TAB_DROP_TYPE,
|
|
||||||
PlacesUtils.TYPE_UNICODE],
|
PlacesUtils.TYPE_UNICODE],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ SessionStartup.prototype = {
|
|||||||
/* ........ Public API ................*/
|
/* ........ Public API ................*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the session state as a string
|
* Get the session state as a jsval
|
||||||
*/
|
*/
|
||||||
get state() {
|
get state() {
|
||||||
return this._initialState;
|
return this._initialState;
|
||||||
|
@ -116,7 +116,7 @@ const CAPABILITIES = [
|
|||||||
// These keys are for internal use only - they shouldn't be part of the JSON
|
// 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.
|
// that gets saved to disk nor part of the strings returned by the API.
|
||||||
const INTERNAL_KEYS = ["_tabStillLoading", "_hosts", "_formDataSaved",
|
const INTERNAL_KEYS = ["_tabStillLoading", "_hosts", "_formDataSaved",
|
||||||
"_shouldRestore"];
|
"_shouldRestore", "_host", "_scheme"];
|
||||||
|
|
||||||
// These are tab events that we listen to.
|
// These are tab events that we listen to.
|
||||||
const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide",
|
const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide",
|
||||||
@ -1770,7 +1770,15 @@ SessionStoreService.prototype = {
|
|||||||
_serializeHistoryEntry:
|
_serializeHistoryEntry:
|
||||||
function sss_serializeHistoryEntry(aEntry, aFullData, aIsPinned) {
|
function sss_serializeHistoryEntry(aEntry, aFullData, aIsPinned) {
|
||||||
var entry = { url: aEntry.URI.spec };
|
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) {
|
if (aEntry.title && aEntry.title != entry.url) {
|
||||||
entry.title = aEntry.title;
|
entry.title = aEntry.title;
|
||||||
}
|
}
|
||||||
@ -2178,21 +2186,20 @@ SessionStoreService.prototype = {
|
|||||||
*/
|
*/
|
||||||
_extractHostsForCookies:
|
_extractHostsForCookies:
|
||||||
function sss__extractHostsForCookies(aEntry, aHosts, aCheckPrivacy, aIsPinned) {
|
function sss__extractHostsForCookies(aEntry, aHosts, aCheckPrivacy, aIsPinned) {
|
||||||
let match;
|
|
||||||
|
|
||||||
if ((match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url)) != null) {
|
// _host and _scheme may not be set (for about: urls for example), in which
|
||||||
if (!aHosts[match[1]] &&
|
// case testing _scheme will be sufficient.
|
||||||
(!aCheckPrivacy ||
|
if (/https?/.test(aEntry._scheme) && !aHosts[aEntry._host] &&
|
||||||
this._checkPrivacyLevel(this._getURIFromString(aEntry.url).schemeIs("https"),
|
(!aCheckPrivacy ||
|
||||||
aIsPinned))) {
|
this._checkPrivacyLevel(aEntry._scheme == "https", aIsPinned))) {
|
||||||
// By setting this to true or false, we can determine when looking at
|
// By setting this to true or false, we can determine when looking at
|
||||||
// the host in _updateCookies if we should check for privacy.
|
// the host in _updateCookies if we should check for privacy.
|
||||||
aHosts[match[1]] = aIsPinned;
|
aHosts[aEntry._host] = aIsPinned;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ((match = /^file:\/\/([^\/]*)/.exec(aEntry.url)) != null) {
|
else if (aEntry._scheme == "file") {
|
||||||
aHosts[match[1]] = true;
|
aHosts[aEntry._host] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aEntry.children) {
|
if (aEntry.children) {
|
||||||
aEntry.children.forEach(function(entry) {
|
aEntry.children.forEach(function(entry) {
|
||||||
this._extractHostsForCookies(entry, aHosts, aCheckPrivacy, aIsPinned);
|
this._extractHostsForCookies(entry, aHosts, aCheckPrivacy, aIsPinned);
|
||||||
|
@ -12,14 +12,15 @@
|
|||||||
# for the specific language governing rights and limitations under the
|
# for the specific language governing rights and limitations under the
|
||||||
# License.
|
# License.
|
||||||
#
|
#
|
||||||
# The Original Code is the Netscape security libraries.
|
# The Original Code is mozilla.org code.
|
||||||
#
|
#
|
||||||
# The Initial Developer of the Original Code is
|
# The Initial Developer of the Original Code is
|
||||||
# Netscape Communications Corporation.
|
# Netscape Communications Corporation.
|
||||||
# Portions created by the Initial Developer are Copyright (C) 1994-2000
|
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||||
# the Initial Developer. All Rights Reserved.
|
# the Initial Developer. All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
|
# Rob Campbell <rcampbell@mozilla.com>
|
||||||
#
|
#
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
# 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
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
@ -35,4 +36,21 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
include $(CORE_DEPTH)/coreconf/Linux.mk
|
DEPTH = ../..
|
||||||
|
topsrcdir = @top_srcdir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
|
||||||
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
|
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;
|
hud.consoleWindowUnregisterOnHide = false;
|
||||||
|
|
||||||
// Remove the HUDBox and the consolePanel if the Web Console is inside a
|
// Remove the HUDBox and the consolePanel if the Web Console is inside a
|
||||||
// floating xul:panel.
|
// floating panel.
|
||||||
hud.HUDBox.parentNode.removeChild(hud.HUDBox);
|
hud.HUDBox.parentNode.removeChild(hud.HUDBox);
|
||||||
if (hud.consolePanel) {
|
if (hud.consolePanel) {
|
||||||
hud.consolePanel.parentNode.removeChild(hud.consolePanel);
|
hud.consolePanel.parentNode.removeChild(hud.consolePanel);
|
||||||
@ -2505,20 +2505,20 @@ HUD_SERVICE.prototype =
|
|||||||
let outputNode = this.hudReferences[hudId].outputNode;
|
let outputNode = this.hudReferences[hudId].outputNode;
|
||||||
|
|
||||||
let chromeDocument = outputNode.ownerDocument;
|
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.setAttribute("value", aActivityObject.method);
|
||||||
methodNode.classList.add("webconsole-msg-body-piece");
|
methodNode.classList.add("webconsole-msg-body-piece");
|
||||||
msgNode.appendChild(methodNode);
|
msgNode.appendChild(methodNode);
|
||||||
|
|
||||||
let linkNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
|
let linkNode = chromeDocument.createElementNS(XUL_NS, "hbox");
|
||||||
linkNode.setAttribute("flex", "1");
|
linkNode.setAttribute("flex", "1");
|
||||||
linkNode.classList.add("webconsole-msg-body-piece");
|
linkNode.classList.add("webconsole-msg-body-piece");
|
||||||
linkNode.classList.add("webconsole-msg-link");
|
linkNode.classList.add("webconsole-msg-link");
|
||||||
msgNode.appendChild(linkNode);
|
msgNode.appendChild(linkNode);
|
||||||
|
|
||||||
let urlNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
let urlNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||||
urlNode.setAttribute("crop", "center");
|
urlNode.setAttribute("crop", "center");
|
||||||
urlNode.setAttribute("flex", "1");
|
urlNode.setAttribute("flex", "1");
|
||||||
urlNode.setAttribute("title", aActivityObject.url);
|
urlNode.setAttribute("title", aActivityObject.url);
|
||||||
@ -2528,7 +2528,7 @@ HUD_SERVICE.prototype =
|
|||||||
urlNode.classList.add("webconsole-msg-url");
|
urlNode.classList.add("webconsole-msg-url");
|
||||||
linkNode.appendChild(urlNode);
|
linkNode.appendChild(urlNode);
|
||||||
|
|
||||||
let statusNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
let statusNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||||
statusNode.setAttribute("value", "");
|
statusNode.setAttribute("value", "");
|
||||||
statusNode.classList.add("hud-clickable");
|
statusNode.classList.add("hud-clickable");
|
||||||
statusNode.classList.add("webconsole-msg-body-piece");
|
statusNode.classList.add("webconsole-msg-body-piece");
|
||||||
@ -3040,7 +3040,7 @@ HeadsUpDisplay.prototype = {
|
|||||||
*/
|
*/
|
||||||
get tab()
|
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,
|
// 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
|
// document, etc. We should simplify the entire code to use only a single
|
||||||
// tab object ref. See bug 656231.
|
// tab object ref. See bug 656231.
|
||||||
@ -3136,12 +3136,15 @@ HeadsUpDisplay.prototype = {
|
|||||||
|
|
||||||
panel.addEventListener("popupshown", onPopupShown,false);
|
panel.addEventListener("popupshown", onPopupShown,false);
|
||||||
|
|
||||||
let onPopupHiding = (function HUD_onPopupHiding(aEvent) {
|
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
|
||||||
if (aEvent.target != panel) {
|
if (aEvent.target != panel) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
panel.removeEventListener("popuphiding", onPopupHiding, false);
|
panel.removeEventListener("popuphidden", onPopupHidden, false);
|
||||||
|
if (panel.parentNode) {
|
||||||
|
panel.parentNode.removeChild(panel);
|
||||||
|
}
|
||||||
|
|
||||||
let width = 0;
|
let width = 0;
|
||||||
try {
|
try {
|
||||||
@ -3149,12 +3152,15 @@ HeadsUpDisplay.prototype = {
|
|||||||
}
|
}
|
||||||
catch (ex) { }
|
catch (ex) { }
|
||||||
|
|
||||||
if (width > -1) {
|
if (width > 0) {
|
||||||
Services.prefs.setIntPref("devtools.webconsole.width", panel.clientWidth);
|
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
|
// Make sure we are not going to close again, drop the hudId reference of
|
||||||
// the panel.
|
// the panel.
|
||||||
@ -3170,19 +3176,6 @@ HeadsUpDisplay.prototype = {
|
|||||||
this.consolePanel = null;
|
this.consolePanel = null;
|
||||||
}).bind(this);
|
}).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);
|
panel.addEventListener("popuphidden", onPopupHidden, false);
|
||||||
|
|
||||||
let lastIndex = -1;
|
let lastIndex = -1;
|
||||||
@ -3249,10 +3242,14 @@ HeadsUpDisplay.prototype = {
|
|||||||
positionConsole: function HUD_positionConsole(aPosition)
|
positionConsole: function HUD_positionConsole(aPosition)
|
||||||
{
|
{
|
||||||
if (!(aPosition in this.positions)) {
|
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") {
|
if (aPosition == "window") {
|
||||||
|
let closeButton = this.consoleFilterToolbar.
|
||||||
|
querySelector(".webconsole-close-button");
|
||||||
|
closeButton.setAttribute("hidden", "true");
|
||||||
this.createOwnWindowPanel();
|
this.createOwnWindowPanel();
|
||||||
this.positionMenuitems.window.setAttribute("checked", true);
|
this.positionMenuitems.window.setAttribute("checked", true);
|
||||||
if (this.positionMenuitems.last) {
|
if (this.positionMenuitems.last) {
|
||||||
@ -3308,6 +3305,10 @@ HeadsUpDisplay.prototype = {
|
|||||||
this.outputNode.ensureIndexIsVisible(lastIndex);
|
this.outputNode.ensureIndexIsVisible(lastIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let closeButton = this.consoleFilterToolbar.
|
||||||
|
getElementsByClassName("webconsole-close-button")[0];
|
||||||
|
closeButton.removeAttribute("hidden");
|
||||||
|
|
||||||
this.uiInOwnWindow = false;
|
this.uiInOwnWindow = false;
|
||||||
if (this.consolePanel) {
|
if (this.consolePanel) {
|
||||||
this.HUDBox.removeAttribute("flex");
|
this.HUDBox.removeAttribute("flex");
|
||||||
@ -3584,7 +3585,7 @@ HeadsUpDisplay.prototype = {
|
|||||||
* Creates the UI for re-positioning the console
|
* Creates the UI for re-positioning the console
|
||||||
*
|
*
|
||||||
* @return nsIDOMNode
|
* @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.
|
* change the console position.
|
||||||
*/
|
*/
|
||||||
createPositionUI: function HUD_createPositionUI()
|
createPositionUI: function HUD_createPositionUI()
|
||||||
@ -5396,22 +5397,22 @@ ConsoleUtils = {
|
|||||||
// Make the icon container, which is a vertical box. Its purpose is to
|
// 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
|
// ensure that the icon stays anchored at the top of the message even for
|
||||||
// long multi-line messages.
|
// 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");
|
iconContainer.classList.add("webconsole-msg-icon-container");
|
||||||
|
|
||||||
// Make the icon node. It's sprited and the actual region of the image is
|
// Make the icon node. It's sprited and the actual region of the image is
|
||||||
// determined by CSS rules.
|
// 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");
|
iconNode.classList.add("webconsole-msg-icon");
|
||||||
iconContainer.appendChild(iconNode);
|
iconContainer.appendChild(iconNode);
|
||||||
|
|
||||||
// Make the spacer that positions the icon.
|
// 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");
|
spacer.setAttribute("flex", "1");
|
||||||
iconContainer.appendChild(spacer);
|
iconContainer.appendChild(spacer);
|
||||||
|
|
||||||
// Create the message body, which contains the actual text of the message.
|
// 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.setAttribute("flex", "1");
|
||||||
bodyNode.classList.add("webconsole-msg-body");
|
bodyNode.classList.add("webconsole-msg-body");
|
||||||
|
|
||||||
@ -5425,15 +5426,15 @@ ConsoleUtils = {
|
|||||||
|
|
||||||
bodyNode.appendChild(aBody);
|
bodyNode.appendChild(aBody);
|
||||||
|
|
||||||
let repeatContainer = aDocument.createElementNS(XUL_NS, "xul:hbox");
|
let repeatContainer = aDocument.createElementNS(XUL_NS, "hbox");
|
||||||
repeatContainer.setAttribute("align", "start");
|
repeatContainer.setAttribute("align", "start");
|
||||||
let repeatNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
let repeatNode = aDocument.createElementNS(XUL_NS, "label");
|
||||||
repeatNode.setAttribute("value", "1");
|
repeatNode.setAttribute("value", "1");
|
||||||
repeatNode.classList.add("webconsole-msg-repeat");
|
repeatNode.classList.add("webconsole-msg-repeat");
|
||||||
repeatContainer.appendChild(repeatNode);
|
repeatContainer.appendChild(repeatNode);
|
||||||
|
|
||||||
// Create the timestamp.
|
// Create the timestamp.
|
||||||
let timestampNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
let timestampNode = aDocument.createElementNS(XUL_NS, "label");
|
||||||
timestampNode.classList.add("webconsole-timestamp");
|
timestampNode.classList.add("webconsole-timestamp");
|
||||||
let timestamp = ConsoleUtils.timestamp();
|
let timestamp = ConsoleUtils.timestamp();
|
||||||
let timestampString = ConsoleUtils.timestampString(timestamp);
|
let timestampString = ConsoleUtils.timestampString(timestamp);
|
||||||
@ -5448,7 +5449,7 @@ ConsoleUtils = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the containing node and append all its elements to it.
|
// 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.clipboardText = aClipboardText;
|
||||||
node.classList.add("hud-msg-node");
|
node.classList.add("hud-msg-node");
|
||||||
|
|
||||||
@ -5523,7 +5524,7 @@ ConsoleUtils = {
|
|||||||
createLocationNode:
|
createLocationNode:
|
||||||
function ConsoleUtils_createLocationNode(aDocument, aSourceURL,
|
function ConsoleUtils_createLocationNode(aDocument, aSourceURL,
|
||||||
aSourceLine) {
|
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
|
// Create the text, which consists of an abbreviated version of the URL
|
||||||
// plus an optional line number.
|
// plus an optional line number.
|
||||||
@ -5662,7 +5663,7 @@ ConsoleUtils = {
|
|||||||
function ConsoleUtils_filterRepeatedConsole(aNode, aOutput) {
|
function ConsoleUtils_filterRepeatedConsole(aNode, aOutput) {
|
||||||
let lastMessage = aOutput.lastChild;
|
let lastMessage = aOutput.lastChild;
|
||||||
|
|
||||||
// childNodes[2] is the xul:description element
|
// childNodes[2] is the description element
|
||||||
if (lastMessage &&
|
if (lastMessage &&
|
||||||
aNode.childNodes[2].textContent ==
|
aNode.childNodes[2].textContent ==
|
||||||
lastMessage.childNodes[2].textContent) {
|
lastMessage.childNodes[2].textContent) {
|
@ -21,6 +21,7 @@
|
|||||||
#
|
#
|
||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
# David Dahl <ddahl@mozilla.com>
|
# David Dahl <ddahl@mozilla.com>
|
||||||
|
# Rob Campbell <rcampbell@mozilla.com>
|
||||||
#
|
#
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
# 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
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
@ -36,14 +37,15 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../../../..
|
DEPTH = ../../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
EXTRA_JS_MODULES = HUDService.jsm \
|
EXTRA_JS_MODULES = \
|
||||||
|
HUDService.jsm \
|
||||||
PropertyPanel.jsm \
|
PropertyPanel.jsm \
|
||||||
NetworkHelper.jsm \
|
NetworkHelper.jsm \
|
||||||
AutocompletePopup.jsm \
|
AutocompletePopup.jsm \
|
||||||
@ -51,7 +53,7 @@ EXTRA_JS_MODULES = HUDService.jsm \
|
|||||||
|
|
||||||
ifdef ENABLE_TESTS
|
ifdef ENABLE_TESTS
|
||||||
ifneq (mobile,$(MOZ_BUILD_APP))
|
ifneq (mobile,$(MOZ_BUILD_APP))
|
||||||
DIRS += tests
|
DIRS += test
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
@ -36,15 +36,13 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../../../../..
|
DEPTH = ../../../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
|
|
||||||
MODULE = test_hudservice
|
|
||||||
|
|
||||||
DIRS = browser
|
DIRS = browser
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
@ -21,6 +21,7 @@
|
|||||||
# David Dahl <ddahl@mozilla.com>
|
# David Dahl <ddahl@mozilla.com>
|
||||||
# Patrick Walton <pcwalton@mozilla.com>
|
# Patrick Walton <pcwalton@mozilla.com>
|
||||||
# Mihai Șucan <mihai.sucan@gmail.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
|
# 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"),
|
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||||
@ -36,11 +37,11 @@
|
|||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../../../../../..
|
DEPTH = ../../../../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
relativesrcdir = toolkit/components/console/hudservice/tests/browser
|
relativesrcdir = browser/devtools/webconsole/test/browser
|
||||||
|
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
@ -37,7 +37,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
@ -41,7 +41,7 @@
|
|||||||
// Tests that the page's resources are displayed in the console as they're
|
// Tests that the page's resources are displayed in the console as they're
|
||||||
// loaded
|
// 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() {
|
function test() {
|
||||||
addTab("data:text/html,Web Console basic network logging test");
|
addTab("data:text/html,Web Console basic network logging test");
|
@ -39,7 +39,7 @@
|
|||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
// Tests that the console object still exists after a page reload.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// Tests that the input field is focused when the console is opened.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -41,7 +41,7 @@
|
|||||||
// Tests to ensure that errors don't appear when the console is closed while a
|
// Tests to ensure that errors don't appear when the console is closed while a
|
||||||
// completion is being performed.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// Tests that errors still show up in the Web Console after a page reload.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// Tests that console groups behave properly.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Cu.import("resource:///modules/HUDService.jsm");
|
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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// Tests that the Web Console close button functions.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -41,7 +41,7 @@
|
|||||||
// Tests that exceptions thrown by content don't show up twice in the Web
|
// Tests that exceptions thrown by content don't show up twice in the Web
|
||||||
// Console.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_DUPLICATE_ERROR_URI);
|
addTab(TEST_DUPLICATE_ERROR_URI);
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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;
|
let HUD, inputNode;
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
// Tests that the Web Console limits the number of lines displayed according to
|
// Tests that the Web Console limits the number of lines displayed according to
|
||||||
// the user's preferences.
|
// 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -36,7 +36,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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";
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// Tests that adding text to one of the output labels doesn't cause errors.
|
// Tests that adding text to one of the output labels doesn't cause errors.
|
||||||
|
|
||||||
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() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -36,7 +36,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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";
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
addTab(TEST_URI);
|
addTab(TEST_URI);
|
@ -36,11 +36,11 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud.html";
|
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-593003-iframe-wrong-hud.html";
|
||||||
|
|
||||||
const TEST_IFRAME_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-593003-iframe-wrong-hud-iframe.html";
|
const TEST_IFRAME_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-593003-iframe-wrong-hud-iframe.html";
|
||||||
|
|
||||||
const TEST_DUMMY_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
const TEST_DUMMY_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||||
|
|
||||||
let tab1, tab2;
|
let tab1, tab2;
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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;
|
let HUD;
|
||||||
|
|
||||||
let outputItem;
|
let outputItem;
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TESTS_PATH = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/";
|
const TESTS_PATH = "http://example.com/browser/browser/devtools/webconsole/test//browser/";
|
||||||
const TESTS = [
|
const TESTS = [
|
||||||
{ // #0
|
{ // #0
|
||||||
file: "test-bug-595934-css-loader.html",
|
file: "test-bug-595934-css-loader.html",
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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 tab1, tab2, win1, win2;
|
let tab1, tab2, win1, win2;
|
||||||
let noErrors = true;
|
let noErrors = true;
|
@ -8,8 +8,8 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/" +
|
const TEST_URI = "http://example.com/browser/browser/devtools/" +
|
||||||
"hudservice/tests/browser/test-bug-597136-external-script-" +
|
"webconsole/test/browser/test-bug-597136-external-script-" +
|
||||||
"errors.html";
|
"errors.html";
|
||||||
|
|
||||||
function test() {
|
function test() {
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network.html";
|
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-network.html";
|
||||||
|
|
||||||
function tabLoad(aEvent) {
|
function tabLoad(aEvent) {
|
||||||
browser.removeEventListener(aEvent.type, arguments.callee, true);
|
browser.removeEventListener(aEvent.type, arguments.callee, true);
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-597756-reopen-closed-tab.html";
|
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-597756-reopen-closed-tab.html";
|
||||||
|
|
||||||
let newTabIsOpen = false;
|
let newTabIsOpen = false;
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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 testEnded = false;
|
let testEnded = false;
|
||||||
let pos = -1;
|
let pos = -1;
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-599725-response-headers.sjs";
|
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-599725-response-headers.sjs";
|
||||||
|
|
||||||
let lastFinishedRequest = null;
|
let lastFinishedRequest = null;
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-600183-charset.html";
|
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-600183-charset.html";
|
||||||
|
|
||||||
let lastFinishedRequest = null;
|
let lastFinishedRequest = null;
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-601177-log-levels.html";
|
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-601177-log-levels.html";
|
||||||
|
|
||||||
let msgs;
|
let msgs;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user