Permalink
Browse files

Merge mozilla-central and tracemonkey.

  • Loading branch information...
2 parents 0b5f6a5 + 037c30c commit 394c554f418e36f08ab69da4ec743f2432da3c02 @cdleary cdleary committed Jun 27, 2011
Showing 2,119 changed files with 36,152 additions and 72,883 deletions.
@@ -450,10 +450,9 @@ nsAccessibleWrap::CreateMaiInterfaces(void)
interfacesBits |= 1 << MAI_INTERFACE_IMAGE;
}
- // HyperLinkAccessible
- if (IsHyperLink()) {
- interfacesBits |= 1 << MAI_INTERFACE_HYPERLINK_IMPL;
- }
+ // HyperLinkAccessible
+ if (IsLink())
+ interfacesBits |= 1 << MAI_INTERFACE_HYPERLINK_IMPL;
if (!nsAccUtils::MustPrune(this)) { // These interfaces require children
//nsIAccessibleHypertext
@@ -1077,6 +1076,16 @@ nsAccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
}
} break;
+ case nsIAccessibleEvent::EVENT_NAME_CHANGE:
+ {
+ nsString newName;
+ accessible->GetName(newName);
+ NS_ConvertUTF16toUTF8 utf8Name(newName);
+ if (!utf8Name.Equals(atkObj->name))
+ atk_object_set_name(atkObj, utf8Name.get());
+
+ break;
+ }
case nsIAccessibleEvent::EVENT_VALUE_CHANGE:
{
MAI_LOG_DEBUG(("\n\nReceived: EVENT_VALUE_CHANGE\n"));
@@ -705,7 +705,7 @@ nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
PRBool
nsApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
{
- PRInt32 index = aChild->GetIndexInParent();
+ PRInt32 index = aChild->IndexInParent();
AtkObject *atkAccessible = nsAccessibleWrap::GetAtkObject(aChild);
atk_object_set_parent(atkAccessible, NULL);
@@ -135,16 +135,16 @@ MaiHyperlink::~MaiHyperlink()
}
}
-AtkHyperlink *
+AtkHyperlink*
MaiHyperlink::GetAtkHyperlink(void)
{
- NS_ENSURE_TRUE(mHyperlink, nsnull);
+ NS_ENSURE_TRUE(mHyperlink, nsnull);
- if (mMaiAtkHyperlink)
- return mMaiAtkHyperlink;
+ if (mMaiAtkHyperlink)
+ return mMaiAtkHyperlink;
- if (!mHyperlink->IsHyperLink())
- return nsnull;
+ if (!mHyperlink->IsLink())
+ return nsnull;
mMaiAtkHyperlink =
reinterpret_cast<AtkHyperlink *>
@@ -215,9 +215,7 @@ getUriCB(AtkHyperlink *aLink, gint aLinkIndex)
nsAccessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, nsnull);
- MaiAtkHyperlink *maiAtkHyperlink = MAI_ATK_HYPERLINK(aLink);
-
- nsCOMPtr<nsIURI> uri = hyperlink->GetAnchorURI(aLinkIndex);
+ nsCOMPtr<nsIURI> uri = hyperlink->AnchorURIAt(aLinkIndex);
if (!uri)
return nsnull;
@@ -234,7 +232,7 @@ getObjectCB(AtkHyperlink *aLink, gint aLinkIndex)
nsAccessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, nsnull);
- nsAccessible* anchor = hyperlink->GetAnchor(aLinkIndex);
+ nsAccessible* anchor = hyperlink->AnchorAt(aLinkIndex);
NS_ENSURE_TRUE(anchor, nsnull);
AtkObject *atkObj = nsAccessibleWrap::GetAtkObject(anchor);
@@ -266,7 +264,7 @@ isValidCB(AtkHyperlink *aLink)
nsAccessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, FALSE);
- return static_cast<gboolean>(hyperlink->IsValid());
+ return static_cast<gboolean>(hyperlink->IsLinkValid());
}
gint
@@ -58,9 +58,8 @@ class MaiHyperlink
public:
AtkHyperlink *GetAtkHyperlink(void);
- nsAccessible* GetAccHyperlink(void) {
- return mHyperlink && mHyperlink->IsHyperLink() ? mHyperlink : nsnull;
- }
+ nsAccessible* GetAccHyperlink()
+ { return mHyperlink && mHyperlink->IsLink() ? mHyperlink : nsnull; }
protected:
nsAccessible* mHyperlink;
@@ -98,16 +98,16 @@ refAccessibleAtPointHelper(nsAccessibleWrap* aAccWrap, gint aX, gint aY,
if (!aAccWrap || aAccWrap->IsDefunct() || nsAccUtils::MustPrune(aAccWrap))
return nsnull;
- // nsAccessible::GetChildAtPoint(x,y) is in screen pixels.
+ // nsAccessible::ChildAtPoint(x,y) is in screen pixels.
if (aCoordType == ATK_XY_WINDOW) {
nsIntPoint winCoords =
nsCoreUtils::GetScreenCoordsForWindow(aAccWrap->GetNode());
aX += winCoords.x;
aY += winCoords.y;
}
- nsAccessible* accAtPoint = aAccWrap->GetChildAtPoint(aX, aY,
- nsAccessible::eDirectChild);
+ nsAccessible* accAtPoint = aAccWrap->ChildAtPoint(aX, aY,
+ nsAccessible::eDirectChild);
if (!accAtPoint)
return nsnull;
@@ -49,16 +49,15 @@ hyperlinkImplInterfaceInitCB(AtkHyperlinkImplIface *aIface)
}
AtkHyperlink*
-getHyperlinkCB(AtkHyperlinkImpl *aImpl)
+getHyperlinkCB(AtkHyperlinkImpl* aImpl)
{
- nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aImpl));
- if (!accWrap)
- return nsnull;
+ nsAccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aImpl));
+ if (!accWrap)
+ return nsnull;
- NS_ENSURE_TRUE(accWrap->IsHyperLink(), nsnull);
-
- MaiHyperlink *maiHyperlink = accWrap->GetMaiHyperlink();
- NS_ENSURE_TRUE(maiHyperlink, nsnull);
- return maiHyperlink->GetAtkHyperlink();
+ NS_ENSURE_TRUE(accWrap->IsLink(), nsnull);
+ MaiHyperlink* maiHyperlink = accWrap->GetMaiHyperlink();
+ NS_ENSURE_TRUE(maiHyperlink, nsnull);
+ return maiHyperlink->GetAtkHyperlink();
}
@@ -47,7 +47,7 @@ AccGroupInfo::AccGroupInfo(nsAccessible* aItem, PRUint32 aRole) :
if (!parent)
return;
- PRInt32 indexInParent = aItem->GetIndexInParent();
+ PRInt32 indexInParent = aItem->IndexInParent();
PRInt32 level = nsAccUtils::GetARIAOrDefaultLevel(aItem);
// Compute position in set.
@@ -87,6 +87,7 @@ EXPORTS = \
nsAccessible.h \
nsAccessNode.h \
nsARIAMap.h \
+ States.h \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
@@ -515,14 +515,14 @@ NotificationController::CoalesceTextChangeEventsFor(AccShowEvent* aTailEvent,
if (!textEvent)
return;
- if (aTailEvent->mAccessible->GetIndexInParent() ==
- aThisEvent->mAccessible->GetIndexInParent() + 1) {
+ if (aTailEvent->mAccessible->IndexInParent() ==
+ aThisEvent->mAccessible->IndexInParent() + 1) {
// If tail target was inserted after this target, i.e. tail target is next
// sibling of this target.
aTailEvent->mAccessible->AppendTextTo(textEvent->mModifiedText);
- } else if (aTailEvent->mAccessible->GetIndexInParent() ==
- aThisEvent->mAccessible->GetIndexInParent() -1) {
+ } else if (aTailEvent->mAccessible->IndexInParent() ==
+ aThisEvent->mAccessible->IndexInParent() -1) {
// If tail target was inserted before this target, i.e. tail target is
// previous sibling of this target.
nsAutoString startText;
@@ -981,7 +981,7 @@ nsARIAGridCellAccessible::GetColumnIndex(PRInt32 *aColumnIndex)
*aColumnIndex = 0;
- PRInt32 indexInRow = GetIndexInParent();
+ PRInt32 indexInRow = IndexInParent();
for (PRInt32 idx = 0; idx < indexInRow; idx++) {
nsAccessible* cell = row->GetChildAt(idx);
PRUint32 role = cell->Role();
@@ -1013,7 +1013,7 @@ nsARIAGridCellAccessible::GetRowIndex(PRInt32 *aRowIndex)
*aRowIndex = 0;
- PRInt32 indexInTable = row->GetIndexInParent();
+ PRInt32 indexInTable = row->IndexInParent();
for (PRInt32 idx = 0; idx < indexInTable; idx++) {
row = table->GetChildAt(idx);
if (row->Role() == nsIAccessibleRole::ROLE_ROW)
@@ -50,7 +50,7 @@
#include "nsIChannel.h"
#include "nsIContentViewer.h"
#include "nsIDOMDocument.h"
-#include "nsIEventListenerManager.h"
+#include "nsEventListenerManager.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMWindow.h"
#include "nsIInterfaceRequestorUtils.h"
@@ -391,16 +391,16 @@ nsAccDocManager::AddListeners(nsIDocument *aDocument,
PRBool aAddDOMContentLoadedListener)
{
nsPIDOMWindow *window = aDocument->GetWindow();
- nsPIDOMEventTarget *target = window->GetChromeEventHandler();
- nsIEventListenerManager* elm = target->GetListenerManager(PR_TRUE);
+ nsIDOMEventTarget *target = window->GetChromeEventHandler();
+ nsEventListenerManager* elm = target->GetListenerManager(PR_TRUE);
elm->AddEventListenerByType(this, NS_LITERAL_STRING("pagehide"),
- NS_EVENT_FLAG_CAPTURE, nsnull);
+ NS_EVENT_FLAG_CAPTURE);
NS_LOG_ACCDOCCREATE_TEXT(" added 'pagehide' listener")
if (aAddDOMContentLoadedListener) {
elm->AddEventListenerByType(this, NS_LITERAL_STRING("DOMContentLoaded"),
- NS_EVENT_FLAG_CAPTURE, nsnull);
+ NS_EVENT_FLAG_CAPTURE);
NS_LOG_ACCDOCCREATE_TEXT(" added 'DOMContentLoaded' listener")
}
}
Oops, something went wrong.

0 comments on commit 394c554

Please sign in to comment.