Make Layer::ShouldHitTest respect SetHideLayerAndSubtree

Ui::Layers call SetHideLayerAndSubtree when they become visible or
hidden. But a cc::Layer with hide_layer_and_subtree = true still
draws its content and is considered hit-testable, though not displayed
on the screen.

This patch makes cc hit testing respect hide_layer_and_subtree and do
not hit test a layer if it's drawn but not displayed on screen.

Bug: 901882
Change-Id: I18c9511c18628067dbcb471cd8dfe43a1e3c6426
Reviewed-on: https://chromium-review.googlesource.com/c/1413393
Reviewed-by: weiliangc <weiliangc@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625335}
7 files changed