DL: Ensure to not not process innerText queries on locked subtrees.

This patch skips innerText processing for elements that are either
display locked, or are inside a locked subtree.

This is due to the fact that display locked subtrees are not painted
and so should behave in the same way as visibility hidden (or display
none elements).

This also ensures that we don't access text nodes when they have not
been laid out, which is possible in display locking. This causes
CHECKs with LayoutNG.

R=chrishtr@chromium.org, rakina@chromium.org, xiaochengh@chromium.org

Bug: 962569
Change-Id: I0f286b7ea55e72baada3d9f2c10f4ea693e268d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1609666
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659664}
4 files changed