Merge trunk into HTML5 repo

This commit is contained in:
Henri Sivonen 2009-06-16 12:18:59 +03:00
commit 4108e0ae0f
517 changed files with 20733 additions and 19291 deletions

View File

@ -43,7 +43,11 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
DIRS = public src build tests
DIRS = public src build
ifdef ENABLE_TESTS
DIRS += tests
endif
include $(topsrcdir)/config/rules.mk

View File

@ -262,26 +262,6 @@ mai_atk_object_get_type(void)
return type;
}
/*
* Must keep sychronization with enumerate AtkProperty in
* accessible/src/base/nsAccessibleEventData.h
*/
static char * sAtkPropertyNameArray[PROP_LAST] = {
0,
"accessible-name",
"accessible-description",
"accessible-parent",
"accessible-role",
"accessible-layer",
"accessible-mdi-zorder",
"accessible-table-caption",
"accessible-table-column-description",
"accessible-table-column-header",
"accessible-table-row-description",
"accessible-table-row-header",
"accessible-table-summary"
};
#ifdef MAI_LOGGING
PRInt32 nsAccessibleWrap::mAccWrapCreated = 0;
PRInt32 nsAccessibleWrap::mAccWrapDeleted = 0;

View File

@ -97,28 +97,10 @@ nsARIAGridAccessible::GetColumns(PRInt32 *aColumns)
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIAccessible> row, nextChild;
GetFirstChild(getter_AddRefs(row));
while (row && nsAccUtils::Role(row) != nsIAccessibleRole::ROLE_ROW) {
row->GetNextSibling(getter_AddRefs(nextChild));
row.swap(nextChild);
}
if (!row)
return NS_OK;
nsCOMPtr<nsIAccessible> row = GetNextRow();
nsCOMPtr<nsIAccessible> cell;
row->GetFirstChild(getter_AddRefs(cell));
while (cell) {
PRUint32 role = nsAccUtils::Role(cell);
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
role == nsIAccessibleRole::ROLE_COLUMNHEADER)
(*aColumns)++;
cell->GetNextSibling(getter_AddRefs(nextChild));
cell.swap(nextChild);
}
while ((cell = GetNextCellInRow(row, cell)))
(*aColumns)++;
return NS_OK;
}
@ -145,15 +127,9 @@ nsARIAGridAccessible::GetRows(PRInt32 *aRows)
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIAccessible> row, nextRow;
GetFirstChild(getter_AddRefs(row));
while (row) {
if (nsAccUtils::Role(row) == nsIAccessibleRole::ROLE_ROW)
(*aRows)++;
row->GetNextSibling(getter_AddRefs(nextRow));
row.swap(nextRow);
}
nsCOMPtr<nsIAccessible> row;
while ((row = GetNextRow(row)))
(*aRows)++;
return NS_OK;
}
@ -181,40 +157,11 @@ nsARIAGridAccessible::CellRefAt(PRInt32 aRow, PRInt32 aColumn,
if (IsDefunct())
return NS_ERROR_FAILURE;
PRInt32 rowIdx = aRow + 1;
nsCOMPtr<nsIAccessible> row, nextChild;
GetFirstChild(getter_AddRefs(row));
while (row) {
if (nsAccUtils::Role(row) == nsIAccessibleRole::ROLE_ROW)
rowIdx--;
nsCOMPtr<nsIAccessible> row = GetRowAt(aRow);
NS_ENSURE_ARG(row);
if (rowIdx == 0)
break;
row->GetNextSibling(getter_AddRefs(nextChild));
row.swap(nextChild);
}
NS_ENSURE_ARG(row && rowIdx == 0);
PRInt32 colIdx = aColumn + 1;
nsCOMPtr<nsIAccessible> cell;
row->GetFirstChild(getter_AddRefs(cell));
while (cell) {
PRUint32 role = nsAccUtils::Role(cell);
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
role == nsIAccessibleRole::ROLE_COLUMNHEADER)
colIdx--;
if (colIdx == 0)
break;
cell->GetNextSibling(getter_AddRefs(nextChild));
cell.swap(nextChild);
}
NS_ENSURE_ARG(cell && colIdx == 0);
nsCOMPtr<nsIAccessible> cell = GetCellInRowAt(row, aColumn);
NS_ENSURE_ARG(cell);
NS_ADDREF(*aAccessible = cell);
return NS_OK;
@ -361,8 +308,23 @@ nsARIAGridAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
NS_ENSURE_ARG(IsValidColumn(aColumn));
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIAccessible> row = GetNextRow();
if (!row)
return NS_OK;
do {
if (!IsARIASelected(row)) {
nsCOMPtr<nsIAccessible> cell = GetCellInRowAt(row, aColumn);
if (!cell) // Do not fail due to wrong markup
return NS_OK;
if (!IsARIASelected(cell))
return NS_OK;
}
} while ((row = GetNextRow(row)));
*aIsSelected = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
@ -374,10 +336,19 @@ nsARIAGridAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
if (IsDefunct())
return NS_ERROR_FAILURE;
NS_ENSURE_ARG(IsValidRow(aRow));
nsCOMPtr<nsIAccessible> row = GetRowAt(aRow);
NS_ENSURE_ARG(row);
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
if (!IsARIASelected(row)) {
nsCOMPtr<nsIAccessible> cell;
while ((cell = GetNextCellInRow(row, cell))) {
if (!IsARIASelected(cell))
return NS_OK;
}
}
*aIsSelected = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
@ -390,10 +361,19 @@ nsARIAGridAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
if (IsDefunct())
return NS_ERROR_FAILURE;
NS_ENSURE_ARG(IsValidRowNColumn(aRow, aColumn));
nsCOMPtr<nsIAccessible> row(GetRowAt(aRow));
NS_ENSURE_ARG(row);
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
if (!IsARIASelected(row)) {
nsCOMPtr<nsIAccessible> cell(GetCellInRowAt(row, aColumn));
NS_ENSURE_ARG(cell);
if (!IsARIASelected(cell))
return NS_OK;
}
*aIsSelected = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
@ -405,21 +385,30 @@ nsARIAGridAccessible::GetSelectedCellsCount(PRUint32* aCount)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
PRInt32 colCount = 0;
GetColumns(&colCount);
nsCOMPtr<nsIAccessible> row;
while ((row = GetNextRow(row))) {
if (IsARIASelected(row)) {
(*aCount) += colCount;
continue;
}
nsCOMPtr<nsIAccessible> cell;
while ((cell = GetNextCellInRow(row, cell))) {
if (IsARIASelected(cell))
(*aCount)++;
}
}
return NS_OK;
}
NS_IMETHODIMP
nsARIAGridAccessible::GetSelectedColumnsCount(PRUint32* aCount)
{
NS_ENSURE_ARG_POINTER(aCount);
*aCount = 0;
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
return GetSelectedColumnsArray(aCount);
}
NS_IMETHODIMP
@ -431,8 +420,30 @@ nsARIAGridAccessible::GetSelectedRowsCount(PRUint32* aCount)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIAccessible> row;
while ((row = GetNextRow(row))) {
if (IsARIASelected(row)) {
(*aCount)++;
continue;
}
nsCOMPtr<nsIAccessible> cell = GetNextCellInRow(row);
if (!cell)
continue;
PRBool isRowSelected = PR_TRUE;
do {
if (!IsARIASelected(cell)) {
isRowSelected = PR_FALSE;
break;
}
} while ((cell = GetNextCellInRow(row, cell)));
if (isRowSelected)
(*aCount)++;
}
return NS_OK;
}
NS_IMETHODIMP
@ -446,24 +457,49 @@ nsARIAGridAccessible::GetSelectedCells(PRUint32 *aCellsCount, PRInt32 **aCells)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
PRInt32 rowCount = 0;
GetRows(&rowCount);
PRInt32 colCount = 0;
GetColumns(&colCount);
nsTArray<PRInt32> selCells(rowCount * colCount);
nsCOMPtr<nsIAccessible> row;
for (PRInt32 rowIdx = 0; row = GetNextRow(row); rowIdx++) {
if (IsARIASelected(row)) {
for (PRInt32 colIdx = 0; colIdx < colCount; colIdx++)
selCells.AppendElement(rowIdx * colCount + colIdx);
continue;
}
nsCOMPtr<nsIAccessible> cell;
for (PRInt32 colIdx = 0; cell = GetNextCellInRow(row, cell); colIdx++) {
if (IsARIASelected(cell))
selCells.AppendElement(rowIdx * colCount + colIdx);
}
}
PRUint32 selCellsCount = selCells.Length();
if (!selCellsCount)
return NS_OK;
*aCells = static_cast<PRInt32*>(
nsMemory::Clone(selCells.Elements(), selCellsCount * sizeof(PRInt32)));
NS_ENSURE_TRUE(*aCells, NS_ERROR_OUT_OF_MEMORY);
*aCellsCount = selCellsCount;
return NS_OK;
}
NS_IMETHODIMP
nsARIAGridAccessible::GetSelectedColumns(PRUint32 *aColumnsCount,
PRInt32 **aColumns)
{
NS_ENSURE_ARG_POINTER(aColumnsCount);
*aColumnsCount = 0;
NS_ENSURE_ARG_POINTER(aColumns);
*aColumns = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
return GetSelectedColumnsArray(aColumnsCount, aColumns);
}
NS_IMETHODIMP
@ -477,8 +513,46 @@ nsARIAGridAccessible::GetSelectedRows(PRUint32 *aRowsCount, PRInt32 **aRows)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
PRInt32 rowCount = 0;
GetRows(&rowCount);
if (!rowCount)
return NS_OK;
nsTArray<PRInt32> selRows(rowCount);
nsCOMPtr<nsIAccessible> row;
for (PRInt32 rowIdx = 0; row = GetNextRow(row); rowIdx++) {
if (IsARIASelected(row)) {
selRows.AppendElement(rowIdx);
continue;
}
nsCOMPtr<nsIAccessible> cell = GetNextCellInRow(row);
if (!cell)
continue;
PRBool isRowSelected = PR_TRUE;
do {
if (!IsARIASelected(cell)) {
isRowSelected = PR_FALSE;
break;
}
} while ((cell = GetNextCellInRow(row, cell)));
if (isRowSelected)
selRows.AppendElement(rowIdx);
}
PRUint32 selRowsCount = selRows.Length();
if (!selRowsCount)
return NS_OK;
*aRows = static_cast<PRInt32*>(
nsMemory::Clone(selRows.Elements(), selRowsCount * sizeof(PRInt32)));
NS_ENSURE_TRUE(*aRows, NS_ERROR_OUT_OF_MEMORY);
*aRowsCount = selRowsCount;
return NS_OK;
}
NS_IMETHODIMP
@ -489,8 +563,13 @@ nsARIAGridAccessible::SelectRow(PRInt32 aRow)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIAccessible> row;
for (PRInt32 rowIdx = 0; row = GetNextRow(row); rowIdx++) {
nsresult rv = SetARIASelected(row, rowIdx == aRow);
NS_ENSURE_SUCCESS(rv, rv);
}
return NS_OK;
}
NS_IMETHODIMP
@ -501,20 +580,33 @@ nsARIAGridAccessible::SelectColumn(PRInt32 aColumn)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIAccessible> row;
while ((row = GetNextRow(row))) {
// Unselect all cells in the row.
nsresult rv = SetARIASelected(row, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
// Select cell at the column index.
nsCOMPtr<nsIAccessible> cell = GetCellInRowAt(row, aColumn);
if (cell) {
rv = SetARIASelected(cell, PR_TRUE);
NS_ENSURE_SUCCESS(rv, rv);
}
}
return NS_OK;
}
NS_IMETHODIMP
nsARIAGridAccessible::UnselectRow(PRInt32 aRow)
{
NS_ENSURE_ARG(IsValidRow(aRow));
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIAccessible> row = GetRowAt(aRow);
NS_ENSURE_ARG(row);
return SetARIASelected(row, PR_FALSE);
}
NS_IMETHODIMP
@ -525,8 +617,16 @@ nsARIAGridAccessible::UnselectColumn(PRInt32 aColumn)
if (IsDefunct())
return NS_ERROR_FAILURE;
// XXX: should we rely on aria-selected or DOM selection?
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIAccessible> row;
while ((row = GetNextRow(row))) {
nsCOMPtr<nsIAccessible> cell = GetCellInRowAt(row, aColumn);
if (cell) {
nsresult rv = SetARIASelected(cell, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
}
}
return NS_OK;
}
NS_IMETHODIMP
@ -579,6 +679,228 @@ nsARIAGridAccessible::IsValidRowNColumn(PRInt32 aRow, PRInt32 aColumn)
return aColumn < colCount;
}
already_AddRefed<nsIAccessible>
nsARIAGridAccessible::GetRowAt(PRInt32 aRow)
{
PRInt32 rowIdx = aRow;
nsCOMPtr<nsIAccessible> row(GetNextRow());
while (rowIdx != 0 && (row = GetNextRow(row)))
rowIdx--;
return row.forget();
}
already_AddRefed<nsIAccessible>
nsARIAGridAccessible::GetCellInRowAt(nsIAccessible *aRow, PRInt32 aColumn)
{
PRInt32 colIdx = aColumn;
nsCOMPtr<nsIAccessible> cell(GetNextCellInRow(aRow));
while (colIdx != 0 && (cell = GetNextCellInRow(aRow, cell)))
colIdx--;
return cell.forget();
}
already_AddRefed<nsIAccessible>
nsARIAGridAccessible::GetNextRow(nsIAccessible *aRow)
{
nsCOMPtr<nsIAccessible> nextRow, tmpAcc;
if (!aRow)
GetFirstChild(getter_AddRefs(nextRow));
else
aRow->GetNextSibling(getter_AddRefs(nextRow));
while (nextRow) {
if (nsAccUtils::Role(nextRow) == nsIAccessibleRole::ROLE_ROW)
return nextRow.forget();
nextRow->GetNextSibling(getter_AddRefs(tmpAcc));
tmpAcc.swap(nextRow);
}
return nsnull;
}
already_AddRefed<nsIAccessible>
nsARIAGridAccessible::GetNextCellInRow(nsIAccessible *aRow, nsIAccessible *aCell)
{
if (!aRow)
return nsnull;
nsCOMPtr<nsIAccessible> nextCell, tmpAcc;
if (!aCell)
aRow->GetFirstChild(getter_AddRefs(nextCell));
else
aCell->GetNextSibling(getter_AddRefs(nextCell));
while (nextCell) {
PRUint32 role = nsAccUtils::Role(nextCell);
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
role == nsIAccessibleRole::ROLE_COLUMNHEADER)
return nextCell.forget();
nextCell->GetNextSibling(getter_AddRefs(tmpAcc));
tmpAcc.swap(nextCell);
}
return nsnull;
}
PRBool
nsARIAGridAccessible::IsARIASelected(nsIAccessible *aAccessible)
{
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible);
nsCOMPtr<nsIDOMNode> node;
acc->GetDOMNode(getter_AddRefs(node));
NS_ASSERTION(node, "No DOM node!");
if (node) {
nsCOMPtr<nsIContent> content(do_QueryInterface(node));
if (content->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected,
nsAccessibilityAtoms::_true, eCaseMatters))
return PR_TRUE;
}
return PR_FALSE;
}
nsresult
nsARIAGridAccessible::SetARIASelected(nsIAccessible *aAccessible,
PRBool aIsSelected, PRBool aNotify)
{
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible);
nsCOMPtr<nsIDOMNode> node;
acc->GetDOMNode(getter_AddRefs(node));
NS_ENSURE_STATE(node);
nsCOMPtr<nsIContent> content(do_QueryInterface(node));
nsresult rv = NS_OK;
if (aIsSelected)
rv = content->SetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_selected,
NS_LITERAL_STRING("true"), aNotify);
else
rv = content->UnsetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_selected, aNotify);
NS_ENSURE_SUCCESS(rv, rv);
// No "smart" select/unselect for internal call.
if (!aNotify)
return NS_OK;
// If row or cell accessible was selected then we're able to not bother about
// selection of its cells or its row because our algorithm is row oriented,
// i.e. we check selection on row firstly and then on cells.
if (aIsSelected)
return NS_OK;
PRUint32 role = nsAccUtils::Role(aAccessible);
// If the given accessible is row that was unselected then remove
// aria-selected from cell accessible.
if (role == nsIAccessibleRole::ROLE_ROW) {
nsCOMPtr<nsIAccessible> cell;
while ((cell = GetNextCellInRow(aAccessible, cell))) {
rv = SetARIASelected(cell, PR_FALSE, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
}
return NS_OK;
}
// If the given accessible is cell that was unselected and its row is selected
// then remove aria-selected from row and put aria-selected on
// siblings cells.
if (role == nsIAccessibleRole::ROLE_GRID_CELL ||
role == nsIAccessibleRole::ROLE_ROWHEADER ||
role == nsIAccessibleRole::ROLE_COLUMNHEADER) {
nsCOMPtr<nsIAccessible> row;
aAccessible->GetParent(getter_AddRefs(row));
if (nsAccUtils::Role(row) == nsIAccessibleRole::ROLE_ROW &&
IsARIASelected(row)) {
rv = SetARIASelected(row, PR_FALSE, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessible> cell;
while ((cell = GetNextCellInRow(row, cell))) {
if (cell != aAccessible) {
rv = SetARIASelected(cell, PR_TRUE, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
}
}
}
}
return NS_OK;
}
nsresult
nsARIAGridAccessible::GetSelectedColumnsArray(PRUint32 *aColumnsCount,
PRInt32 **aColumns)
{
NS_ENSURE_ARG_POINTER(aColumnsCount);
*aColumnsCount = 0;
if (aColumns)
*aColumns = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIAccessible> row = GetNextRow();
if (!row)
return NS_OK;
PRInt32 colCount = 0;
GetColumns(&colCount);
if (!colCount)
return NS_OK;
PRInt32 selColCount = colCount;
nsTArray<PRBool> isColSelArray(selColCount);
isColSelArray.AppendElements(selColCount);
for (PRInt32 i = 0; i < selColCount; i++)
isColSelArray[i] = PR_TRUE;
do {
if (IsARIASelected(row))
continue;
PRInt32 colIdx = 0;
nsCOMPtr<nsIAccessible> cell;
for (colIdx = 0; cell = GetNextCellInRow(row, cell); colIdx++) {
if (isColSelArray.SafeElementAt(colIdx, PR_FALSE) &&
!IsARIASelected(cell)) {
isColSelArray[colIdx] = PR_FALSE;
selColCount--;
}
}
} while ((row = GetNextRow(row)));
if (!selColCount)
return NS_OK;
if (!aColumns) {
*aColumnsCount = selColCount;
return NS_OK;
}
*aColumns = static_cast<PRInt32*>(
nsMemory::Alloc(selColCount * sizeof(PRInt32)));
NS_ENSURE_TRUE(*aColumns, NS_ERROR_OUT_OF_MEMORY);
*aColumnsCount = selColCount;
for (PRInt32 colIdx = 0, idx = 0; colIdx < colCount; colIdx++) {
if (isColSelArray[colIdx])
(*aColumns)[idx++] = colIdx;
}
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsARIAGridCellAccessible

View File

@ -59,11 +59,75 @@ public:
NS_DECL_NSIACCESSIBLETABLE
protected:
/**
* Return true if the given row index is valid.
*/
PRBool IsValidRow(PRInt32 aRow);
/**
* Retrn true if the given column index is valid.
*/
PRBool IsValidColumn(PRInt32 aColumn);
/**
* Retrun true if given row and column indexes are valid.
*/
PRBool IsValidRowNColumn(PRInt32 aRow, PRInt32 aColumn);
/**
* Return row accessible at the given row index.
*/
already_AddRefed<nsIAccessible> GetRowAt(PRInt32 aRow);
/**
* Return cell accessible at the given column index in the row.
*/
already_AddRefed<nsIAccessible> GetCellInRowAt(nsIAccessible *aRow,
PRInt32 aColumn);
/**
* Return next row accessible relative given row accessible or first row
* accessible if it is null.
*
* @param aRow [in, optional] row accessible
*/
already_AddRefed<nsIAccessible> GetNextRow(nsIAccessible *aRow = nsnull);
/**
* Return next cell accessible relative given cell accessible or first cell
* in the given row accessible if given cell accessible is null.
*
* @param aRow [in] row accessible
* @param aCell [in, optional] cell accessible
*/
already_AddRefed<nsIAccessible> GetNextCellInRow(nsIAccessible *aRow,
nsIAccessible *aCell = nsnull);
/**
* Return true if the DOM node of given accessible has aria-selected="true"
* attribute.
*/
PRBool IsARIASelected(nsIAccessible *aAccessible);
/**
* Set aria-selected attribute value on DOM node of the given accessible.
*
* @param aAccessible [in] accessible
* @param aIsSelected [in] new value of aria-selected attribute
* @param aNotify [in, optional] specifies if DOM should be notified
* about attribute change (used internally).
*/
nsresult SetARIASelected(nsIAccessible *aAccessible, PRBool aIsSelected,
PRBool aNotify = PR_TRUE);
/**
* Helper method for GetSelectedColumnsCount and GetSelectedColumns.
*/
nsresult GetSelectedColumnsArray(PRUint32 *aColumnsCount,
PRInt32 **aColumns = nsnull);
};
/**
* Accessible for ARIA gridcell and rowheader/columnheader.
*/

View File

@ -63,6 +63,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"alert",
nsIAccessibleRole::ROLE_ALERT,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -72,6 +73,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"alertdialog",
nsIAccessibleRole::ROLE_DIALOG,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -81,6 +83,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"application",
nsIAccessibleRole::ROLE_APPLICATION,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -90,6 +93,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"article",
nsIAccessibleRole::ROLE_DOCUMENT,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -99,6 +103,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"button",
nsIAccessibleRole::ROLE_PUSHBUTTON,
kUseMapRole,
eNoValue,
eClickAction,
eNoLiveAttr,
@ -110,6 +115,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"checkbox",
nsIAccessibleRole::ROLE_CHECKBUTTON,
kUseMapRole,
eNoValue,
eCheckUncheckAction,
eNoLiveAttr,
@ -122,6 +128,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"columnheader",
nsIAccessibleRole::ROLE_COLUMNHEADER,
kUseMapRole,
eNoValue,
eSortAction,
eNoLiveAttr,
@ -134,6 +141,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"combobox",
nsIAccessibleRole::ROLE_COMBOBOX,
kUseMapRole,
eHasValueMinMax,
eOpenCloseAction,
eNoLiveAttr,
@ -145,6 +153,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"dialog",
nsIAccessibleRole::ROLE_DIALOG,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -154,6 +163,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"document",
nsIAccessibleRole::ROLE_DOCUMENT,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -163,6 +173,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"grid",
nsIAccessibleRole::ROLE_TABLE,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -174,6 +185,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"gridcell",
nsIAccessibleRole::ROLE_GRID_CELL,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -186,6 +198,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"group",
nsIAccessibleRole::ROLE_GROUPING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -195,6 +208,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"heading",
nsIAccessibleRole::ROLE_HEADING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -204,6 +218,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"img",
nsIAccessibleRole::ROLE_GRAPHIC,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -213,6 +228,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"label",
nsIAccessibleRole::ROLE_LABEL,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -222,6 +238,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"link",
nsIAccessibleRole::ROLE_LINK,
kUseMapRole,
eNoValue,
eJumpAction,
eNoLiveAttr,
@ -231,6 +248,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"list",
nsIAccessibleRole::ROLE_LIST,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -241,6 +259,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"listbox",
nsIAccessibleRole::ROLE_LISTBOX,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -252,6 +271,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"listitem",
nsIAccessibleRole::ROLE_LISTITEM,
kUseMapRole,
eNoValue,
eNoAction, // XXX: should depend on state, parent accessible
eNoLiveAttr,
@ -266,6 +286,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"log",
nsIAccessibleRole::ROLE_NOTHING,
kUseNativeRole,
eNoValue,
eNoAction,
ePoliteLiveAttr,
@ -275,6 +296,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"marquee",
nsIAccessibleRole::ROLE_NOTHING,
kUseNativeRole,
eNoValue,
eNoAction,
eOffLiveAttr,
@ -284,6 +306,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"math",
nsIAccessibleRole::ROLE_FLAT_EQUATION,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -293,6 +316,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"menu",
nsIAccessibleRole::ROLE_MENUPOPUP,
kUseMapRole,
eNoValue,
eNoAction, // XXX: technically accessibles of menupopup role haven't
// any action, but menu can be open or close.
@ -303,6 +327,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"menubar",
nsIAccessibleRole::ROLE_MENUBAR,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -312,6 +337,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"menuitem",
nsIAccessibleRole::ROLE_MENUITEM,
kUseMapRole,
eNoValue,
eClickAction,
eNoLiveAttr,
@ -324,6 +350,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"menuitemcheckbox",
nsIAccessibleRole::ROLE_CHECK_MENU_ITEM,
kUseMapRole,
eNoValue,
eClickAction,
eNoLiveAttr,
@ -335,6 +362,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"menuitemradio",
nsIAccessibleRole::ROLE_RADIO_MENU_ITEM,
kUseMapRole,
eNoValue,
eClickAction,
eNoLiveAttr,
@ -345,6 +373,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"option",
nsIAccessibleRole::ROLE_OPTION,
kUseMapRole,
eNoValue,
eSelectAction,
eNoLiveAttr,
@ -359,6 +388,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"presentation",
nsIAccessibleRole::ROLE_NOTHING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -368,6 +398,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"progressbar",
nsIAccessibleRole::ROLE_PROGRESSBAR,
kUseMapRole,
eHasValueMinMax,
eNoAction,
eNoLiveAttr,
@ -377,6 +408,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"radio",
nsIAccessibleRole::ROLE_RADIOBUTTON,
kUseMapRole,
eNoValue,
eSelectAction,
eNoLiveAttr,
@ -387,6 +419,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"radiogroup",
nsIAccessibleRole::ROLE_GROUPING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -396,6 +429,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"region",
nsIAccessibleRole::ROLE_PANE,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -405,6 +439,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"row",
nsIAccessibleRole::ROLE_ROW,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -416,6 +451,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"rowheader",
nsIAccessibleRole::ROLE_ROWHEADER,
kUseMapRole,
eNoValue,
eSortAction,
eNoLiveAttr,
@ -428,6 +464,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"section",
nsIAccessibleRole::ROLE_SECTION,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -437,6 +474,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"separator",
nsIAccessibleRole::ROLE_SEPARATOR,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -446,6 +484,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"slider",
nsIAccessibleRole::ROLE_SLIDER,
kUseMapRole,
eHasValueMinMax,
eNoAction,
eNoLiveAttr,
@ -456,6 +495,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"spinbutton",
nsIAccessibleRole::ROLE_SPINBUTTON,
kUseMapRole,
eHasValueMinMax,
eNoAction,
eNoLiveAttr,
@ -466,6 +506,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"status",
nsIAccessibleRole::ROLE_STATUSBAR,
kUseMapRole,
eNoValue,
eNoAction,
ePoliteLiveAttr,
@ -475,6 +516,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"tab",
nsIAccessibleRole::ROLE_PAGETAB,
kUseMapRole,
eNoValue,
eSwitchAction,
eNoLiveAttr,
@ -484,6 +526,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"tablist",
nsIAccessibleRole::ROLE_PAGETABLIST,
kUseMapRole,
eNoValue,
eNoAction,
ePoliteLiveAttr,
@ -493,6 +536,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"tabpanel",
nsIAccessibleRole::ROLE_PROPERTYPAGE,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -502,6 +546,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"textbox",
nsIAccessibleRole::ROLE_ENTRY,
kUseMapRole,
eNoValue,
eActivateAction,
eNoLiveAttr,
@ -516,6 +561,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"timer",
nsIAccessibleRole::ROLE_NOTHING,
kUseNativeRole,
eNoValue,
eNoAction,
eOffLiveAttr,
@ -525,6 +571,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"toolbar",
nsIAccessibleRole::ROLE_TOOLBAR,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -534,6 +581,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"tooltip",
nsIAccessibleRole::ROLE_TOOLTIP,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -543,6 +591,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"tree",
nsIAccessibleRole::ROLE_OUTLINE,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -554,6 +603,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"treegrid",
nsIAccessibleRole::ROLE_TREE_TABLE,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -565,6 +615,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{
"treeitem",
nsIAccessibleRole::ROLE_OUTLINEITEM,
kUseMapRole,
eNoValue,
eActivateAction, // XXX: should expose second 'expand/collapse' action based
// on states
@ -584,6 +635,7 @@ PRUint32 nsARIAMap::gWAIRoleMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIRoleMap);
nsRoleMapEntry nsARIAMap::gLandmarkRoleMap = {
"",
nsIAccessibleRole::ROLE_NOTHING,
kUseNativeRole,
eNoValue,
eNoAction,
eNoLiveAttr,
@ -594,6 +646,7 @@ nsRoleMapEntry nsARIAMap::gLandmarkRoleMap = {
nsRoleMapEntry nsARIAMap::gEmptyRoleMap = {
"",
nsIAccessibleRole::ROLE_NOTHING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,

View File

@ -72,6 +72,10 @@ enum ELiveAttrRule
ePoliteLiveAttr
};
// Role mapping rule
const PRBool kUseMapRole = PR_TRUE;
const PRBool kUseNativeRole = PR_FALSE;
// ARIA attribute characteristic masks, grow as needed
/**
@ -119,6 +123,9 @@ struct nsRoleMapEntry
// Role mapping rule: maps to this nsIAccessibleRole
PRUint32 role;
// Role rule: whether to use mapped role or native semantics
PRBool roleRule;
// Value mapping rule: how to compute nsIAccessible value
EValueRule valueRule;

View File

@ -558,6 +558,10 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame *aFrame,
tag == nsAccessibilityAtoms::q) {
return CreateHyperTextAccessible(aFrame, aAccessible);
}
else if (tag == nsAccessibilityAtoms::tr) {
*aAccessible = new nsEnumRoleAccessible(aNode, aWeakShell,
nsIAccessibleRole::ROLE_ROW);
}
else if (nsCoreUtils::IsHTMLTableHeader(content)) {
*aAccessible = new nsHTMLTableHeaderAccessible(aNode, aWeakShell);
}

View File

@ -1608,8 +1608,12 @@ NS_IMETHODIMP
nsAccessible::GetRole(PRUint32 *aRole)
{
NS_ENSURE_ARG_POINTER(aRole);
*aRole = nsIAccessibleRole::ROLE_NOTHING;
if (IsDefunct())
return NS_ERROR_FAILURE;
if (mRoleMapEntry) {
*aRole = mRoleMapEntry->role;
@ -1651,21 +1655,12 @@ nsAccessible::GetRole(PRUint32 *aRole)
*aRole = nsIAccessibleRole::ROLE_COMBOBOX_OPTION;
}
// gLandmarkRoleMap: can use role of accessible class impl
// gEmptyRoleMap and all others: cannot use role of accessible class impl
if (mRoleMapEntry != &nsARIAMap::gLandmarkRoleMap) {
// We can now expose ROLE_NOTHING when there is a role map entry or used
// role is nothing, which
// will cause ATK to use ROLE_UNKNOWN and MSAA to use a BSTR role with
// the ARIA role or element's tag. In either case the AT can also use
// the object attributes tag and xml-roles to find out more.
// We are done if the mapped role trumps native semantics
if (mRoleMapEntry->roleRule == kUseMapRole)
return NS_OK;
}
}
return mDOMNode ?
GetRoleInternal(aRole) :
NS_ERROR_FAILURE; // Node already shut down
return GetRoleInternal(aRole);
}
NS_IMETHODIMP

View File

@ -76,15 +76,19 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsAccEvent)
// nsAccEvent. Constructors
nsAccEvent::nsAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible,
PRBool aIsAsynch, EEventRule aEventRule):
mEventType(aEventType), mAccessible(aAccessible), mEventRule(aEventRule)
PRBool aIsAsynch, EEventRule aEventRule)
: mEventType(aEventType)
, mEventRule(aEventRule)
, mAccessible(aAccessible)
{
CaptureIsFromUserInput(aIsAsynch);
}
nsAccEvent::nsAccEvent(PRUint32 aEventType, nsIDOMNode *aDOMNode,
PRBool aIsAsynch, EEventRule aEventRule):
mEventType(aEventType), mDOMNode(aDOMNode), mEventRule(aEventRule)
PRBool aIsAsynch, EEventRule aEventRule)
: mEventType(aEventType)
, mEventRule(aEventRule)
, mDOMNode(aDOMNode)
{
CaptureIsFromUserInput(aIsAsynch);
}

View File

@ -380,10 +380,12 @@ NS_IMETHODIMP nsDocAccessible::TakeFocus()
if (document) {
// focus the document
nsCOMPtr<nsIDOMElement> newFocus;
fm->MoveFocus(document->GetWindow(), nsnull, nsIFocusManager::MOVEFOCUS_ROOT, 0,
getter_AddRefs(newFocus));
return fm->MoveFocus(document->GetWindow(), nsnull,
nsIFocusManager::MOVEFOCUS_ROOT, 0,
getter_AddRefs(newFocus));
}
}
return NS_ERROR_FAILURE;
}
// ------- nsIAccessibleDocument Methods (5) ---------------
@ -1283,9 +1285,16 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
return;
}
if (aAttribute == nsAccessibilityAtoms::aria_valuenow) {
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
targetNode);
// Fire value change event whenever aria-valuetext is changed, or
// when aria-valuenow is changed and aria-valuetext is empty
if (aAttribute == nsAccessibilityAtoms::aria_valuetext ||
(aAttribute == nsAccessibilityAtoms::aria_valuenow &&
(!aContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_valuetext) ||
aContent->AttrValueIs(kNameSpaceID_None,
nsAccessibilityAtoms::aria_valuetext, nsAccessibilityAtoms::_empty,
eCaseMatters)))) {
FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE, targetNode);
return;
}

View File

@ -75,7 +75,8 @@ nsTextEquivUtils::GetNameFromSubtree(nsIAccessible *aAccessible,
nsAutoString name;
AppendFromAccessibleChildren(aAccessible, &name);
name.CompressWhitespace();
aName = name;
if (!IsWhitespaceString(name))
aName = name;
}
}
@ -419,6 +420,27 @@ nsTextEquivUtils::AppendString(nsAString *aString,
return PR_TRUE;
}
PRBool
nsTextEquivUtils::IsWhitespaceString(const nsSubstring& aString)
{
nsSubstring::const_char_iterator iterBegin, iterEnd;
aString.BeginReading(iterBegin);
aString.EndReading(iterEnd);
while (iterBegin != iterEnd && IsWhitespace(*iterBegin))
++iterBegin;
return iterBegin == iterEnd;
}
PRBool
nsTextEquivUtils::IsWhitespace(PRUnichar aChar)
{
return aChar == ' ' || aChar == '\n' ||
aChar == '\r' || aChar == '\t' || aChar == 0xa0;
}
////////////////////////////////////////////////////////////////////////////////
// Name rules to role map.

View File

@ -159,6 +159,18 @@ private:
static PRBool AppendString(nsAString *aString,
const nsAString& aTextEquivalent);
/**
* Returns true if the given string is empty or contains whitespace symbols
* only. In contrast to nsWhitespaceTokenizer class it takes into account
* non-breaking space (0xa0).
*/
static PRBool IsWhitespaceString(const nsSubstring& aString);
/**
* Returns true if the given character is whitespace symbol.
*/
static PRBool IsWhitespace(PRUnichar aChar);
/**
* Map array from roles to name rules (constants of ETextEquivRule).
*/

View File

@ -1237,7 +1237,7 @@ NS_IMETHODIMP nsHTMLTableAccessible::GetDescription(nsAString& aDescription)
return NS_OK;
}
PRBool nsHTMLTableAccessible::HasDescendant(char *aTagName, PRBool aAllowEmpty)
PRBool nsHTMLTableAccessible::HasDescendant(const char *aTagName, PRBool aAllowEmpty)
{
nsCOMPtr<nsIDOMElement> tableElt(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(tableElt, PR_FALSE);

View File

@ -210,7 +210,7 @@ protected:
virtual void CacheChildren();
nsresult GetTableNode(nsIDOMNode **_retval);
nsresult GetTableLayout(nsITableLayout **aLayoutObject);
PRBool HasDescendant(char *aTagName, PRBool aAllowEmpty = PR_TRUE);
PRBool HasDescendant(const char *aTagName, PRBool aAllowEmpty = PR_TRUE);
#ifdef SHOW_LAYOUT_HEURISTIC
nsAutoString mLayoutHeuristic;
#endif

View File

@ -203,8 +203,13 @@ __try {
if (widget) {
hwnd = (HWND)widget->GetNativeData(NS_NATIVE_WINDOW);
NS_ASSERTION(hwnd, "No window handle for window");
nsIViewManager* viewManager = view->GetViewManager();
if (!viewManager)
return E_UNEXPECTED;
nsIView *rootView;
view->GetViewManager()->GetRootView(rootView);
viewManager->GetRootView(rootView);
if (rootView == view) {
// If the current object has a widget but was created by an
// outer object with its own outer window, then

View File

@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = test_accessibility
ifdef ENABLE_TESTS
DIRS += mochitest
endif
DIRS = mochitest
include $(topsrcdir)/config/rules.mk

View File

@ -75,6 +75,7 @@ _TEST_FILES =\
test_aria_role_article.html \
test_aria_role_equation.html \
test_aria_role_grid.html \
test_aria_roles.html \
test_aria_token_attrs.html \
test_bug420863.html \
$(warning test_childAtPoint.html temporarily disabled) \
@ -83,11 +84,13 @@ _TEST_FILES =\
test_descr.html \
test_elm_filectrl.html \
$(warning test_elm_media.html temporarily disabled) \
test_elm_table.html \
test_elm_txtcntnr.html \
test_events_caretmove.html \
test_events_focus.xul \
test_events_mutation.html \
test_events_tree.xul \
test_events_valuechange.html \
test_groupattrs.xul \
test_groupattrs.html \
test_name.html \
@ -125,6 +128,7 @@ _TEST_FILES =\
test_table_4.html \
$(warning test_table_indexes.html temporarily disabled) \
test_table_indexes_ariagrid.html \
test_table_sels_ariagrid.html \
test_textattrs.html \
test_textboxes.html \
test_textboxes.xul \

View File

@ -60,6 +60,7 @@ const STATE_HASPOPUP = nsIAccessibleStates.STATE_HASPOPUP;
const STATE_LINKED = nsIAccessibleStates.STATE_LINKED;
const STATE_MIXED = nsIAccessibleStates.STATE_MIXED;
const STATE_MULTISELECTABLE = nsIAccessibleStates.STATE_MULTISELECTABLE;
const STATE_OFFSCREEN = nsIAccessibleStates.STATE_OFFSCREEN;
const STATE_PRESSED = nsIAccessibleStates.STATE_PRESSED;
const STATE_READONLY = nsIAccessibleStates.STATE_READONLY;
const STATE_SELECTABLE = nsIAccessibleStates.STATE_SELECTABLE;

View File

@ -90,7 +90,7 @@ const INVOKER_ACTION_FAILED = 1;
* Creates event queue for the given event type. The queue consists of invoker
* objects, each of them generates the event of the event type. When queue is
* started then every invoker object is asked to generate event after timeout.
* When event is caught then current invoker object is asked to check wether
* When event is caught then current invoker object is asked to check whether
* event was handled correctly.
*
* Invoker interface is:

View File

@ -2,6 +2,7 @@
// Role constants
const ROLE_ALERT = nsIAccessibleRole.ROLE_ALERT;
const ROLE_APPLICATION = nsIAccessibleRole.ROLE_APPLICATION;
const ROLE_CELL = nsIAccessibleRole.ROLE_CELL;
const ROLE_CHROME_WINDOW = nsIAccessibleRole.ROLE_CHROME_WINDOW;
const ROLE_COMBOBOX = nsIAccessibleRole.ROLE_COMBOBOX;

View File

@ -21,13 +21,13 @@ function testTableIndexes(aIdentifier, aLen, aRowIdxes, aColIdxes)
try {
row = tableAcc.getRowAtIndex(i);
} catch (e) {
ok(false, id + ": can't get row index for cell index " + i + ".");
ok(false, id + ": can't get row index for cell index " + i + "," + e);
}
try {
column = tableAcc.getColumnAtIndex(i);
} catch (e) {
ok(false, id + ": can't get column index for cell index " + i + ".");
ok(false, id + ": can't get column index for cell index " + i + "," + e);
}
try {
@ -35,7 +35,7 @@ function testTableIndexes(aIdentifier, aLen, aRowIdxes, aColIdxes)
} catch (e) {
ok(false,
id + ": can't get cell index by row index " + aRowIdxes[i] +
" and column index: " + aColIdxes[i] + ".");
" and column index: " + aColIdxes[i] + ", " + e);
}
is(row, aRowIdxes[i], id + ": row for index " + i +" is nor correct");
@ -69,3 +69,214 @@ function testTableIndexes(aIdentifier, aLen, aRowIdxes, aColIdxes)
}
}
}
/**
* Test table getters selection methods.
*
* @param aIdentifier [in] table accessible identifier
* @param aCellsArray [in] two dimensional array (row X columns) of selected
* cells states.
* @param aMsg [in] text appended before every message
*/
function testTableSelection(aIdentifier, aCellsArray, aMsg)
{
var msg = aMsg ? aMsg : "";
var acc = getAccessible(aIdentifier, [nsIAccessibleTable]);
if (!acc)
return;
var rowsCount = aCellsArray.length;
var colsCount = aCellsArray[0].length;
// Columns selection tests.
var selCols = new Array();
// isColumnSelected test
for (var colIdx = 0; colIdx < colsCount; colIdx++) {
var isColSelected = true;
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++) {
if (!aCellsArray[rowIdx][colIdx]) {
isColSelected = false;
break;
}
}
is(acc.isColumnSelected(colIdx), isColSelected,
msg + "Wrong selection state of " + colIdx + " column for " +
prettyName(aIdentifier));
if (isColSelected)
selCols.push(colIdx);
}
// selectedColsCount test
is(acc.selectedColumnsCount, selCols.length,
msg + "Wrong count of selected columns for " + prettyName(aIdentifier));
// getSelectedColumns test
var actualSelColsCountObj = { value: null };
var actualSelCols = acc.getSelectedColumns(actualSelColsCountObj);
var actualSelColsCount = actualSelColsCountObj.value;
is (actualSelColsCount, selCols.length,
msg + "Wrong count of selected columns for " + prettyName(aIdentifier) +
"from getSelectedColumns.");
for (var i = 0; i < actualSelColsCount; i++) {
is (actualSelCols[i], selCols[i],
msg + "Column at index " + selCols[i] + " should be selected.");
}
// Rows selection tests.
var selRows = new Array();
// isRowSelected test
var selRowsCount = 0;
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++) {
var isRowSelected = true;
for (var colIdx = 0; colIdx < colsCount; colIdx++) {
if (!aCellsArray[rowIdx][colIdx]) {
isRowSelected = false;
break;
}
}
is(acc.isRowSelected(rowIdx), isRowSelected,
msg + "Wrong selection state of " + rowIdx + " row for " +
prettyName(aIdentifier));
if (isRowSelected)
selRows.push(rowIdx);
}
// selectedRowsCount test
is(acc.selectedRowsCount, selRows.length,
msg + "Wrong count of selected rows for " + prettyName(aIdentifier));
// getSelectedRows test
var actualSelRowsCountObj = { value: null };
var actualSelRows = acc.getSelectedRows(actualSelRowsCountObj);
var actualSelRowsCount = actualSelRowsCountObj.value;
is (actualSelRowsCount, selRows.length,
msg + "Wrong count of selected rows for " + prettyName(aIdentifier) +
"from getSelectedRows.");
for (var i = 0; i < actualSelRowsCount; i++) {
is (actualSelRows[i], selRows[i],
msg + "Row at index " + selRows[i] + " should be selected.");
}
// Cells selection tests.
var selCells = new Array();
// isCellSelected test
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++) {
for (var colIdx = 0; colIdx < colsCount; colIdx++) {
is(acc.isCellSelected(rowIdx, colIdx), aCellsArray[rowIdx][colIdx],
msg + "Wrong selection state of cell at " + rowIdx + " row and " +
colIdx + " column for " + prettyName(aIdentifier));
if (aCellsArray[rowIdx][colIdx])
selCells.push(acc.getIndexAt(rowIdx, colIdx));
}
}
// selectedCellsCount tests
is(acc.selectedCellsCount, selCells.length,
msg + "Wrong count of selected cells for " + prettyName(aIdentifier));
// getSelectedCells test
var actualSelCellsCountObj = { value: null };
var actualSelCells = acc.getSelectedCells(actualSelCellsCountObj);
var actualSelCellsCount = actualSelCellsCountObj.value;
is (actualSelCellsCount, selCells.length,
msg + "Wrong count of selected cells for " + prettyName(aIdentifier) +
"from getSelectedCells.");
for (var i = 0; i < actualSelCellsCount; i++) {
is (actualSelCells[i], selCells[i],
msg + "Cell at index " + selCells[i] + " should be selected.");
}
}
/**
* Test unselectColumn method of accessible table.
*/
function testUnselectTableColumn(aIdentifier, aColIdx, aCellsArray)
{
var acc = getAccessible(aIdentifier, [nsIAccessibleTable]);
if (!acc)
return;
var rowsCount = aCellsArray.length;
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++)
aCellsArray[rowIdx][aColIdx] = false;
acc.unselectColumn(aColIdx);
testTableSelection(aIdentifier, aCellsArray,
"Unselect " + aColIdx + " column: ");
}
/**
* Test selectColumn method of accessible table.
*/
function testSelectTableColumn(aIdentifier, aColIdx, aCellsArray)
{
var acc = getAccessible(aIdentifier, [nsIAccessibleTable]);
if (!acc)
return;
var rowsCount = aCellsArray.length;
var colsCount = aCellsArray[0].length;
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++) {
for (var colIdx = 0; colIdx < colsCount; colIdx++)
aCellsArray[rowIdx][colIdx] = (colIdx == aColIdx);
}
acc.selectColumn(aColIdx);
testTableSelection(aIdentifier, aCellsArray,
"Select " + aColIdx + " column: ");
}
/**
* Test unselectRow method of accessible table.
*/
function testUnselectTableRow(aIdentifier, aRowIdx, aCellsArray)
{
var acc = getAccessible(aIdentifier, [nsIAccessibleTable]);
if (!acc)
return;
var colsCount = aCellsArray[0].length;
for (var colIdx = 0; colIdx < colsCount; colIdx++)
aCellsArray[aRowIdx][colIdx] = false;
acc.unselectRow(aRowIdx);
testTableSelection(aIdentifier, aCellsArray,
"Unselect " + aRowIdx + " row: ");
}
/**
* Test selectRow method of accessible table.
*/
function testSelectTableRow(aIdentifier, aRowIdx, aCellsArray)
{
var acc = getAccessible(aIdentifier, [nsIAccessibleTable]);
if (!acc)
return;
var rowsCount = aCellsArray.length;
var colsCount = aCellsArray[0].length;
for (var rowIdx = 0; rowIdx < rowsCount; rowIdx++) {
for (var colIdx = 0; colIdx < colsCount; colIdx++)
aCellsArray[rowIdx][colIdx] = (rowIdx == aRowIdx);
}
acc.selectRow(aRowIdx);
testTableSelection(aIdentifier, aCellsArray,
"Select " + aRowIdx + " row: ");
}

