[Display Locking]: Mark locked elements for style recalc if blocked during current style recalc

There are some cases where we go to a locked element during style
recalc and the element or its children is not actually dirty, but
we're going there due to a change in the ancestor that necessitates
a traversal & recalc of the descendants. However if we got blocked
by the lock and the element stays style-clean, we'll not
go to recalc the style for that locked subtree again.

Example:
If an element with display:none changed its display value to something
else (block etc) it will trigger a style recalc for its whole subtree
but it will be skipping locked elements as usual. However if we do
this and after that there's no other change to the locked subtree,
we might never actually calculate the style for that locked subtree.
If this is a lock-before-append case, that means the ComputedStyle
will stay null.

In this CL, we check if we're encountering such a case and mark the
locked element as dirty sufficiently (local/subtree change) if so,
so that when we update/commit, we're guaranteed to traverse to that
subtree and calculate the style correctly.

Bug: 940857
Change-Id: I577deb420a6a57e54d478e295ac60c004fb5b25c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1517476
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640706}
6 files changed