Skip to content

Commit

Permalink
Merge pull request #522 from Floorp-Projects/upstream-esr115-20231022…
Browse files Browse the repository at this point in the history
…024919

Pull upstream
  • Loading branch information
surapunoyousei authored Oct 22, 2023
2 parents c4ceea7 + 4c54c5f commit 99b33c1
Show file tree
Hide file tree
Showing 304 changed files with 7,294 additions and 6,996 deletions.
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -4387,3 +4387,4 @@ bf2f656d025836975b7bf6aeb16901a037a01923 FIREFOX_115_2_0esr_RELEASE
17bedcda2f5c28b7fbc136d300bdbbf04f382e00 FIREFOX_115_3_0esr_RELEASE
749617c4473c65f8aebb2e3254777ae99dc17cce FIREFOX_115_3_1esr_BUILD1
749617c4473c65f8aebb2e3254777ae99dc17cce FIREFOX_115_3_1esr_RELEASE
7e770707fe156fc2e62c5f624235e4b2dadc1e7b FIREFOX_115_4_0esr_BUILD1
12 changes: 6 additions & 6 deletions accessible/atk/AccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "RemoteAccessible.h"
#include "DocAccessibleParent.h"
#include "RootAccessible.h"
#include "mozilla/a11y/TableAccessibleBase.h"
#include "mozilla/a11y/TableCellAccessibleBase.h"
#include "mozilla/a11y/TableAccessible.h"
#include "mozilla/a11y/TableCellAccessible.h"
#include "nsMai.h"
#include "nsMaiHyperlink.h"
#include "nsString.h"
Expand Down Expand Up @@ -1442,7 +1442,7 @@ void AccessibleWrap::GetKeyBinding(Accessible* aAccessible,
}

// static
Accessible* AccessibleWrap::GetColumnHeader(TableAccessibleBase* aAccessible,
Accessible* AccessibleWrap::GetColumnHeader(TableAccessible* aAccessible,
int32_t aColIdx) {
if (!aAccessible) {
return nullptr;
Expand All @@ -1460,7 +1460,7 @@ Accessible* AccessibleWrap::GetColumnHeader(TableAccessibleBase* aAccessible,
}

// otherwise get column header for the data cell at the first row.
TableCellAccessibleBase* tableCell = cell->AsTableCellBase();
TableCellAccessible* tableCell = cell->AsTableCell();
if (!tableCell) {
return nullptr;
}
Expand All @@ -1475,7 +1475,7 @@ Accessible* AccessibleWrap::GetColumnHeader(TableAccessibleBase* aAccessible,
}

// static
Accessible* AccessibleWrap::GetRowHeader(TableAccessibleBase* aAccessible,
Accessible* AccessibleWrap::GetRowHeader(TableAccessible* aAccessible,
int32_t aRowIdx) {
if (!aAccessible) {
return nullptr;
Expand All @@ -1493,7 +1493,7 @@ Accessible* AccessibleWrap::GetRowHeader(TableAccessibleBase* aAccessible,
}

// otherwise get row header for the data cell at the first column.
TableCellAccessibleBase* tableCell = cell->AsTableCellBase();
TableCellAccessible* tableCell = cell->AsTableCell();
if (!tableCell) {
return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions accessible/atk/AccessibleWrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ class AccessibleWrap : public LocalAccessible {

static void GetKeyBinding(Accessible* aAccessible, nsAString& aResult);

static Accessible* GetColumnHeader(TableAccessibleBase* aAccessible,
static Accessible* GetColumnHeader(TableAccessible* aAccessible,
int32_t aColIdx);
static Accessible* GetRowHeader(TableAccessibleBase* aAccessible,
static Accessible* GetRowHeader(TableAccessible* aAccessible,
int32_t aRowIdx);

protected:
Expand Down
40 changes: 19 additions & 21 deletions accessible/atk/nsMaiInterfaceTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "InterfaceInitFuncs.h"

#include "AccessibleWrap.h"
#include "mozilla/a11y/TableAccessibleBase.h"
#include "mozilla/a11y/TableAccessible.h"
#include "nsAccessibilityService.h"
#include "nsMai.h"
#include "RemoteAccessible.h"
Expand All @@ -29,7 +29,7 @@ static AtkObject* refAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
if (!acc) {
return nullptr;
}
Accessible* cell = acc->AsTableBase()->CellAt(aRowIdx, aColIdx);
Accessible* cell = acc->AsTable()->CellAt(aRowIdx, aColIdx);
if (!cell) {
return nullptr;
}
Expand All @@ -52,7 +52,7 @@ static gint getIndexAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->CellIndexAt(aRowIdx, aColIdx));
return static_cast<gint>(acc->AsTable()->CellIndexAt(aRowIdx, aColIdx));
}

static gint getColumnAtIndexCB(AtkTable* aTable, gint aIdx) {
Expand All @@ -64,7 +64,7 @@ static gint getColumnAtIndexCB(AtkTable* aTable, gint aIdx) {
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->ColIndexAt(aIdx));
return static_cast<gint>(acc->AsTable()->ColIndexAt(aIdx));
}

static gint getRowAtIndexCB(AtkTable* aTable, gint aIdx) {
Expand All @@ -76,23 +76,23 @@ static gint getRowAtIndexCB(AtkTable* aTable, gint aIdx) {
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->RowIndexAt(aIdx));
return static_cast<gint>(acc->AsTable()->RowIndexAt(aIdx));
}

static gint getColumnCountCB(AtkTable* aTable) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aTable));
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->ColCount());
return static_cast<gint>(acc->AsTable()->ColCount());
}

static gint getRowCountCB(AtkTable* aTable) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aTable));
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->RowCount());
return static_cast<gint>(acc->AsTable()->RowCount());
}

