[FastFlatTreeTraversal] Enter fast path always in Node::AssignedSlot()

If NeedsAssignmentRecalc() is true, the current code doesn't enter
fast path.

However, if Node::AssignedSlot() is repeated again and again without
any dom mutation, this can be improved by doing recalc assignements
once, and use the flat tree node data for the 2nd call or later.

This situation can happen in event dispatching, where we might need
to call Node::AssignedSlot for the same node repeatedly.

BUG: 906494
Change-Id: Iafd57a4ff90144da462d71066122ac6977fd8c84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1531926
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643289}
1 file changed