Monospace rendering changes between screenshots

#377537312 Area: Blink>DevTools / WebPreferences P2 CL 8649780

What happens

Screenshot tools pin the generic font families through Page.setFontFamilies so that captures are reproducible. The first full-page capture then makes the browser re-push WebPreferences to the renderer -- unchanged, but WebView::ApplyWebPreferences() re-applies the embedder's font family maps unconditionally, which overwrites the override. Every capture after the first one renders with a different monospace font, which is what the report describes as text metrics depending on the previous element.

The fix skips the font family maps when a WebPreferences update does not change them, so a re-push is the no-op it is meant to be. A real change to the maps still wins. Behind the default-on PreserveDevToolsFontFamilyOverrides kill switch.

Page.setFontFamilies(fixed: Liberation Serif), then a full-page capture

Before: default monospace is back
Kill switch off: after the capture the override is gone, the run is back to the default monospace at 138px.
After: override preserved
With the fix the override survives the capture: the same run stays at 195.84px.
Diff mask over all the text
23705 px differ -- every glyph on the page is drawn with a different family.
The page itself just reports the width of a monospace run; the override is what the capture script sets.

Verification

Links

Issue 377537312 CL 8649780 standalone sampler.html capture_screenshots.py