зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to services-central.
This commit is contained in:
Коммит
537a59da5b
|
@ -826,21 +826,20 @@ getAttributesCB(AtkObject *aAtkObj)
|
|||
AtkObject *
|
||||
getParentCB(AtkObject *aAtkObj)
|
||||
{
|
||||
if (!aAtkObj->accessible_parent) {
|
||||
nsAccessibleWrap *accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (!accWrap) {
|
||||
return nsnull;
|
||||
}
|
||||
if (!aAtkObj->accessible_parent) {
|
||||
nsAccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (!accWrap)
|
||||
return nsnull;
|
||||
|
||||
nsAccessible* accParent = accWrap->GetParent();
|
||||
if (!accParent)
|
||||
return nsnull;
|
||||
nsAccessible* accParent = accWrap->Parent();
|
||||
if (!accParent)
|
||||
return nsnull;
|
||||
|
||||
AtkObject *parent = nsAccessibleWrap::GetAtkObject(accParent);
|
||||
if (parent)
|
||||
atk_object_set_parent(aAtkObj, parent);
|
||||
}
|
||||
return aAtkObj->accessible_parent;
|
||||
AtkObject* parent = nsAccessibleWrap::GetAtkObject(accParent);
|
||||
if (parent)
|
||||
atk_object_set_parent(aAtkObj, parent);
|
||||
}
|
||||
return aAtkObj->accessible_parent;
|
||||
}
|
||||
|
||||
gint
|
||||
|
@ -893,10 +892,9 @@ getIndexInParentCB(AtkObject *aAtkObj)
|
|||
return -1;
|
||||
}
|
||||
|
||||
nsAccessible *parent = accWrap->GetParent();
|
||||
if (!parent) {
|
||||
nsAccessible* parent = accWrap->Parent();
|
||||
if (!parent)
|
||||
return -1; // No parent
|
||||
}
|
||||
|
||||
return parent->GetIndexOfEmbeddedChild(accWrap);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
|
|||
if (!keyBinding.IsEmpty()) {
|
||||
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
|
||||
|
||||
nsAccessible* parent = acc->GetParent();
|
||||
nsAccessible* parent = acc->Parent();
|
||||
PRUint32 role = parent ? parent->Role() : 0;
|
||||
if (role == nsIAccessibleRole::ROLE_PARENT_MENUITEM ||
|
||||
role == nsIAccessibleRole::ROLE_MENUITEM ||
|
||||
|
@ -141,7 +141,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
|
|||
|
||||
keysInHierarchyStr.Insert(str, 0);
|
||||
}
|
||||
} while ((parent = parent->GetParent()) &&
|
||||
} while ((parent = parent->Parent()) &&
|
||||
parent->Role() != nsIAccessibleRole::ROLE_MENUBAR);
|
||||
|
||||
keyBindingsStr.Append(';');
|
||||
|
|
|
@ -312,7 +312,7 @@ AccHideEvent::
|
|||
AccHideEvent(nsAccessible* aTarget, nsINode* aTargetNode) :
|
||||
AccMutationEvent(::nsIAccessibleEvent::EVENT_HIDE, aTarget, aTargetNode)
|
||||
{
|
||||
mParent = mAccessible->GetParent();
|
||||
mParent = mAccessible->Parent();
|
||||
mNextSibling = mAccessible->NextSibling();
|
||||
mPrevSibling = mAccessible->PrevSibling();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ AccGroupInfo::AccGroupInfo(nsAccessible* aItem, PRUint32 aRole) :
|
|||
mPosInSet(0), mSetSize(0), mParent(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(AccGroupInfo);
|
||||
nsAccessible* parent = aItem->GetParent();
|
||||
nsAccessible* parent = aItem->Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
|
|
|
@ -374,8 +374,8 @@ NotificationController::CoalesceEvents()
|
|||
return;
|
||||
}
|
||||
} else if (tailEvent->mEventType == nsIAccessibleEvent::EVENT_SHOW) {
|
||||
if (thisEvent->mAccessible->GetParent() ==
|
||||
tailEvent->mAccessible->GetParent()) {
|
||||
if (thisEvent->mAccessible->Parent() ==
|
||||
tailEvent->mAccessible->Parent()) {
|
||||
tailEvent->mEventRule = thisEvent->mEventRule;
|
||||
|
||||
// Coalesce text change events for show events.
|
||||
|
|
|
@ -69,11 +69,9 @@ void
|
|||
TextUpdater::DoUpdate(const nsAString& aNewText, const nsAString& aOldText,
|
||||
PRUint32 aSkipStart)
|
||||
{
|
||||
nsAccessible* parent = mTextLeaf->GetParent();
|
||||
if (!parent) {
|
||||
NS_ERROR("No parent for text leaf!");
|
||||
nsAccessible* parent = mTextLeaf->Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
}
|
||||
|
||||
mHyperText = parent->AsHyperText();
|
||||
if (!mHyperText) {
|
||||
|
|
|
@ -830,7 +830,7 @@ nsARIAGridAccessible::SetARIASelected(nsAccessible *aAccessible,
|
|||
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
|
||||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
|
||||
role == nsIAccessibleRole::ROLE_COLUMNHEADER) {
|
||||
nsAccessible *row = aAccessible->GetParent();
|
||||
nsAccessible* row = aAccessible->Parent();
|
||||
|
||||
if (row && row->Role() == nsIAccessibleRole::ROLE_ROW &&
|
||||
nsAccUtils::IsARIASelected(row)) {
|
||||
|
@ -949,11 +949,11 @@ nsARIAGridCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
|||
NS_ENSURE_ARG_POINTER(aTable);
|
||||
*aTable = nsnull;
|
||||
|
||||
nsAccessible* thisRow = GetParent();
|
||||
nsAccessible* thisRow = Parent();
|
||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = thisRow->GetParent();
|
||||
nsAccessible* table = thisRow->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -975,7 +975,7 @@ nsARIAGridCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1003,11 +1003,11 @@ nsARIAGridCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = row->GetParent();
|
||||
nsAccessible* table = row->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1096,7 +1096,7 @@ nsARIAGridCellAccessible::IsSelected(PRBool *aIsSelected)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible *row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ nsARIAGridCellAccessible::ApplyARIAState(PRUint64* aState)
|
|||
return;
|
||||
|
||||
// Check aria-selected="true" on the row.
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return;
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
|
|||
|
||||
// Expose "table-cell-index" attribute.
|
||||
|
||||
nsAccessible* thisRow = GetParent();
|
||||
nsAccessible* thisRow = Parent();
|
||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttrib
|
|||
colCount++;
|
||||
}
|
||||
|
||||
nsAccessible* table = thisRow->GetParent();
|
||||
nsAccessible* table = thisRow->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ nsAccUtils::GetDefaultLevel(nsAccessible *aAccessible)
|
|||
return 1;
|
||||
|
||||
if (role == nsIAccessibleRole::ROLE_ROW) {
|
||||
nsAccessible *parent = aAccessible->GetParent();
|
||||
nsAccessible* parent = aAccessible->Parent();
|
||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
||||
// It is a row inside flatten treegrid. Group level is always 1 until it
|
||||
// is overriden by aria-level attribute.
|
||||
|
@ -338,7 +338,7 @@ nsAccUtils::GetAncestorWithRole(nsAccessible *aDescendant, PRUint32 aRole)
|
|||
{
|
||||
nsAccessible *document = aDescendant->GetDocAccessible();
|
||||
nsAccessible *parent = aDescendant;
|
||||
while ((parent = parent->GetParent())) {
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 testRole = parent->Role();
|
||||
if (testRole == aRole)
|
||||
return parent;
|
||||
|
@ -359,7 +359,7 @@ nsAccUtils::GetSelectableContainer(nsAccessible* aAccessible, PRUint64 aState)
|
|||
return nsnull;
|
||||
|
||||
nsAccessible* parent = aAccessible;
|
||||
while ((parent = parent->GetParent()) && !parent->IsSelect()) {
|
||||
while ((parent = parent->Parent()) && !parent->IsSelect()) {
|
||||
if (Role(parent) == nsIAccessibleRole::ROLE_PANE)
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
|
|||
if (textAcc)
|
||||
return textAcc;
|
||||
|
||||
} while (accessible = accessible->GetParent());
|
||||
} while (accessible = accessible->Parent());
|
||||
|
||||
NS_NOTREACHED("We must reach document accessible implementing nsIAccessibleText!");
|
||||
return nsnull;
|
||||
|
|
|
@ -421,8 +421,10 @@ NS_IMETHODIMP
|
|||
nsAccessible::GetParent(nsIAccessible **aParent)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_IF_ADDREF(*aParent = GetParent());
|
||||
NS_IF_ADDREF(*aParent = Parent());
|
||||
return *aParent ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -729,7 +731,7 @@ nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
|
|||
}
|
||||
else if (gLastFocusedNode) {
|
||||
focusedChild = GetAccService()->GetAccessible(gLastFocusedNode);
|
||||
if (focusedChild && focusedChild->GetParent() != this)
|
||||
if (focusedChild && focusedChild->Parent() != this)
|
||||
focusedChild = nsnull;
|
||||
}
|
||||
|
||||
|
@ -819,7 +821,7 @@ nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
|||
// ensure obtained accessible is a child of this accessible.
|
||||
nsAccessible* child = accessible;
|
||||
while (true) {
|
||||
nsAccessible* parent = child->GetParent();
|
||||
nsAccessible* parent = child->Parent();
|
||||
if (!parent) {
|
||||
// Reached the top of the hierarchy. These bounds were inside an
|
||||
// accessible that is not a descendant of this one.
|
||||
|
@ -2140,9 +2142,8 @@ nsAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||
nsIView *view = frame->GetViewExternal();
|
||||
if (view) {
|
||||
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
||||
if (scrollFrame || view->GetWidget() || !frame->GetParent()) {
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
||||
}
|
||||
if (scrollFrame || view->GetWidget() || !frame->GetParent())
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, Parent());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2615,7 +2616,7 @@ nsAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset,
|
|||
|
||||
if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
|
||||
aText += kForcedNewLineChar;
|
||||
} else if (nsAccUtils::MustPrune(GetParent())) {
|
||||
} else if (nsAccUtils::MustPrune(Parent())) {
|
||||
// Expose the embedded object accessible as imaginary embedded object
|
||||
// character if its parent hypertext accessible doesn't expose children to
|
||||
// AT.
|
||||
|
@ -3257,16 +3258,18 @@ nsAccessible::GetLevelInternal()
|
|||
{
|
||||
PRInt32 level = nsAccUtils::GetDefaultLevel(this);
|
||||
|
||||
PRUint32 role = Role();
|
||||
nsAccessible* parent = GetParent();
|
||||
if (!IsBoundToParent())
|
||||
return level;
|
||||
|
||||
PRUint32 role = Role();
|
||||
if (role == nsIAccessibleRole::ROLE_OUTLINEITEM) {
|
||||
// Always expose 'level' attribute for 'outlineitem' accessible. The number
|
||||
// of nested 'grouping' accessibles containing 'outlineitem' accessible is
|
||||
// its level.
|
||||
level = 1;
|
||||
|
||||
while (parent) {
|
||||
nsAccessible* parent = this;
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 parentRole = parent->Role();
|
||||
|
||||
if (parentRole == nsIAccessibleRole::ROLE_OUTLINE)
|
||||
|
@ -3274,7 +3277,6 @@ nsAccessible::GetLevelInternal()
|
|||
if (parentRole == nsIAccessibleRole::ROLE_GROUPING)
|
||||
++ level;
|
||||
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
} else if (role == nsIAccessibleRole::ROLE_LISTITEM) {
|
||||
|
@ -3285,8 +3287,8 @@ nsAccessible::GetLevelInternal()
|
|||
|
||||
// Calculate 'level' attribute based on number of parent listitems.
|
||||
level = 0;
|
||||
|
||||
while (parent) {
|
||||
nsAccessible* parent = this;
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 parentRole = parent->Role();
|
||||
|
||||
if (parentRole == nsIAccessibleRole::ROLE_LISTITEM)
|
||||
|
@ -3294,23 +3296,20 @@ nsAccessible::GetLevelInternal()
|
|||
else if (parentRole != nsIAccessibleRole::ROLE_LIST)
|
||||
break;
|
||||
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
if (level == 0) {
|
||||
// If this listitem is on top of nested lists then expose 'level'
|
||||
// attribute.
|
||||
nsAccessible* parent(GetParent());
|
||||
parent = Parent();
|
||||
PRInt32 siblingCount = parent->GetChildCount();
|
||||
for (PRInt32 siblingIdx = 0; siblingIdx < siblingCount; siblingIdx++) {
|
||||
nsAccessible* sibling = parent->GetChildAt(siblingIdx);
|
||||
|
||||
nsCOMPtr<nsIAccessible> siblingChild;
|
||||
sibling->GetLastChild(getter_AddRefs(siblingChild));
|
||||
if (nsAccUtils::Role(siblingChild) == nsIAccessibleRole::ROLE_LIST) {
|
||||
level = 1;
|
||||
break;
|
||||
}
|
||||
nsAccessible* siblingChild = sibling->LastChild();
|
||||
if (siblingChild &&
|
||||
siblingChild->Role() == nsIAccessibleRole::ROLE_LIST)
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
++ level; // level is 1-index based
|
||||
|
|
|
@ -279,7 +279,7 @@ public:
|
|||
/**
|
||||
* Return parent accessible.
|
||||
*/
|
||||
nsAccessible* GetParent() const { return mParent; }
|
||||
nsAccessible* Parent() const { return mParent; }
|
||||
|
||||
/**
|
||||
* Return child accessible at the given index.
|
||||
|
@ -307,12 +307,20 @@ public:
|
|||
PRBool HasChildren() { return !!GetChildAt(0); }
|
||||
|
||||
/**
|
||||
* Return next/previous sibling of the accessible.
|
||||
* Return first/last/next/previous sibling of the accessible.
|
||||
*/
|
||||
inline nsAccessible* NextSibling() const
|
||||
{ return GetSiblingAtOffset(1); }
|
||||
inline nsAccessible* PrevSibling() const
|
||||
{ return GetSiblingAtOffset(-1); }
|
||||
inline nsAccessible* FirstChild()
|
||||
{ return GetChildCount() != 0 ? GetChildAt(0) : nsnull; }
|
||||
inline nsAccessible* LastChild()
|
||||
{
|
||||
PRUint32 childCount = GetChildCount();
|
||||
return childCount != 0 ? GetChildAt(childCount - 1) : nsnull;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return embedded accessible children count.
|
||||
|
|
|
@ -234,8 +234,8 @@ nsLinkableAccessible::BindToParent(nsAccessible* aParent,
|
|||
// on non accessible node in parent chain but this node is skipped when tree
|
||||
// is traversed.
|
||||
nsAccessible* walkUpAcc = this;
|
||||
while ((walkUpAcc = walkUpAcc->GetParent()) && !walkUpAcc->IsDoc()) {
|
||||
if (walkUpAcc && walkUpAcc->Role() == nsIAccessibleRole::ROLE_LINK &&
|
||||
while ((walkUpAcc = walkUpAcc->Parent()) && !walkUpAcc->IsDoc()) {
|
||||
if (walkUpAcc->Role() == nsIAccessibleRole::ROLE_LINK &&
|
||||
walkUpAcc->State() & states::LINKED) {
|
||||
mIsLink = PR_TRUE;
|
||||
mActionAcc = walkUpAcc;
|
||||
|
|
|
@ -581,7 +581,7 @@ nsDocAccessible::GetAccessible(nsINode* aNode) const
|
|||
// It will assert if not all the children were created
|
||||
// when they were first cached, and no invalidation
|
||||
// ever corrected parent accessible's child cache.
|
||||
nsAccessible* parent(accessible->GetParent());
|
||||
nsAccessible* parent = accessible->Parent();
|
||||
if (parent)
|
||||
parent->TestChildCache(accessible);
|
||||
#endif
|
||||
|
@ -1487,8 +1487,8 @@ nsDocAccessible::NotifyOfInitialUpdate()
|
|||
// a problem then consider to keep event processing per tab document.
|
||||
if (!IsRoot()) {
|
||||
nsRefPtr<AccEvent> reorderEvent =
|
||||
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, GetParent(),
|
||||
eAutoDetect, AccEvent::eCoalesceFromSameSubtree);
|
||||
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, Parent(), eAutoDetect,
|
||||
AccEvent::eCoalesceFromSameSubtree);
|
||||
ParentDocument()->FireDelayedAccessibleEvent(reorderEvent);
|
||||
}
|
||||
}
|
||||
|
@ -1817,7 +1817,7 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
|
|||
if (ancestor == this)
|
||||
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 parent doesn't have own DOM node like list accessible for HTML
|
||||
// selects.
|
||||
nsAccessible* parent = aChild->GetParent();
|
||||
nsAccessible* parent = aChild->Parent();
|
||||
NS_ASSERTION(parent, "No accessible parent?!");
|
||||
if (parent)
|
||||
parent->RemoveChild(aChild);
|
||||
|
|
|
@ -699,14 +699,14 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||
// is active.
|
||||
return;
|
||||
} else {
|
||||
nsAccessible *containerAccessible = accessible->GetParent();
|
||||
if (!containerAccessible)
|
||||
nsAccessible* container = accessible->Parent();
|
||||
if (!container)
|
||||
return;
|
||||
// It is not top level menuitem
|
||||
// Only fire focus event if it is not inside collapsed popup
|
||||
// and not a listitem of a combo box
|
||||
if (containerAccessible->State() & states::COLLAPSED) {
|
||||
nsAccessible *containerParent = containerAccessible->GetParent();
|
||||
if (container->State() & states::COLLAPSED) {
|
||||
nsAccessible* containerParent = container->Parent();
|
||||
if (!containerParent)
|
||||
return;
|
||||
if (containerParent->Role() != nsIAccessibleRole::ROLE_COMBOBOX) {
|
||||
|
@ -796,7 +796,7 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
|
|||
// If ancestor chain of accessibles is not completely visible,
|
||||
// don't use this one. This happens for example if it's inside
|
||||
// a background tab (tabbed browsing)
|
||||
nsAccessible *parent = accDoc->GetParent();
|
||||
nsAccessible* parent = accDoc->Parent();
|
||||
while (parent) {
|
||||
if (parent->State() & states::INVISIBLE)
|
||||
return nsnull;
|
||||
|
@ -804,7 +804,7 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart)
|
|||
if (parent == this)
|
||||
break; // Don't check past original root accessible we started with
|
||||
|
||||
parent = parent->GetParent();
|
||||
parent = parent->Parent();
|
||||
}
|
||||
|
||||
NS_ADDREF(aStart);
|
||||
|
@ -878,7 +878,7 @@ nsRootAccessible::HandlePopupShownEvent(nsAccessible* aAccessible)
|
|||
|
||||
if (role == nsIAccessibleRole::ROLE_COMBOBOX_LIST) {
|
||||
// Fire expanded state change event for comboboxes and autocompeletes.
|
||||
nsAccessible* combobox = aAccessible->GetParent();
|
||||
nsAccessible* combobox = aAccessible->Parent();
|
||||
if (!combobox)
|
||||
return;
|
||||
|
||||
|
@ -914,7 +914,7 @@ nsRootAccessible::HandlePopupHidingEvent(nsINode* aNode,
|
|||
aAccessible->Role() != nsIAccessibleRole::ROLE_COMBOBOX_LIST)
|
||||
return;
|
||||
|
||||
nsAccessible* combobox = aAccessible->GetParent();
|
||||
nsAccessible* combobox = aAccessible->Parent();
|
||||
if (!combobox)
|
||||
return;
|
||||
|
||||
|
|
|
@ -407,8 +407,9 @@ nsHTMLTextFieldAccessible::GetNameInternal(nsAString& aName)
|
|||
// This means we're part of another control, so use parent accessible for name.
|
||||
// This ensures that a textbox inside of a XUL widget gets
|
||||
// an accessible name.
|
||||
nsAccessible* parent = GetParent();
|
||||
parent->GetName(aName);
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent)
|
||||
parent->GetName(aName);
|
||||
}
|
||||
|
||||
if (!aName.IsEmpty())
|
||||
|
@ -452,7 +453,7 @@ nsHTMLTextFieldAccessible::NativeState()
|
|||
state |= states::PROTECTED;
|
||||
}
|
||||
else {
|
||||
nsAccessible* parent = GetParent();
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
||||
state |= states::HASPOPUP;
|
||||
}
|
||||
|
@ -650,7 +651,7 @@ nsHTMLLegendAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
||||
// Look for groupbox parent
|
||||
nsAccessible* groupbox = GetParent();
|
||||
nsAccessible* groupbox = Parent();
|
||||
|
||||
if (groupbox && groupbox->Role() == nsIAccessibleRole::ROLE_GROUPING) {
|
||||
// XXX: if group box exposes more than one relation of the given type
|
||||
|
|
|
@ -300,7 +300,7 @@ nsHTMLSelectOptionAccessible::NativeState()
|
|||
// visibility implementation unless they get reimplemented in layout
|
||||
state &= ~states::OFFSCREEN;
|
||||
// <select> is not collapsed: compare bounds to calculate OFFSCREEN
|
||||
nsAccessible* listAcc = GetParent();
|
||||
nsAccessible* listAcc = Parent();
|
||||
if (listAcc) {
|
||||
PRInt32 optionX, optionY, optionWidth, optionHeight;
|
||||
PRInt32 listX, listY, listWidth, listHeight;
|
||||
|
@ -382,8 +382,9 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::DoAction(PRUint8 index)
|
|||
if (!newHTMLOption)
|
||||
return NS_ERROR_FAILURE;
|
||||
// Clear old selection
|
||||
nsAccessible* parent = GetParent();
|
||||
NS_ASSERTION(parent, "No parent!");
|
||||
nsAccessible* parent = Parent();
|
||||
if (!parent)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIContent> oldHTMLOptionContent =
|
||||
GetFocusedOption(parent->GetContent());
|
||||
|
@ -891,7 +892,7 @@ void nsHTMLComboboxListAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBo
|
|||
{
|
||||
*aBoundingFrame = nsnull;
|
||||
|
||||
nsAccessible* comboAcc = GetParent();
|
||||
nsAccessible* comboAcc = Parent();
|
||||
if (!comboAcc)
|
||||
return;
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ already_AddRefed<nsIAccessibleTable>
|
|||
nsHTMLTableCellAccessible::GetTableAccessible()
|
||||
{
|
||||
nsAccessible* parent = this;
|
||||
while ((parent = parent->GetParent())) {
|
||||
while ((parent = parent->Parent())) {
|
||||
PRUint32 role = parent->Role();
|
||||
if (role == nsIAccessibleRole::ROLE_TABLE ||
|
||||
role == nsIAccessibleRole::ROLE_TREE_TABLE) {
|
||||
|
@ -1528,8 +1528,9 @@ nsHTMLCaptionAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||
aRelation);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR)
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, GetParent());
|
||||
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, Parent());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -621,9 +621,9 @@ nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
|
|||
}
|
||||
|
||||
// From the descendant, go up and get the immediate child of this hypertext
|
||||
nsAccessible *childAccAtOffset = nsnull;
|
||||
nsAccessible* childAccAtOffset = nsnull;
|
||||
while (descendantAcc) {
|
||||
nsAccessible *parentAcc = descendantAcc->GetParent();
|
||||
nsAccessible* parentAcc = descendantAcc->Parent();
|
||||
if (parentAcc == this) {
|
||||
childAccAtOffset = descendantAcc;
|
||||
break;
|
||||
|
|
|
@ -285,7 +285,7 @@ nsAccessibleWrap::GetUnignoredChildren(nsTArray<nsRefPtr<nsAccessibleWrap> > &aC
|
|||
already_AddRefed<nsIAccessible>
|
||||
nsAccessibleWrap::GetUnignoredParent()
|
||||
{
|
||||
nsAccessibleWrap *parentWrap = static_cast<nsAccessibleWrap*>(GetParent());
|
||||
nsAccessibleWrap* parentWrap = static_cast<nsAccessibleWrap*>(Parent());
|
||||
if (!parentWrap)
|
||||
return nsnull;
|
||||
|
||||
|
@ -313,12 +313,12 @@ nsAccessibleWrap::AncestorIsFlat()
|
|||
// look the same on all platforms, we still let the C++ objects be created
|
||||
// though.
|
||||
|
||||
nsAccessible* parent(GetParent());
|
||||
nsAccessible* parent = Parent();
|
||||
while (parent) {
|
||||
if (nsAccUtils::MustPrune(parent))
|
||||
return PR_TRUE;
|
||||
|
||||
parent = parent->GetParent();
|
||||
parent = parent->Parent();
|
||||
}
|
||||
// no parent was flat
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -61,9 +61,6 @@
|
|||
#include "OLEIDL.H"
|
||||
#include "OLEACC.H"
|
||||
#include <winuser.h>
|
||||
#ifndef WINABLEAPI
|
||||
#include <winable.h>
|
||||
#endif
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsICrashReporter.h"
|
||||
#endif
|
||||
|
|
|
@ -214,7 +214,7 @@ __try {
|
|||
}
|
||||
}
|
||||
|
||||
nsAccessible* xpParentAcc = GetParent();
|
||||
nsAccessible* xpParentAcc = Parent();
|
||||
if (!xpParentAcc) {
|
||||
if (IsApplication())
|
||||
return S_OK;
|
||||
|
@ -374,7 +374,7 @@ __try {
|
|||
// a ROLE_OUTLINEITEM for consistency and compatibility.
|
||||
// We need this because ARIA has a role of "row" for both grid and treegrid
|
||||
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
||||
nsAccessible* xpParent = GetParent();
|
||||
nsAccessible* xpParent = Parent();
|
||||
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
||||
msaaRole = ROLE_SYSTEM_OUTLINEITEM;
|
||||
}
|
||||
|
@ -1160,7 +1160,7 @@ __try {
|
|||
// Special case, if there is a ROLE_ROW inside of a ROLE_TREE_TABLE, then call
|
||||
// the IA2 role a ROLE_OUTLINEITEM.
|
||||
if (xpRole == nsIAccessibleRole::ROLE_ROW) {
|
||||
nsAccessible* xpParent = GetParent();
|
||||
nsAccessible* xpParent = Parent();
|
||||
if (xpParent && xpParent->Role() == nsIAccessibleRole::ROLE_TREE_TABLE)
|
||||
*aRole = ROLE_SYSTEM_OUTLINEITEM;
|
||||
}
|
||||
|
@ -1768,12 +1768,12 @@ nsAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
|
|||
|
||||
// Check whether the accessible for the given ID is a child of ARIA
|
||||
// document.
|
||||
nsAccessible* parent = child ? child->GetParent() : nsnull;
|
||||
nsAccessible* parent = child ? child->Parent() : nsnull;
|
||||
while (parent && parent != document) {
|
||||
if (parent == this)
|
||||
return child;
|
||||
|
||||
parent = parent->GetParent();
|
||||
parent = parent->Parent();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,9 +39,6 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <winuser.h>
|
||||
#ifndef WINABLEAPI
|
||||
#include <winable.h>
|
||||
#endif
|
||||
#include "AccessibleEventId.h"
|
||||
|
||||
const PRUint32 kEVENT_WIN_UNKNOWN = 0x00000000;
|
||||
|
|
|
@ -573,8 +573,9 @@ nsXULToolbarButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||
PRInt32 setSize = 0;
|
||||
PRInt32 posInSet = 0;
|
||||
|
||||
nsAccessible* parent(GetParent());
|
||||
NS_ENSURE_TRUE(parent,);
|
||||
nsAccessible* parent = Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
PRInt32 childCount = parent->GetChildCount();
|
||||
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
|
|
|
@ -998,11 +998,11 @@ nsXULListCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* thisRow = GetParent();
|
||||
nsAccessible* thisRow = Parent();
|
||||
if (!thisRow || thisRow->Role() != nsIAccessibleRole::ROLE_ROW)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = thisRow->GetParent();
|
||||
nsAccessible* table = thisRow->Parent();
|
||||
if (!table || table->Role() != nsIAccessibleRole::ROLE_TABLE)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ nsXULListCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1048,11 +1048,11 @@ nsXULListCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAccessible* row = GetParent();
|
||||
nsAccessible* row = Parent();
|
||||
if (!row)
|
||||
return NS_OK;
|
||||
|
||||
nsAccessible* table = row->GetParent();
|
||||
nsAccessible* table = row->Parent();
|
||||
if (!table)
|
||||
return NS_OK;
|
||||
|
||||
|
|
|
@ -332,8 +332,8 @@ nsXULMenuitemAccessible::NativeState()
|
|||
|
||||
// Is collapsed?
|
||||
PRBool isCollapsed = PR_FALSE;
|
||||
nsAccessible* parentAcc = GetParent();
|
||||
if (parentAcc->State() & states::INVISIBLE)
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->State() & states::INVISIBLE)
|
||||
isCollapsed = PR_TRUE;
|
||||
|
||||
if (isSelected) {
|
||||
|
@ -342,11 +342,12 @@ nsXULMenuitemAccessible::NativeState()
|
|||
// Selected and collapsed?
|
||||
if (isCollapsed) {
|
||||
// Set selected option offscreen/invisible according to combobox state
|
||||
nsAccessible* grandParentAcc = parentAcc->GetParent();
|
||||
NS_ENSURE_TRUE(grandParentAcc, state);
|
||||
NS_ASSERTION(grandParentAcc->Role() == nsIAccessibleRole::ROLE_COMBOBOX,
|
||||
nsAccessible* grandParent = parent->Parent();
|
||||
if (!grandParent)
|
||||
return state;
|
||||
NS_ASSERTION(grandParent->Role() == nsIAccessibleRole::ROLE_COMBOBOX,
|
||||
"grandparent of combobox listitem is not combobox");
|
||||
PRUint64 grandParentState = grandParentAcc->State();
|
||||
PRUint64 grandParentState = grandParent->State();
|
||||
state &= ~(states::OFFSCREEN | states::INVISIBLE);
|
||||
state |= (grandParentState & states::OFFSCREEN) |
|
||||
(grandParentState & states::INVISIBLE) |
|
||||
|
@ -404,7 +405,7 @@ nsXULMenuitemAccessible::AccessKey() const
|
|||
|
||||
PRUint32 modifierKey = 0;
|
||||
|
||||
nsAccessible* parentAcc = GetParent();
|
||||
nsAccessible* parentAcc = Parent();
|
||||
if (parentAcc) {
|
||||
if (parentAcc->NativeRole() == nsIAccessibleRole::ROLE_MENUBAR) {
|
||||
// If top level menu item, add Alt+ or whatever modifier text to string
|
||||
|
@ -639,8 +640,9 @@ nsXULMenupopupAccessible::NativeState()
|
|||
PRBool isActive = mContent->HasAttr(kNameSpaceID_None,
|
||||
nsAccessibilityAtoms::menuactive);
|
||||
if (!isActive) {
|
||||
nsAccessible* parent(GetParent());
|
||||
NS_ENSURE_TRUE(parent, state);
|
||||
nsAccessible* parent = Parent();
|
||||
if (!parent)
|
||||
return state;
|
||||
|
||||
nsIContent *parentContent = parnet->GetContent();
|
||||
NS_ENSURE_TRUE(parentContent, state);
|
||||
|
@ -685,7 +687,7 @@ nsXULMenupopupAccessible::NativeRole()
|
|||
|
||||
if (role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
|
||||
// Some widgets like the search bar have several popups, owned by buttons.
|
||||
nsAccessible* grandParent = mParent->GetParent();
|
||||
nsAccessible* grandParent = mParent->Parent();
|
||||
if (grandParent &&
|
||||
grandParent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
|
||||
return nsIAccessibleRole::ROLE_COMBOBOX_LIST;
|
||||
|
|
|
@ -98,7 +98,7 @@ nsXULTextAccessible::GetRelationByType(PRUint32 aRelationType,
|
|||
// Caption is the label for groupbox
|
||||
nsIContent *parent = mContent->GetParent();
|
||||
if (parent && parent->Tag() == nsAccessibilityAtoms::caption) {
|
||||
nsAccessible* parent = GetParent();
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->Role() == nsIAccessibleRole::ROLE_GROUPING)
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, parent);
|
||||
}
|
||||
|
|
|
@ -1225,7 +1225,7 @@ nsXULTreeColumnsAccessible::GetSiblingAtOffset(PRInt32 aOffset,
|
|||
PRInt32 rowCount = 0;
|
||||
treeView->GetRowCount(&rowCount);
|
||||
if (rowCount > 0 && aOffset <= rowCount) {
|
||||
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(GetParent());
|
||||
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(Parent());
|
||||
|
||||
if (treeAcc)
|
||||
return treeAcc->GetTreeItemAccessible(aOffset - 1);
|
||||
|
|
|
@ -1016,7 +1016,10 @@ nsXULTreeGridCellAccessible::GetTable(nsIAccessibleTable **aTable)
|
|||
if (IsDefunct())
|
||||
return NS_OK;
|
||||
|
||||
CallQueryInterface(mParent->GetParent(), aTable);
|
||||
nsAccessible* grandParent = mParent->Parent();
|
||||
if (grandParent)
|
||||
CallQueryInterface(grandParent, aTable);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1171,9 +1174,12 @@ nsXULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAtt
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
// "table-cell-index" attribute
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
mParent->GetParent(getter_AddRefs(accessible));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAccessible = do_QueryInterface(accessible);
|
||||
nsAccessible* grandParent = mParent->Parent();
|
||||
if (!grandParent)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAccessible =
|
||||
do_QueryInterface(static_cast<nsIAccessible*>(grandParent));
|
||||
|
||||
// XXX - temp fix for crash bug 516047
|
||||
if (!tableAccessible)
|
||||
|
@ -1308,7 +1314,7 @@ nsXULTreeGridCellAccessible::GetSiblingAtOffset(PRInt32 aOffset,
|
|||
if (!columnAtOffset)
|
||||
return nsnull;
|
||||
|
||||
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(GetParent());
|
||||
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(Parent());
|
||||
return rowAcc->GetCellAccessible(columnAtOffset);
|
||||
}
|
||||
|
||||
|
|
|
@ -762,6 +762,12 @@ function synthClick(aNodeOrID, aCheckerOrEventSeq, aEventType)
|
|||
synthesizeMouse(this.DOMNode, 1, 1, {});
|
||||
}
|
||||
|
||||
this.finalCheck = function synthClick_finalCheck()
|
||||
{
|
||||
// Scroll top window back.
|
||||
window.top.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
this.getID = function synthClick_getID()
|
||||
{
|
||||
return prettyName(aNodeOrID) + " click";
|
||||
|
|
|
@ -103,13 +103,15 @@
|
|||
{
|
||||
this.type = EVENT_NAME_CHANGE;
|
||||
|
||||
this.target getter = function()
|
||||
function targetGetter()
|
||||
{
|
||||
var acc = getAccessible(gTree);
|
||||
|
||||
var tableAcc = getAccessible(acc, [nsIAccessibleTable]);
|
||||
return tableAcc.getCellAt(aRow, aCol);
|
||||
}
|
||||
Object.defineProperty(this, "target", { get: targetGetter });
|
||||
|
||||
this.getID = function getID()
|
||||
{
|
||||
return aMsg + "name changed";
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
};
|
||||
|
||||
if (LINUX || SOLARIS)
|
||||
tree.children[2].children[0].\(subsubmenuTree);
|
||||
tree.children[2].children[0].children.push(subsubmenuTree);
|
||||
else
|
||||
tree.children[2].children[0].children[0].children[0].children.push(subsubmenuTree);
|
||||
|
||||
|
|
|
@ -376,12 +376,12 @@
|
|||
{ INTERNAL_FRAME: [
|
||||
{ DOCUMENT: [
|
||||
{ ENTRY: [ ] }
|
||||
] };
|
||||
] }
|
||||
] };
|
||||
testAccessibleTree(this.containerNode, tree);
|
||||
}
|
||||
|
||||
this.getID() = function changeSrc_getID()
|
||||
this.getID = function changeSrc_getID()
|
||||
{
|
||||
return "change src on iframe";
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ include $(topsrcdir)/config/config.mk
|
|||
PARALLEL_DIRS = \
|
||||
base \
|
||||
components \
|
||||
devtools \
|
||||
fuel \
|
||||
locales \
|
||||
themes \
|
||||
|
|
|
@ -843,6 +843,7 @@ var BookmarksEventHandler = {
|
|||
var PlacesMenuDNDHandler = {
|
||||
_springLoadDelay: 350, // milliseconds
|
||||
_loadTimer: null,
|
||||
_closerTimer: null,
|
||||
|
||||
/**
|
||||
* Called when the user enters the <menu> element during a drag.
|
||||
|
@ -854,13 +855,18 @@ var PlacesMenuDNDHandler = {
|
|||
if (!this._isStaticContainer(event.target))
|
||||
return;
|
||||
|
||||
this._loadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
this._loadTimer.initWithCallback(function() {
|
||||
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();
|
||||
let ip = new InsertionPoint(PlacesUtils.bookmarksMenuFolderId,
|
||||
PlacesUtils.bookmarks.DEFAULT_INDEX,
|
||||
Ci.nsITreeView.DROP_ON);
|
||||
if (ip && PlacesControllerDragHelper.canDrop(ip, event.dataTransfer)) {
|
||||
this._loadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
this._loadTimer.initWithCallback(function() {
|
||||
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();
|
||||
},
|
||||
|
||||
|
@ -878,8 +884,9 @@ var PlacesMenuDNDHandler = {
|
|||
this._loadTimer.cancel();
|
||||
this._loadTimer = null;
|
||||
}
|
||||
let closeTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
closeTimer.initWithCallback(function() {
|
||||
this._closeTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
this._closeTimer.initWithCallback(function() {
|
||||
this._closeTimer = null;
|
||||
let node = PlacesControllerDragHelper.currentDropTarget;
|
||||
let inHierarchy = false;
|
||||
while (node && !inHierarchy) {
|
||||
|
|
|
@ -13,6 +13,7 @@ tabbrowser {
|
|||
-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[overflow="true"] > .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 */
|
||||
}
|
||||
|
||||
.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 {
|
||||
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
|
||||
}
|
||||
|
|
|
@ -399,6 +399,24 @@
|
|||
</panel>
|
||||
|
||||
<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>
|
||||
|
||||
#ifdef CAN_DRAW_IN_TITLEBAR
|
||||
|
@ -468,12 +486,12 @@
|
|||
label="&backCmd.label;"
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&backButton.tooltip;"/>
|
||||
tooltip="back-button-tooltip"/>
|
||||
<toolbarbutton id="forward-button" class="toolbarbutton-1"
|
||||
label="&forwardCmd.label;"
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
tooltiptext="&forwardButton.tooltip;"/>
|
||||
tooltip="forward-button-tooltip"/>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
|
||||
|
|
|
@ -528,6 +528,7 @@ Highlighter.prototype = {
|
|||
*/
|
||||
var InspectorUI = {
|
||||
browser: null,
|
||||
tools: {},
|
||||
showTextNodesWithWhitespace: false,
|
||||
inspecting: false,
|
||||
treeLoaded: false,
|
||||
|
@ -859,6 +860,13 @@ var InspectorUI = {
|
|||
delete this.domplateUtils;
|
||||
}
|
||||
|
||||
this.saveToolState(this.winID);
|
||||
this.toolsDo(function IUI_toolsHide(aTool) {
|
||||
if (aTool.panel) {
|
||||
aTool.panel.hidePopup();
|
||||
}
|
||||
});
|
||||
|
||||
this.inspectCmd.setAttribute("checked", false);
|
||||
this.browser = this.win = null; // null out references to browser and window
|
||||
this.winID = null;
|
||||
|
@ -880,6 +888,7 @@ var InspectorUI = {
|
|||
*/
|
||||
startInspecting: function IUI_startInspecting()
|
||||
{
|
||||
document.getElementById("inspector-inspect-toolbutton").checked = true;
|
||||
this.attachPageListeners();
|
||||
this.inspecting = true;
|
||||
this.highlighter.veilTransparentBox.removeAttribute("locked");
|
||||
|
@ -895,6 +904,7 @@ var InspectorUI = {
|
|||
return;
|
||||
}
|
||||
|
||||
document.getElementById("inspector-inspect-toolbutton").checked = false;
|
||||
this.detachPageListeners();
|
||||
this.inspecting = false;
|
||||
if (this.highlighter.node) {
|
||||
|
@ -926,6 +936,11 @@ var InspectorUI = {
|
|||
}
|
||||
this.ioBox.select(this.selection, true, true, aScroll);
|
||||
}
|
||||
this.toolsDo(function IUI_toolsOnSelect(aTool) {
|
||||
if (aTool.panel.state == "open") {
|
||||
aTool.onSelect.apply(aTool.context, [aNode]);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
@ -974,6 +989,7 @@ var InspectorUI = {
|
|||
}, INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||
} else {
|
||||
this.openInspectorUI();
|
||||
this.restoreToolState(winID);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1222,7 +1238,113 @@ var InspectorUI = {
|
|||
}
|
||||
this._log("END TRACE");
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an external tool with the inspector.
|
||||
*
|
||||
* aRegObj = {
|
||||
* id: "toolname",
|
||||
* context: myTool,
|
||||
* label: "Button label",
|
||||
* icon: "chrome://somepath.png",
|
||||
* tooltiptext: "Button tooltip",
|
||||
* accesskey: "S",
|
||||
* onSelect: object.method,
|
||||
* onShow: object.method,
|
||||
* onHide: object.method,
|
||||
* panel: myTool.panel
|
||||
* }
|
||||
*
|
||||
* @param aRegObj
|
||||
*/
|
||||
registerTool: function IUI_RegisterTool(aRegObj) {
|
||||
if (this.tools[aRegObj.id]) {
|
||||
return;
|
||||
} else {
|
||||
let id = aRegObj.id;
|
||||
let buttonId = "inspector-" + id + "-toolbutton";
|
||||
aRegObj.buttonId = buttonId;
|
||||
|
||||
aRegObj.panel.addEventListener("popuphiding",
|
||||
function IUI_toolPanelHiding() {
|
||||
btn.setAttribute("checked", "false");
|
||||
}, false);
|
||||
aRegObj.panel.addEventListener("popupshowing",
|
||||
function IUI_toolPanelShowing() {
|
||||
btn.setAttribute("checked", "true");
|
||||
}, false);
|
||||
|
||||
this.tools[id] = aRegObj;
|
||||
}
|
||||
|
||||
let toolbar = document.getElementById("inspector-toolbar");
|
||||
let btn = document.createElement("toolbarbutton");
|
||||
btn.setAttribute("id", aRegObj.buttonId);
|
||||
btn.setAttribute("label", aRegObj.label);
|
||||
btn.setAttribute("tooltiptext", aRegObj.tooltiptext);
|
||||
btn.setAttribute("accesskey", aRegObj.accesskey);
|
||||
btn.setAttribute("class", "toolbarbutton-text");
|
||||
btn.setAttribute("image", aRegObj.icon || "");
|
||||
toolbar.appendChild(btn);
|
||||
|
||||
btn.addEventListener("click",
|
||||
function IUI_ToolButtonClick(aEvent) {
|
||||
if (btn.getAttribute("checked") == "true") {
|
||||
aRegObj.onHide.apply(aRegObj.context);
|
||||
} else {
|
||||
aRegObj.onShow.apply(aRegObj.context, [InspectorUI.selection]);
|
||||
aRegObj.onSelect.apply(aRegObj.context, [InspectorUI.selection]);
|
||||
}
|
||||
}, false);
|
||||
},
|
||||
|
||||
/**
|
||||
* Save a list of open tools to the inspector store.
|
||||
*
|
||||
* @param aWinID The ID of the window used to save the associated tools
|
||||
*/
|
||||
saveToolState: function IUI_saveToolState(aWinID)
|
||||
{
|
||||
let openTools = {};
|
||||
this.toolsDo(function IUI_toolsSetId(aTool) {
|
||||
if (aTool.panel.state == "open") {
|
||||
openTools[aTool.id] = true;
|
||||
}
|
||||
});
|
||||
InspectorStore.setValue(aWinID, "openTools", openTools);
|
||||
},
|
||||
|
||||
/**
|
||||
* Restore tools previously save using saveToolState().
|
||||
*
|
||||
* @param aWinID The ID of the window to which the associated tools are to be
|
||||
* restored.
|
||||
*/
|
||||
restoreToolState: function IUI_restoreToolState(aWinID)
|
||||
{
|
||||
let openTools = InspectorStore.getValue(aWinID, "openTools");
|
||||
InspectorUI.selection = InspectorUI.selection;
|
||||
if (openTools) {
|
||||
this.toolsDo(function IUI_toolsOnShow(aTool) {
|
||||
if (aTool.id in openTools) {
|
||||
aTool.onShow.apply(aTool.context, [InspectorUI.selection]);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Loop through all registered tools and pass each into the provided function
|
||||
*
|
||||
* @param aFunction The function to which each tool is to be passed
|
||||
*/
|
||||
toolsDo: function IUI_toolsDo(aFunction)
|
||||
{
|
||||
for each (let tool in this.tools) {
|
||||
aFunction(tool);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* The Inspector store is used for storing data specific to each tab window.
|
||||
|
@ -1357,4 +1479,3 @@ var InspectorStore = {
|
|||
XPCOMUtils.defineLazyGetter(InspectorUI, "inspectCmd", function () {
|
||||
return document.getElementById("Tools:Inspect");
|
||||
});
|
||||
|
||||
|
|
|
@ -38,6 +38,16 @@ tabpanels {
|
|||
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 {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -526,12 +526,15 @@ let Utils = {
|
|||
// Pass as many arguments as you want, it'll print them all.
|
||||
trace: function Utils_trace() {
|
||||
var text = this.expandArgumentsForLog(arguments);
|
||||
// cut off the first two lines of the stack trace, because they're just this function.
|
||||
let stack = Error().stack.replace(/^.*?\n.*?\n/, "");
|
||||
|
||||
// cut off the first line of the stack trace, because that's just this function.
|
||||
let stack = Error().stack.split("\n").slice(1);
|
||||
|
||||
// if the caller was assert, cut out the line for the assert function as well.
|
||||
if (this.trace.caller.name == 'Utils_assert')
|
||||
stack = stack.replace(/^.*?\n/, "");
|
||||
this.log('trace: ' + text + '\n' + stack);
|
||||
if (stack[0].indexOf("Utils_assert(") == 0)
|
||||
stack.splice(0, 1);
|
||||
|
||||
this.log('trace: ' + text + '\n' + stack.join("\n"));
|
||||
},
|
||||
|
||||
// ----------
|
||||
|
@ -560,10 +563,10 @@ let Utils = {
|
|||
else
|
||||
text = "tabview assert: " + label;
|
||||
|
||||
// cut off the first two lines of the stack trace, because they're just this function.
|
||||
text += Error().stack.replace(/^.*?\n.*?\n/, "");
|
||||
// cut off the first line of the stack trace, because that's just this function.
|
||||
let stack = Error().stack.split("\n").slice(1);
|
||||
|
||||
throw text;
|
||||
throw text + "\n" + stack.join("\n");
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1003,6 +1003,9 @@ let UI = {
|
|||
[
|
||||
#ifdef XP_UNIX
|
||||
"redo",
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
"fullScreen",
|
||||
#endif
|
||||
"closeWindow", "tabview", "undoCloseTab", "undoCloseWindow",
|
||||
"privatebrowsing"
|
||||
|
|
|
@ -54,6 +54,7 @@ _BROWSER_FILES = \
|
|||
browser_inspector_treePanel_output.js \
|
||||
browser_inspector_treePanel_input.html \
|
||||
browser_inspector_treePanel_result.html \
|
||||
browser_inspector_registertools.js \
|
||||
browser_inspector_bug_665880.js \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -0,0 +1,275 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Inspector Highlighter Tests.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* The Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Michael Ratcliffe <mratcliffe@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
let doc;
|
||||
let h1;
|
||||
let tool1;
|
||||
let tool2;
|
||||
let tool3;
|
||||
|
||||
function createDocument()
|
||||
{
|
||||
let div = doc.createElement("div");
|
||||
let h1 = doc.createElement("h1");
|
||||
let p1 = doc.createElement("p");
|
||||
let p2 = doc.createElement("p");
|
||||
let div2 = doc.createElement("div");
|
||||
let p3 = doc.createElement("p");
|
||||
doc.title = "Inspector Tree Selection Test";
|
||||
h1.textContent = "Inspector Tree Selection Test";
|
||||
p1.textContent = "This is some example text";
|
||||
p2.textContent = "Lorem ipsum dolor sit amet, consectetur adipisicing " +
|
||||
"elit, sed do eiusmod tempor incididunt ut labore et dolore magna " +
|
||||
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco " +
|
||||
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
|
||||
"dolor in reprehenderit in voluptate velit esse cillum dolore eu " +
|
||||
"fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " +
|
||||
"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
|
||||
p3.textContent = "Lorem ipsum dolor sit amet, consectetur adipisicing " +
|
||||
"elit, sed do eiusmod tempor incididunt ut labore et dolore magna " +
|
||||
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco " +
|
||||
"laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
|
||||
"dolor in reprehenderit in voluptate velit esse cillum dolore eu " +
|
||||
"fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " +
|
||||
"proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
|
||||
div.appendChild(h1);
|
||||
div.appendChild(p1);
|
||||
div.appendChild(p2);
|
||||
div2.appendChild(p3);
|
||||
doc.body.appendChild(div);
|
||||
doc.body.appendChild(div2);
|
||||
setupHighlighterTests();
|
||||
}
|
||||
|
||||
function setupHighlighterTests()
|
||||
{
|
||||
h1 = doc.querySelectorAll("h1")[0];
|
||||
ok(h1, "we have the header node");
|
||||
Services.obs.addObserver(inspectorOpen, "inspector-opened", false);
|
||||
InspectorUI.toggleInspectorUI();
|
||||
}
|
||||
|
||||
function inspectorOpen()
|
||||
{
|
||||
info("we received the inspector-opened notification");
|
||||
Services.obs.removeObserver(inspectorOpen, "inspector-opened", false);
|
||||
Services.obs.addObserver(startToolTests, "inspector-highlighting", false);
|
||||
let rect = h1.getBoundingClientRect();
|
||||
executeSoon(function() {
|
||||
EventUtils.synthesizeMouse(h1, 2, 2, {type: "mousemove"}, content);
|
||||
});
|
||||
}
|
||||
|
||||
function startToolTests(evt)
|
||||
{
|
||||
info("we received the inspector-highlighting notification");
|
||||
Services.obs.removeObserver(startToolTests, "inspector-highlighting", false);
|
||||
InspectorUI.stopInspecting();
|
||||
|
||||
info("Getting InspectorUI.tools");
|
||||
let tools = InspectorUI.tools;
|
||||
tool1 = InspectorUI.tools["tool_1"];
|
||||
tool2 = InspectorUI.tools["tool_2"];
|
||||
tool3 = InspectorUI.tools["tool_3"];
|
||||
|
||||
info("Checking panel states 1");
|
||||
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
|
||||
|
||||
info("Calling show method for all tools");
|
||||
tool1.onShow.apply(tool1.context, [h1]);
|
||||
tool2.onShow.apply(tool2.context, [h1]);
|
||||
tool3.onShow.apply(tool3.context, [h1]);
|
||||
|
||||
info("Checking panel states 2");
|
||||
ok(tool1.context.panelIsOpen, "Panel 1 is open");
|
||||
ok(tool2.context.panelIsOpen, "Panel 2 is open");
|
||||
ok(tool3.context.panelIsOpen, "Panel 3 is open");
|
||||
|
||||
info("Calling selectNode method for all tools");
|
||||
tool1.onSelect.apply(tool1.context, [h1]);
|
||||
tool2.onSelect.apply(tool2.context, [h1]);
|
||||
tool3.onSelect.apply(tool3.context, [h1]);
|
||||
|
||||
info("Calling hide method for all tools");
|
||||
tool1.onHide.apply(tool1.context, [h1]);
|
||||
tool2.onHide.apply(tool2.context, [h1]);
|
||||
tool3.onHide.apply(tool3.context, [h1]);
|
||||
|
||||
info("Checking panel states 3");
|
||||
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
|
||||
|
||||
info("Showing tools 1 & 3");
|
||||
tool1.onShow.apply(tool1.context, [h1]);
|
||||
tool3.onShow.apply(tool3.context, [h1]);
|
||||
|
||||
info("Checking panel states 4");
|
||||
ok(tool1.context.panelIsOpen, "Panel 1 is open");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsOpen, "Panel 3 is open");
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
waitForFocus(testSecondTab, content);
|
||||
}, true);
|
||||
|
||||
content.location = "data:text/html,registertool new tab test for inspector";
|
||||
}
|
||||
|
||||
function testSecondTab()
|
||||
{
|
||||
info("Opened second tab");
|
||||
info("Checking panel states 5");
|
||||
ok(tool1.context.panelIsClosed, "Panel 1 is closed");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsClosed, "Panel 3 is closed");
|
||||
|
||||
info("Closing current tab");
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
info("Checking panel states 6");
|
||||
ok(tool1.context.panelIsOpen, "Panel 1 is open");
|
||||
ok(tool2.context.panelIsClosed, "Panel 2 is closed");
|
||||
ok(tool3.context.panelIsOpen, "Panel 3 is open");
|
||||
|
||||
executeSoon(finishUp);
|
||||
}
|
||||
|
||||
function finishUp() {
|
||||
InspectorUI.closeInspectorUI(true);
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
waitForExplicitFinish();
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
doc = content.document;
|
||||
waitForFocus(registerTools, content);
|
||||
}, true);
|
||||
|
||||
content.location = "data:text/html,registertool tests for inspector";
|
||||
}
|
||||
|
||||
function registerTools()
|
||||
{
|
||||
createDocument();
|
||||
registerTool(new testTool("tool_1", "Tool 1", "Tool 1 tooltip", "I"));
|
||||
registerTool(new testTool("tool_2", "Tool 2", "Tool 2 tooltip", "J"));
|
||||
registerTool(new testTool("tool_3", "Tool 3", "Tool 3 tooltip", "K"));
|
||||
}
|
||||
|
||||
function registerTool(aTool)
|
||||
{
|
||||
InspectorUI.registerTool({
|
||||
id: aTool.id,
|
||||
label: aTool.label,
|
||||
tooltiptext: aTool.tooltip,
|
||||
accesskey: aTool.accesskey,
|
||||
context: aTool,
|
||||
onSelect: aTool.selectNode,
|
||||
onShow: aTool.show,
|
||||
onHide: aTool.hide,
|
||||
panel: aTool.panel
|
||||
});
|
||||
}
|
||||
|
||||
// Tool Object
|
||||
function testTool(aToolId, aLabel, aTooltip, aAccesskey)
|
||||
{
|
||||
this.id = aToolId;
|
||||
this.label = aLabel;
|
||||
this.tooltip = aTooltip;
|
||||
this.accesskey = aAccesskey
|
||||
this.panel = this.createPanel();
|
||||
}
|
||||
|
||||
testTool.prototype = {
|
||||
get panelIsOpen()
|
||||
{
|
||||
return this.panel.state == "open" || this.panel.state == "showing";
|
||||
},
|
||||
|
||||
get panelIsClosed()
|
||||
{
|
||||
return this.panel.state == "closed" || this.panel.state == "hiding";
|
||||
},
|
||||
|
||||
selectNode: function BIR_selectNode(aNode) {
|
||||
is(InspectorUI.selection, aNode,
|
||||
"selectNode: currently selected node was passed: " + this.id);
|
||||
},
|
||||
|
||||
show: function BIR_show(aNode) {
|
||||
this.panel.openPopup(gBrowser.selectedBrowser,
|
||||
"end_before", 0, 20, false, false);
|
||||
is(InspectorUI.selection, aNode,
|
||||
"show: currently selected node was passed: " + this.id);
|
||||
},
|
||||
|
||||
hide: function BIR_hide() {
|
||||
info(this.id + " hide");
|
||||
this.panel.hidePopup();
|
||||
},
|
||||
|
||||
createPanel: function BIR_createPanel() {
|
||||
let popupSet = document.getElementById("mainPopupSet");
|
||||
let ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
let panel = this.panel = document.createElementNS(ns, "panel");
|
||||
panel.setAttribute("orient", "vertical");
|
||||
panel.setAttribute("noautofocus", "true");
|
||||
panel.setAttribute("noautohide", "true");
|
||||
panel.setAttribute("titlebar", "normal");
|
||||
panel.setAttribute("close", "true");
|
||||
panel.setAttribute("label", "Panel for " + this.id);
|
||||
panel.setAttribute("width", 200);
|
||||
panel.setAttribute("height", 400);
|
||||
popupSet.appendChild(panel);
|
||||
|
||||
ok(panel.parentNode == popupSet, "Panel created and appended successfully");
|
||||
return panel;
|
||||
},
|
||||
};
|
|
@ -25,7 +25,7 @@ function onTabViewWindowLoaded() {
|
|||
|
||||
// create a group item
|
||||
let groupItem = createGroupItemWithBlankTabs(window, 300, 300, 400, 1);
|
||||
groupItemId = groupItem.id;
|
||||
let groupItemId = groupItem.id;
|
||||
is(groupItem.getChildren().length, 1, "The new group has a tab item");
|
||||
// start the tests
|
||||
waitForFocus(function() {
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
// Services = object with smart getters for common XPCOM services
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
|
||||
|
||||
var gBidiUI = false;
|
||||
|
||||
function getBrowserURL()
|
||||
|
|
|
@ -93,5 +93,3 @@ browser.jar:
|
|||
# the following files are browser-specific overrides
|
||||
* content/browser/license.html (/toolkit/content/license.html)
|
||||
% override chrome://global/content/license.html chrome://browser/content/license.html
|
||||
# XXXkhuey This really should live in browser/, but it's too late in the release cycle to move
|
||||
+ content/browser/NetworkPanel.xhtml (/toolkit/components/console/hudservice/NetworkPanel.xhtml)
|
||||
|
|
|
@ -47,8 +47,6 @@ endif
|
|||
|
||||
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
|
||||
|
||||
tier_app_dirs += toolkit/components/console/hudservice
|
||||
|
||||
ifdef MOZ_SERVICES_SYNC
|
||||
tier_app_dirs += services
|
||||
endif
|
||||
|
|
|
@ -1396,17 +1396,13 @@ let PlacesControllerDragHelper = {
|
|||
|
||||
// Urls can be dropped on any insertionpoint.
|
||||
// XXXmano: remember that this method is called for each dragover event!
|
||||
// Thus we shouldn't use unwrapNodes here at all if possible.
|
||||
// I think it would be OK to accept bogus data here (e.g. text which was
|
||||
// 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
|
||||
// Thus we shouldn't use unwrapNodes here at all if possible. I think it
|
||||
// would be OK to accept bogus data here (this is not in our control and
|
||||
// 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
|
||||
// cannot be dropped in the current insertionpoint. The last case will
|
||||
// likely force us to use unwrapNodes for the private data types of
|
||||
// places.
|
||||
if (flavor == TAB_DROP_TYPE)
|
||||
continue;
|
||||
|
||||
let data = dt.mozGetDataAt(flavor, i);
|
||||
let dragged;
|
||||
try {
|
||||
|
@ -1520,21 +1516,8 @@ let PlacesControllerDragHelper = {
|
|||
|
||||
let data = dt.mozGetDataAt(flavor, i);
|
||||
let unwrapped;
|
||||
if (flavor != TAB_DROP_TYPE) {
|
||||
// There's only ever one in the D&D case.
|
||||
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")
|
||||
// There's only ever one in the D&D case.
|
||||
unwrapped = PlacesUtils.unwrapNodes(data, flavor)[0];
|
||||
|
||||
let index = insertionPoint.index;
|
||||
|
||||
|
@ -1588,7 +1571,6 @@ let PlacesControllerDragHelper = {
|
|||
PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR,
|
||||
PlacesUtils.TYPE_X_MOZ_PLACE,
|
||||
PlacesUtils.TYPE_X_MOZ_URL,
|
||||
TAB_DROP_TYPE,
|
||||
PlacesUtils.TYPE_UNICODE],
|
||||
};
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ SessionStartup.prototype = {
|
|||
/* ........ Public API ................*/
|
||||
|
||||
/**
|
||||
* Get the session state as a string
|
||||
* Get the session state as a jsval
|
||||
*/
|
||||
get state() {
|
||||
return this._initialState;
|
||||
|
|
|
@ -116,7 +116,7 @@ const CAPABILITIES = [
|
|||
// These keys are for internal use only - they shouldn't be part of the JSON
|
||||
// that gets saved to disk nor part of the strings returned by the API.
|
||||
const INTERNAL_KEYS = ["_tabStillLoading", "_hosts", "_formDataSaved",
|
||||
"_shouldRestore"];
|
||||
"_shouldRestore", "_host", "_scheme"];
|
||||
|
||||
// These are tab events that we listen to.
|
||||
const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide",
|
||||
|
@ -1770,7 +1770,15 @@ SessionStoreService.prototype = {
|
|||
_serializeHistoryEntry:
|
||||
function sss_serializeHistoryEntry(aEntry, aFullData, aIsPinned) {
|
||||
var entry = { url: aEntry.URI.spec };
|
||||
|
||||
|
||||
try {
|
||||
entry._host = aEntry.URI.host;
|
||||
entry._scheme = aEntry.URI.scheme;
|
||||
}
|
||||
catch (ex) {
|
||||
// We just won't attempt to get cookies for this entry.
|
||||
}
|
||||
|
||||
if (aEntry.title && aEntry.title != entry.url) {
|
||||
entry.title = aEntry.title;
|
||||
}
|
||||
|
@ -2178,21 +2186,20 @@ SessionStoreService.prototype = {
|
|||
*/
|
||||
_extractHostsForCookies:
|
||||
function sss__extractHostsForCookies(aEntry, aHosts, aCheckPrivacy, aIsPinned) {
|
||||
let match;
|
||||
|
||||
if ((match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url)) != null) {
|
||||
if (!aHosts[match[1]] &&
|
||||
(!aCheckPrivacy ||
|
||||
this._checkPrivacyLevel(this._getURIFromString(aEntry.url).schemeIs("https"),
|
||||
aIsPinned))) {
|
||||
// By setting this to true or false, we can determine when looking at
|
||||
// the host in _updateCookies if we should check for privacy.
|
||||
aHosts[match[1]] = aIsPinned;
|
||||
}
|
||||
// _host and _scheme may not be set (for about: urls for example), in which
|
||||
// case testing _scheme will be sufficient.
|
||||
if (/https?/.test(aEntry._scheme) && !aHosts[aEntry._host] &&
|
||||
(!aCheckPrivacy ||
|
||||
this._checkPrivacyLevel(aEntry._scheme == "https", aIsPinned))) {
|
||||
// By setting this to true or false, we can determine when looking at
|
||||
// the host in _updateCookies if we should check for privacy.
|
||||
aHosts[aEntry._host] = aIsPinned;
|
||||
}
|
||||
else if ((match = /^file:\/\/([^\/]*)/.exec(aEntry.url)) != null) {
|
||||
aHosts[match[1]] = true;
|
||||
else if (aEntry._scheme == "file") {
|
||||
aHosts[aEntry._host] = true;
|
||||
}
|
||||
|
||||
if (aEntry.children) {
|
||||
aEntry.children.forEach(function(entry) {
|
||||
this._extractHostsForCookies(entry, aHosts, aCheckPrivacy, aIsPinned);
|
||||
|
|
|
@ -12,14 +12,15 @@
|
|||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# 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.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -35,4 +36,21 @@
|
|||
#
|
||||
# ***** 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
|
|
@ -0,0 +1,2 @@
|
|||
browser.jar:
|
||||
content/browser/NetworkPanel.xhtml (webconsole/NetworkPanel.xhtml)
|
|
@ -1730,7 +1730,7 @@ HUD_SERVICE.prototype =
|
|||
hud.consoleWindowUnregisterOnHide = false;
|
||||
|
||||
// Remove the HUDBox and the consolePanel if the Web Console is inside a
|
||||
// floating xul:panel.
|
||||
// floating panel.
|
||||
hud.HUDBox.parentNode.removeChild(hud.HUDBox);
|
||||
if (hud.consolePanel) {
|
||||
hud.consolePanel.parentNode.removeChild(hud.consolePanel);
|
||||
|
@ -2505,20 +2505,20 @@ HUD_SERVICE.prototype =
|
|||
let outputNode = this.hudReferences[hudId].outputNode;
|
||||
|
||||
let chromeDocument = outputNode.ownerDocument;
|
||||
let msgNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
|
||||
let msgNode = chromeDocument.createElementNS(XUL_NS, "hbox");
|
||||
|
||||
let methodNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let methodNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||
methodNode.setAttribute("value", aActivityObject.method);
|
||||
methodNode.classList.add("webconsole-msg-body-piece");
|
||||
msgNode.appendChild(methodNode);
|
||||
|
||||
let linkNode = chromeDocument.createElementNS(XUL_NS, "xul:hbox");
|
||||
let linkNode = chromeDocument.createElementNS(XUL_NS, "hbox");
|
||||
linkNode.setAttribute("flex", "1");
|
||||
linkNode.classList.add("webconsole-msg-body-piece");
|
||||
linkNode.classList.add("webconsole-msg-link");
|
||||
msgNode.appendChild(linkNode);
|
||||
|
||||
let urlNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let urlNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||
urlNode.setAttribute("crop", "center");
|
||||
urlNode.setAttribute("flex", "1");
|
||||
urlNode.setAttribute("title", aActivityObject.url);
|
||||
|
@ -2528,7 +2528,7 @@ HUD_SERVICE.prototype =
|
|||
urlNode.classList.add("webconsole-msg-url");
|
||||
linkNode.appendChild(urlNode);
|
||||
|
||||
let statusNode = chromeDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let statusNode = chromeDocument.createElementNS(XUL_NS, "label");
|
||||
statusNode.setAttribute("value", "");
|
||||
statusNode.classList.add("hud-clickable");
|
||||
statusNode.classList.add("webconsole-msg-body-piece");
|
||||
|
@ -3040,7 +3040,7 @@ HeadsUpDisplay.prototype = {
|
|||
*/
|
||||
get tab()
|
||||
{
|
||||
// TODO: we should only keep a reference to the xul:tab object and use
|
||||
// TODO: we should only keep a reference to the tab object and use
|
||||
// getters to determine the rest of objects we need - the chrome window,
|
||||
// document, etc. We should simplify the entire code to use only a single
|
||||
// tab object ref. See bug 656231.
|
||||
|
@ -3136,12 +3136,15 @@ HeadsUpDisplay.prototype = {
|
|||
|
||||
panel.addEventListener("popupshown", onPopupShown,false);
|
||||
|
||||
let onPopupHiding = (function HUD_onPopupHiding(aEvent) {
|
||||
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
|
||||
if (aEvent.target != panel) {
|
||||
return;
|
||||
}
|
||||
|
||||
panel.removeEventListener("popuphiding", onPopupHiding, false);
|
||||
panel.removeEventListener("popuphidden", onPopupHidden, false);
|
||||
if (panel.parentNode) {
|
||||
panel.parentNode.removeChild(panel);
|
||||
}
|
||||
|
||||
let width = 0;
|
||||
try {
|
||||
|
@ -3149,12 +3152,15 @@ HeadsUpDisplay.prototype = {
|
|||
}
|
||||
catch (ex) { }
|
||||
|
||||
if (width > -1) {
|
||||
if (width > 0) {
|
||||
Services.prefs.setIntPref("devtools.webconsole.width", panel.clientWidth);
|
||||
}
|
||||
|
||||
Services.prefs.setIntPref("devtools.webconsole.top", panel.popupBoxObject.y);
|
||||
Services.prefs.setIntPref("devtools.webconsole.left", panel.popupBoxObject.x);
|
||||
/*
|
||||
* Removed because of bug 674562
|
||||
* Services.prefs.setIntPref("devtools.webconsole.top", panel.panelBox.y);
|
||||
* Services.prefs.setIntPref("devtools.webconsole.left", panel.panelBox.x);
|
||||
*/
|
||||
|
||||
// Make sure we are not going to close again, drop the hudId reference of
|
||||
// the panel.
|
||||
|
@ -3170,19 +3176,6 @@ HeadsUpDisplay.prototype = {
|
|||
this.consolePanel = null;
|
||||
}).bind(this);
|
||||
|
||||
panel.addEventListener("popuphiding", onPopupHiding, false);
|
||||
|
||||
let onPopupHidden = (function HUD_onPopupHidden(aEvent) {
|
||||
if (aEvent.target != panel) {
|
||||
return;
|
||||
}
|
||||
|
||||
panel.removeEventListener("popuphidden", onPopupHidden, false);
|
||||
if (panel.parentNode) {
|
||||
panel.parentNode.removeChild(panel);
|
||||
}
|
||||
}).bind(this);
|
||||
|
||||
panel.addEventListener("popuphidden", onPopupHidden, false);
|
||||
|
||||
let lastIndex = -1;
|
||||
|
@ -3249,10 +3242,14 @@ HeadsUpDisplay.prototype = {
|
|||
positionConsole: function HUD_positionConsole(aPosition)
|
||||
{
|
||||
if (!(aPosition in this.positions)) {
|
||||
throw new Error("Incorrect argument: " + aPosition + ". Cannot position Web Console");
|
||||
throw new Error("Incorrect argument: " + aPosition +
|
||||
". Cannot position Web Console");
|
||||
}
|
||||
|
||||
if (aPosition == "window") {
|
||||
let closeButton = this.consoleFilterToolbar.
|
||||
querySelector(".webconsole-close-button");
|
||||
closeButton.setAttribute("hidden", "true");
|
||||
this.createOwnWindowPanel();
|
||||
this.positionMenuitems.window.setAttribute("checked", true);
|
||||
if (this.positionMenuitems.last) {
|
||||
|
@ -3308,6 +3305,10 @@ HeadsUpDisplay.prototype = {
|
|||
this.outputNode.ensureIndexIsVisible(lastIndex);
|
||||
}
|
||||
|
||||
let closeButton = this.consoleFilterToolbar.
|
||||
getElementsByClassName("webconsole-close-button")[0];
|
||||
closeButton.removeAttribute("hidden");
|
||||
|
||||
this.uiInOwnWindow = false;
|
||||
if (this.consolePanel) {
|
||||
this.HUDBox.removeAttribute("flex");
|
||||
|
@ -3584,7 +3585,7 @@ HeadsUpDisplay.prototype = {
|
|||
* Creates the UI for re-positioning the console
|
||||
*
|
||||
* @return nsIDOMNode
|
||||
* The xul:toolbarbutton which holds the menu that allows the user to
|
||||
* The toolbarbutton which holds the menu that allows the user to
|
||||
* change the console position.
|
||||
*/
|
||||
createPositionUI: function HUD_createPositionUI()
|
||||
|
@ -5396,22 +5397,22 @@ ConsoleUtils = {
|
|||
// Make the icon container, which is a vertical box. Its purpose is to
|
||||
// ensure that the icon stays anchored at the top of the message even for
|
||||
// long multi-line messages.
|
||||
let iconContainer = aDocument.createElementNS(XUL_NS, "xul:vbox");
|
||||
let iconContainer = aDocument.createElementNS(XUL_NS, "vbox");
|
||||
iconContainer.classList.add("webconsole-msg-icon-container");
|
||||
|
||||
// Make the icon node. It's sprited and the actual region of the image is
|
||||
// determined by CSS rules.
|
||||
let iconNode = aDocument.createElementNS(XUL_NS, "xul:image");
|
||||
let iconNode = aDocument.createElementNS(XUL_NS, "image");
|
||||
iconNode.classList.add("webconsole-msg-icon");
|
||||
iconContainer.appendChild(iconNode);
|
||||
|
||||
// Make the spacer that positions the icon.
|
||||
let spacer = aDocument.createElementNS(XUL_NS, "xul:spacer");
|
||||
let spacer = aDocument.createElementNS(XUL_NS, "spacer");
|
||||
spacer.setAttribute("flex", "1");
|
||||
iconContainer.appendChild(spacer);
|
||||
|
||||
// Create the message body, which contains the actual text of the message.
|
||||
let bodyNode = aDocument.createElementNS(XUL_NS, "xul:description");
|
||||
let bodyNode = aDocument.createElementNS(XUL_NS, "description");
|
||||
bodyNode.setAttribute("flex", "1");
|
||||
bodyNode.classList.add("webconsole-msg-body");
|
||||
|
||||
|
@ -5425,15 +5426,15 @@ ConsoleUtils = {
|
|||
|
||||
bodyNode.appendChild(aBody);
|
||||
|
||||
let repeatContainer = aDocument.createElementNS(XUL_NS, "xul:hbox");
|
||||
let repeatContainer = aDocument.createElementNS(XUL_NS, "hbox");
|
||||
repeatContainer.setAttribute("align", "start");
|
||||
let repeatNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let repeatNode = aDocument.createElementNS(XUL_NS, "label");
|
||||
repeatNode.setAttribute("value", "1");
|
||||
repeatNode.classList.add("webconsole-msg-repeat");
|
||||
repeatContainer.appendChild(repeatNode);
|
||||
|
||||
// Create the timestamp.
|
||||
let timestampNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let timestampNode = aDocument.createElementNS(XUL_NS, "label");
|
||||
timestampNode.classList.add("webconsole-timestamp");
|
||||
let timestamp = ConsoleUtils.timestamp();
|
||||
let timestampString = ConsoleUtils.timestampString(timestamp);
|
||||
|
@ -5448,7 +5449,7 @@ ConsoleUtils = {
|
|||
}
|
||||
|
||||
// Create the containing node and append all its elements to it.
|
||||
let node = aDocument.createElementNS(XUL_NS, "xul:richlistitem");
|
||||
let node = aDocument.createElementNS(XUL_NS, "richlistitem");
|
||||
node.clipboardText = aClipboardText;
|
||||
node.classList.add("hud-msg-node");
|
||||
|
||||
|
@ -5523,7 +5524,7 @@ ConsoleUtils = {
|
|||
createLocationNode:
|
||||
function ConsoleUtils_createLocationNode(aDocument, aSourceURL,
|
||||
aSourceLine) {
|
||||
let locationNode = aDocument.createElementNS(XUL_NS, "xul:label");
|
||||
let locationNode = aDocument.createElementNS(XUL_NS, "label");
|
||||
|
||||
// Create the text, which consists of an abbreviated version of the URL
|
||||
// plus an optional line number.
|
||||
|
@ -5662,7 +5663,7 @@ ConsoleUtils = {
|
|||
function ConsoleUtils_filterRepeatedConsole(aNode, aOutput) {
|
||||
let lastMessage = aOutput.lastChild;
|
||||
|
||||
// childNodes[2] is the xul:description element
|
||||
// childNodes[2] is the description element
|
||||
if (lastMessage &&
|
||||
aNode.childNodes[2].textContent ==
|
||||
lastMessage.childNodes[2].textContent) {
|
|
@ -21,6 +21,7 @@
|
|||
#
|
||||
# Contributor(s):
|
||||
# David Dahl <ddahl@mozilla.com>
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -36,14 +37,15 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_JS_MODULES = HUDService.jsm \
|
||||
EXTRA_JS_MODULES = \
|
||||
HUDService.jsm \
|
||||
PropertyPanel.jsm \
|
||||
NetworkHelper.jsm \
|
||||
AutocompletePopup.jsm \
|
||||
|
@ -51,7 +53,7 @@ EXTRA_JS_MODULES = HUDService.jsm \
|
|||
|
||||
ifdef ENABLE_TESTS
|
||||
ifneq (mobile,$(MOZ_BUILD_APP))
|
||||
DIRS += tests
|
||||
DIRS += test
|
||||
endif
|
||||
endif
|
||||
|
|
@ -36,15 +36,13 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../../..
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = test_hudservice
|
||||
|
||||
DIRS = browser
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -21,6 +21,7 @@
|
|||
# David Dahl <ddahl@mozilla.com>
|
||||
# Patrick Walton <pcwalton@mozilla.com>
|
||||
# Mihai Șucan <mihai.sucan@gmail.com>
|
||||
# Rob Campbell <rcampbell@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -36,11 +37,11 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../../../..
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = toolkit/components/console/hudservice/tests/browser
|
||||
relativesrcdir = browser/devtools/webconsole/test/browser
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_REPLACED_API_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console-replaced-api.html";
|
||||
const TEST_REPLACED_API_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console-replaced-api.html";
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
|
@ -41,7 +41,7 @@
|
|||
// Tests that the page's resources are displayed in the console as they're
|
||||
// loaded
|
||||
|
||||
const TEST_NETWORK_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network.html" + "?_date=" + Date.now();
|
||||
const TEST_NETWORK_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-network.html" + "?_date=" + Date.now();
|
||||
|
||||
function test() {
|
||||
addTab("data:text/html,Web Console basic network logging test");
|
|
@ -39,7 +39,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// Tests that the console object still exists after a page reload.
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// Tests that the input field is focused when the console is opened.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -41,7 +41,7 @@
|
|||
// Tests to ensure that errors don't appear when the console is closed while a
|
||||
// completion is being performed.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// Tests that errors still show up in the Web Console after a page reload.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-error.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-error.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// Tests that console groups behave properly.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
Cu.import("resource:///modules/HUDService.jsm");
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// Tests that the Web Console close button functions.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -41,7 +41,7 @@
|
|||
// Tests that exceptions thrown by content don't show up twice in the Web
|
||||
// Console.
|
||||
|
||||
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-duplicate-error.html";
|
||||
const TEST_DUPLICATE_ERROR_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-duplicate-error.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_DUPLICATE_ERROR_URI);
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
let HUD, inputNode;
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// Tests that the Web Console limits the number of lines displayed according to
|
||||
// the user's preferences.
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -36,7 +36,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-585956-console-trace.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-bug-585956-console-trace.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// 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() {
|
||||
addTab(TEST_URI);
|
|
@ -36,7 +36,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
function test() {
|
||||
addTab(TEST_URI);
|
|
@ -36,11 +36,11 @@
|
|||
*
|
||||
* ***** 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;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
let HUD;
|
||||
|
||||
let outputItem;
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** 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 = [
|
||||
{ // #0
|
||||
file: "test-bug-595934-css-loader.html",
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
let tab1, tab2, win1, win2;
|
||||
let noErrors = true;
|
|
@ -8,8 +8,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/" +
|
||||
"hudservice/tests/browser/test-bug-597136-external-script-" +
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/" +
|
||||
"webconsole/test/browser/test-bug-597136-external-script-" +
|
||||
"errors.html";
|
||||
|
||||
function test() {
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** 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) {
|
||||
browser.removeEventListener(aEvent.type, arguments.callee, true);
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** 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;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const TEST_URI = "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-console.html";
|
||||
const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test//browser/test-console.html";
|
||||
|
||||
let testEnded = false;
|
||||
let pos = -1;
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** 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;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** 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;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* ***** 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;
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче