[css-pseudo] Detect list style changes in the list item, not the marker
The list-style-type and list-style-image properties can affect the kind of list marker that we have. However, what matters are the values on the originating list item, not on the ::marker itself. Right now the difference doesn't matter, since ::marker doesn't accept these properties, and thus must be inherited. But in the future we might remove the restrictions and accept arbitrary properties in ::marker. This patch makes LayoutListMarker stop detecting changes in the list properties. They are instead detected in LayoutListItem, which notifies the marker, using a similar logic as for LayoutInsideListMarker and LayoutOutideListMarker. Also, the SetNeedsLayoutAndIntrinsicWidthsRecalcAndFullPaintInvalidation call when list-style-type changes is now avoided if list-style-image is a valid image, since then it overrides list-style-type. And there is no need to check list-style-position, since it affects the display, thus forcing a layout tree reattachment. So the layout invalidation reason can be changed from kStyleChange to kListStyleTypeChange. Bug: 457718 Change-Id: Ifde0068bbc3fbf8802c1c9c4fed13bc682b65d80 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2279775Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/master@{#786225}
Showing
Please register or sign in to comment