View File

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=481114
-->
<head>
<title>Test weak ARIA roles</title>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
<script type="application/javascript">
function doTest()
{
// Note:
// The phrase "weak foo" here means that there is no good foo-to-platform
// role mapping. Similarly "strong foo" means there is a good foo-to-
// platform role mapping.
// weak roles that are forms of "live regions"
testRole("log_table", ROLE_TABLE);
testRole("marquee_h1", ROLE_HEADING);
testRole("timer_div", ROLE_SECTION);
// strong landmark
testRole("application", ROLE_APPLICATION);
// weak landmarks
var weak_landmarks = ["banner", "complementary", "contentinfo",
"main", "navigation", "search"];
for (l in weak_landmarks)
testRole(weak_landmarks[l], ROLE_SECTION);
// test gEmptyRoleMap
testRole("cell", ROLE_NOTHING);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=481114">Mozilla Bug 481114</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<!-- "live" roles -->
<table role="log" id="log_table">
<tr><td>Table based log</td></tr>
</table>
<h1 role="marquee" id="marquee_h1">marquee</h1>
<div role="timer" id="timer_div">timer</div>
<!-- landmarks -->
<div role="application" id="application">application</div>
<div role="banner" id="banner">banner</div>
<div role="complementary" id="complementary">complementary</div>
<div role="contentinfo" id="contentinfo">contentinfo</div>
<div role="main" id="main">main</div>
<div role="navigation" id="navigation">navigation</div>
<div role="search" id="search">search</div>
<!-- test gEmptyRoleMap -->
<table role="label">
<tr>
<td id="cell">cell</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=483573
-->
<head>
<title>File Input Control tests</title>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
<script type="application/javascript">
function doTest()
{
var accTree = {
role: ROLE_TABLE, // table
children: [
{
role: ROLE_TEXT_CONTAINER, // thead
children: [
{
role: ROLE_ROW,
children: [
{
role: ROLE_COLUMNHEADER
},
{
role: ROLE_COLUMNHEADER
}
]
}
]
},
{
role: ROLE_TEXT_CONTAINER, // tbody
children: [
{
role: ROLE_ROW,
children: [
{
role: ROLE_CELL
},
{
role: ROLE_CELL
}
]
}
]
},
{
role: ROLE_TEXT_CONTAINER, // tfoot
children: [
{
role: ROLE_ROW,
children: [
{
role: ROLE_COLUMNHEADER
},
{
role: ROLE_COLUMNHEADER
}
]
}
]
}
]
};
if (LINUX)
todo(false, "No tests on linux because of different hierarchies.");
else
testAccessibleTree("table", accTree);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
title="create accessibles for HTML tr"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=493695">Mozilla Bug 493695</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<table id="table">
<thead>
<tr>
<th>col1</th><th>col2</th>
</tr>
</thead>
<tbody>
<tr>
<td>cell1</td><td>cell2</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>col1</th><th>col2</th>
</tr>
</tfoot>
</table>
</body>
</html>

View File

@ -206,7 +206,7 @@
this.getID = function removeFromDOM_getID()
{
return aNodeOrID + " remove from DOM.";
return prettyName(aNodeOrID) + " remove from DOM.";
}
if (aTargetsFunc && (eventTypes & kHideEvent))

View File

@ -0,0 +1,109 @@
<html>
<head>
<title>Accessible value change events testing</title>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/events.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/value.js"></script>
<script type="application/javascript">
/**
* Do tests.
*/
var gQueue = null;
// Value change invoker
function changeValue(aNodeOrID, aValuenow, aValuetext)
{
this.DOMNode = getNode(aNodeOrID);
this.invoke = function changeValue_invoke() {
// Note: this should not fire an EVENT_VALUE_CHANGE when aria-valuetext
// is not empty
if (aValuenow != undefined)
this.DOMNode.setAttribute("aria-valuenow", aValuenow);
// Note: this should always fire an EVENT_VALUE_CHANGE
if (aValuetext != undefined)
this.DOMNode.setAttribute("aria-valuetext", aValuetext);
}
this.check = function changeValue_check() {
var acc = getAccessible(aNodeOrID, [nsIAccessibleValue]);
if (!acc)
return;
// Note: always test against valuetext first because the existence of
// aria-valuetext takes precedence over aria-valuenow in gecko.
is(acc.value, (aValuetext != undefined)? aValuetext : aValuenow,
"Wrong value of " + prettyName(aNodeOrID));
}
this.getID = function changeValue_getID() {
return prettyName(aNodeOrID) + " value changed";
}
}
function doTests()
{
// Test initial values
testValue("slider_vn", "5", 5, 0, 1000, 0);
testValue("slider_vnvt", "plain", 0, 0, 5, 0);
testValue("slider_vt", "hi", 0, 0, 3, 0);
// Test value change events
gQueue = new eventQueue(nsIAccessibleEvent.EVENT_VALUE_CHANGE);
gQueue.push(new changeValue("slider_vn", "6", undefined));
gQueue.push(new changeValue("slider_vt", undefined, "hey!"));
gQueue.push(new changeValue("slider_vnvt", "3", "sweet"));
gQueue.invoke(); // Will call SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTests);
</script>
</head>
<body>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=478032"
title=" Fire delayed value changed event for aria-valuetext changes">
Mozilla Bug 478032
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<div id="eventdump"></div>
<!-- ARIA sliders -->
<div id="slider_vn" role="slider" aria-valuenow="5"
aria-valuemin="0" aria-valuemax="1000">slider</div>
<div id="slider_vt" role="slider" aria-valuetext="hi"
aria-valuemin="0" aria-valuemax="3">greeting slider</div>
<div id="slider_vnvt" role="slider" aria-valuenow="0" aria-valuetext="plain"
aria-valuemin="0" aria-valuemax="5">sweetness slider</div>
</body>
</html>

View File

@ -92,6 +92,9 @@
// Gets the name from html:input value, ignore @title attribute on input
testName("from_input_ignoretitle", "Custom country");
// Gets the name from @title, ignore whitespace content
testName("from_label_ignore_ws_subtree", "about");
//////////////////////////////////////////////////////////////////////////
// label element
@ -303,6 +306,9 @@
value="Custom country"
title="Input your country of origin"/ >
<!-- no name from subtree because it holds whitespaces only -->
<a id="from_label_ignore_ws_subtree" href="about:" title="about">&nbsp;&nbsp; </a>
<!-- label element, label contains the button -->
<label>text<button id="btn_label_inside">10</button>text</label>
<br/>

View File

@ -6,6 +6,16 @@
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<style type="text/css">
.offscreen {
position: absolute;
left: -5000px;
top: -5000px;
height: 100px;
width: 100px;
}
</style>
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
@ -40,12 +50,15 @@
// disabled, too. See bug 429285.
testStatesInSubtree("group", STATE_UNAVAILABLE);
testStates("aria_offscreen_textbox", STATE_OFFSCREEN);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
</script>
</head>
<body>
@ -91,5 +104,9 @@
</div>
<div role="slider" tabindex="0">A slider</div>
</div>
<div id="offscreen_log" role="log" class="offscreen">
<div id="aria_offscreen_textbox" role="textbox" aria-readonly="true">This text should be offscreen</div>
</div>
</body>
</html>

View File

@ -60,7 +60,7 @@ function doTest()
accNotCreated = (!isAccessible("tr"));
ok(!accNotCreated, "missed tr accessible");
testRole(accTable4, ROLE_NOTHING); // XXX: it's a bug, should be ROLE_TABLE
testRole(accTable4, ROLE_TABLE);
is(accTable4.cellRefAt(0,0).firstChild.name, "cell0", "wrong cell");
is(accTable4.cellRefAt(0,1).firstChild.name, "cell1", "wrong cell");

View File

@ -31,7 +31,7 @@
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
addA11yLoadEvent(doTest);
</script>
</head>
<body>

View File

@ -0,0 +1,92 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=410052
-->
<head>
<title>Table indexes chrome tests</title>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/table.js"></script>
<script type="application/javascript">
function doTest()
{
//////////////////////////////////////////////////////////////////////////
// table
var cellsArray =
[
[ true, true, false, true],
[ true, false, true, true],
[ true, false, false, true],
[ true, true, true, true],
[ true, true, true, true]
];
testTableSelection("table", cellsArray);
testUnselectTableColumn("table", 3, cellsArray);
testUnselectTableRow("table", 3, cellsArray);
testSelectTableColumn("table", 0, cellsArray);
testSelectTableRow("table", 0, cellsArray);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
title="implement nsIAccessibleTable selection methods for ARIA grids"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=410052">Mozilla Bug 410052</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<div role="grid" id="table">
<div role="row">
<span role="gridcell" aria-selected="true">cell1</span>
<span role="gridcell" aria-selected="true">cell2</span>
<span role="gridcell">cell3</span>
<span role="gridcell" aria-selected="true">cell4</span>
</div>
<div role="row">
<span role="gridcell" aria-selected="true">cell5</span>
<span role="gridcell">cell6</span>
<span role="gridcell" aria-selected="true">cell7</span>
<span role="gridcell" aria-selected="true">cell8</span>
</div>
<div role="row">
<span role="gridcell" aria-selected="true">cell9</span>
<span role="gridcell">cell10</span>
<span role="gridcell">cell11</span>
<span role="gridcell" aria-selected="true">cell12</span>
</div>
<div role="row" aria-selected="true">
<span role="gridcell">cell13</span>
<span role="gridcell">cell14</span>
<span role="gridcell">cell15</span>
<span role="gridcell">cell16</span>
</div>
<div role="row">
<span role="gridcell" aria-selected="true">cell17</span>
<span role="gridcell" aria-selected="true">cell18</span>
<span role="gridcell" aria-selected="true">cell19</span>
<span role="gridcell" aria-selected="true">cell20</span>
</div>
</div>
</body>
</html>

View File

@ -452,6 +452,7 @@
<menupopup id="goPopup"
type="places"
onpopupshowing="HistoryMenu.onPopupShowing(this);"
onpopuphidden="HistoryMenu.onPopupHidden(this);"
place="place:redirectsMode=2&amp;sort=4&amp;maxResults=10"
tooltip="btTooltip">
<menuitem id="historyMenuBack"

View File

@ -600,13 +600,21 @@ var HistoryMenu = {
document.getElementById("endHistorySeparator").hidden =
resultNode.childCount == 0;
if (!wasOpen)
resultNode.containerOpen = false;
// HistoryMenu.toggleRecentlyClosedTabs, HistoryMenu.toggleRecentlyClosedWindows
// are defined in browser.js
this.toggleRecentlyClosedTabs();
this.toggleRecentlyClosedWindows();
},
/**
* popuphidden handler for the history menu.
* @param aMenuPopup
* XULNode for the history menupopup
*/
onPopupHidden: function PHM_onPopupHidden(aMenuPopup) {
var resultNode = aMenuPopup.getResultNode();
if (resultNode.containerOpen)
resultNode.containerOpen = false;
}
};
@ -699,7 +707,7 @@ var BookmarksEventHandler = {
var itemId = target._resultNode.itemId;
var siteURIString = "";
if (itemId != -1 && PlacesUtils.livemarks.isLivemark(itemId)) {
if (itemId != -1 && PlacesUtils.itemIsLivemark(itemId)) {
var siteURI = PlacesUtils.livemarks.getSiteURI(itemId);
if (siteURI)
siteURIString = siteURI.spec;

13
browser/base/content/browser.css Executable file → Normal file
View File

@ -51,16 +51,9 @@ toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] {
visibility: collapse;
}
#identity-icon-labels {
max-width: 18em;
}
#identity-icon-country-label {
direction: ltr;
}
#identity-box.verifiedIdentity > hbox > #identity-icon-labels > #identity-icon-label {
-moz-margin-end: 0.25em !important;
#identity-box > hbox {
max-width: 22em;
min-width: 1px;
}
/* ::::: Unified Back-/Forward Button ::::: */

View File

@ -1590,7 +1590,10 @@ function initializeSanitizer()
var clearOnShutdownBranch = prefService.getBranch("privacy.clearOnShutdown.");
itemArray.forEach(function (name) {
try {
cpdBranch.setBoolPref(name, itemBranch.getBoolPref(name));
// don't migrate password or offlineApps clearing in the CRH dialog since
// there's no UI for those anymore. They default to false. bug 497656
if (name != "passwords" && name != "offlineApps")
cpdBranch.setBoolPref(name, itemBranch.getBoolPref(name));
clearOnShutdownBranch.setBoolPref(name, itemBranch.getBoolPref(name));
}
catch(e) {
@ -4527,14 +4530,15 @@ function onViewToolbarsPopupShowing(aEvent)
for (i = 0; i < gNavToolbox.childNodes.length; ++i) {
var toolbar = gNavToolbox.childNodes[i];
var toolbarName = toolbar.getAttribute("toolbarname");
var type = toolbar.getAttribute("type");
if (toolbarName && type != "menubar") {
var menuItem = document.createElement("menuitem");
if (toolbarName) {
let menuItem = document.createElement("menuitem");
let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
"autohide" : "collapsed";
menuItem.setAttribute("toolbarindex", i);
menuItem.setAttribute("type", "checkbox");
menuItem.setAttribute("label", toolbarName);
menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
menuItem.setAttribute("checked", toolbar.getAttribute("collapsed") != "true");
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
popup.insertBefore(menuItem, firstMenuItem);
menuItem.addEventListener("command", onViewToolbarCommand, false);
@ -4547,9 +4551,12 @@ function onViewToolbarCommand(aEvent)
{
var index = aEvent.originalTarget.getAttribute("toolbarindex");
var toolbar = gNavToolbox.childNodes[index];
var hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
"autohide" : "collapsed";
toolbar.collapsed = aEvent.originalTarget.getAttribute("checked") != "true";
document.persist(toolbar.id, "collapsed");
toolbar.setAttribute(hidingAttribute,
aEvent.originalTarget.getAttribute("checked") != "true");
document.persist(toolbar.id, hidingAttribute);
}
function displaySecurityInfo()
@ -6569,10 +6576,6 @@ var gIdentityHandler = {
delete this._identityIconLabel;
return this._identityIconLabel = document.getElementById("identity-icon-label");
},
get _identityIconCountryLabel () {
delete this._identityIconCountryLabel;
return this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
},
/**
* Rebuild cache of the elements that may or may not exist depending
@ -6581,10 +6584,8 @@ var gIdentityHandler = {
_cacheElements : function() {
delete this._identityBox;
delete this._identityIconLabel;
delete this._identityIconCountryLabel;
this._identityBox = document.getElementById("identity-box");
this._identityIconLabel = document.getElementById("identity-icon-label");
this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
},
/**
@ -6706,8 +6707,6 @@ var gIdentityHandler = {
// let's just use that. Check the pref to determine how much of the verified
// hostname to show
var icon_label = "";
var icon_country_label = "";
var icon_labels_dir = "ltr";
switch (gPrefService.getIntPref("browser.identity.ssl_domain_display")) {
case 2 : // Show full domain
icon_label = this._lastLocation.hostname;
@ -6746,34 +6745,20 @@ var gIdentityHandler = {
iData = this.getIdentityData();
tooltip = this._stringBundle.getFormattedString("identity.identified.verifier",
[iData.caOrg]);
icon_label = iData.subjectOrg;
if (iData.country)
icon_country_label = "(" + iData.country + ")";
// If the organization name starts with an RTL character, then
// swap the positions of the organization and country code labels.
// The Unicode ranges reflect the definition of the UCS2_CHAR_IS_BIDI
// macro in intl/unicharutil/util/nsBidiUtils.h. When bug 218823 gets
// fixed, this test should be replaced by one adhering to the
// Unicode Bidirectional Algorithm proper (at the paragraph level).
icon_labels_dir = /^[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufefc]/.test(icon_label) ?
"rtl" : "ltr";
icon_label = this._stringBundle.getFormattedString("identity.identified.title_with_country",
[iData.subjectOrg, iData.country]);
else
icon_label = iData.subjectOrg;
}
else {
tooltip = this._stringBundle.getString("identity.unknown.tooltip");
icon_label = "";
icon_country_label = "";
icon_labels_dir = "ltr";
}
// Push the appropriate strings out to the UI
this._identityBox.tooltipText = tooltip;
this._identityIconLabel.value = icon_label;
this._identityIconCountryLabel.value = icon_country_label;
// Set cropping and direction
this._identityIconLabel.crop = icon_country_label ? "end" : "center";
this._identityIconLabel.parentNode.style.direction = icon_labels_dir;
// Hide completely if the organization label is empty
this._identityIconLabel.parentNode.hidden = icon_label ? false : true;
},
/**

9
browser/base/content/browser.xul Executable file → Normal file
View File

@ -284,6 +284,10 @@
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
defaultset="menubar-items"
mode="icons" iconsize="small" defaulticonsize="small"
#ifdef XP_WIN
toolbarname="&menubarCmd.label;"
accesskey="&menubarCmd.accesskey;"
#endif
context="toolbar-context-menu">
<toolbaritem id="menubar-items" align="center">
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
@ -388,10 +392,7 @@
ondraggesture="PageProxyDragGesture(event);"
onerror="this.removeAttribute('src');"/>
</stack>
<hbox id="identity-icon-labels">
<label id="identity-icon-label" class="plain" flex="1"/>
<label id="identity-icon-country-label" class="plain"/>
</hbox>
<label id="identity-icon-label" crop="center" flex="1"/>
</hbox>
</box>
<hbox id="urlbar-icons">

View File

@ -248,7 +248,7 @@
<parameter name="aDocument"/>
<body>
<![CDATA[
var browsers = this.browsers;
var browsers = this.browsers;
for (var i = 0; i < browsers.length; i++)
if (browsers[i].contentDocument == aDocument)
return i;
@ -314,29 +314,29 @@
return;
if (this.mTabBrowser.mCurrentTab == this.mTab) {
for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
var p = this.mTabBrowser.mProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
let p = this.mTabBrowser.mProgressListeners[i];
if (p)
try {
p.onProgressChange(aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress);
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
}
for (var i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
var p = this.mTabBrowser.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
let p = this.mTabBrowser.mTabsProgressListeners[i];
if (p)
try {
p.onProgressChange(this.mBrowser, aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress);
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
@ -432,8 +432,8 @@
}
if (this.mTabBrowser.mCurrentTab == this.mTab) {
for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
var p = this.mTabBrowser.mProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
let p = this.mTabBrowser.mProgressListeners[i];
if (p)
try {
if (!oldBlank)
@ -442,19 +442,19 @@
else if ("onUpdateCurrentBrowser" in p)
p.onUpdateCurrentBrowser(aStateFlags, aStatus, "", 0);
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
}
for (var i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
var p = this.mTabBrowser.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
let p = this.mTabBrowser.mTabsProgressListeners[i];
if (p)
try {
p.onStateChange(this.mBrowser, aWebProgress, aRequest, aStateFlags, aStatus);
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
@ -486,8 +486,8 @@
return;
if (this.mTabBrowser.mCurrentTab == this.mTab) {
for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
var p = this.mTabBrowser.mProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
let p = this.mTabBrowser.mProgressListeners[i];
if (p)
try {
p.onLocationChange(aWebProgress, aRequest, aLocation);
@ -498,8 +498,8 @@
}
}
for (var i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
var p = this.mTabBrowser.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
let p = this.mTabBrowser.mTabsProgressListeners[i];
if (p)
try {
p.onLocationChange(this.mBrowser, aWebProgress, aRequest, aLocation);
@ -516,25 +516,25 @@
return;
if (this.mTabBrowser.mCurrentTab == this.mTab) {
for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
var p = this.mTabBrowser.mProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
let p = this.mTabBrowser.mProgressListeners[i];
if (p)
try {
p.onStatusChange(aWebProgress, aRequest, aStatus, aMessage);
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
}
for (var i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
var p = this.mTabBrowser.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
let p = this.mTabBrowser.mTabsProgressListeners[i];
if (p)
try {
p.onStatusChange(this.mBrowser, aWebProgress, aRequest, aStatus, aMessage);
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
@ -545,8 +545,8 @@
onSecurityChange : function(aWebProgress, aRequest, aState)
{
if (this.mTabBrowser.mCurrentTab == this.mTab) {
for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
var p = this.mTabBrowser.mProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
let p = this.mTabBrowser.mProgressListeners[i];
if (p)
try {
p.onSecurityChange(aWebProgress, aRequest, aState);
@ -557,8 +557,8 @@
}
}
for (var i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
var p = this.mTabBrowser.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
let p = this.mTabBrowser.mTabsProgressListeners[i];
if (p)
try {
p.onSecurityChange(this.mBrowser, aWebProgress, aRequest, aState);
@ -573,28 +573,28 @@
{
var allowRefresh = true;
if (this.mTabBrowser.mCurrentTab == this.mTab) {
for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
var p = this.mTabBrowser.mProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
let p = this.mTabBrowser.mProgressListeners[i];
if (p && "onRefreshAttempted" in p) {
try {
if (!p.onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI))
allowRefresh = false;
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
}
}
for (var i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
var p = this.mTabBrowser.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabBrowser.mTabsProgressListeners.length; i++) {
let p = this.mTabBrowser.mTabsProgressListeners[i];
if (p && "onRefreshAttempted" in p) {
try {
if (!p.onRefreshAttempted(this.mBrowser, aWebProgress, aURI, aDelay, aSameURI))
allowRefresh = false;
} catch (e) {
// don't inhibit other listeners or following code
// don't inhibit other listeners
Components.utils.reportError(e);
}
}
@ -638,8 +638,8 @@
this.updateIcon(aTab);
if (browser == this.mCurrentBrowser) {
for (var i = 0; i < this.mProgressListeners.length; i++) {
var p = this.mProgressListeners[i];
for (let i = 0; i < this.mProgressListeners.length; i++) {
let p = this.mProgressListeners[i];
if ('onLinkIconAvailable' in p)
try {
p.onLinkIconAvailable(browser);
@ -650,8 +650,8 @@
}
}
for (var i = 0; i < this.mTabsProgressListeners.length; i++) {
var p = this.mTabsProgressListeners[i];
for (let i = 0; i < this.mTabsProgressListeners.length; i++) {
let p = this.mTabsProgressListeners[i];
if ('onLinkIconAvailable' in p)
try {
p.onLinkIconAvailable(browser);

View File

@ -57,6 +57,9 @@ _TEST_FILES = test_feed_discovery.html \
offlineChild2.html \
offlineChild2.cacheManifest \
offlineChild2.cacheManifest^headers^ \
offlineEvent.html \
offlineEvent.cacheManifest \
offlineEvent.cacheManifest^headers^ \
$(NULL)
# The following tests are disabled because they are unreliable:

View File

@ -0,0 +1,2 @@
CACHE MANIFEST
offlineChild.html

View File

@ -0,0 +1 @@
Content-Type: text/cache-manifest

View File

@ -0,0 +1,9 @@
<html manifest="offlineEvent.cacheManifest">
<head>
<title></title>
</head>
<body>
<h1>Child</h1>
</body>
</html>

View File

@ -19,6 +19,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=462856
notification -->
<iframe name="testFrame3" src="http://example.com/tests/browser/base/content/test/offlineChild.html"></iframe>
<iframe id="eventsTestFrame" src="offlineEvent.html"></iframe>
<div id="content" style="display: none">
</div>
<pre id="test">
@ -44,7 +46,55 @@ window.addEventListener("message", function(event) {
}
}, false);
var count = 0;
var expectedEvent = "";
function eventHandler(evt) {
++count;
is(evt.type, expectedEvent, "Wrong event!");
}
function testEventHandling() {
var events = [ "checking",
"error",
"noupdate",
"downloading",
"progress",
"updateready",
"cached",
"obsolete"];
var w = document.getElementById("eventsTestFrame").contentWindow;
var e;
for (var i = 0; i < events.length; ++i) {
count = 0;
expectedEvent = events[i];
e = w.document.createEvent("event");
e.initEvent(expectedEvent, true, true);
w.applicationCache["on" + expectedEvent] = eventHandler;
w.applicationCache.addEventListener(expectedEvent, eventHandler, true);
w.applicationCache.dispatchEvent(e);
is(count, 2, "Wrong number events!");
w.applicationCache["on" + expectedEvent] = null;
w.applicationCache.removeEventListener(expectedEvent, eventHandler, true);
w.applicationCache.dispatchEvent(e);
is(count, 2, "Wrong number events!");
}
// Test some random event.
count = 0;
expectedEvent = "foo";
e = w.document.createEvent("event");
e.initEvent(expectedEvent, true, true);
w.applicationCache.addEventListener(expectedEvent, eventHandler, true);
w.applicationCache.dispatchEvent(e);
is(count, 1, "Wrong number events!");
w.applicationCache.removeEventListener(expectedEvent, eventHandler, true);
w.applicationCache.dispatchEvent(e);
is(count, 1, "Wrong number events!");
}
function loaded() {
testEventHandling();
// Click the notification bar's "Allow" button. This should kick
// off updates, which will eventually lead to getting messages from
// the children.

View File

@ -27,7 +27,7 @@ interface nsIMicrosummaryObserver : nsISupports
* Called when an observed microsummary encounters an error during an update.
*
* @param microsummary
* the microsumary which could not be updated
* the microsummary which could not be updated
*
*/
void onError(in nsIMicrosummary microsummary);

View File

@ -23,6 +23,7 @@
# Asaf Romano <mano@mozilla.com>
# Dan Mills <thunder@mozilla.com>
# Ryan Flint <rflint@dslr.net>
# Dietrich Ayala <dietrich@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
@ -70,6 +71,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
function MicrosummaryService() {
this._obs.addObserver(this, "xpcom-shutdown", true);
this._ans.addObserver(this, false);
Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService).
@ -83,39 +85,35 @@ function MicrosummaryService() {
MicrosummaryService.prototype = {
// Bookmarks Service
__bms: null,
get _bms() {
if (!this.__bms)
this.__bms = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService);
return this.__bms;
var svc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService);
this.__defineGetter__("_bms", function() svc);
return this._bms;
},
// Annotation Service
__ans: null,
get _ans() {
if (!this.__ans)
this.__ans = Cc["@mozilla.org/browser/annotation-service;1"].
getService(Ci.nsIAnnotationService);
return this.__ans;
var svc = Cc["@mozilla.org/browser/annotation-service;1"].
getService(Ci.nsIAnnotationService);
this.__defineGetter__("_ans", function() svc);
return this._ans;
},
// IO Service
__ios: null,
get _ios() {
if (!this.__ios)
this.__ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
return this.__ios;
var svc = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
this.__defineGetter__("_ios", function() svc);
return this._ios;
},
// Observer Service
__obs: null,
get _obs() {
if (!this.__obs)
this.__obs = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
return this.__obs;
var svc = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
this.__defineGetter__("_obs", function() svc);
return this._obs;
},
/**
@ -158,6 +156,7 @@ MicrosummaryService.prototype = {
classID: Components.ID("{460a9792-b154-4f26-a922-0f653e2c8f91}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMicrosummaryService,
Ci.nsISupportsWeakReference,
Ci.nsIAnnotationObserver,
Ci.nsIObserver]),
// nsIObserver
@ -204,12 +203,14 @@ MicrosummaryService.prototype = {
},
_destroy: function MSS__destroy() {
this._obs.removeObserver(this, "xpcom-shutdown", true);
this._ans.removeObserver(this);
this._timer.cancel();
this._timer = null;
},
_updateMicrosummaries: function MSS__updateMicrosummaries() {
var bookmarks = this._getBookmarks();
var bookmarks = this._bookmarks;
var now = Date.now();
var updateInterval = this._updateInterval;
@ -545,7 +546,7 @@ MicrosummaryService.prototype = {
*
*/
_changeField: function MSS__changeField(fieldName, oldValue, newValue) {
var bookmarks = this._getBookmarks();
var bookmarks = this._bookmarks;
for ( var i = 0; i < bookmarks.length; i++ ) {
var bookmarkID = bookmarks[i];
@ -557,27 +558,19 @@ MicrosummaryService.prototype = {
},
/**
* Get the set of bookmarks with microsummaries.
* Get the set of bookmarks that have microsummaries.
*
* This is the internal version of this method, which is not accessible
* via XPCOM but is more performant; inside this component, use this version.
* Outside the component, use getBookmarks (no underscore prefix) instead.
* This caches the list of microsummarized bookmarks. The cache is
* managed by observing the annotation service, and updating
* when a microsummary annotation is added or removed.
*
* @returns an array of place: uris representing bookmarks items
* @returns an array of item ids for microsummarized bookmarks
*
*/
_getBookmarks: function MSS__getBookmarks() {
var bookmarks;
// This try/catch block is a temporary workaround for bug 336194.
try {
bookmarks = this._ans.getItemsWithAnnotation(ANNO_MICSUM_GEN_URI, {});
}
catch(e) {
bookmarks = [];
}
return bookmarks;
get _bookmarks() {
var bookmarks = this._ans.getItemsWithAnnotation(ANNO_MICSUM_GEN_URI, {});
this.__defineGetter__("_bookmarks", function() bookmarks);
return this._bookmarks;
},
_setAnnotation: function MSS__setAnnotation(aBookmarkId, aFieldName, aFieldValue) {
@ -592,14 +585,14 @@ MicrosummaryService.prototype = {
* Get the set of bookmarks with microsummaries.
*
* This is the external version of this method and is accessible via XPCOM.
* Use it outside this component. Inside the component, use _getBookmarks
* Use it outside this component. Inside the component, use _bookmarks
* (with underscore prefix) instead for performance.
*
* @returns an nsISimpleEnumerator enumeration of bookmark IDs
*
*/
getBookmarks: function MSS_getBookmarks() {
return new ArrayEnumerator(this._getBookmarks());
return new ArrayEnumerator(this._bookmarks);
},
/**
@ -687,15 +680,15 @@ MicrosummaryService.prototype = {
/**
* Whether or not the given bookmark has a current microsummary.
*
* @param bookmarkID
* the bookmark for which to set the current microsummary
* @param bookmarkId
* the bookmark id to check
*
* @returns a boolean representing whether or not the given bookmark
* has a current microsummary
* currently has a microsummary
*
*/
hasMicrosummary: function MSS_hasMicrosummary(bookmarkID) {
return this._ans.itemHasAnnotation(bookmarkID, ANNO_MICSUM_GEN_URI);
hasMicrosummary: function MSS_hasMicrosummary(aBookmarkId) {
return (this._bookmarks.indexOf(aBookmarkId) != -1);
},
/**
@ -717,7 +710,7 @@ MicrosummaryService.prototype = {
throw Cr.NS_ERROR_INVALID_ARG;
if (this.hasMicrosummary(aBookmarkID)) {
currentMicrosummarry = this.getMicrosummary(aBookmarkID);
var currentMicrosummarry = this.getMicrosummary(aBookmarkID);
if (aMicrosummary.equals(currentMicrosummarry))
return true;
}
@ -766,6 +759,9 @@ MicrosummaryService.prototype = {
try {
this._svc._updateMicrosummary(this._bookmarkID, microsummary);
}
catch (ex) {
Cu.reportError("refreshMicrosummary() observer: " + ex);
}
finally {
this._svc = null;
this._bookmarkID = null;
@ -785,7 +781,23 @@ MicrosummaryService.prototype = {
microsummary.update();
return microsummary;
}
},
// nsIAnnotationObserver
onItemAnnotationSet: function(aItemId, aAnnotationName) {
if (aAnnotationName == ANNO_MICSUM_GEN_URI &&
this._bookmarks.indexOf(aItemId) == -1)
this._bookmarks.push(aItemId);
},
onItemAnnotationRemoved: function(aItemId, aAnnotationName) {
var index = this._bookmarks.indexOf(aItemId);
var isMicsumAnno = aAnnotationName == ANNO_MICSUM_GEN_URI ||
!aAnnotationName.length; /* all annos were removed */
if (index > -1 && isMicsumAnno)
this._bookmarks.splice(index, 1);
},
onPageAnnotationSet: function(aUri, aAnnotationName) {},
onPageAnnotationRemoved: function(aUri, aAnnotationName) {},
};
@ -1027,7 +1039,7 @@ Microsummary.prototype = {
/**
* Try to reinstall a missing local generator that was originally installed
* from a URL using nsSidebar::addMicrosumaryGenerator.
* from a URL using nsSidebar::addMicrosummaryGenerator.
*
*/
_reinstallMissingGenerator: function MS__reinstallMissingGenerator() {
@ -1598,7 +1610,7 @@ MicrosummarySet.prototype = {
},
/**
* Determines whether the given microsumary is already represented in the
* Determines whether the given microsummary is already represented in the
* set.
*/
hasItemForMicrosummary: function MSSet_hasItemForMicrosummary(aMicrosummary) {

View File

@ -1088,11 +1088,13 @@ nsSafariProfileMigrator::ParseBookmarksFolder(CFArrayRef aChildren,
if (GetDictionaryStringValue(URIDictionary, CFSTR("title"), title) &&
GetDictionaryCStringValue(entry, CFSTR("URLString"), url, kCFStringEncodingUTF8)) {
nsCOMPtr<nsIURI> uri;
rv |= NS_NewURI(getter_AddRefs(uri), url);
PRInt64 id;
rv |= aBookmarksService->InsertBookmark(aParentFolder, uri,
nsINavBookmarksService::DEFAULT_INDEX,
NS_ConvertUTF16toUTF8(title), &id);
rv = NS_NewURI(getter_AddRefs(uri), url);
if (NS_SUCCEEDED(rv)) {
PRInt64 id;
rv = aBookmarksService->InsertBookmark(aParentFolder, uri,
nsINavBookmarksService::DEFAULT_INDEX,
NS_ConvertUTF16toUTF8(title), &id);
}
}
}
}

View File

@ -109,6 +109,11 @@ BrowserGlue.prototype = {
_setPrefToSaveSession: function()
{
this._prefs.setBoolPref("browser.sessionstore.resume_session_once", true);
// This method can be called via [NSApplication terminate:] on Mac, which
// ends up causing prefs not to be flushed to disk, so we need to do that
// explicitly here. See bug 497652.
this._prefs.QueryInterface(Ci.nsIPrefService).savePrefFile(null);
},
// nsIObserver implementation

View File

@ -219,6 +219,7 @@ var BookmarkPropertiesPanel = {
if ("keyword" in dialogInfo) {
this._keyword = dialogInfo.keyword;
this._isAddKeywordDialog = true;
if ("postData" in dialogInfo)
this._postData = dialogInfo.postData;
if ("charSet" in dialogInfo)
@ -282,7 +283,7 @@ var BookmarkPropertiesPanel = {
break;
case "folder":
if (PlacesUtils.livemarks.isLivemark(this._itemId)) {
if (PlacesUtils.itemIsLivemark(this._itemId)) {
this._itemType = LIVEMARK_CONTAINER;
this._feedURI = PlacesUtils.livemarks.getFeedURI(this._itemId);
this._siteURI = PlacesUtils.livemarks.getSiteURI(this._itemId);
@ -367,6 +368,10 @@ var BookmarkPropertiesPanel = {
if (this._itemType == BOOKMARK_ITEM) {
this._element("locationField")
.addEventListener("input", this, false);
if (this._isAddKeywordDialog) {
this._element("keywordField")
.addEventListener("input", this, false);
}
}
else if (this._itemType == LIVEMARK_CONTAINER) {
this._element("feedLocationField")
@ -387,7 +392,8 @@ var BookmarkPropertiesPanel = {
case "input":
if (target.id == "editBMPanel_locationField" ||
target.id == "editBMPanel_feedLocationField" ||
target.id == "editBMPanel_siteLocationField") {
target.id == "editBMPanel_siteLocationField" ||
target.id == "editBMPanel_keywordField") {
// Check uri fields to enable accept button if input is valid
document.documentElement
.getButton("accept").disabled = !this._inputIsValid();
@ -511,6 +517,8 @@ var BookmarkPropertiesPanel = {
if (this._itemType == BOOKMARK_ITEM &&
!this._containsValidURI("locationField"))
return false;
if (this._isAddKeywordDialog && !this._element("keywordField").value.length)
return false;
// Feed Location has to be a valid URI;
// Site Location has to be a valid URI or empty

View File

@ -162,12 +162,12 @@ var gEditItemOverlay = {
}
else {
this._itemId = aFor;
var container = PlacesUtils.bookmarks.getFolderIdForItem(this._itemId);
var containerId = PlacesUtils.bookmarks.getFolderIdForItem(this._itemId);
this._itemType = PlacesUtils.bookmarks.getItemType(this._itemId);
if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
this._uri = PlacesUtils.bookmarks.getBookmarkURI(this._itemId);
if (!this._readOnly) // If readOnly wasn't forced through aInfo
this._readOnly = PlacesUtils.livemarks.isLivemark(container);
this._readOnly = PlacesUtils.itemIsLivemark(containerId);
this._initTextField("keywordField",
PlacesUtils.bookmarks
.getKeywordForBookmark(this._itemId));
@ -181,7 +181,7 @@ var gEditItemOverlay = {
this._readOnly = false;
this._uri = null;
this._isLivemark = PlacesUtils.livemarks.isLivemark(this._itemId);
this._isLivemark = PlacesUtils.itemIsLivemark(this._itemId);
if (this._isLivemark) {
var feedURI = PlacesUtils.livemarks.getFeedURI(this._itemId);
var siteURI = PlacesUtils.livemarks.getSiteURI(this._itemId);
@ -191,7 +191,7 @@ var gEditItemOverlay = {
}
// folder picker
this._initFolderMenuList(container);
this._initFolderMenuList(containerId);
// description field
this._initTextField("descriptionField",

View File

@ -54,11 +54,11 @@
</hbox>
<grid id="editBookmarkPanelGrid" flex="1">
<columns>
<column/>
<column flex="1"/>
<columns id="editBMPanel_columns">
<column id="editBMPanel_labelColumn" />
<column flex="1" id="editBMPanel_editColumn" />
</columns>
<rows>
<rows id="editBMPanel_rows">
<row align="center" id="editBMPanel_nameRow">
<label value="&editBookmarkOverlay.name.label;"
accesskey="&editBookmarkOverlay.name.accesskey;"

View File

@ -538,6 +538,7 @@
<destructor><![CDATA[
this._resultNode = null;
if (this._result) {
this._result.root.containerOpen = false;
this._result.viewer = null;
this._result = null;
}
@ -578,6 +579,8 @@
]]></body>
</method>
<field name="_result">null</field>
<!-- nsIPlacesView -->
<method name="getResult">
<body><![CDATA[
@ -717,6 +720,8 @@
// object which is already set for this viewer. At that point,
// we should do nothing.
if (this._self._result != val) {
if (this._self._result)
this._self._result.root.containerOpen = false;
this._built = false;
this._self._containerNodesMap = [];
this._self._resultNode = val.root;

View File

@ -301,7 +301,7 @@ var PlacesOrganizer = {
if (selectedNode) {
var doubleClickOnFlatList = (aEvent.button == 0 && aEvent.detail == 2 &&
aEvent.target.parentNode.flatList);
var middleClick = (Event.button == 1 && aEvent.detail == 1);
var middleClick = (aEvent.button == 1 && aEvent.detail == 1);
if (PlacesUtils.nodeIsURI(selectedNode) &&
(doubleClickOnFlatList || middleClick)) {

View File

@ -478,6 +478,8 @@
// object which is already set for this viewer. At that point,
// we should do nothing.
if (this._self._result != val) {
if (this._self._result)
this._self._result.root.containerOpen = false;
this._self._containerNodesMap = [];
this._self._result = val;
if (val) // this calls _rebuild through invalidateContainer

View File

@ -57,8 +57,10 @@
// Note: unsetting the result's viewer also unsets
// the viewer's reference to our treeBoxObject.
var result = this.getResult();
if (result)
if (result) {
result.viewer = null;
result.root.containerOpen = false;
}
this.view = null;
]]></destructor>
@ -119,8 +121,14 @@
<parameter name="queries"/>
<parameter name="options"/>
<body><![CDATA[
var result = PlacesUtils.history.executeQueries(queries, queries.length,
options);
// Cleanup old result if exists.
var oldResult = this.getResult();
if (oldResult)
oldResult.root.containerOpen = false;
var result = PlacesUtils.history
.executeQueries(queries, queries.length,
options);
var callback;
if (this.flatList) {
var onOpenFlatContainer = this.onOpenFlatContainer;

View File

@ -808,6 +808,8 @@ PlacesTreeView.prototype = {
// object which is already set for this viewer. At that point,
// we should do nothing.
if (this._result != val) {
if (this._result)
this._result.root.containerOpen = false;
this._result = val;
this._finishInit();
}
@ -907,20 +909,14 @@ PlacesTreeView.prototype = {
}
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER ||
nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT) {
if (PlacesUtils.annotations.itemHasAnnotation(itemId,
LMANNO_FEEDURI))
if (PlacesUtils.nodeIsLivemarkContainer(node))
properties.push(this._getAtomFor("livemark"));
}
if (itemId != -1) {
var oqAnno;
try {
oqAnno = PlacesUtils.annotations
.getItemAnnotation(itemId,
ORGANIZER_QUERY_ANNO);
properties.push(this._getAtomFor("OrganizerQuery_" + oqAnno));
}
catch (ex) { /* not a special query */ }
var queryName = PlacesUIUtils.getLeftPaneQueryNameFromId(itemId);
if (queryName)
properties.push(this._getAtomFor("OrganizerQuery_" + queryName));
}
}
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)

View File

@ -535,8 +535,9 @@ var PlacesUIUtils = {
if (typeof(aKeyword) == "string") {
info.keyword = aKeyword;
// hide the Tags field if we are adding a keyword
// Hide the Tags field if we are adding a keyword.
info.hiddenRows.push("tags");
// Keyword related params.
if (typeof(aPostData) == "string")
info.postData = aPostData;
if (typeof(aCharSet) == "string")
@ -1299,6 +1300,9 @@ var PlacesUIUtils = {
return this.leftPaneFolderId = leftPaneRoot;
},
/**
* Get the folder id for the organizer left-pane folder.
*/
get allBookmarksFolderId() {
// ensure the left-pane root is initialized;
this.leftPaneFolderId;
@ -1306,6 +1310,38 @@ var PlacesUIUtils = {
return this.allBookmarksFolderId = this.leftPaneQueries["AllBookmarks"];
},
/**
* If an item is a left-pane query, returns the name of the query
* or an empty string if not.
*
* @param aItemId id of a container
* @returns the name of the query, or empty string if not a left-pane query
*/
getLeftPaneQueryNameFromId: function PU_getLeftPaneQueryNameFromId(aItemId) {
var queryName = "";
// If the let pane hasn't been built, use the annotation service
// directly, to avoid building the left pane too early.
if (this.__lookupGetter__("leftPaneFolderId")) {
try {
queryName = PlacesUtils.annotations.
getItemAnnotation(itemId, ORGANIZER_QUERY_ANNO);
}
catch (ex) {
// doesn't have the annotation
queryName = "";
}
}
else {
// If the left pane has already been built, use the name->id map
// cached in PlacesUIUtils.
for (let [name, id] in Iterator(this.leftPaneQueries)) {
if (aItemId == id)
queryName = name;
}
}
return queryName;
},
/**
* Add, update or remove the livemark status menuitem.
* @param aPopup

View File

@ -128,7 +128,7 @@ placesTransactionsService.prototype = {
// if the item is a livemark container we will not save its children and
// will use createLivemark to undo.
if (PlacesUtils.livemarks.isLivemark(aItemId))
if (PlacesUtils.itemIsLivemark(aItemId))
return new placesRemoveLivemarkTransaction(aItemId);
return new placesRemoveItemTransaction(aItemId);
@ -685,6 +685,7 @@ placesRemoveItemTransaction.prototype = {
this._transactions
.push(new placesRemoveItemTransaction(contents.getChild(i).itemId));
}
contents.containerOpen = false;
}
};
@ -849,7 +850,7 @@ placesEditBookmarkPostDataTransactions.prototype = {
__proto__: placesBaseTransaction.prototype,
doTransaction: function PEUPDT_doTransaction() {
this._oldPostData = PlacesUtils.getPostDataForBookmark(this._id);
this._oldPostData = PlacesUtils.getPostDataForBookmark(this.id);
PlacesUtils.setPostDataForBookmark(this.id, this._newPostData);
},
@ -988,7 +989,8 @@ placesSortFolderByNameTransactions.prototype = {
doTransaction: function PSSFBN_doTransaction() {
this._oldOrder = [];
var contents = PlacesUtils.getFolderContents(this._folderId, false, false).root;
var contents =
PlacesUtils.getFolderContents(this._folderId, false, false).root;
var count = contents.childCount;
// sort between separators
@ -1017,6 +1019,8 @@ placesSortFolderByNameTransactions.prototype = {
else
preSep.push(item);
}
contents.containerOpen = false;
if (preSep.length > 0) {
preSep.sort(sortingMethod);
newOrder = newOrder.concat(preSep);

View File

@ -59,6 +59,7 @@ _BROWSER_TEST_FILES = \
browser_forgetthissite_single.js \
browser_library_left_pane_commands.js \
browser_drag_bookmarks_on_toolbar.js \
browser_library_middleclick.js \
$(NULL)
libs:: $(_BROWSER_TEST_FILES)

View File

@ -90,6 +90,8 @@ function synthesizeDragWithDirection(aElement, aExpectedDragData, aDirection) {
event.stopPropagation();
}
var prevent = function(aEvent) {aEvent.preventDefault();}
var xIncrement = 0;
var yIncrement = 0;
@ -122,15 +124,20 @@ function synthesizeDragWithDirection(aElement, aExpectedDragData, aDirection) {
{ type: "mousemove" });
gBookmarksToolbar.addEventListener("dragstart", trapDrag, false);
EventUtils.synthesizeMouse(aElement,
startingPoint.x + xIncrement * 8,
startingPoint.y + yIncrement * 8,
startingPoint.x + xIncrement * 9,
startingPoint.y + yIncrement * 9,
{ type: "mousemove" });
ok(trapped, "A dragstart event has been trapped.");
gBookmarksToolbar.removeEventListener("dragstart", trapDrag, false);
// This is likely to cause a click event, and, in case we are dragging a
// bookmark, an unwanted page visit. Prevent the click event.
aElement.addEventListener("click", prevent, false);
EventUtils.synthesizeMouse(aElement,
startingPoint.x + xIncrement * 8,
startingPoint.y + yIncrement * 8,
startingPoint.x + xIncrement * 9,
startingPoint.y + yIncrement * 9,
{ type: "mouseup" });
aElement.removeEventListener("click", prevent, false);
// Cleanup eventually opened menus.
if (aElement.localName == "menu" && aElement.open)
@ -202,11 +209,6 @@ var gTests = [
{
desc: "Drag a bookmark on toolbar",
run: function() {
//XXX bug 496266: this test causes a page navigation to the bookmark, which in
// turn causes a history visit to be added for the page, which messes up
// subsequent tests, so disable it for now
return;
// Create a test bookmark to be dragged.
var itemId = PlacesUtils.bookmarks
.insertBookmark(PlacesUtils.toolbarFolderId,
@ -248,15 +250,6 @@ function nextTest() {
}
function test() {
var osString = Cc["@mozilla.org/xre/app-info;1"].
getService(Ci.nsIXULRuntime).OS;
// XXX bug 496277: this test fails on linux for some reason
if (osString == "Linux") {
finish();
return;
}
waitForExplicitFinish();
nextTest();

View File

@ -0,0 +1,340 @@
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** 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 Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Marco Bonardo <mak77@bonardo.net>
*
* 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 ***** */
/**
* Tests middle-clicking items in the Library.
*/
const Cc = Components.classes;
const Ci = Components.interfaces;
var gPrefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
const DISABLE_HISTORY_PREF = "browser.history_expire_days";
var gLibrary = null;
var gTests = [];
var gCurrentTest = null;
// Listener for TabOpen and tabs progress.
var gTabsListener = {
_loadedURIs: [],
_openTabsCount: 0,
handleEvent: function(aEvent) {
if (aEvent.type != "TabOpen")
return;
if (++this._openTabsCount == gCurrentTest.URIs.length) {
is(gBrowser.mTabs.length, gCurrentTest.URIs.length + 1,
"We have opened " + gCurrentTest.URIs.length + " new tab(s)");
}
var tab = aEvent.target;
is(tab.ownerDocument.defaultView.getBrowser(), gBrowser,
"Tab has been opened in current browser window");
},
onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI) {
var spec = aLocationURI.spec;
ok(true, spec);
// When a new tab is opened, location is first set to "about:blank", so
// we can ignore those calls.
// Ignore multiple notifications for the same URI too.
if (spec == "about:blank" || this._loadedURIs.indexOf(spec) != -1)
return;
ok(gCurrentTest.URIs.indexOf(spec) != -1,
"Opened URI found in list: " + spec);
if (gCurrentTest.URIs.indexOf(spec) != -1 )
this._loadedURIs.push(spec);
if (this._loadedURIs.length == gCurrentTest.URIs.length) {
// We have correctly opened all URIs.
// Reset arrays.
this._loadedURIs.length = 0;
// Close all tabs.
while (gBrowser.mTabs.length > 1)
gBrowser.removeCurrentTab();
this._openTabsCount = 0;
// Test finished. This will move to the next one.
gCurrentTest.finish();
}
},
onProgressChange: function(aBrowser, aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
},
onStateChange: function(aBrowser, aWebProgress, aRequest,
aStateFlags, aStatus) {
},
onStatusChange: function(aBrowser, aWebProgress, aRequest,
aStatus, aMessage) {
},
onSecurityChange: function(aBrowser, aWebProgress, aRequest, aState) {
},
noLinkIconAvailable: function(aBrowser) {
}
}
//------------------------------------------------------------------------------
// Open bookmark in a new tab.
gTests.push({
desc: "Open bookmark in a new tab.",
URIs: ["about:buildconfig"],
_itemId: -1,
setup: function() {
var bs = PlacesUtils.bookmarks;
// Add a new unsorted bookmark.
this._itemId = bs.insertBookmark(bs.unfiledBookmarksFolder,
PlacesUtils._uri(this.URIs[0]),
bs.DEFAULT_INDEX,
"Title");
// Select unsorted bookmarks root in the left pane.
gLibrary.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
isnot(gLibrary.PlacesOrganizer._places.selectedNode, null,
"We correctly have selection in the Library left pane");
// Get our bookmark in the right pane.
var bookmarkNode = gLibrary.PlacesOrganizer._content.view.nodeForTreeIndex(0);
is(bookmarkNode.uri, this.URIs[0], "Found bookmark in the right pane");
},
finish: function() {
setTimeout(runNextTest, 0);
},
cleanup: function() {
PlacesUtils.bookmarks.removeItem(this._itemId);
}
});
//------------------------------------------------------------------------------
// Open a folder in tabs.
gTests.push({
desc: "Open a folder in tabs.",
URIs: ["about:buildconfig", "about:"],
_folderId: -1,
setup: function() {
var bs = PlacesUtils.bookmarks;
// Create a new folder.
var folderId = bs.createFolder(bs.unfiledBookmarksFolder,
"Folder",
bs.DEFAULT_INDEX);
this._folderId = folderId;
// Add bookmarks in folder.
this.URIs.forEach(function(aURI) {
bs.insertBookmark(folderId,
PlacesUtils._uri(aURI),
bs.DEFAULT_INDEX,
"Title");
});
// Select unsorted bookmarks root in the left pane.
gLibrary.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
isnot(gLibrary.PlacesOrganizer._places.selectedNode, null,
"We correctly have selection in the Library left pane");
// Get our bookmark in the right pane.
var folderNode = gLibrary.PlacesOrganizer._content.view.nodeForTreeIndex(0);
is(folderNode.title, "Folder", "Found folder in the right pane");
},
finish: function() {
setTimeout(runNextTest, 0);
},
cleanup: function() {
PlacesUtils.bookmarks.removeItem(this._folderId);
}
});
//------------------------------------------------------------------------------
// Open a query in tabs.
gTests.push({
desc: "Open a query in tabs.",
URIs: ["about:buildconfig", "about:"],
_folderId: -1,
_queryId: -1,
setup: function() {
var bs = PlacesUtils.bookmarks;
// Create a new folder.
var folderId = bs.createFolder(bs.unfiledBookmarksFolder,
"Folder",
bs.DEFAULT_INDEX);
this._folderId = folderId;
// Add bookmarks in folder.
this.URIs.forEach(function(aURI) {
bs.insertBookmark(folderId,
PlacesUtils._uri(aURI),
bs.DEFAULT_INDEX,
"Title");
});
// Create a bookmarks query containing our bookmarks.
var hs = PlacesUtils.history;
var options = hs.getNewQueryOptions();
options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
var query = hs.getNewQuery();
query.searchTerms = "about";
var queryString = hs.queriesToQueryString([query], 1, options);
this._queryId = bs.insertBookmark(bs.unfiledBookmarksFolder,
PlacesUtils._uri(queryString),
0, // It must be the first.
"Query");
// Select unsorted bookmarks root in the left pane.
gLibrary.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
isnot(gLibrary.PlacesOrganizer._places.selectedNode, null,
"We correctly have selection in the Library left pane");
// Get our bookmark in the right pane.
var folderNode = gLibrary.PlacesOrganizer._content.view.nodeForTreeIndex(0);
is(folderNode.title, "Query", "Found query in the right pane");
},
finish: function() {
setTimeout(runNextTest, 0);
},
cleanup: function() {
PlacesUtils.bookmarks.removeItem(this._folderId);
PlacesUtils.bookmarks.removeItem(this._queryId);
}
});
//------------------------------------------------------------------------------
function test() {
waitForExplicitFinish();
dump("Starting test browser_library_middleclick.js\n");
// Sanity checks.
ok(PlacesUtils, "PlacesUtils in context");
ok(PlacesUIUtils, "PlacesUIUtils in context");
// Add tabs listeners.
gBrowser.tabContainer.addEventListener("TabOpen", gTabsListener, false);
gBrowser.addTabsProgressListener(gTabsListener);
// Temporary disable history, so we won't record pages navigation.
gPrefs.setIntPref(DISABLE_HISTORY_PREF, 0);
// Window watcher for Library window.
var ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
getService(Ci.nsIWindowWatcher);
var windowObserver = {
observe: function(aSubject, aTopic, aData) {
if (aTopic === "domwindowopened") {
ww.unregisterNotification(this);
gLibrary = aSubject.QueryInterface(Ci.nsIDOMWindow);
gLibrary.addEventListener("load", function onLoad(event) {
gLibrary.removeEventListener("load", onLoad, false);
// Kick off tests.
setTimeout(runNextTest, 0);
}, false);
}
}
};
// Open Library window.
ww.registerNotification(windowObserver);
ww.openWindow(null,
"chrome://browser/content/places/places.xul",
"",
"chrome,toolbar=yes,dialog=no,resizable",
null);
}
function runNextTest() {
// Cleanup from previous test.
if (gCurrentTest)
gCurrentTest.cleanup();
if (gTests.length > 0) {
// Goto next test.
gCurrentTest = gTests.shift();
ok(true, "*** TEST: " + gCurrentTest.desc);
dump("*** TEST: " + gCurrentTest.desc + "\n");
// Test setup will set Library so that the bookmark to be opened is the
// first node in the content (right pane) tree.
gCurrentTest.setup();
// Middle click on first node in the content tree of the Library.
gLibrary.PlacesOrganizer._content.focus();
mouseEventOnCell(gLibrary.PlacesOrganizer._content, 0, 0, { button: 1 });
}
else {
// No more tests.
// Close Library window.
gLibrary.close();
// Remove tabs listeners.
gBrowser.tabContainer.removeEventListener("TabOpen", gTabsListener, false);
gBrowser.removeTabsProgressListener(gTabsListener);
// Restore history.
gPrefs.setIntPref(DISABLE_HISTORY_PREF, 180);
finish();
}
}
function mouseEventOnCell(aTree, aRowIndex, aColumnIndex, aEventDetails) {
var selection = aTree.view.selection;
selection.select(aRowIndex);
aTree.treeBoxObject.ensureRowIsVisible(aRowIndex);
var column = aTree.columns[aColumnIndex];
// get cell coordinates
var x = {}, y = {}, width = {}, height = {};
aTree.treeBoxObject.getCoordsForCellItem(aRowIndex, column, "text",
x, y, width, height);
EventUtils.synthesizeMouse(aTree.body, x.value, y.value,
aEventDetails, gLibrary);
}

View File

@ -78,23 +78,21 @@
showcommentcolumn="true"
tabscrolling="true"
xbl:inherits="disabled,disableautocomplete,searchengine,src,newlines">
<xul:box>
<xul:button class="searchbar-engine-button"
type="menu"
anonid="searchbar-engine-button"
chromedir="&locale.dir;">
<xul:image class="searchbar-engine-image" xbl:inherits="src"/>
<xul:image class="searchbar-dropmarker-image"/>
<xul:menupopup class="searchbar-popup"
anonid="searchbar-popup">
<xul:menuseparator/>
<xul:menuitem class="open-engine-manager"
anonid="open-engine-manager"
label="&cmd_engineManager.label;"
oncommand="openManager(event);"/>
</xul:menupopup>
</xul:button>
</xul:box>
<xul:button class="searchbar-engine-button"
type="menu"
anonid="searchbar-engine-button"
chromedir="&locale.dir;">
<xul:image class="searchbar-engine-image" xbl:inherits="src"/>
<xul:image class="searchbar-dropmarker-image"/>
<xul:menupopup class="searchbar-popup"
anonid="searchbar-popup">
<xul:menuseparator/>
<xul:menuitem class="open-engine-manager"
anonid="open-engine-manager"
label="&cmd_engineManager.label;"
oncommand="openManager(event);"/>
</xul:menupopup>
</xul:button>
<xul:hbox class="search-go-container" chromedir="&locale.dir;">
<xul:image class="search-go-button"
anonid="search-go-button"

View File

@ -50,7 +50,7 @@ function test() {
let theWin = openDialog(location, "_blank", "chrome,all,dialog=no");
theWin.addEventListener("load", function(aEvent) {
theWin.gBrowser.removeEventListener("load", arguments.callee, true);
theWin.removeEventListener("load", arguments.callee, true);
ss.setWindowState(theWin, JSON.stringify(aState.windowState), true);
@ -70,10 +70,18 @@ function test() {
};
os.addObserver(observer, "domwindowclosed", true);
theWin.gBrowser.addEventListener("load", function() {
theWin.gBrowser.removeEventListener("load", arguments.callee, true);
theWin.close();
}, true);
// Close the window as soon as the first tab loads, or immediately if
// there are no tabs.
if (aState.windowState.windows[0].tabs[0].entries.length) {
theWin.gBrowser.addEventListener("load", function() {
theWin.gBrowser.removeEventListener("load", arguments.callee, true);
theWin.close();
}, true);
} else {
executeSoon(function() {
theWin.close();
});
}
}, true);
}

View File

@ -64,8 +64,7 @@ vpath book%.inc @srcdir@/en-US/profile
endif
run_for_effects := $(shell if ! test -d $(DIST); then $(NSINSTALL) -D $(DIST); fi; if ! test -d $(DIST)/branding; then $(NSINSTALL) -D $(DIST)/branding; fi)
_ABS_DIST := $(call core_abspath,$(DIST))
run_for_effects_too := if ! test -d $(DIST)/branding; then $(NSINSTALL) -D $(DIST)/branding; fi)
ifdef MOZ_BRANDING_DIRECTORY
SUBMAKEFILES += \
@ -77,8 +76,6 @@ endif
# This makefile uses variable overrides from the libs-% target to
# build non-default locales to non-default dist/ locations. Be aware!
AB = $(firstword $(subst -, ,$(AB_CD)))
APP_VERSION := $(shell cat $(srcdir)/../config/version.txt)
PWD := $(CURDIR)
@ -90,14 +87,7 @@ PWD := $(CURDIR)
ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
DEFINES += \
-DAB_CD=$(AB_CD) \
-DMOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-DLOCALE_SRCDIR=$(call core_abspath,$(LOCALE_SRCDIR)) \
-DPKG_BASENAME="$(PKG_BASENAME)" \
-DPKG_INST_BASENAME="$(PKG_INST_BASENAME)" \
$(NULL)
MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org
ifndef MOZ_BRANDING_DIRECTORY
DEFINES += -DMOZ_USE_GENERIC_BRANDING
@ -107,10 +97,13 @@ ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
DEFINES += -DEXTENSION_PREF
endif
PREF_JS_EXPORTS = $(LOCALE_SRCDIR)/firefox-l10n.js
PREF_JS_EXPORTS = $(firstword $(wildcard $(LOCALE_SRCDIR)/firefox-l10n.js) \
$(srcdir)/en-US/firefox-l10n.js )
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/locales/l10n.mk
libs::
@if test -f "$(LOCALE_SRCDIR)/existing-profile-defaults.js"; then \
$(PERL) $(topsrcdir)/config/preprocessor.pl $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
@ -185,8 +178,6 @@ ifneq (en-US, $(AB_CD))
@$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/check-locales.pl $(LOCALE_SRCDIR)/installer
endif
clobber-%:
$(RM) -rf $(DIST)/xpi-stage/locale-$*
libs-%:
$(NSINSTALL) -D $(DIST)/install
@ -206,8 +197,6 @@ MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
endif
PACKAGER_NO_LIBS = 1
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
@ -254,25 +243,6 @@ else
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
endif
$(STAGEDIST): AB_CD:=en-US
$(STAGEDIST): UNPACKAGE=$(ZIP_IN)
$(STAGEDIST): $(ZIP_IN)
# only mac needs to remove the parent of STAGEDIST...
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
if test -d $(DIST)/l10n-stage; then \
$(RM) -r -v $(DIST)/l10n-stage; \
fi
else
# ... and windows doesn't like removing STAGEDIST itself, remove all children
if test -d $(DIST)/l10n-stage; then \
find $(STAGEDIST) -maxdepth 1 -print0 | xargs -0 $(RM) -r ; \
fi
endif
$(NSINSTALL) -D $(DIST)/l10n-stage
cd $(DIST)/l10n-stage && \
$(UNMAKE_PACKAGE)
make clobber-zip AB_CD=en-US
clobber-zip:
$(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
$(STAGEDIST)/chrome/$(AB_CD).manifest \
@ -282,57 +252,6 @@ clobber-zip:
$(STAGEDIST)/defaults/profile \
$(STAGEDIST)/chrome/$(AB_CD)
unpack: $(STAGEDIST)
@echo done unpacking
repackage-zip: ZIP_OUT="$(_ABS_DIST)/$(PACKAGE)"
repackage-zip: UNPACKAGE="$(ZIP_IN)"
repackage-zip:
ifeq (WINNT,$(OS_ARCH))
$(RM) -r $(STAGEDIST)/uninstall
$(NSINSTALL) -D $(STAGEDIST)/uninstall
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
endif
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
ifneq (en,$(AB))
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
endif
endif
$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
cd $(DIST)/l10n-stage; \
$(MAKE_PACKAGE)
ifdef MOZ_MAKE_COMPLETE_MAR
$(MAKE) -C $(DEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
MOZ_PKG_PRETTYNAMES=$(MOZ_PKG_PRETTYNAMES) \
PACKAGE_BASE_DIR="$(_ABS_DIST)/l10n-stage" \
DIST="$(_ABS_DIST)"
endif
# packaging done, undo l10n stuff
ifneq (en,$(AB))
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj
endif
endif
$(MAKE) clobber-zip AB_CD=$(AB_CD)
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(DIST)/$(PACKAGE)"
repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
langpack-%: LANGPACK_FILE=$(_ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%: libs-%
@echo "Making langpack $(LANGPACK_FILE)"
$(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
$(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest -x chrome/$(AB_CD).manifest
langpack: langpack-$(AB_CD)
@ -363,25 +282,6 @@ libs:: crashreporter-override.ini
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
endif
# This variable is to allow the wget-en-US target to know which ftp server to download from
ifndef EN_US_BINARY_URL
EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
endif
# This make target allows us to wget the latest en-US binary from a specified website
# The make installers-% target needs the en-US binary in dist/
# and for the windows repackages we need the .installer.exe in dist/sea
wget-en-US:
ifndef WGET
$(error Wget not installed)
endif
(cd $(_ABS_DIST) && $(WGET) -nv -N $(EN_US_BINARY_URL)/$(PACKAGE))
@echo "Downloaded $(EN_US_BINARY_URL)/$(PACKAGE) to $(_ABS_DIST)/$(PACKAGE)"
ifeq ($(OS_ARCH), WINNT)
$(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH)
(cd $(_ABS_DIST)/$(PKG_INST_PATH) && $(WGET) -nv -N "$(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe")
@echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe to $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
endif
ident:
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(STAGEDIST)/application.ini App SourceStamp

View File

@ -32,6 +32,8 @@
<!ENTITY goOfflineCmd.label "Work Offline">
<!ENTITY goOfflineCmd.accesskey "w">
<!ENTITY menubarCmd.label "Menu Bar">
<!ENTITY menubarCmd.accesskey "M">
<!ENTITY navbarCmd.label "Navigation Toolbar">
<!ENTITY navbarCmd.accesskey "N">
<!ENTITY personalbarCmd.label "Bookmarks Toolbar">

View File

@ -139,8 +139,9 @@ offlineApps.manageUsage=Show settings
offlineApps.manageUsageAccessKey=S
identity.identified.verifier=Verified by: %S
identity.identified.verified_by_you=You have added a security exception for this site
identity.identified.verified_by_you=You have added a security exception for this site.
identity.identified.state_and_country=%S, %S
identity.identified.title_with_country=%S (%S)
identity.encrypted=Your connection to this web site is encrypted to prevent eavesdropping.
identity.unencrypted=Your connection to this web site is not encrypted.

View File

@ -892,8 +892,13 @@ toolbar[iconsize="small"] #paste-button[disabled="true"] {
background-color: rgba(0, 0, 0, .1);
}
#identity-icon-labels {
#identity-icon-label {
padding: 0 2px;
margin: 0;
}
#identity-icon-label[value=""] {
display: none;
}
#identity-box.verifiedDomain {

View File

@ -5,10 +5,6 @@
background-color: -moz-field;
}
.autocomplete-textbox-container {
-moz-box-align: stretch;
}
.textbox-input-box {
margin: 0;
}

View File

@ -779,131 +779,48 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
/* ::::: nav-bar-inner ::::: */
#urlbar {
direction: ltr;
}
.searchbar-textbox,
#urlbar {
font: icon;
-moz-appearance: none;
direction: ltr !important;
border: none;
background: url("chrome://browser/skin/urlbar/endcap.png") transparent right center no-repeat;
margin: 0 3px 1px;
-moz-padding-end: 11px;
font: icon !important;
width: 7em;
min-width: 7em;
-moz-appearance: none;
-moz-background-clip: padding;
-moz-border-radius: 100%;
border: 1px solid;
-moz-border-top-colors: #666;
-moz-border-right-colors: #777;
-moz-border-bottom-colors: #888;
-moz-border-left-colors: #777;
-moz-box-shadow: 0 1px 1px rgba(0,0,0,.3) inset,
0 1px 0 rgba(255,255,255,.3);
margin-top: 0;
margin-bottom: 1px;
-moz-padding-end: 6px;
height: 28px;
}
.searchbar-textbox[focused="true"],
#urlbar[focused="true"] {
-moz-border-top-colors: rgba(0,0,0,.3);
-moz-border-right-colors: rgba(0,0,0,.2);
-moz-border-bottom-colors: rgba(0,0,0,.15);
-moz-border-left-colors: rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 1px rgba(0,0,0,.3) inset,
0 0 1px -moz-mac-focusring inset,
0 0 4px 1px -moz-mac-focusring,
0 0 2px 1px -moz-mac-focusring;
background: url("chrome://browser/skin/urlbar/endcap-focused.png") transparent right center no-repeat;
}
.searchbar-engine-button,
#identity-box {
background: #fff url(navbar-textbox-button.png) bottom repeat-x;
-moz-background-clip: padding;
color: black;
-moz-padding-start: 6px;
-moz-padding-end: 16px;
-moz-border-radius: 100%;
border-top: 1px solid rgba(0,0,0,.35);
-moz-border-start: 1px solid rgba(0,0,0,.25);
border-bottom: 1px solid rgba(0,0,0,.2);
margin-top: -1px;
margin-bottom: -1px;
-moz-margin-start: -1px;
-moz-margin-end: 0;
#urlbar[focused="true"]:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/endcap-focused-graphite.png");
}
#identity-box:focus:not(:active):not([open="true"]) #page-proxy-stack {
-moz-border-radius: 4px;
-moz-box-shadow: 0 0 3px 1px -moz-mac-focusring inset,
0 0 3px 2px -moz-mac-focusring;
#urlbar .textbox-input-box,
#urlbar-icons {
margin: 0;
background: url("chrome://browser/skin/urlbar/textfield-mid.png") transparent left center repeat-x;
}
.searchbar-textbox[focused="true"] .searchbar-engine-button,
#urlbar[focused="true"] > #identity-box {
-moz-box-shadow: 0 0 1px -moz-mac-focusring inset;
#urlbar[focused="true"] .textbox-input-box,
#urlbar[focused="true"] #urlbar-icons {
background-image: url("chrome://browser/skin/urlbar/textfield-mid-focused.png");
}
.searchbar-engine-button[open="true"],
.searchbar-engine-button:hover:active,
#identity-box[open="true"],
#identity-box:hover:active {
border-style: none;
#urlbar[focused="true"] .textbox-input-box:-moz-system-metric(mac-graphite-theme),
#urlbar[focused="true"] #urlbar-icons:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/textfield-mid-focused-graphite.png");
}
#urlbar .textbox-input-box {
padding-top: 1px;
padding-bottom: 1px;
-moz-padding-start: 7px;
-moz-box-shadow: 0 0 50px rgba(0,0,0,.3) inset,
0 3px 3px rgba(0,0,0,.6) inset,
2px 0 2px rgba(0,0,0,.3) inset,
0 -2px 2px rgba(0,0,0,.1) inset !important;
}
#identity-box.verifiedDomain {
background-image: url(navbar-textbox-button-verifiedDomain.png);
}
#identity-box.verifiedIdentity {
background-image: url(navbar-textbox-button-verifiedIdentity.png);
}
#identity-icon-labels {
margin: 0 4px;
}
.searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box,
#urlbar > .autocomplete-textbox-container > .textbox-input-box {
-moz-margin-end: 0;
-moz-margin-start: -16px;
background-color: -moz-field;
-moz-padding-start: 10px;
}
.searchbar-textbox[chromedir="ltr"] > .autocomplete-textbox-container > .textbox-input-box,
#urlbar > .autocomplete-textbox-container > .textbox-input-box {
-moz-border-radius-topleft: 100%;
-moz-border-radius-bottomleft: 100%;
-moz-box-shadow: 1px 1px 1px rgba(0,0,0,.3) inset,
1px 0 0 rgba(0,0,0,.2) inset;
}
.searchbar-textbox[chromedir="rtl"] > .autocomplete-textbox-container > .textbox-input-box {
-moz-border-radius-topright: 100%;
-moz-border-radius-bottomright: 100%;
-moz-box-shadow: -1px 1px 1px rgba(0,0,0,.3) inset,
-1px 0 0 rgba(0,0,0,.2) inset;
}
.searchbar-textbox[focused="true"][chromedir="ltr"] > .autocomplete-textbox-container > .textbox-input-box,
#urlbar[focused="true"] > .autocomplete-textbox-container > .textbox-input-box {
-moz-box-shadow: 1px 1px 1px rgba(0,0,0,.3) inset,
1px 0 0 rgba(0,0,0,.2) inset,
2px 0 0 -moz-field inset,
1px 0 1px -moz-mac-focusring inset;
}
.searchbar-textbox[focused="true"][chromedir="rtl"] > .autocomplete-textbox-container > .textbox-input-box {
-moz-box-shadow: -1px 1px 1px rgba(0,0,0,.3) inset,
-1px 0 0 rgba(0,0,0,.2) inset,
-2px 0 0 -moz-field inset,
-1px 0 1px -moz-mac-focusring inset;
.autocomplete-textbox {
background-image: inherit !important;
}
#urlbar-icons {
@ -911,10 +828,13 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
}
#urlbar-search-splitter {
/* This is a bit of a mess, because the location bar and the search bar are bigger
than they look. For example, -moz-margin-start: -6px should really be -4px.
Bug 482086 and bug 482105 will solve this. */
min-width: 8px;
width: 8px;
background-image: none;
-moz-margin-start: -4px;
-moz-margin-start: -6px;
}
#urlbar-search-splitter + #urlbar-container > #urlbar,
@ -922,6 +842,34 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
-moz-margin-start: 0;
}
#wrapper-urlbar-container #urlbar,
#urlbar[readonly="true"] {
-moz-padding-end: 12px;
}
#wrapper-urlbar-container[place="palette"] {
max-width: 20em;
}
#wrapper-urlbar-container > #urlbar-container > #urlbar > #identity-box > hbox > #identity-icon-label,
#wrapper-urlbar-container #urlbar > .autocomplete-history-dropmarker {
display: none;
}
#wrapper-urlbar-container > #urlbar-container > #urlbar > #identity-box.verifiedIdentity > hbox > #identity-icon-label,
#wrapper-urlbar-container > #urlbar-container > #urlbar > #identity-box.verifiedDomain > hbox > #identity-icon-label {
display: -moz-box;
}
/* Keep the URL bar LTR */
#PopupAutoCompleteRichResult {
direction: ltr !important;
margin-top: -2px;
}
/* ----- PAGE PROXY ICON ----- */
#page-proxy-favicon,
#urlbar-throbber {
width: 16px;
@ -931,14 +879,11 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
}
#page-proxy-stack {
-moz-margin-start: 10px;
width: 24px;
height: 20px;
padding: 2px 4px;
}
#identity-box.verifiedIdentity > hbox > #page-proxy-stack,
#identity-box.verifiedDomain > hbox > #page-proxy-stack {
background: url(urlbar-favicon-glow.png) center center no-repeat;
opacity: 1.0;
}
#page-proxy-favicon:not([src]) {
@ -953,19 +898,6 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
list-style-image: url("chrome://browser/skin/places/searching_16.png");
}
#wrapper-urlbar-container[place="palette"] {
max-width: 20em;
}
#wrapper-urlbar-container #identity-icon-labels,
#wrapper-urlbar-container .autocomplete-history-dropmarker {
display: none;
}
#PopupAutoCompleteRichResult {
direction: ltr !important;
margin-top: 2px;
}
statusbarpanel#statusbar-display {
-moz-padding-start: 0;
@ -1620,7 +1552,6 @@ tabbrowser > tabbox {
}
.tabbrowser-tab[selected="true"] {
-moz-user-focus: normal;
padding: 0 6px 1px;
border-width: 2px;
-moz-border-left-colors: rgba(0, 0, 0, .1) rgba(0, 0, 0, .2);
@ -1895,6 +1826,179 @@ tabpanels.plain {
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight !important;
}
/* ::::: Identity Indicator Styling ::::: */
/* Location bar visuals*/
#identity-box {
background: url("chrome://browser/skin/urlbar/startcap.png") left center no-repeat;
min-width: 45px;
}
#urlbar[focused="true"] > #identity-box {
background-image: url("chrome://browser/skin/urlbar/startcap-focused.png");
}
#urlbar[focused="true"] > #identity-box:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-focused-graphite.png");
}
#identity-box:focus > hbox > #page-proxy-deck {
outline: 2px solid #4F8EC9;
-moz-outline-radius: 2px;
}
#identity-box:hover:active,
#identity-box[open="true"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active.png");
}
#identity-icon-label {
margin: 0;
color: black;
padding: 4px 6px 3px;
-moz-padding-end: 14px;
}
#identity-box.unknownIdentity > hbox > #identity-icon-label {
display: none;
}
/* Verified domain */
/* - Normal state */
#identity-box.verifiedDomain {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-start.png");
-moz-padding-start: 13px;
}
#identity-box.verifiedDomain > hbox {
padding: 0;
background: url("chrome://browser/skin/urlbar/startcap-secure-mid.png") repeat-x center center;
-moz-box-pack: center;
}
#identity-box.verifiedDomain > hbox > #identity-icon-label {
background: url("chrome://browser/skin/urlbar/startcap-secure-end.png") no-repeat center right;
}
/* - Active state */
#identity-box.verifiedDomain[open="true"],
#identity-box.verifiedDomain:hover:active {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-start-active.png");
}
#identity-box.verifiedDomain[open="true"] > hbox,
#identity-box.verifiedDomain:hover:active > hbox {
padding: 0;
background: url("chrome://browser/skin/urlbar/startcap-secure-mid-active.png") repeat-x center center;
-moz-box-pack: center;
}
#identity-box.verifiedDomain[open="true"] > hbox > #identity-icon-label,
#identity-box.verifiedDomain:hover:active > hbox > #identity-icon-label {
background: url("chrome://browser/skin/urlbar/startcap-secure-end-active.png") no-repeat center right;
}
/* - Focus state */
#urlbar[focused="true"] > #identity-box.verifiedDomain {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-start-focused.png");
}
#urlbar[focused="true"] > #identity-box.verifiedDomain > hbox {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-mid-focused.png");
}
#urlbar[focused="true"] > #identity-box.verifiedDomain > hbox > #identity-icon-label {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-end-focused.png");
}
#urlbar[focused="true"] > #identity-box.verifiedDomain:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-start-focused-graphite.png");
}
#urlbar[focused="true"] > #identity-box.verifiedDomain > hbox:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-mid-focused-graphite.png");
}
#urlbar[focused="true"] > #identity-box.verifiedDomain > hbox > #identity-icon-label:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-secure-end-focused-graphite.png");
}
#identity-box.verifiedDomain > hbox > #identity-icon-label[value=""] {
-moz-padding-start: 3px !important;
-moz-padding-end: 8px !important;
}
/* Verified Identity */
/* - Normal state */
#identity-box.verifiedIdentity {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-start.png");
-moz-padding-start: 13px;
}
#identity-box.verifiedIdentity > hbox {
padding: 0;
background: url("chrome://browser/skin/urlbar/startcap-verified-mid.png") repeat-x center center;
-moz-box-pack: center;
}
#identity-box.verifiedIdentity > hbox > #identity-icon-label {
background: url("chrome://browser/skin/urlbar/startcap-verified-end.png") no-repeat center right;
}
/* - Active state */
#identity-box.verifiedIdentity[open="true"],
#identity-box.verifiedIdentity:hover:active {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-start-active.png");
}
#identity-box.verifiedIdentity[open="true"] > hbox,
#identity-box.verifiedIdentity:hover:active > hbox {
background: url("chrome://browser/skin/urlbar/startcap-verified-mid-active.png") repeat-x center center;
}
#identity-box.verifiedIdentity[open="true"] > hbox > #identity-icon-label,
#identity-box.verifiedIdentity:hover:active > hbox > #identity-icon-label {
background: url("chrome://browser/skin/urlbar/startcap-verified-end-active.png") no-repeat center right;
}
/* - Focus state */
#urlbar[focused="true"] > #identity-box.verifiedIdentity {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-start-focused.png");
}
#urlbar[focused="true"] > #identity-box.verifiedIdentity > hbox {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-mid-focused.png");
}
#urlbar[focused="true"] > #identity-box.verifiedIdentity > hbox > #identity-icon-label {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-end-focused.png");
}
#urlbar[focused="true"] > #identity-box.verifiedIdentity:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-start-focused-graphite.png");
}
#urlbar[focused="true"] > #identity-box.verifiedIdentity > hbox:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-mid-focused-graphite.png");
}
#urlbar[focused="true"] > #identity-box.verifiedIdentity > hbox > #identity-icon-label:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-verified-end-focused-graphite.png");
}
/* Favicon Glow */
#identity-box.verifiedIdentity > hbox > #page-proxy-stack,
#identity-box.verifiedDomain > hbox > #page-proxy-stack {
-moz-margin-start: -3px;
width: 24px;
height: 20px;
padding: 2px 4px;
background: url("chrome://browser/skin/urlbar/urlbar-favicon-glow.png") center center no-repeat;
}
/* Popup Icons */
#identity-popup-icon {
height: 64px;
@ -1964,7 +2068,7 @@ tabpanels.plain {
-moz-window-shadow: none;
background-color: transparent;
margin-top: -4px;
margin-left: -15px;
margin-left: -13px;
min-width: 280px;
-moz-border-image: url(chrome://browser/skin/hud-panel.png) 26 18 22 50 / 26px 18px 22px 50px repeat;
}

View File

@ -32,9 +32,6 @@ classic.jar:
skin/classic/browser/KUI-background.png
skin/classic/browser/menu-back.png
skin/classic/browser/menu-forward.png
skin/classic/browser/navbar-textbox-button.png
skin/classic/browser/navbar-textbox-button-verifiedDomain.png
skin/classic/browser/navbar-textbox-button-verifiedIdentity.png
skin/classic/browser/page-livemarks.png
skin/classic/browser/livemark-item.png
skin/classic/browser/pageInfo.css
@ -53,7 +50,6 @@ classic.jar:
skin/classic/browser/Secure-background.gif
skin/classic/browser/Toolbar.png
skin/classic/browser/Toolbar-rtl.png
skin/classic/browser/urlbar-favicon-glow.png
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
@ -125,5 +121,53 @@ classic.jar:
skin/classic/browser/tabbrowser/tabbrowser-tabs-bkgnd.png (tabbrowser/tabbrowser-tabs-bkgnd.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
skin/classic/browser/tabbrowser/tab-bkgnd.png (tabbrowser/tab-bkgnd.png)
skin/classic/browser/urlbar/endcap.png (urlbar/endcap.png)
skin/classic/browser/urlbar/endcap-rtl.png (urlbar/endcap-rtl.png)
skin/classic/browser/urlbar/endcap-focused.png (urlbar/endcap-focused.png)
skin/classic/browser/urlbar/endcap-focused-graphite.png (urlbar/endcap-focused-graphite.png)
skin/classic/browser/urlbar/endcap-focused-graphite-rtl.png (urlbar/endcap-focused-graphite-rtl.png)
skin/classic/browser/urlbar/endcap-focused-rtl.png (urlbar/endcap-focused-rtl.png)
skin/classic/browser/urlbar/startcap.png (urlbar/startcap.png)
skin/classic/browser/urlbar/startcap-rtl.png (urlbar/startcap-rtl.png)
skin/classic/browser/urlbar/startcap-focused.png (urlbar/startcap-focused.png)
skin/classic/browser/urlbar/startcap-focused-graphite.png (urlbar/startcap-focused-graphite.png)
skin/classic/browser/urlbar/startcap-focused-graphite-rtl.png (urlbar/startcap-focused-graphite-rtl.png)
skin/classic/browser/urlbar/startcap-focused-rtl.png (urlbar/startcap-focused-rtl.png)
skin/classic/browser/urlbar/startcap-secure-start.png (urlbar/startcap-secure-start.png)
skin/classic/browser/urlbar/startcap-secure-mid.png (urlbar/startcap-secure-mid.png)
skin/classic/browser/urlbar/startcap-secure-end.png (urlbar/startcap-secure-end.png)
skin/classic/browser/urlbar/startcap-secure-start-active.png (urlbar/startcap-secure-start-active.png)
skin/classic/browser/urlbar/startcap-secure-mid-active.png (urlbar/startcap-secure-mid-active.png)
skin/classic/browser/urlbar/startcap-secure-end-active.png (urlbar/startcap-secure-end-active.png)
skin/classic/browser/urlbar/startcap-secure-start-focused.png (urlbar/startcap-secure-start-focused.png)
skin/classic/browser/urlbar/startcap-secure-start-focused-graphite.png (urlbar/startcap-secure-start-focused-graphite.png)
skin/classic/browser/urlbar/startcap-secure-mid-focused.png (urlbar/startcap-secure-mid-focused.png)
skin/classic/browser/urlbar/startcap-secure-mid-focused-graphite.png (urlbar/startcap-secure-mid-focused-graphite.png)
skin/classic/browser/urlbar/startcap-secure-end-focused.png (urlbar/startcap-secure-end-focused.png)
skin/classic/browser/urlbar/startcap-secure-end-focused-graphite.png (urlbar/startcap-secure-end-focused-graphite.png)
skin/classic/browser/urlbar/startcap-verified-start.png (urlbar/startcap-verified-start.png)
skin/classic/browser/urlbar/startcap-verified-mid.png (urlbar/startcap-verified-mid.png)
skin/classic/browser/urlbar/startcap-verified-end.png (urlbar/startcap-verified-end.png)
skin/classic/browser/urlbar/startcap-verified-start-active.png (urlbar/startcap-verified-start-active.png)
skin/classic/browser/urlbar/startcap-verified-mid-active.png (urlbar/startcap-verified-mid-active.png)
skin/classic/browser/urlbar/startcap-verified-end-active.png (urlbar/startcap-verified-end-active.png)
skin/classic/browser/urlbar/startcap-verified-start-focused.png (urlbar/startcap-verified-start-focused.png)
skin/classic/browser/urlbar/startcap-verified-start-focused-graphite.png (urlbar/startcap-verified-start-focused-graphite.png)
skin/classic/browser/urlbar/startcap-verified-mid-focused.png (urlbar/startcap-verified-mid-focused.png)
skin/classic/browser/urlbar/startcap-verified-mid-focused-graphite.png (urlbar/startcap-verified-mid-focused-graphite.png)
skin/classic/browser/urlbar/startcap-verified-end-focused.png (urlbar/startcap-verified-end-focused.png)
skin/classic/browser/urlbar/startcap-verified-end-focused-graphite.png (urlbar/startcap-verified-end-focused-graphite.png)
skin/classic/browser/urlbar/startcap-secure.png (urlbar/startcap-secure.png)
skin/classic/browser/urlbar/startcap-active.png (urlbar/startcap-active.png)
skin/classic/browser/urlbar/startcap-active-rtl.png (urlbar/startcap-active-rtl.png)
skin/classic/browser/urlbar/startcap-active-focused.png (urlbar/startcap-active-focused.png)
skin/classic/browser/urlbar/startcap-active-focused-graphite.png (urlbar/startcap-active-focused-graphite.png)
skin/classic/browser/urlbar/startcap-active-focused-graphite-rtl.png (urlbar/startcap-active-focused-graphite-rtl.png)
skin/classic/browser/urlbar/startcap-active-focused-rtl.png (urlbar/startcap-active-focused-rtl.png)
skin/classic/browser/urlbar/startcap-secure-active.png (urlbar/startcap-secure-active.png)
skin/classic/browser/urlbar/urlbar-favicon-glow.png (urlbar/urlbar-favicon-glow.png)
skin/classic/browser/urlbar/textfield-mid.png (urlbar/textfield-mid.png)
skin/classic/browser/urlbar/textfield-mid-focused.png (urlbar/textfield-mid-focused.png)
skin/classic/browser/urlbar/textfield-mid-focused-graphite.png (urlbar/textfield-mid-focused-graphite.png)
icon.png
preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

View File

@ -223,10 +223,6 @@ caption {
border-bottom: 1px solid #ccc;
}
#enableImagesRow {
-moz-box-align: start !important;
}
#browserUseCurrent, #browserUseBookmark, #browserUseBlank {
margin-top: 10px;
}

