Commit 0d1d3e69 authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

AXSelection: Strengthened table test

I tried hard, but I wasn't able to make non-text positions work inside a table.
The DOM parser collects all the non-white space text nodes between the table cells and places them in a single text node before the table element.
This is not part of the accessibility code, but is how the DOM parser works.
The alternative, which I implemented in this patch, is to enhance the table test by adding more selections inside text nodes.
<table>
  ^<tr>
    <td>column</td>
  </tr>|
</table>
Becomes in the DOM tree:
Body
++#Text "\n^|\n"
++Table
++++Tr
++++++Td

R=dmazzoni@chromium.org

Change-Id: I99c4a1f14805f9a0ba4addbaaff9bad1b1a0b86b
Reviewed-on: https://chromium-review.googlesource.com/c/1332728Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607505}
parent 03a083db
================================================================================ ================================================================================
AXSelection from AX object anchored position in "WebArea": "", 0 to AX object anchored position in "WebArea": "", 0 AXSelection from AX text position in "StaticText": "Sum", 0 to AX text position in "StaticText": "Subtraction", 11
================================================================================ ================================================================================
|++<Table> ++<Table>
++++<Row> ++++<Row>
++++++<ColumnHeader: Sum> ++++++<ColumnHeader: Sum>
++++++++<StaticText: Sum> ^++++++++<StaticText: ^Sum>
++++++<ColumnHeader: Subtraction> ++++++<ColumnHeader: Subtraction>
++++++++<StaticText: Subtraction> ++++++++<StaticText: Subtraction|>
++++<Row> ++++<Row>
++++++<Cell: 10> ++++++<Cell: 10>
++++++++<StaticText: 10> ++++++++<StaticText: 10>
...@@ -25,9 +25,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an ...@@ -25,9 +25,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an
++++++++<StaticText: 3> ++++++++<StaticText: 3>
================================================================================ ================================================================================
AXSelection from AX object anchored position in "WebArea": "", 0 to AX object anchored position in "WebArea": "", 0 AXSelection from AX text position in "StaticText": "7", 1 to AX text position in "StaticText": "10", 0
================================================================================ ================================================================================
|++<Table> ++<Table>
++++<Row> ++++<Row>
++++++<ColumnHeader: Sum> ++++++<ColumnHeader: Sum>
++++++++<StaticText: Sum> ++++++++<StaticText: Sum>
...@@ -35,9 +35,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an ...@@ -35,9 +35,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an
++++++++<StaticText: Subtraction> ++++++++<StaticText: Subtraction>
++++<Row> ++++<Row>
++++++<Cell: 10> ++++++<Cell: 10>
++++++++<StaticText: 10> |++++++++<StaticText: |10>
++++++<Cell: 7> ++++++<Cell: 7>
++++++++<StaticText: 7> ++++++++<StaticText: 7^>
++++<Row> ++++<Row>
++++++<Cell: 2> ++++++<Cell: 2>
++++++++<StaticText: 2> ++++++++<StaticText: 2>
...@@ -50,9 +50,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an ...@@ -50,9 +50,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an
++++++++<StaticText: 3> ++++++++<StaticText: 3>
================================================================================ ================================================================================
AXSelection from AX object anchored position in "WebArea": "", 0 to AX object anchored position in "WebArea": "", 0 AXSelection from AX text position in "StaticText": "2", 1 to AX text position in "StaticText": "4", 0
================================================================================ ================================================================================
|++<Table> ++<Table>
++++<Row> ++++<Row>
++++++<ColumnHeader: Sum> ++++++<ColumnHeader: Sum>
++++++++<StaticText: Sum> ++++++++<StaticText: Sum>
...@@ -65,9 +65,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an ...@@ -65,9 +65,9 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an
++++++++<StaticText: 7> ++++++++<StaticText: 7>
++++<Row> ++++<Row>
++++++<Cell: 2> ++++++<Cell: 2>
++++++++<StaticText: 2> ++++++++<StaticText: 2^>
++++++<Cell: 4> ++++++<Cell: 4>
++++++++<StaticText: 4> |++++++++<StaticText: |4>
++++<Row> ++++<Row>
++++++<Cell: 12> ++++++<Cell: 12>
++++++++<StaticText: 12> ++++++++<StaticText: 12>
...@@ -75,14 +75,14 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an ...@@ -75,14 +75,14 @@ AXSelection from AX object anchored position in "WebArea": "", 0 to AX object an
++++++++<StaticText: 3> ++++++++<StaticText: 3>
================================================================================ ================================================================================
AXSelection from AX text position in "StaticText": "Sum", 0 to AX text position in "StaticText": "Subtraction", 11 AXSelection from AX text position in "StaticText": "12", 0 to AX text position in "StaticText": "3", 1
================================================================================ ================================================================================
++<Table> ++<Table>
++++<Row> ++++<Row>
++++++<ColumnHeader: Sum> ++++++<ColumnHeader: Sum>
^++++++++<StaticText: ^Sum> ++++++++<StaticText: Sum>
++++++<ColumnHeader: Subtraction> ++++++<ColumnHeader: Subtraction>
++++++++<StaticText: Subtraction|> ++++++++<StaticText: Subtraction>
++++<Row> ++++<Row>
++++++<Cell: 10> ++++++<Cell: 10>
++++++++<StaticText: 10> ++++++++<StaticText: 10>
...@@ -95,6 +95,6 @@ AXSelection from AX text position in "StaticText": "Sum", 0 to AX text position ...@@ -95,6 +95,6 @@ AXSelection from AX text position in "StaticText": "Sum", 0 to AX text position
++++++++<StaticText: 4> ++++++++<StaticText: 4>
++++<Row> ++++<Row>
++++++<Cell: 12> ++++++<Cell: 12>
++++++++<StaticText: 12> ^++++++++<StaticText: ^12>
++++++<Cell: 3> ++++++<Cell: 3>
++++++++<StaticText: 3> ++++++++<StaticText: 3|>
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
</tr> </tr>
</thead> </thead>
<tfoot> <tfoot>
^<tr> <tr>
<td>12</td> <td>^12</td>
<td>3</td> <td>3|</td>
</tr>| </tr>
</tfoot> </tfoot>
<tbody> <tbody>
<tr> <tr>
^<td>10</td> <td>|10</td>
<td>7</td>| <td>7^</td>
</tr>
<tr>
<td>2^</td>
<td>|4</td>
</tr> </tr>
^<tr>
<td>2</td>
<td>4</td>
</tr>|
</tbody> </tbody>
</table> </table>
</body> </body>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment