--HG--
rename : mobile/android/config/tooltool-manifests/android/releng.manifest => mobile/android/config/tooltool-manifests/b2gdroid/releng.manifest
extra : rebase_source : 10508628a76cecbf86b54dd2e27fca8c39cfa37b
This commit is contained in:
Wes Kocher 2015-10-07 11:33:10 -07:00
Родитель 219eacc1d3 5dc7315e7b
Коммит c23069f318
1283 изменённых файлов: 10874 добавлений и 6216 удалений

Просмотреть файл

@ -14,6 +14,8 @@
#include "OuterDocAccessible.h"
#include "ProxyAccessible.h"
#include "RootAccessible.h"
#include "TableAccessible.h"
#include "TableCellAccessible.h"
#include "nsMai.h"
#include "nsMaiHyperlink.h"
#include "nsString.h"
@ -1570,3 +1572,118 @@ AccessibleWrap::FireAtkShowHideEvent(AccEvent* aEvent,
return NS_OK;
}
// static
void
AccessibleWrap::GetKeyBinding(Accessible* aAccessible, nsAString& aResult)
{
// Return all key bindings including access key and keyboard shortcut.
// Get access key.
nsAutoString keyBindingsStr;
KeyBinding keyBinding = aAccessible->AccessKey();
if (!keyBinding.IsEmpty()) {
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
Accessible* parent = aAccessible->Parent();
roles::Role role = parent ? parent->Role() : roles::NOTHING;
if (role == roles::PARENT_MENUITEM || role == roles::MENUITEM ||
role == roles::RADIO_MENU_ITEM || role == roles::CHECK_MENU_ITEM) {
// It is submenu, expose keyboard shortcuts from menu hierarchy like
// "s;<Alt>f:s"
nsAutoString keysInHierarchyStr = keyBindingsStr;
do {
KeyBinding parentKeyBinding = parent->AccessKey();
if (!parentKeyBinding.IsEmpty()) {
nsAutoString str;
parentKeyBinding.ToString(str, KeyBinding::eAtkFormat);
str.Append(':');
keysInHierarchyStr.Insert(str, 0);
}
} while ((parent = parent->Parent()) && parent->Role() != roles::MENUBAR);
keyBindingsStr.Append(';');
keyBindingsStr.Append(keysInHierarchyStr);
}
} else {
// No access key, add ';' to point this.
keyBindingsStr.Append(';');
}
// Get keyboard shortcut.
keyBindingsStr.Append(';');
keyBinding = aAccessible->KeyboardShortcut();
if (!keyBinding.IsEmpty()) {
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
}
aResult = keyBindingsStr;
}
// static
Accessible*
AccessibleWrap::GetColumnHeader(TableAccessible* aAccessible, int32_t aColIdx)
{
if (!aAccessible) {
return nullptr;
}
Accessible* cell = aAccessible->CellAt(0, aColIdx);
if (!cell) {
return nullptr;
}
// If the cell at the first row is column header then assume it is column
// header for all rows,
if (cell->Role() == roles::COLUMNHEADER) {
return cell;
}
// otherwise get column header for the data cell at the first row.
TableCellAccessible* tableCell = cell->AsTableCell();
if (!tableCell) {
return nullptr;
}
nsAutoTArray<Accessible*, 10> headerCells;
tableCell->ColHeaderCells(&headerCells);
if (headerCells.IsEmpty()) {
return nullptr;
}
return headerCells[0];
}
// static
Accessible*
AccessibleWrap::GetRowHeader(TableAccessible* aAccessible, int32_t aRowIdx)
{
if (!aAccessible) {
return nullptr;
}
Accessible* cell = aAccessible->CellAt(aRowIdx, 0);
if (!cell) {
return nullptr;
}
// If the cell at the first column is row header then assume it is row
// header for all columns,
if (cell->Role() == roles::ROWHEADER) {
return cell;
}
// otherwise get row header for the data cell at the first column.
TableCellAccessible* tableCell = cell->AsTableCell();
if (!tableCell) {
return nullptr;
}
nsAutoTArray<Accessible*, 10> headerCells;
tableCell->RowHeaderCells(&headerCells);
if (headerCells.IsEmpty()) {
return nullptr;
}
return headerCells[0];
}

Просмотреть файл

@ -69,6 +69,12 @@ public:
return returnedString.get();
}
static void GetKeyBinding(Accessible* aAccessible, nsAString& aResult);
static Accessible* GetColumnHeader(TableAccessible* aAccessible,
int32_t aColIdx);
static Accessible* GetRowHeader(TableAccessible* aAccessible,
int32_t aRowIdx);
protected:
nsresult FireAtkStateChangeEvent(AccEvent* aEvent, AtkObject *aObject);

Просмотреть файл

@ -10,7 +10,7 @@
#include "nsMai.h"
#include "Role.h"
#include "mozilla/Likely.h"
#include "ProxyAccessible.h"
#include "nsString.h"
using namespace mozilla::a11y;
@ -21,86 +21,69 @@ static gboolean
doActionCB(AtkAction *aAction, gint aActionIndex)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
return accWrap && accWrap->DoAction(aActionIndex);
if (accWrap) {
return accWrap->DoAction(aActionIndex);
}
ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction));
return proxy && proxy->DoAction(aActionIndex);
}
static gint
getActionCountCB(AtkAction *aAction)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
return accWrap ? accWrap->ActionCount() : 0;
if (accWrap) {
return accWrap->ActionCount();
}
ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction));
return proxy ? proxy->ActionCount() : 0;
}
static const gchar*
getActionDescriptionCB(AtkAction *aAction, gint aActionIndex)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
if (!accWrap)
return nullptr;
nsAutoString description;
accWrap->ActionDescriptionAt(aActionIndex, description);
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
if (accWrap) {
accWrap->ActionDescriptionAt(aActionIndex, description);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
proxy->ActionDescriptionAt(aActionIndex, description);
} else {
return nullptr;
}
return AccessibleWrap::ReturnString(description);
}
static const gchar*
getActionNameCB(AtkAction *aAction, gint aActionIndex)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
if (!accWrap)
return nullptr;
nsAutoString autoStr;
accWrap->ActionNameAt(aActionIndex, autoStr);
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
if (accWrap) {
accWrap->ActionNameAt(aActionIndex, autoStr);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
proxy->ActionNameAt(aActionIndex, autoStr);
} else {
return nullptr;
}
return AccessibleWrap::ReturnString(autoStr);
}
static const gchar*
getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
{
AccessibleWrap* acc = GetAccessibleWrap(ATK_OBJECT(aAction));
if (!acc)
return nullptr;
// Return all key bindings including access key and keyboard shortcut.
nsAutoString keyBindingsStr;
// Get access key.
KeyBinding keyBinding = acc->AccessKey();
if (!keyBinding.IsEmpty()) {
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
Accessible* parent = acc->Parent();
roles::Role role = parent ? parent->Role() : roles::NOTHING;
if (role == roles::PARENT_MENUITEM || role == roles::MENUITEM ||
role == roles::RADIO_MENU_ITEM || role == roles::CHECK_MENU_ITEM) {
// It is submenu, expose keyboard shortcuts from menu hierarchy like
// "s;<Alt>f:s"
nsAutoString keysInHierarchyStr = keyBindingsStr;
do {
KeyBinding parentKeyBinding = parent->AccessKey();
if (!parentKeyBinding.IsEmpty()) {
nsAutoString str;
parentKeyBinding.ToString(str, KeyBinding::eAtkFormat);
str.Append(':');
keysInHierarchyStr.Insert(str, 0);
}
} while ((parent = parent->Parent()) && parent->Role() != roles::MENUBAR);
keyBindingsStr.Append(';');
keyBindingsStr.Append(keysInHierarchyStr);
}
AccessibleWrap* acc = GetAccessibleWrap(ATK_OBJECT(aAction));
if (acc) {
AccessibleWrap::GetKeyBinding(acc, keyBindingsStr);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
proxy->AtkKeyBinding(keyBindingsStr);
} else {
// No access key, add ';' to point this.
keyBindingsStr.Append(';');
}
// Get keyboard shortcut.
keyBindingsStr.Append(';');
keyBinding = acc->KeyboardShortcut();
if (!keyBinding.IsEmpty()) {
keyBinding.AppendToString(keyBindingsStr, KeyBinding::eAtkFormat);
return nullptr;
}
return AccessibleWrap::ReturnString(keyBindingsStr);

Просмотреть файл

@ -12,7 +12,7 @@
#include "TableAccessible.h"
#include "TableCellAccessible.h"
#include "nsMai.h"
#include "ProxyAccessible.h"
#include "nsArrayUtils.h"
#include "mozilla/Likely.h"
@ -23,17 +23,31 @@ extern "C" {
static AtkObject*
refAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx)
{
if (aRowIdx < 0 || aColIdx < 0) {
return nullptr;
}
AtkObject* cellAtkObj = nullptr;
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap || aRowIdx < 0 || aColIdx < 0)
return nullptr;
if (accWrap) {
Accessible* cell = accWrap->AsTable()->CellAt(aRowIdx, aColIdx);
if (!cell) {
return nullptr;
}
Accessible* cell = accWrap->AsTable()->CellAt(aRowIdx, aColIdx);
if (!cell)
return nullptr;
cellAtkObj = AccessibleWrap::GetAtkObject(cell);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
ProxyAccessible* cell = proxy->TableCellAt(aRowIdx, aColIdx);
if (!cell) {
return nullptr;
}
AtkObject* cellAtkObj = AccessibleWrap::GetAtkObject(cell);
if (cellAtkObj)
cellAtkObj = GetWrapperFor(cell);
}
if (cellAtkObj) {
g_object_ref(cellAtkObj);
}
return cellAtkObj;
}
@ -41,93 +55,153 @@ refAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx)
static gint
getIndexAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap || aRowIdx < 0 || aColIdx < 0)
if (aRowIdx < 0 || aColIdx < 0) {
return -1;
}
return static_cast<gint>(accWrap->AsTable()->CellIndexAt(aRowIdx, aColIdx));
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->CellIndexAt(aRowIdx, aColIdx));
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableCellIndexAt(aRowIdx, aColIdx));
}
return -1;
}
static gint
getColumnAtIndexCB(AtkTable *aTable, gint aIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap || aIdx < 0)
if (aIdx < 0) {
return -1;
}
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->ColIndexAt(aIdx));
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableColumnIndexAt(aIdx));
}
return -1;
}
static gint
getRowAtIndexCB(AtkTable *aTable, gint aIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap || aIdx < 0)
if (aIdx < 0) {
return -1;
}
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->RowIndexAt(aIdx));
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableRowIndexAt(aIdx));
}
return -1;
}
static gint
getColumnCountCB(AtkTable *aTable)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return -1;
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->ColCount());
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableColumnCount());
}
return -1;
}
static gint
getRowCountCB(AtkTable *aTable)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return -1;
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->RowCount());
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableRowCount());
}
return -1;
}
static gint
getColumnExtentAtCB(AtkTable *aTable, gint aRowIdx, gint aColIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap || aRowIdx < 0 || aColIdx < 0)
if (aRowIdx < 0 || aColIdx < 0) {
return -1;
}
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->ColExtentAt(aRowIdx, aColIdx));
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableColumnExtentAt(aRowIdx, aColIdx));
}
return -1;
}
static gint
getRowExtentAtCB(AtkTable *aTable, gint aRowIdx, gint aColIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return -1;
if (accWrap) {
return static_cast<gint>(accWrap->AsTable()->RowExtentAt(aRowIdx, aColIdx));
}
return static_cast<gint>(accWrap->AsTable()->RowExtentAt(aRowIdx, aColIdx));
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gint>(proxy->TableRowExtentAt(aRowIdx, aColIdx));
}
return -1;
}
static AtkObject*
getCaptionCB(AtkTable* aTable)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return nullptr;
if (accWrap) {
Accessible* caption = accWrap->AsTable()->Caption();
return caption ? AccessibleWrap::GetAtkObject(caption) : nullptr;
}
Accessible* caption = accWrap->AsTable()->Caption();
return caption ? AccessibleWrap::GetAtkObject(caption) : nullptr;
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
ProxyAccessible* caption = proxy->TableCaption();
return caption ? GetWrapperFor(caption) : nullptr;
}
return nullptr;
}
static const gchar*
getColumnDescriptionCB(AtkTable *aTable, gint aColumn)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return nullptr;
nsAutoString autoStr;
accWrap->AsTable()->ColDescription(aColumn, autoStr);
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
accWrap->AsTable()->ColDescription(aColumn, autoStr);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
proxy->TableColumnDescription(aColumn, autoStr);
} else {
return nullptr;
}
return AccessibleWrap::ReturnString(autoStr);
}
@ -136,40 +210,32 @@ static AtkObject*
getColumnHeaderCB(AtkTable *aTable, gint aColIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return nullptr;
if (accWrap) {
Accessible* header =
AccessibleWrap::GetColumnHeader(accWrap->AsTable(), aColIdx);
return header ? AccessibleWrap::GetAtkObject(header) : nullptr;
}
Accessible* cell = accWrap->AsTable()->CellAt(0, aColIdx);
if (!cell)
return nullptr;
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
ProxyAccessible* header = proxy->AtkTableColumnHeader(aColIdx);
return header ? GetWrapperFor(header) : nullptr;
}
// If the cell at the first row is column header then assume it is column
// header for all rows,
if (cell->Role() == roles::COLUMNHEADER)
return AccessibleWrap::GetAtkObject(cell);
// otherwise get column header for the data cell at the first row.
TableCellAccessible* tableCell = cell->AsTableCell();
if (!tableCell)
return nullptr;
nsAutoTArray<Accessible*, 10> headerCells;
tableCell->ColHeaderCells(&headerCells);
if (headerCells.IsEmpty())
return nullptr;
return AccessibleWrap::GetAtkObject(headerCells[0]);
return nullptr;
}
static const gchar*
getRowDescriptionCB(AtkTable *aTable, gint aRow)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return nullptr;
nsAutoString autoStr;
accWrap->AsTable()->RowDescription(aRow, autoStr);
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
accWrap->AsTable()->RowDescription(aRow, autoStr);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
proxy->TableRowDescription(aRow, autoStr);
} else {
return nullptr;
}
return AccessibleWrap::ReturnString(autoStr);
}
@ -178,29 +244,18 @@ static AtkObject*
getRowHeaderCB(AtkTable *aTable, gint aRowIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return nullptr;
if (accWrap) {
Accessible* header =
AccessibleWrap::GetRowHeader(accWrap->AsTable(), aRowIdx);
return header ? AccessibleWrap::GetAtkObject(header) : nullptr;
}
Accessible* cell = accWrap->AsTable()->CellAt(aRowIdx, 0);
if (!cell)
return nullptr;
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
ProxyAccessible* header = proxy->AtkTableRowHeader(aRowIdx);
return header ? GetWrapperFor(header) : nullptr;
}
// If the cell at the first column is row header then assume it is row
// header for all columns,
if (cell->Role() == roles::ROWHEADER)
return AccessibleWrap::GetAtkObject(cell);
// otherwise get row header for the data cell at the first column.
TableCellAccessible* tableCell = cell->AsTableCell();
if (!tableCell)
return nullptr;
nsAutoTArray<Accessible*, 10> headerCells;
tableCell->RowHeaderCells(&headerCells);
if (headerCells.IsEmpty())
return nullptr;
return AccessibleWrap::GetAtkObject(headerCells[0]);
return nullptr;
}
static AtkObject*
@ -218,12 +273,16 @@ getSelectedColumnsCB(AtkTable *aTable, gint** aSelected)
{
*aSelected = nullptr;
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return 0;
nsAutoTArray<uint32_t, 10> cols;
accWrap->AsTable()->SelectedColIndices(&cols);
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
accWrap->AsTable()->SelectedColIndices(&cols);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
proxy->TableSelectedColumnIndices(&cols);
} else {
return 0;
}
if (cols.IsEmpty())
return 0;
@ -241,12 +300,15 @@ getSelectedColumnsCB(AtkTable *aTable, gint** aSelected)
static gint
getSelectedRowsCB(AtkTable *aTable, gint **aSelected)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return 0;
nsAutoTArray<uint32_t, 10> rows;
accWrap->AsTable()->SelectedRowIndices(&rows);
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (accWrap) {
accWrap->AsTable()->SelectedRowIndices(&rows);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
proxy->TableSelectedRowIndices(&rows);
} else {
return 0;
}
gint* atkRows = g_new(gint, rows.Length());
if (!atkRows) {
@ -263,31 +325,40 @@ static gboolean
isColumnSelectedCB(AtkTable *aTable, gint aColIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return FALSE;
if (accWrap) {
return static_cast<gboolean>(accWrap->AsTable()->IsColSelected(aColIdx));
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gboolean>(proxy->TableColumnSelected(aColIdx));
}
return static_cast<gboolean>(accWrap->AsTable()->IsColSelected(aColIdx));
return FALSE;
}
static gboolean
isRowSelectedCB(AtkTable *aTable, gint aRowIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return FALSE;
if (accWrap) {
return static_cast<gboolean>(accWrap->AsTable()->IsRowSelected(aRowIdx));
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gboolean>(proxy->TableRowSelected(aRowIdx));
}
return static_cast<gboolean>(accWrap->AsTable()->IsRowSelected(aRowIdx));
return FALSE;
}
static gboolean
isCellSelectedCB(AtkTable *aTable, gint aRowIdx, gint aColIdx)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
if (!accWrap)
return FALSE;
if (accWrap) {
return static_cast<gboolean>(accWrap->AsTable()->
IsCellSelected(aRowIdx, aColIdx));
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
return static_cast<gboolean>(proxy->TableCellSelected(aRowIdx, aColIdx));
}
return FALSE;
}
}

