Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 771310bdbcaf492206a9dfa9a6863a937e52bb73
      
https://github.com/WebKit/WebKit/commit/771310bdbcaf492206a9dfa9a6863a937e52bb73
  Author: Rob Buis <rb...@igalia.com>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-font-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-font.html
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-zero-height-font-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-zero-height-font.html
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust.html
    M LayoutTests/platform/gtk/TestExpectations
    M LayoutTests/platform/wpe/TestExpectations
    M Source/WebCore/platform/graphics/FontPlatformData.cpp
    M Source/WebCore/style/StyleFontSizeFunctions.cpp

  Log Message:
  -----------
  ASAN_TRAP | WebCore::RenderText::computePreferredLogicalWidths; 
WebCore::RenderText::trimmedPreferredWidths; 
WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=288444

Reviewed by Vitor Roriz.

In Style::adjustedFontSize a NaN value can be returned for font-size-adjust of 
zero. This causes the
FontPlatformData comparison operator for font size to be broken since a NaN 
will never match anything including other NaNs,
resulting in ASSERTs.

To fix this return early with zero size when font-size-adjust is zero, this is 
according to spec [1].

[1] https://drafts.csswg.org/css-fonts-5/#font-size-adjust-prop

* 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-font-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-font.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-zero-height-font-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust-no-glyphs-zero-height-font.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/svg/fonts/zero-font-size-adjust.html:
 Added.
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::updateSizeWithFontSizeAdjust):
* Source/WebCore/style/StyleFontSizeFunctions.cpp:
(WebCore::Style::adjustedFontSize):

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



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

Reply via email to