static gint getColumnExtentAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
Expand All @@ -104,23 +104,23 @@ static gint getColumnExtentAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->ColExtentAt(aRowIdx, aColIdx));
return static_cast<gint>(acc->AsTable()->ColExtentAt(aRowIdx, aColIdx));
}

static gint getRowExtentAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aTable));
if (!acc) {
return -1;
}
return static_cast<gint>(acc->AsTableBase()->RowExtentAt(aRowIdx, aColIdx));
return static_cast<gint>(acc->AsTable()->RowExtentAt(aRowIdx, aColIdx));
}

static AtkObject* getCaptionCB(AtkTable* aTable) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aTable));
if (!acc) {
return nullptr;
}
Accessible* caption = acc->AsTableBase()->Caption();
Accessible* caption = acc->AsTable()->Caption();
return caption ? GetWrapperFor(caption) : nullptr;
}

Expand All @@ -130,7 +130,7 @@ static const gchar* getColumnDescriptionCB(AtkTable* aTable, gint aColumn) {
return nullptr;
}
nsAutoString autoStr;
acc->AsTableBase()->ColDescription(aColumn, autoStr);
acc->AsTable()->ColDescription(aColumn, autoStr);
return AccessibleWrap::ReturnString(autoStr);
}

Expand All @@ -139,8 +139,7 @@ static AtkObject* getColumnHeaderCB(AtkTable* aTable, gint aColIdx) {
if (!acc) {
return nullptr;
}
Accessible* header =
AccessibleWrap::GetColumnHeader(acc->AsTableBase(), aColIdx);
Accessible* header = AccessibleWrap::GetColumnHeader(acc->AsTable(), aColIdx);
return header ? GetWrapperFor(header) : nullptr;
}

Expand All @@ -150,7 +149,7 @@ static const gchar* getRowDescriptionCB(AtkTable* aTable, gint aRow) {
return nullptr;
}
nsAutoString autoStr;
acc->AsTableBase()->RowDescription(aRow, autoStr);
acc->AsTable()->RowDescription(aRow, autoStr);
return AccessibleWrap::ReturnString(autoStr);
}

Expand All @@ -159,8 +158,7 @@ static AtkObject* getRowHeaderCB(AtkTable* aTable, gint aRowIdx) {
if (!acc) {
return nullptr;
}
Accessible* header =
AccessibleWrap::GetRowHeader(acc->AsTableBase(), aRowIdx);
Accessible* header = AccessibleWrap::GetRowHeader(acc->AsTable(), aRowIdx);
return header ? GetWrapperFor(header) : nullptr;
}

Expand All @@ -180,7 +178,7 @@ static gint getSelectedColumnsCB(AtkTable* aTable, gint** aSelected) {
return 0;
}
AutoTArray<uint32_t, 10> cols;
acc->AsTableBase()->SelectedColIndices(&cols);
acc->AsTable()->SelectedColIndices(&cols);

if (cols.IsEmpty()) return 0;

Expand All @@ -201,7 +199,7 @@ static gint getSelectedRowsCB(AtkTable* aTable, gint** aSelected) {
return 0;
}
AutoTArray<uint32_t, 10> rows;
acc->AsTableBase()->SelectedRowIndices(&rows);
acc->AsTable()->SelectedRowIndices(&rows);

gint* atkRows = g_new(gint, rows.Length());
if (!atkRows) {
Expand All @@ -219,15 +217,15 @@ static gboolean isColumnSelectedCB(AtkTable* aTable, gint aColIdx) {
if (!acc) {
return FALSE;
}
return static_cast<gboolean>(acc->AsTableBase()->IsColSelected(aColIdx));
return static_cast<gboolean>(acc->AsTable()->IsColSelected(aColIdx));
}

static gboolean isRowSelectedCB(AtkTable* aTable, gint aRowIdx) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aTable));
if (!acc) {
return FALSE;
}
return static_cast<gboolean>(acc->AsTableBase()->IsRowSelected(aRowIdx));
return static_cast<gboolean>(acc->AsTable()->IsRowSelected(aRowIdx));
}

static gboolean isCellSelectedCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
Expand All @@ -236,7 +234,7 @@ static gboolean isCellSelectedCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
return FALSE;
}
return static_cast<gboolean>(
acc->AsTableBase()->IsCellSelected(aRowIdx, aColIdx));
acc->AsTable()->IsCellSelected(aRowIdx, aColIdx));
}
}

Expand Down
30 changes: 21 additions & 9 deletions accessible/atk/nsMaiInterfaceTableCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "InterfaceInitFuncs.h"

#include "mozilla/a11y/TableAccessibleBase.h"
#include "mozilla/a11y/TableCellAccessibleBase.h"
#include "mozilla/a11y/TableAccessible.h"
#include "mozilla/a11y/TableCellAccessible.h"
#include "nsAccessibilityService.h"
#include "nsMai.h"
#include "RemoteAccessible.h"
Expand All @@ -24,23 +24,23 @@ static gint GetColumnSpanCB(AtkTableCell* aCell) {
if (!acc) {
return 0;
}
return static_cast<gint>(acc->AsTableCellBase()->ColExtent());
return static_cast<gint>(acc->AsTableCell()->ColExtent());
}

static gint GetRowSpanCB(AtkTableCell* aCell) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aCell));
if (!acc) {
return 0;
}
return static_cast<gint>(acc->AsTableCellBase()->RowExtent());
return static_cast<gint>(acc->AsTableCell()->RowExtent());
}

static gboolean GetPositionCB(AtkTableCell* aCell, gint* aRow, gint* aCol) {
Accessible* acc = GetInternalObj(ATK_OBJECT(aCell));
if (!acc) {
return false;
}
TableCellAccessibleBase* cell = acc->AsTableCellBase();
TableCellAccessible* cell = acc->AsTableCell();
if (!cell) {
return false;
}
Expand All @@ -55,7 +55,7 @@ static gboolean GetColumnRowSpanCB(AtkTableCell* aCell, gint* aCol, gint* aRow,
if (!acc) {
return false;
}
TableCellAccessibleBase* cellAcc = acc->AsTableCellBase();
TableCellAccessible* cellAcc = acc->AsTableCell();
if (!cellAcc) {
return false;
}
Expand All @@ -71,7 +71,11 @@ static AtkObject* GetTableCB(AtkTableCell* aTableCell) {
if (!acc) {
return nullptr;
}
TableAccessibleBase* table = acc->AsTableCellBase()->Table();
TableCellAccessible* cell = acc->AsTableCell();
if (!cell) {
return nullptr;
}
TableAccessible* table = cell->Table();
if (!table) {
return nullptr;
}
Expand All @@ -84,8 +88,12 @@ static GPtrArray* GetColumnHeaderCellsCB(AtkTableCell* aCell) {
if (!acc) {
return nullptr;
}
TableCellAccessible* cell = acc->AsTableCell();
if (!cell) {
return nullptr;
}
AutoTArray<Accessible*, 10> headers;
acc->AsTableCellBase()->ColHeaderCells(&headers);
cell->ColHeaderCells(&headers);
if (headers.IsEmpty()) {
return nullptr;
}
Expand All @@ -105,8 +113,12 @@ static GPtrArray* GetRowHeaderCellsCB(AtkTableCell* aCell) {
if (!acc) {
return nullptr;
}
TableCellAccessible* cell = acc->AsTableCell();
if (!cell) {
return nullptr;
}
AutoTArray<Accessible*, 10> headers;
acc->AsTableCellBase()->RowHeaderCells(&headers);
cell->RowHeaderCells(&headers);
if (headers.IsEmpty()) {
return nullptr;
}
Expand Down
Loading

0 comments on commit 99b33c1

Please sign in to comment.