View File

@ -1,3 +1,31 @@
/* *** pinstripe *** */
.searchbar-textbox {
-moz-appearance: none;
font: icon;
height: 28px;
width: 5em;
margin: 0 3px 1px;
min-width: 5em;
border: none;
background-color: transparent;
}
.searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box {
background: url("chrome://browser/skin/urlbar/textfield-mid.png") repeat-x;
padding: 0;
margin: 0;
-moz-margin-start: 45px;
}
.searchbar-textbox[focused="true"] > .autocomplete-textbox-container > .textbox-input-box {
background-image: url("chrome://browser/skin/urlbar/textfield-mid-focused.png");
}
.searchbar-textbox[focused="true"] > .autocomplete-textbox-container > .textbox-input-box:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/textfield-mid-focused-graphite.png");
}
.searchbar-engine-image {
width: 16px;
height: 16px;
@ -6,8 +34,65 @@
}
.searchbar-engine-button {
background: url("chrome://browser/skin/urlbar/startcap.png") center center no-repeat;
-moz-appearance: none;
min-width: 0;
height: 28px;
min-width: 45px;
border: 0;
-moz-box-align: center;
margin: 0;
-moz-margin-start: -45px;
padding: 0;
}
.searchbar-engine-button[chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-rtl.png");
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button {
background-image: url("chrome://browser/skin/urlbar/startcap-focused.png");
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button[chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-focused-rtl.png");
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-focused-graphite.png");
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button[chromedir="rtl"]:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-focused-graphite-rtl.png");
}
.searchbar-engine-button:hover:active,
.searchbar-engine-button[open="true"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active.png") !important;
}
.searchbar-engine-button:hover:active[chromedir="rtl"],
.searchbar-engine-button[open="true"][chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active-rtl.png") !important;
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button:active,
.searchbar-textbox[focused="true"] > .searchbar-engine-button[open="true"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active-focused.png") !important;
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button[chromedir="rtl"]:active,
.searchbar-textbox[focused="true"] > .searchbar-engine-button[open="true"][chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active-focused-rtl.png") !important;
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button:active:-moz-system-metric(mac-graphite-theme),
.searchbar-textbox[focused="true"] > .searchbar-engine-button[open="true"]:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-active-focused-graphite.png") !important;
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button[chromedir="rtl"]:active:-moz-system-metric(mac-graphite-theme),
.searchbar-textbox[focused="true"] > .searchbar-engine-button[open="true"][chromedir="rtl"]:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/startcap-active-focused-graphite-rtl.png") !important;
}
.searchbar-engine-button > .button-box {
@ -18,11 +103,7 @@
}
.searchbar-engine-button[addengines="true"] > .button-box {
background: transparent url(chrome://browser/skin/Search-addengines.png) no-repeat right center;
}
.searchbar-textbox[chromedir="rtl"] .searchbar-engine-button[addengines="true"] > .button-box {
background-position: left center;
background: transparent url(chrome://browser/skin/Search-addengines.png) no-repeat 25px 50%;
}
.searchbar-dropmarker-image {
@ -33,10 +114,36 @@
.search-go-container {
-moz-box-align: center;
background: url("chrome://browser/skin/urlbar/endcap.png") no-repeat right top;
-moz-padding-end: 5px;
}
.search-go-container[chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/endcap-rtl.png");
}
.searchbar-textbox[focused="true"] > .search-go-container {
background-image: url("chrome://browser/skin/urlbar/endcap-focused.png");
}
.searchbar-textbox[focused="true"] > .search-go-container[chromedir="rtl"] {
background: url("chrome://browser/skin/urlbar/endcap-focused-rtl.png") no-repeat left top;
}
.searchbar-textbox[focused="true"] > .search-go-container:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/endcap-focused-graphite.png");
}
.searchbar-textbox[focused="true"] > .search-go-container[chromedir="rtl"]:-moz-system-metric(mac-graphite-theme) {
background-image: url("chrome://browser/skin/urlbar/endcap-focused-graphite-rtl.png");
}
.search-go-button {
padding: 1px;
list-style-image: url("chrome://browser/skin/Search.png");
margin: 0;
padding: 0;
-moz-padding-end: 6px;
}
.searchbar-engine-menuitem[selected="true"] > .menu-iconic-text {

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Some files were not shown because too many files have changed in this diff Show More