Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0d680136cb51cf449dca3430455b1ffe95be5661
      
https://github.com/WebKit/WebKit/commit/0d680136cb51cf449dca3430455b1ffe95be5661
  Author: Vitor Roriz <[email protected]>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/page/Settings.yaml
    M Source/WebCore/page/SettingsBase.cpp
    M Source/WebCore/page/SettingsBase.h

  Log Message:
  -----------
  REGRESSION(291808@main): [macOS Debug]: ASSERTION FAILED: !index in 
CSSFontSelector::fallbackFontAt on html5lib/generated/run-entities01-data.html 
(290012)
rdar://147365119
https://bugs.webkit.org/show_bug.cgi?id=290231

Reviewed by Geoffrey Garen.

Settings control how we resolve generic font-family names.

This bug happens because we were setting setFontFallbackPrefersPictographs(true)
from another test, on the same process, before running run-entities01-data.html.

This made the cached FontCascadeFont object to have its 
m_lastRealizedFallbackIndex
expanded beyound effectiveFamilyCount(), making fontSelectorFallbackIndex 
turning 1.

When running run-entities01-data.html, m_lastRealizedFallbackIndex is still
retaining that value. However, fontSelector->fallbackFontCount() that comes 
from Settings
is now 0 and we won't pass the check `fontSelectorFallbackIndex == 
fontSelector->fallbackFontCount()`.

This lead us to a inconsistent state in which we call fallbackFontAt for 
resolving the pictographFontFamily,
although we are stating by the index != 0 that we already did.

We should make sure that setting fontFallbackPrefersPictographs invalidates the 
FontCascadeCache
as we already do for the other related settings as `setSansSerifFontFamily`, 
`setCursiveFontFamily` and etc.

* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/page/Settings.yaml:
* Source/WebCore/page/SettingsBase.cpp:
(WebCore::SettingsBase::protectedPage const):
(WebCore::SettingsBase::fontFallbackPrefersPictographsChanged):
* Source/WebCore/page/SettingsBase.h:

Canonical link: https://commits.webkit.org/292764@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to