Просмотреть файл

@ -17,6 +17,9 @@
#include "nsIPersistentProperties2.h"
#include "nsISimpleEnumerator.h"
#include "nsAccUtils.h"
#ifdef MOZ_ACCESSIBILITY_ATK
#include "AccessibleWrap.h"
#endif
namespace mozilla {
namespace a11y {
@ -1449,6 +1452,52 @@ DocAccessibleChild::RecvTableIsProbablyForLayout(const uint64_t& aID,
return true;
}
bool
DocAccessibleChild::RecvAtkTableColumnHeader(const uint64_t& aID,
const int32_t& aCol,
uint64_t* aHeader,
bool* aOk)
{
*aHeader = 0;
*aOk = false;
#ifdef MOZ_ACCESSIBILITY_ATK
TableAccessible* acc = IdToTableAccessible(aID);
if (acc) {
Accessible* header = AccessibleWrap::GetColumnHeader(acc, aCol);
if (header) {
*aHeader = reinterpret_cast<uint64_t>(header->UniqueID());
*aOk = true;
}
}
#endif
return true;
}
bool
DocAccessibleChild::RecvAtkTableRowHeader(const uint64_t& aID,
const int32_t& aRow,
uint64_t* aHeader,
bool* aOk)
{
*aHeader = 0;
*aOk = false;
#ifdef MOZ_ACCESSIBILITY_ATK
TableAccessible* acc = IdToTableAccessible(aID);
if (acc) {
Accessible* header = AccessibleWrap::GetRowHeader(acc, aRow);
if (header) {
*aHeader = reinterpret_cast<uint64_t>(header->UniqueID());
*aOk = true;
}
}
#endif
return true;
}
bool
DocAccessibleChild::RecvSelectedItems(const uint64_t& aID,
nsTArray<uint64_t>* aSelectedItemIDs)
@ -1655,6 +1704,19 @@ DocAccessibleChild::RecvKeyboardShortcut(const uint64_t& aID,
return true;
}
bool
DocAccessibleChild::RecvAtkKeyBinding(const uint64_t& aID,
nsString* aResult)
{
#ifdef MOZ_ACCESSIBILITY_ATK
Accessible* acc = IdToAccessible(aID);
if (acc) {
AccessibleWrap::GetKeyBinding(acc, *aResult);
}
#endif
return true;
}
bool
DocAccessibleChild::RecvCurValue(const uint64_t& aID,
double* aValue)

Просмотреть файл

@ -363,6 +363,14 @@ public:
const uint32_t& aRow) override;
virtual bool RecvTableIsProbablyForLayout(const uint64_t& aID,
bool* aForLayout) override;
virtual bool RecvAtkTableColumnHeader(const uint64_t& aID,
const int32_t& aCol,
uint64_t* aHeader,
bool* aOk) override;
virtual bool RecvAtkTableRowHeader(const uint64_t& aID,
const int32_t& aRow,
uint64_t* aHeader,
bool* aOk) override;
virtual bool RecvSelectedItems(const uint64_t& aID,
nsTArray<uint64_t>* aSelectedItemIDs) override;
@ -416,6 +424,9 @@ public:
uint32_t* aKey,
uint32_t* aModifierMask) override;
virtual bool RecvAtkKeyBinding(const uint64_t& aID,
nsString* aResult) override;
virtual bool RecvCurValue(const uint64_t& aID,
double* aValue) override;

Просмотреть файл

@ -202,6 +202,10 @@ child:
prio(high) sync TableUnselectColumn(uint64_t aID, uint32_t aCol);
prio(high) sync TableUnselectRow(uint64_t aID, uint32_t aRow);
prio(high) sync TableIsProbablyForLayout(uint64_t aID) returns(bool aForLayout);
prio(high) sync AtkTableColumnHeader(uint64_t aID, int32_t aCol)
returns(uint64_t aHeaderID, bool aOk);
prio(high) sync AtkTableRowHeader(uint64_t aID, int32_t aRow)
returns(uint64_t aHeaderID, bool aOk);
prio(high) sync SelectedItems(uint64_t aID) returns(uint64_t[] aSelectedItemIDs);
prio(high) sync SelectedItemCount(uint64_t aID) returns(uint32_t aCount);
@ -218,6 +222,7 @@ child:
prio(high) sync ActionNameAt(uint64_t aID, uint8_t aIndex) returns(nsString aName);
prio(high) sync AccessKey(uint64_t aID) returns(uint32_t aKey, uint32_t aModifierMask);
prio(high) sync KeyboardShortcut(uint64_t aID) returns(uint32_t aKey, uint32_t aModifierMask);
prio(high) sync AtkKeyBinding(uint64_t aID) returns(nsString aResult);
prio(high) sync CurValue(uint64_t aID) returns(double aValue);
prio(high) sync SetCurValue(uint64_t aID, double aValue) returns(bool aRetVal);

Просмотреть файл

