[FlexNG] Update hittest with flexbox if we hit an anon flex-item.

Previously if we hit an anonymous flex-item we wouldn't update the
hit-test result with the flexbox itself.

This updates the hit-test with the flexbox if no node is set yet.

Bug: 1097654
Change-Id: I4b9d1754061aae14dd8fa6a9f33d8d065c838db6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264017
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782059}
diff --git a/css/css-flexbox/hittest-anonymous-box.html b/css/css-flexbox/hittest-anonymous-box.html
new file mode 100644
index 0000000..06de327
--- /dev/null
+++ b/css/css-flexbox/hittest-anonymous-box.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<link rel="help" href="https://crbug.com/1097654" />
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+#target {
+  font: 20px/1 Ahem;
+  display: flex;
+  flex-direction: column;
+  border: 2px solid black;
+  width: 100px;
+  height: 100px;
+}
+</style>
+<div id=target>X</div>
+<script>
+test(function(t) {
+  const target = document.getElementById('target');
+  assert_equals(target, document.elementFromPoint(30, 10));
+}, 'Hit-testing within an anonymous flex-item should return the flexbox as the hittest result.');
+</script>
+