[A11y] Address possibility of nodeless object with content-visibility rule

Note that the new test does not exercise all of the added code, because
an AXObject never existed for the nodeless layout object in the
scrollbar. However, rather than hitting a CHECK(), the code will now
continue and ensure that if there is a subtree of AXObjects based
only on layout objects, that they are removed in this case.

Fixed: 1481892
Change-Id: Iebacc810852c0a34e6f743a821957360bcfd69d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4860045
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196125}
diff --git a/accessibility/crashtests/null-node.html b/accessibility/crashtests/null-node.html
new file mode 100644
index 0000000..dc4a81e
--- /dev/null
+++ b/accessibility/crashtests/null-node.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<style>
+::-webkit-scrollbar-track, ::-webkit-scrollbar {
+  color: red;
+}
+::-webkit-scrollbar-track:horizontal:disabled {
+  content-visibility: hidden;
+}
+</style>
+<main style="height: 100px; width: 100px; overflow: scroll;"></main>