[css-pseudo] Move LayoutNG marker code to ListMarker

The LayoutNGListItem used to hold some information about the marker:
the kind of marker, whether the marker text was up-to-date, etc.

With the addition of the ::marker pseudo-element, markers have become
independent and are no longer created and destroyed by LayoutNGListItem.
However, this made it more difficult to keep the information in sync.

For example, dynamically applying 'content: none' to a symbol marker
destroys it, but LayoutNGListItem didn't notice that marker_type_ was
supposed to change from kSymbolValue to kStatic. This caused a DCHECK
failure and a null deref in SymbolMarkerLayoutText().

To avoid these problems, this patch moves all the code regarding markers
from LayoutNGListItem to ListMarker. This is a new class that contains
generic methods for the LayoutNG markers (LayoutNGListMarker or
LayoutNGInsideListMarker).

BUG=1043478, 457718

TEST=external/wpt/css/css-pseudo/marker-content-020.html

The test fails in legacy since 'content' is not properly supported yet.

Change-Id: I2d7b424bbaf2487a8fbc49303d5114187d8c1fb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007754
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735167}
15 files changed