@ -820,6 +820,24 @@ ProxyAccessible::TableIsProbablyForLayout()
return forLayout;
}
ProxyAccessible*
ProxyAccessible::AtkTableColumnHeader(int32_t aCol)
{
uint64_t headerID = 0;
bool ok = false;
unused << mDoc->SendAtkTableColumnHeader(mID, aCol, &headerID, &ok);
return ok ? mDoc->GetAccessible(headerID) : nullptr;
}
ProxyAccessible*
ProxyAccessible::AtkTableRowHeader(int32_t aRow)
{
uint64_t headerID = 0;
bool ok = false;
unused << mDoc->SendAtkTableRowHeader(mID, aRow, &headerID, &ok);
return ok ? mDoc->GetAccessible(headerID) : nullptr;
}
void
ProxyAccessible::SelectedItems(nsTArray<ProxyAccessible*>* aSelectedItems)
{
@ -934,6 +952,12 @@ ProxyAccessible::KeyboardShortcut()
return KeyBinding(key, modifierMask);
}
void
ProxyAccessible::AtkKeyBinding(nsString& aBinding)
{
unused << mDoc->SendAtkKeyBinding(mID, &aBinding);
}
double
ProxyAccessible::CurValue()
{

Просмотреть файл

@ -297,6 +297,8 @@ public:
void TableUnselectColumn(uint32_t aCol);
void TableUnselectRow(uint32_t aRow);
bool TableIsProbablyForLayout();
ProxyAccessible* AtkTableColumnHeader(int32_t aCol);
ProxyAccessible* AtkTableRowHeader(int32_t aRow);
void SelectedItems(nsTArray<ProxyAccessible*>* aSelectedItems);
uint32_t SelectedItemCount();
@ -313,6 +315,7 @@ public:
void ActionNameAt(uint8_t aIndex, nsString& aName);
KeyBinding AccessKey();
KeyBinding KeyboardShortcut();
void AtkKeyBinding(nsString& aBinding);
double CurValue();
bool SetCurValue(double aValue);

Просмотреть файл

@ -4,8 +4,8 @@
SimpleTest, getBoundsForDOMElm, Point, Utils */
/* exported loadJSON, eventMap */
const Ci = Components.interfaces;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import('resource://gre/modules/accessibility/Utils.jsm');
Cu.import('resource://gre/modules/Geometry.jsm');

Просмотреть файл

@ -1,4 +1,4 @@
const Cu = Components.utils;
var Cu = Components.utils;
const PREF_UTTERANCE_ORDER = "accessibility.accessfu.utterance";
Cu.import('resource://gre/modules/accessibility/Utils.jsm');

Просмотреть файл

@ -1,26 +1,26 @@
////////////////////////////////////////////////////////////////////////////////
// Constants
const RELATION_CONTROLLED_BY = nsIAccessibleRelation.RELATION_CONTROLLED_BY;
const RELATION_CONTROLLER_FOR = nsIAccessibleRelation.RELATION_CONTROLLER_FOR;
const RELATION_DEFAULT_BUTTON = nsIAccessibleRelation.RELATION_DEFAULT_BUTTON;
const RELATION_DESCRIBED_BY = nsIAccessibleRelation.RELATION_DESCRIBED_BY;
const RELATION_DESCRIPTION_FOR = nsIAccessibleRelation.RELATION_DESCRIPTION_FOR;
const RELATION_EMBEDDED_BY = nsIAccessibleRelation.RELATION_EMBEDDED_BY;
const RELATION_EMBEDS = nsIAccessibleRelation.RELATION_EMBEDS;
const RELATION_FLOWS_FROM = nsIAccessibleRelation.RELATION_FLOWS_FROM;
const RELATION_FLOWS_TO = nsIAccessibleRelation.RELATION_FLOWS_TO;
const RELATION_LABEL_FOR = nsIAccessibleRelation.RELATION_LABEL_FOR;
const RELATION_LABELLED_BY = nsIAccessibleRelation.RELATION_LABELLED_BY;
const RELATION_MEMBER_OF = nsIAccessibleRelation.RELATION_MEMBER_OF;
const RELATION_NODE_CHILD_OF = nsIAccessibleRelation.RELATION_NODE_CHILD_OF;
const RELATION_NODE_PARENT_OF = nsIAccessibleRelation.RELATION_NODE_PARENT_OF;
const RELATION_PARENT_WINDOW_OF = nsIAccessibleRelation.RELATION_PARENT_WINDOW_OF;
const RELATION_POPUP_FOR = nsIAccessibleRelation.RELATION_POPUP_FOR;
const RELATION_SUBWINDOW_OF = nsIAccessibleRelation.RELATION_SUBWINDOW_OF;
const RELATION_CONTAINING_DOCUMENT = nsIAccessibleRelation.RELATION_CONTAINING_DOCUMENT;
const RELATION_CONTAINING_TAB_PANE = nsIAccessibleRelation.RELATION_CONTAINING_TAB_PANE;
const RELATION_CONTAINING_APPLICATION = nsIAccessibleRelation.RELATION_CONTAINING_APPLICATION;
var RELATION_CONTROLLED_BY = nsIAccessibleRelation.RELATION_CONTROLLED_BY;
var RELATION_CONTROLLER_FOR = nsIAccessibleRelation.RELATION_CONTROLLER_FOR;
var RELATION_DEFAULT_BUTTON = nsIAccessibleRelation.RELATION_DEFAULT_BUTTON;
var RELATION_DESCRIBED_BY = nsIAccessibleRelation.RELATION_DESCRIBED_BY;
var RELATION_DESCRIPTION_FOR = nsIAccessibleRelation.RELATION_DESCRIPTION_FOR;
var RELATION_EMBEDDED_BY = nsIAccessibleRelation.RELATION_EMBEDDED_BY;
var RELATION_EMBEDS = nsIAccessibleRelation.RELATION_EMBEDS;
var RELATION_FLOWS_FROM = nsIAccessibleRelation.RELATION_FLOWS_FROM;
var RELATION_FLOWS_TO = nsIAccessibleRelation.RELATION_FLOWS_TO;
var RELATION_LABEL_FOR = nsIAccessibleRelation.RELATION_LABEL_FOR;
var RELATION_LABELLED_BY = nsIAccessibleRelation.RELATION_LABELLED_BY;
var RELATION_MEMBER_OF = nsIAccessibleRelation.RELATION_MEMBER_OF;
var RELATION_NODE_CHILD_OF = nsIAccessibleRelation.RELATION_NODE_CHILD_OF;
var RELATION_NODE_PARENT_OF = nsIAccessibleRelation.RELATION_NODE_PARENT_OF;
var RELATION_PARENT_WINDOW_OF = nsIAccessibleRelation.RELATION_PARENT_WINDOW_OF;
var RELATION_POPUP_FOR = nsIAccessibleRelation.RELATION_POPUP_FOR;
var RELATION_SUBWINDOW_OF = nsIAccessibleRelation.RELATION_SUBWINDOW_OF;
var RELATION_CONTAINING_DOCUMENT = nsIAccessibleRelation.RELATION_CONTAINING_DOCUMENT;
var RELATION_CONTAINING_TAB_PANE = nsIAccessibleRelation.RELATION_CONTAINING_TAB_PANE;
var RELATION_CONTAINING_APPLICATION = nsIAccessibleRelation.RELATION_CONTAINING_APPLICATION;
////////////////////////////////////////////////////////////////////////////////
// General

Просмотреть файл

@ -18,6 +18,7 @@
#include "nsIAccessibleTypes.h"
#include "mozilla/a11y/PDocAccessible.h"
#include "Relation.h"
#include "nsAccessibilityService.h"
#include "nsIPersistentProperties2.h"
#include "nsISimpleEnumerator.h"
@ -651,7 +652,27 @@ ia2Accessible::get_accessibleWithCaret(IUnknown** aAccessible,
*aAccessible = nullptr;
*aCaretOffset = -1;
return E_NOTIMPL;
AccessibleWrap* acc = static_cast<AccessibleWrap*>(this);
if (acc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
int32_t caretOffset = -1;
Accessible* accWithCaret = SelectionMgr()->AccessibleWithCaret(&caretOffset);
if (acc->Document() != accWithCaret->Document())
return S_FALSE;
Accessible* child = accWithCaret;
while (child != acc)
child = child->Parent();
if (!child)
return S_FALSE;
*aAccessible = static_cast<IAccessible2*>(
static_cast<AccessibleWrap*>(accWithCaret));
*aCaretOffset = caretOffset;
return S_OK;
A11Y_TRYBLOCK_END
}

Просмотреть файл

@ -5,7 +5,7 @@
var EXPORTED_SYMBOLS = ["Startup"];
const { utils: Cu, interfaces: Ci, classes: Cc } = Components;
var { utils: Cu, interfaces: Ci, classes: Cc } = Components;
const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
const { defer } = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -6,4 +6,4 @@
const { utils: Cu } = Components;
const {require} = Cu.import(`${ROOT}/toolkit/require.js`, {});
const {Bootstrap} = require(`${ROOT}/sdk/addon/bootstrap.js`);
const {startup, shutdown, install, uninstall} = new Bootstrap();
var {startup, shutdown, install, uninstall} = new Bootstrap();

Просмотреть файл

@ -727,7 +727,7 @@ exports["test requestAnimationFrame"] = createProxyTest("", function (helper) {
exports["testGlobalScope"] = createProxyTest("", function (helper) {
helper.createWorker(
'let toplevelScope = true;' +
'var toplevelScope = true;' +
'assert(window.toplevelScope, "variables in toplevel scope are set to `window` object");' +
'assert(this.toplevelScope, "variables in toplevel scope are set to `this` object");' +
'done();'

Просмотреть файл

@ -125,7 +125,7 @@ textarea,
border-style: solid;
border-color: #7d7d7d;
color: #414141;
background: white linear-gradient(rgba(115,115,115,0.5) 0, rgba(215,215,215,0.5) 3px, rgba(255,255,255,0.2) 16px);
background-color: white;
}
/* Selects are handled by the form helper, see bug 685197 */
@ -147,11 +147,11 @@ button {
}
input[type="checkbox"] {
background: white linear-gradient(rgba(115,115,115,0.5) 0, rgba(215,215,215,0.5) 2px, rgba(255,255,255,0.2) 6px);
background-color: white;
}
input[type="radio"] {
background: radial-gradient(at 6px 6px, rgba(255,255,255,0.2) 3px, rgba(195,195,195,0.5) 5px, rgba(115,115,115,0.5) 100%);
background-color: white;
}
select {
@ -226,7 +226,7 @@ input[type="file"]:focus > input[type="text"],
outline: 0px !important;
border-style: solid;
border-color: rgb(94,128,153);
background: white linear-gradient(rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 3px, rgba(255,255,255,0.2) 16px);
background-color: white;
}
select:not([size]):not([multiple]):focus,
@ -247,14 +247,6 @@ input[type="radio"]:focus {
border-color: #99c6e0 !important;
}
input[type="checkbox"]:focus {
background: white linear-gradient(rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 2px, rgba(255,255,255,0.2) 6px);
}
input[type="radio"]:focus {
background: radial-gradient(at 6px 6px, rgba(255,255,255,0.2) 3px, rgba(198,225,246,0.2) 5px, rgba(27,113,177,0.5) 100%);
}
/* we need to be specific for selects because the above rules are specific too */
textarea[disabled],
select[size][disabled],
@ -269,13 +261,13 @@ button[disabled],
border-color: rgba(125,125,125,0.4);
border-style: solid;
border-width: 1px;
background: transparent linear-gradient(rgba(185,185,185,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(255,255,255,0.4) 100%);
background-color: #f5f5f5;
}
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
background: transparent linear-gradient(rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%);
background-color: #f5f5f5;
}
input[type="button"][disabled],
@ -286,7 +278,7 @@ button[disabled] {
-moz-padding-end: 7px;
padding-block-start: 0;
padding-block-end: 0;
background: transparent linear-gradient(rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%);
background-color: #f5f5f5;
}
input[type="radio"][disabled],

Просмотреть файл

@ -8,10 +8,10 @@
window.performance.mark('gecko-settings-loadstart');
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
// The load order is important here SettingsRequestManager _must_ be loaded
// prior to using SettingsListener otherwise there is a race in acquiring the

Просмотреть файл

@ -1502,7 +1502,7 @@ const saveWindowGeometry = () => {
}
window.addEventListener("unload", saveWindowGeometry);
let baseWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
var baseWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.treeOwner

Просмотреть файл

@ -6,7 +6,7 @@
"use strict";
const {utils: Cu} = Components;
var {utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
@ -14,7 +14,7 @@ function debug(aStr) {
// dump(" -*- ShellRemote.js: " + aStr + "\n");
}
let remoteShell = {
var remoteShell = {
get homeURL() {
let systemAppManifestURL = Services.io.newURI(this.systemAppManifestURL, null, null);

Просмотреть файл

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
const { Services } = Cu.import('resource://gre/modules/Services.jsm');
const { SystemAppProxy } = Cu.import('resource://gre/modules/SystemAppProxy.jsm');

Просмотреть файл

@ -15,11 +15,11 @@ function debug(aStr) {
// dump("MultiscreenHandler: " + aStr + "\n");
}
let window = Services.wm.getMostRecentWindow("navigator:browser");
var window = Services.wm.getMostRecentWindow("navigator:browser");
// Multi-screen support on b2g. The following implementation will open a new
// top-level window once we receive a display connected event.
let MultiscreenHandler = {
var MultiscreenHandler = {
topLevelWindows: new Map(),

Просмотреть файл

@ -4,8 +4,8 @@
'use strict';
const Cc = Components.classes;
const Ci = Components.interfaces;
var Cc = Components.classes;
var Ci = Components.interfaces;
// use ppmm to handle file-picker message.
var ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1']

Просмотреть файл

@ -8,9 +8,9 @@ function debug(str) {
dump("CHROME PERMISSON HANDLER -- " + str + "\n");
}
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
const { Services } = Cu.import("resource://gre/modules/Services.jsm");
const { SystemAppProxy } = Cu.import("resource://gre/modules/SystemAppProxy.jsm");

Просмотреть файл

@ -8,7 +8,7 @@
dump('presentation_prompt_handler_chrome: ' + str + '\n');
}
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const { XPCOMUtils } = Cu.import('resource://gre/modules/XPCOMUtils.jsm');
const { SystemAppProxy } = Cu.import('resource://gre/modules/SystemAppProxy.jsm');

Просмотреть файл

@ -4,7 +4,7 @@
'use strict';
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const { XPCOMUtils } = Cu.import('resource://gre/modules/XPCOMUtils.jsm');
const { SystemAppProxy } = Cu.import('resource://gre/modules/SystemAppProxy.jsm');

Просмотреть файл

@ -1,5 +1,5 @@
const Cu = Components.utils;
const Ci = Components.interfaces;
var Cu = Components.utils;
var Ci = Components.interfaces;
Cu.importGlobalProperties(['File']);

Просмотреть файл

@ -1,4 +1,4 @@
const Cu = Components.utils;
var Cu = Components.utils;
const { Services } = Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");

Просмотреть файл

@ -1,8 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const Ci = Components.interfaces;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cu = Components.utils;
// The following boilerplate makes sure that XPCOM calls
// that use the profile directory work.

Просмотреть файл

@ -14,9 +14,9 @@
"use strict";
const Cu = Components.utils;
const Ci = Components.interfaces;
const Cc = Components.classes;
var Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/osfile.jsm");

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
const {utils: Cu} = Components;
var {utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
const {utils: Cu} = Components;
var {utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const {results: Cr} = Components;
var {results: Cr} = Components;
// Trivial test just to make sure we have no syntax error
add_test(function test_ksm_ok() {

Просмотреть файл

@ -1,6 +1,6 @@
/* jshint moz: true */
const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
var {utils: Cu, classes: Cc, interfaces: Ci} = Components;
function debug(msg) {
var timestamp = Date.now();

Просмотреть файл

@ -10,7 +10,7 @@
/* jshint -W097 */
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/LogCapture.jsm");
Cu.import("resource://gre/modules/LogShake.jsm");

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f004530b30a63c08a16d82536858600446b2abf5"/>
@ -30,7 +30,7 @@
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="b89fda71fcd0fa0cf969310e75be3ea33e048b44"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="2e7d5348f35575870b3c7e567a9a9f6d66f8d6c5"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" revision="1342fd7b4b000ac3e76a5dfe111a0de9d710b4c8"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" revision="a70724fae4d4c571e5657340f80a0c130d5283ec"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" revision="a356cc4cab8b8e6b4642525b689c72de35dc6d12"/>
<project groups="linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" path="prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" revision="1b26ad444462ccbd97f6319565b4735f7bd779e5"/>
<project name="device/common" path="device/common" revision="4e1a38704dcfadef60ed2da3cfeba02a56b069d2"/>
<project name="device/sample" path="device/sample" revision="b045905b46c8b4ee630d0c2aee7db63eaec722d9"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>

Просмотреть файл

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "0019347fbaedc9d54f2f3436fff17aeb22968174",
"git_revision": "b99837aa2294348317bcae68acabe71d9a83d774",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "32ae3240869f21601d31c7f71c4fd09c02239353",
"revision": "cd2549520049a8532b966d3edda167f7bc444fba",
"repo_path": "integration/gaia-central"
}

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>

Просмотреть файл

@ -18,7 +18,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f004530b30a63c08a16d82536858600446b2abf5"/>
@ -31,7 +31,7 @@
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="b89fda71fcd0fa0cf969310e75be3ea33e048b44"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="2e7d5348f35575870b3c7e567a9a9f6d66f8d6c5"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" revision="1342fd7b4b000ac3e76a5dfe111a0de9d710b4c8"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" revision="a70724fae4d4c571e5657340f80a0c130d5283ec"/>
<project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" revision="a356cc4cab8b8e6b4642525b689c72de35dc6d12"/>
<project groups="linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" path="prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" revision="1b26ad444462ccbd97f6319565b4735f7bd779e5"/>
<project name="device/common" path="device/common" revision="4e1a38704dcfadef60ed2da3cfeba02a56b069d2"/>
<project name="device/sample" path="device/sample" revision="b045905b46c8b4ee630d0c2aee7db63eaec722d9"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0019347fbaedc9d54f2f3436fff17aeb22968174"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b99837aa2294348317bcae68acabe71d9a83d774"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7e0fe55ac52323eace5a6119ab2b911fc4f64495"/>

4
b2g/simulator/bootstrap.js поставляемый
Просмотреть файл

@ -1,5 +1,5 @@
const Ci = Components.interfaces;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FxAccounts.jsm");

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -3722,6 +3722,8 @@ const BrowserSearch = {
}
};
XPCOMUtils.defineConstant(this, "BrowserSearch", BrowserSearch);
function FillHistoryMenu(aParent) {
// Lazily add the hover listeners on first showing and never remove them
if (!aParent.hasStatusListener) {

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/LoadContextInfo.jsm");
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -3,11 +3,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
let {Sanitizer} = Cu.import("resource:///modules/Sanitizer.jsm", {});
var {Sanitizer} = Cu.import("resource:///modules/Sanitizer.jsm", {});
var gSanitizePromptDialog = {

Просмотреть файл

@ -6,7 +6,7 @@
/* This content script should work in any browser or iframe and should not
* depend on the frame being contained in tabbrowser. */
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://services-common/utils.js");
Cu.import("resource://services-sync/main.js");

Просмотреть файл

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cu = Components.utils;
Cu.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

Просмотреть файл

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
var Ci = Components.interfaces;
var Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");

Просмотреть файл

@ -3,10 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
var Cu = Components.utils;
// page consts

Просмотреть файл

@ -1,6 +1,6 @@
"use strict";
let { TabCrashReporter } =
var { TabCrashReporter } =
Cu.import("resource:///modules/ContentCrashReporters.jsm");
const SERVER_URL = "http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs";

Просмотреть файл

@ -1,4 +1,4 @@
const Ci = Components.interfaces;
var Ci = Components.interfaces;
const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
Ci.nsIWebProgressListener.STATE_IS_NETWORK;

Просмотреть файл

@ -1,7 +1,7 @@
// Bug 356571 - loadOneOrMoreURIs gives up if one of the URLs has an unknown protocol
const Cr = Components.results;
const Cm = Components.manager;
var Cr = Components.results;
var Cm = Components.manager;
// Set to true when docShell alerts for unknown protocol error
var didFail = false;

Просмотреть файл

@ -2,7 +2,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
const {Ci: interfaces, Cc: classes} = Components;
var {Ci: interfaces, Cc: classes} = Components;
var Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
var HasFindClipboard = Clipboard.supportsFindClipboard();

Просмотреть файл

@ -1,37 +1,18 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function waitForActive() {
if (!gBrowser.docShell.isActive) {
executeSoon(waitForActive);
return;
}
is(gBrowser.docShell.isActive, true, "Docshell should be active again");
finish();
}
function waitForInactive() {
if (gBrowser.docShell.isActive) {
executeSoon(waitForInactive);
return;
}
is(gBrowser.docShell.isActive, false, "Docshell should be inactive");
window.restore();
waitForActive();
}
function test() {
add_task(function *() {
registerCleanupFunction(function() {
window.restore();
});
waitForExplicitFinish();
is(gBrowser.docShell.isActive, true, "Docshell should be active");
function waitForActive() { return gBrowser.selectedTab.linkedBrowser.docShellIsActive; }
function waitForInactive() { return !gBrowser.selectedTab.linkedBrowser.docShellIsActive; }
yield promiseWaitForCondition(waitForActive);
is(gBrowser.selectedTab.linkedBrowser.docShellIsActive, true, "Docshell should be active");
window.minimize();
// XXX On Linux minimize/restore seem to be very very async, but
// our window.windowState changes sync.... so we can't rely on the
// latter correctly reflecting the state of the former. In
// particular, a restore() call before minimizing is done will not
// actually restore the window, but change the window state. As a
// result, just poll waiting for our expected isActive values.
waitForInactive();
}
yield promiseWaitForCondition(waitForInactive);
is(gBrowser.selectedTab.linkedBrowser.docShellIsActive, false, "Docshell should be Inactive");
window.restore();
yield promiseWaitForCondition(waitForActive);
is(gBrowser.selectedTab.linkedBrowser.docShellIsActive, true, "Docshell should be active again");
});

Просмотреть файл

@ -10,44 +10,25 @@
* the HTTP top level page to broken HTTPS.
*/
const gHttpTestRoot = "http://example.com/browser/browser/base/content/test/general/";
const gHttpTestUrl = "http://example.com/browser/browser/base/content/test/general/file_mixedContentFramesOnHttp.html";
var gTestBrowser = null;
function SecStateTestsCompleted() {
gBrowser.removeCurrentTab();
window.focus();
finish();
}
add_task(function *() {
yield new Promise(resolve => {
SpecialPowers.pushPrefEnv({
"set": [
["security.mixed_content.block_active_content", true],
["security.mixed_content.block_display_content", false]
]
}, resolve);
});
let url = gHttpTestUrl
yield BrowserTestUtils.withNewTab({gBrowser, url}, function*(){
gTestBrowser = gBrowser.selectedBrowser;
// check security state is insecure
isSecurityState("insecure");
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: false, passiveLoaded: true});
});
});
function test() {
waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [
["security.mixed_content.block_active_content", true],
["security.mixed_content.block_display_content", false]
]}, SecStateTests);
}
function SecStateTests() {
let url = gHttpTestRoot + "file_mixedContentFramesOnHttp.html";
gBrowser.selectedTab = gBrowser.addTab();
gTestBrowser = gBrowser.selectedBrowser;
whenLoaded(gTestBrowser, SecStateTest1);
gTestBrowser.contentWindow.location = url;
}
// The http page loads an https frame with an http image.
function SecStateTest1() {
// check security state is insecure
isSecurityState("insecure");
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: false, passiveLoaded: true});
SecStateTestsCompleted();
}
function whenLoaded(aElement, aCallback) {
aElement.addEventListener("load", function onLoad() {
aElement.removeEventListener("load", onLoad, true);
executeSoon(aCallback);
}, true);
}

Просмотреть файл

@ -14,67 +14,36 @@ const gHttpTestRoot2 = "http://example.net/browser/browser/base/content/test/gen
const gHttpsTestRoot2 = "https://test2.example.com/browser/browser/base/content/test/general/";
var gTestBrowser = null;
function SecStateTestsCompleted() {
gBrowser.removeCurrentTab();
window.focus();
finish();
}
function test() {
waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [["security.mixed_content.block_active_content", true],
["security.mixed_content.block_display_content", false]]}, SecStateTests);
}
function SecStateTests() {
gBrowser.selectedTab = gBrowser.addTab();
gTestBrowser = gBrowser.selectedBrowser;
whenLoaded(gTestBrowser, SecStateTest1A);
add_task(function *() {
let url = gHttpTestRoot1 + "file_mixedContentFromOnunload.html";
gTestBrowser.contentWindow.location = url;
}
// Navigation from an http page to a https page with no mixed content
// The http page loads an http image on unload
function SecStateTest1A() {
whenLoaded(gTestBrowser, SecStateTest1B);
let url = gHttpsTestRoot1 + "file_mixedContentFromOnunload_test1.html";
gTestBrowser.contentWindow.location = url;
}
function SecStateTest1B() {
yield BrowserTestUtils.withNewTab({gBrowser, url}, function*(){
yield new Promise(resolve => {
SpecialPowers.pushPrefEnv({
"set": [
["security.mixed_content.block_active_content", true],
["security.mixed_content.block_display_content", false]
]
}, resolve);
});
gTestBrowser = gBrowser.selectedBrowser;
// Navigation from an http page to a https page with no mixed content
// The http page loads an http image on unload
url = gHttpsTestRoot1 + "file_mixedContentFromOnunload_test1.html";
yield BrowserTestUtils.loadURI(gTestBrowser, url);
yield BrowserTestUtils.browserLoaded(gTestBrowser);
// check security state. Since current url is https and doesn't have any
// mixed content resources, we expect it to be secure.
isSecurityState("secure");
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: false, passiveLoaded: false});
whenLoaded(gTestBrowser, SecStateTest2A);
// change locations and proceed with the second test
let url = gHttpTestRoot2 + "file_mixedContentFromOnunload.html";
gTestBrowser.contentWindow.location = url;
}
// Navigation from an http page to a https page that has mixed display content
// The https page loads an http image on unload
function SecStateTest2A() {
whenLoaded(gTestBrowser, SecStateTest2B);
let url = gHttpsTestRoot2 + "file_mixedContentFromOnunload_test2.html";
gTestBrowser.contentWindow.location = url;
}
function SecStateTest2B() {
// Navigation from an http page to a https page that has mixed display content
// The https page loads an http image on unload
url = gHttpTestRoot2 + "file_mixedContentFromOnunload.html";
yield BrowserTestUtils.loadURI(gTestBrowser, url);
yield BrowserTestUtils.browserLoaded(gTestBrowser);
url = gHttpsTestRoot2 + "file_mixedContentFromOnunload_test2.html";
yield BrowserTestUtils.loadURI(gTestBrowser, url);
yield BrowserTestUtils.browserLoaded(gTestBrowser);
isSecurityState("broken");
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: false, passiveLoaded: true});
SecStateTestsCompleted();
}
function whenLoaded(aElement, aCallback) {
aElement.addEventListener("load", function onLoad() {
aElement.removeEventListener("load", onLoad, true);
executeSoon(aCallback);
}, true);
}
});
});

Просмотреть файл

@ -3,16 +3,16 @@ var scrollbox = tabstrip._scrollbox;
var originalSmoothScroll = tabstrip.smoothScroll;
var tabs = gBrowser.tabs;
let rect = ele => ele.getBoundingClientRect();
let width = ele => rect(ele).width;
let left = ele => rect(ele).left;
let right = ele => rect(ele).right;
let isLeft = (ele, msg) => is(left(ele) + tabstrip._tabMarginLeft, left(scrollbox), msg);
let isRight = (ele, msg) => is(right(ele) - tabstrip._tabMarginRight, right(scrollbox), msg);
let elementFromPoint = x => tabstrip._elementFromPoint(x);
let nextLeftElement = () => elementFromPoint(left(scrollbox) - 1);
let nextRightElement = () => elementFromPoint(right(scrollbox) + 1);
let firstScrollable = () => tabs[gBrowser._numPinnedTabs];
var rect = ele => ele.getBoundingClientRect();
var width = ele => rect(ele).width;
var left = ele => rect(ele).left;
var right = ele => rect(ele).right;
var isLeft = (ele, msg) => is(left(ele) + tabstrip._tabMarginLeft, left(scrollbox), msg);
var isRight = (ele, msg) => is(right(ele) - tabstrip._tabMarginRight, right(scrollbox), msg);
var elementFromPoint = x => tabstrip._elementFromPoint(x);
var nextLeftElement = () => elementFromPoint(left(scrollbox) - 1);
var nextRightElement = () => elementFromPoint(right(scrollbox) + 1);
var firstScrollable = () => tabs[gBrowser._numPinnedTabs];
function test() {
requestLongerTimeout(2);

Просмотреть файл

@ -2,7 +2,7 @@
* Test the Permissions section in the Control Center.
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PERMISSIONS_PAGE = "http://example.com/browser/browser/base/content/test/general/permissions.html";
var {SitePermissions} = Cu.import("resource:///modules/SitePermissions.jsm", {});

Просмотреть файл

@ -18,7 +18,7 @@
*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
var {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
"resource://gre/modules/FormHistory.jsm");
@ -29,10 +29,10 @@ XPCOMUtils.defineLazyModuleGetter(this, "Timer",
XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
"resource://testing-common/PlacesTestUtils.jsm");
let tempScope = {};
var tempScope = {};
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js", tempScope);
let Sanitizer = tempScope.Sanitizer;
var Sanitizer = tempScope.Sanitizer;
const kMsecPerMin = 60 * 1000;
const kUsecPerMin = 60 * 1000000;
@ -675,8 +675,8 @@ add_task(function* test_offline_apps_permissions() {
return wh.promiseClosed;
});
let now_mSec = Date.now();
let now_uSec = now_mSec * 1000;
var now_mSec = Date.now();
var now_uSec = now_mSec * 1000;
///////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -7,7 +7,7 @@
* See also Bugs 1175327, 1043801, 1178985
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

Просмотреть файл

@ -4,7 +4,7 @@
* See also Bugs 1175327, 1043801, 1178985.
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

Просмотреть файл

@ -4,7 +4,7 @@
* See also Bug 1175858.
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

Просмотреть файл

@ -2,7 +2,7 @@
* Test telemetry for Tracking Protection
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";

Просмотреть файл

@ -5,7 +5,7 @@
// This file is loaded as a "content script" for browser_aboutAccounts tests
"use strict";
const {interfaces: Ci, utils: Cu} = Components;
var {interfaces: Ci, utils: Cu} = Components;
addEventListener("load", function load(event) {
if (event.target != content.document) {

Просмотреть файл

@ -1,4 +1,4 @@
const TEST_PINGS = [
var TEST_PINGS = [
{
type: "test-telemetryArchive-1",
payload: { foo: "bar" },

Просмотреть файл

@ -1,7 +1,7 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cm = Components.manager;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cm = Components.manager;
const kBlocklistServiceUUID = "{66354bc9-7ed1-4692-ae1d-8da97d6b205e}";
const kBlocklistServiceContractID = "@mozilla.org/extensions/blocklist;1";

Просмотреть файл

@ -2,8 +2,8 @@ var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content
var gTestBrowser = null;
var gConsoleErrors = 0;
const Cc = Components.classes;
const Ci = Components.interfaces;
var Cc = Components.classes;
var Ci = Components.interfaces;
add_task(function* () {
registerCleanupFunction(function () {

Просмотреть файл

@ -1594,9 +1594,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
document.getElementById("addon-progress-notification-progresstext");
</field>
<field name="DownloadUtils" readonly="true">
let utils = {};
Components.utils.import("resource://gre/modules/DownloadUtils.jsm", utils);
utils.DownloadUtils;
{
let utils = {};
Components.utils.import("resource://gre/modules/DownloadUtils.jsm", utils);
utils.DownloadUtils;
}
</field>
<method name="destroy">
@ -2676,11 +2678,13 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
]]></destructor>
<field name="_panel" readonly="true"><![CDATA[
let node = this.parentNode;
while(node && node.localName != "panel") {
node = node.parentNode;
{
let node = this.parentNode;
while(node && node.localName != "panel") {
node = node.parentNode;
}
node;
}
node;
]]></field>
<field name="_promomessage" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "promo-message");

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/webrtcUI.jsm");

Просмотреть файл

@ -510,6 +510,8 @@ const PanelUI = {
},
};
XPCOMUtils.defineConstant(this, "PanelUI", PanelUI);
/**
* Gets the currently selected locale for display.
* @return the selected locale or "en-US" if none is selected

Просмотреть файл

@ -9,17 +9,18 @@ add_task(function*() {
defaultArea: CustomizableUI.AREA_NAVBAR
});
const kPrefCustomizationState = "browser.uiCustomization.state";
let bsPass = Cu.import("resource:///modules/CustomizableUI.jsm", {});
ok(bsPass.gSeenWidgets.has(BUTTONID), "Widget should be seen after createWidget is called.");
CustomizableUI.reset();
ok(bsPass.gSeenWidgets.has(BUTTONID), "Widget should still be seen after reset.");
ok(!Services.prefs.prefHasUserValue(bsPass.kPrefCustomizationState), "Pref shouldn't be set right now, because that'd break undo.");
ok(!Services.prefs.prefHasUserValue(kPrefCustomizationState), "Pref shouldn't be set right now, because that'd break undo.");
CustomizableUI.addWidgetToArea(BUTTONID, CustomizableUI.AREA_NAVBAR);
gCustomizeMode.removeFromArea(document.getElementById(BUTTONID));
let hasUserValue = Services.prefs.prefHasUserValue(bsPass.kPrefCustomizationState);
let hasUserValue = Services.prefs.prefHasUserValue(kPrefCustomizationState);
ok(hasUserValue, "Pref should be set right now.");
if (hasUserValue) {
let seenArray = JSON.parse(Services.prefs.getCharPref(bsPass.kPrefCustomizationState)).seen;
let seenArray = JSON.parse(Services.prefs.getCharPref(kPrefCustomizationState)).seen;
isnot(seenArray.indexOf(BUTTONID), -1, "Widget should be in saved 'seen' list.");
}
});

Просмотреть файл

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
var Cc = Components.classes;
var Ci = Components.interfaces;
var gProfD = do_get_profile();
var gDirSvc = Cc["@mozilla.org/file/directory_service;1"].

Просмотреть файл

@ -4,10 +4,10 @@
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
var Cu = Components.utils;
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
"distribution-customization-complete";

Просмотреть файл

@ -580,6 +580,8 @@ const DownloadsPanel = {
},
};
XPCOMUtils.defineConstant(this, "DownloadsPanel", DownloadsPanel);
////////////////////////////////////////////////////////////////////////////////
//// DownloadsOverlayLoader
@ -658,6 +660,8 @@ const DownloadsOverlayLoader = {
},
};
XPCOMUtils.defineConstant(this, "DownloadsOverlayLoader", DownloadsOverlayLoader);
////////////////////////////////////////////////////////////////////////////////
//// DownloadsView
@ -1004,6 +1008,8 @@ const DownloadsView = {
},
}
XPCOMUtils.defineConstant(this, "DownloadsView", DownloadsView);
////////////////////////////////////////////////////////////////////////////////
//// DownloadsViewItem
@ -1142,6 +1148,8 @@ const DownloadsViewController = {
}
};
XPCOMUtils.defineConstant(this, "DownloadsViewController", DownloadsViewController);
////////////////////////////////////////////////////////////////////////////////
//// DownloadsViewItemController
@ -1488,7 +1496,9 @@ const DownloadsSummary = {
delete this._detailsNode;
return this._detailsNode = node;
}
}
};
XPCOMUtils.defineConstant(this, "DownloadsSummary", DownloadsSummary);
////////////////////////////////////////////////////////////////////////////////
//// DownloadsFooter
@ -1542,3 +1552,5 @@ const DownloadsFooter = {
return this._footerNode = node;
}
};
XPCOMUtils.defineConstant(this, "DownloadsFooter", DownloadsFooter);

Просмотреть файл

@ -577,3 +577,8 @@ const DownloadsIndicatorView = {
},
};
Object.defineProperty(this, "DownloadsIndicatorView", {
value: DownloadsIndicatorView,
enumerable: true,
writable: false
});

Просмотреть файл

@ -10,9 +10,9 @@
////////////////////////////////////////////////////////////////////////////////
//// Globals
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
Cu.import("resource:///modules/DownloadsCommon.jsm");

Просмотреть файл

@ -17,7 +17,7 @@ var browserActionMap = new WeakMap();
// WeakMap[Extension -> docshell]
// This map is a cache of the windowless browser that's used to render ImageData
// for the browser_action icon.
let imageRendererMap = new WeakMap();
var imageRendererMap = new WeakMap();
function browserActionOf(extension)
{

Просмотреть файл

@ -3,7 +3,7 @@ Cu.import("resource://gre/modules/MatchPattern.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
let {
var {
EventManager,
contextMenuItems,
runSafe
@ -13,13 +13,13 @@ let {
// Map[Extension -> Map[ID -> MenuItem]]
// Note: we want to enumerate all the menu items so
// this cannot be a weak map.
let contextMenuMap = new Map();
var contextMenuMap = new Map();
// Not really used yet, will be used for event pages.
let onClickedCallbacksMap = new WeakMap();
var onClickedCallbacksMap = new WeakMap();
// If id is not specified for an item we use an integer.
let nextID = 0;
var nextID = 0;
function contextMenuObserver(subject, topic, data) {
subject = subject.wrappedJSObject;
@ -34,7 +34,7 @@ function contextMenuObserver(subject, topic, data) {
// For remote processes there is a gContextMenuContentData where all
// the important info is stored from the child process. We get
// this data in |contentData|.
let menuBuilder = {
var menuBuilder = {
build: function(contextData) {
// TODO: icons should be set for items
let xulMenu = contextData.menu;
@ -338,7 +338,7 @@ MenuItem.prototype = {
},
};
let extCount = 0;
var extCount = 0;
extensions.on("startup", (type, extension) => {
contextMenuMap.set(extension, new Map());
if (++extCount == 1) {

Просмотреть файл

@ -1,4 +1,4 @@
let {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm");
var {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm");
function makeWidgetId(id)
{

Просмотреть файл

@ -1,5 +1,5 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cr = Components.results;
var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);

Просмотреть файл

@ -1,4 +1,4 @@
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
function run_test() {

Просмотреть файл

@ -17,6 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm
this.EXPORTED_SYMBOLS = ["LoopRoomsCache"];
const LOOP_ROOMS_CACHE_FILENAME = "loopRoomsCache.json";
XPCOMUtils.defineConstant(this, "LOOP_ROOMS_CACHE_FILENAME", LOOP_ROOMS_CACHE_FILENAME);
/**
* RoomsCache is a cache for saving simple rooms data to the disk in case we

Просмотреть файл

@ -112,6 +112,14 @@ this.EXPORTED_SYMBOLS = ["MozLoopService", "LOOP_SESSION_TYPE",
"TWO_WAY_MEDIA_CONN_LENGTH", "SHARING_STATE_CHANGE", "SHARING_ROOM_URL",
"ROOM_CREATE", "ROOM_DELETE", "ROOM_CONTEXT_ADD"];
XPCOMUtils.defineConstant(this, "LOOP_SESSION_TYPE", LOOP_SESSION_TYPE);
XPCOMUtils.defineConstant(this, "TWO_WAY_MEDIA_CONN_LENGTH", TWO_WAY_MEDIA_CONN_LENGTH);
XPCOMUtils.defineConstant(this, "SHARING_STATE_CHANGE", SHARING_STATE_CHANGE);
XPCOMUtils.defineConstant(this, "SHARING_ROOM_URL", SHARING_ROOM_URL);
XPCOMUtils.defineConstant(this, "ROOM_CREATE", ROOM_CREATE);
XPCOMUtils.defineConstant(this, "ROOM_DELETE", ROOM_DELETE);
XPCOMUtils.defineConstant(this, "ROOM_CONTEXT_ADD", ROOM_CONTEXT_ADD);
XPCOMUtils.defineLazyModuleGetter(this, "injectLoopAPI",
"resource:///modules/loop/MozLoopAPI.jsm");

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
// Initialize this before the imports, as some of them need it.
do_get_profile();

Просмотреть файл

@ -32,7 +32,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WindowsRegistry",
Cu.importGlobalProperties(["URL"]);
let CtypesKernelHelpers = MSMigrationUtils.CtypesKernelHelpers;
var CtypesKernelHelpers = MSMigrationUtils.CtypesKernelHelpers;
////////////////////////////////////////////////////////////////////////////////
//// Resources

Просмотреть файл

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
const kIMig = Ci.nsIBrowserProfileMigrator;
const kIPStartup = Ci.nsIProfileStartup;

Просмотреть файл

@ -1,4 +1,4 @@
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
Cu.importGlobalProperties([ "URL" ]);

Просмотреть файл

@ -3,10 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/LoadContextInfo.jsm");

Просмотреть файл

@ -8,7 +8,7 @@ const TRACK_SUFFIX = "-track-digest256";
const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists.";
let gBlocklistManager = {
var gBlocklistManager = {
_type: "",
_blockLists: [],
_brandShortName : null,

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше