Commit 4cbd3d8f authored by Jacques Newman's avatar Jacques Newman Committed by Commit Bot

Always rebuild extra mac nodes to keep index_in_parent up to date.


Bug: 1012831
Change-Id: I40adeaa1c625ee45f21cd3cc1f1ada50d8760c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854719
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705201}
parent 96f3b7dd
......@@ -342,23 +342,18 @@ void AXTableInfo::UpdateExtraMacNodes() {
// The table header container is just a node with all of the headers in the
// table as indirect children.
// One node for each column, and one more for the table header container.
size_t extra_node_count = col_count + 1;
if (extra_mac_nodes.size() != extra_node_count) {
// Delete old extra nodes.
ClearExtraMacNodes();
// Delete old extra nodes.
ClearExtraMacNodes();
// Resize.
extra_mac_nodes.resize(col_count + 1);
// Resize.
extra_mac_nodes.resize(col_count + 1);
// Create column nodes.
for (size_t i = 0; i < col_count; i++)
extra_mac_nodes[i] = CreateExtraMacColumnNode(i);
// Create column nodes.
for (size_t i = 0; i < col_count; i++)
extra_mac_nodes[i] = CreateExtraMacColumnNode(i);
// Create table header container node.
extra_mac_nodes[col_count] = CreateExtraMacTableHeaderNode();
}
// Create table header container node.
extra_mac_nodes[col_count] = CreateExtraMacTableHeaderNode();
// Update the columns to reflect current state of the table.
for (size_t i = 0; i < col_count; i++)
......
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