⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 248285 in webkit


Ignore:
Timestamp:
Aug 5, 2019, 7:07:06 PM (7 years ago)
Author:
Fujii Hironori
Message:

[Win] Specifying huge font-size causes crashing
https://bugs.webkit.org/show_bug.cgi?id=200340

Reviewed by Don Olmstead.

Source/WebCore:

Covered by existing tests.

  • platform/graphics/win/FontPlatformDataWin.cpp:

(WebCore::FontPlatformData::FontPlatformData): Use GetTextFace to
get font face names instead of GetOutlineTextMetrics which returns
null for huge size fonts.

LayoutTests:

  • platform/win/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r248283 r248285  
     12019-08-05  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win] Specifying huge font-size causes crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=200340
     5
     6        Reviewed by Don Olmstead.
     7
     8        * platform/win/TestExpectations:
     9
    1102019-08-05  Youenn Fablet  <youenn@apple.com>
    211
  • trunk/LayoutTests/platform/win/TestExpectations

    r248172 r248285  
    30033003fast/ruby/ruby-expansion-cjk-4.html [ ImageOnlyFailure ]
    30043004fast/ruby/ruby-expansion-cjk-5.html [ ImageOnlyFailure ]
    3005 fast/text/combining-mark-paint.html [ ImageOnlyFailure Crash ]
     3005fast/text/combining-mark-paint.html [ ImageOnlyFailure ]
    30063006fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ]
    30073007fast/text/trailing-word-detection.html [ Failure ]
     
    39823982webkit.org/b/182694 fast/html/marquee-reparent-check.html [ Crash ]
    39833983webkit.org/b/182694 fast/loader/document-destruction-within-unload.html [ Crash ]
    3984 webkit.org/b/182694 fast/scrolling/adjust-scroll-offset-on-zoom.html [ Crash ]
    39853984webkit.org/b/182694 fast/text/invalid-positionForPoint-offset.html [ Crash ]
    39863985webkit.org/b/182694 http/tests/security/svg-image-with-cached-remote-image.html [ Crash ]
     
    43364335[ Win10 ] fast/forms/number/number-appearance-spinbutton-layer.html [ Failure ]
    43374336[ Win10 Release ] accessibility/content-changed-notification-causes-crash.html [ Crash ]
    4338 [ Win10 ] fast/block/float/float-append-child-crash.html [ Crash ]
    4339 [ Win10 ] fast/css/font-size-nan.svg [ Crash ]
    4340 [ Win10 ] fast/css/large-font-size-crash.html [ Crash ]
    4341 [ Win10 ] fast/multicol/assert-on-column-count-when-zoomed-in.html [ Crash ]
    4342 [ Win10 ] fast/shapes/shape-outside-floats/shape-outside-negative-line-height-crash.html [ Crash ]
    4343 [ Win10 ] fast/text/hyphenation-unknown-locale.html [ Crash ]
    4344 [ Win10 ] fast/text/international/spaces-combined-in-vertical-text.html [ Crash ]
    4345 [ Win10 ] imported/blink/svg/zoom/large-zoom-crash.html [ Crash ]
    4346 [ Win10 Release ] legacy-animation-engine/accessibility/content-changed-notification-causes-crash.html [ Crash ]
    4347 [ Win10 ] svg/custom/use-invalidate-click-crash.xhtml [ Crash ]
    4348 [ Win10 ] svg/text/font-size-too-large-crash.svg [ Crash ]
    4349 [ Win10 ] svg/text/svg-zoom-large-value.xhtml [ Crash ]
    4350 [ Win10 ] svg/text/text-style-recalc-crash.html [ Crash ]
    43514337[ Win10 ] fast/dom/crash-with-bad-url.html [ Timeout ]
    43524338
  • trunk/Source/WebCore/ChangeLog

    r248283 r248285  
     12019-08-05  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win] Specifying huge font-size causes crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=200340
     5
     6        Reviewed by Don Olmstead.
     7
     8        Covered by existing tests.
     9
     10        * platform/graphics/win/FontPlatformDataWin.cpp:
     11        (WebCore::FontPlatformData::FontPlatformData): Use GetTextFace to
     12        get font face names instead of GetOutlineTextMetrics which returns
     13        null for huge size fonts.
     14
    1152019-08-05  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp

    r239320 r248285  
    5353   
    5454    ::SelectObject(hdc, m_font->get());
    55     UINT bufferSize = GetOutlineTextMetrics(hdc, 0, NULL);
    5655
    57     ASSERT_WITH_MESSAGE(bufferSize, "Bitmap fonts not supported with CoreGraphics.");
    58 
    59     if (bufferSize) {
    60         static const constexpr unsigned InitialBufferSize { 256 };
    61         Vector<char, InitialBufferSize> buffer(bufferSize);
    62         auto* metrics = reinterpret_cast<OUTLINETEXTMETRICW*>(buffer.data());
    63 
    64         GetOutlineTextMetricsW(hdc, bufferSize, metrics);
    65         WCHAR* faceName = (WCHAR*)((uintptr_t)metrics + (uintptr_t)metrics->otmpFaceName);
    66 
    67         platformDataInit(m_font->get(), size, hdc, faceName);
    68     }
     56    wchar_t faceName[LF_FACESIZE];
     57    GetTextFace(hdc, LF_FACESIZE, faceName);
     58    platformDataInit(m_font->get(), size, hdc, faceName);
    6959
    7060    RestoreDC(hdc, -1);
Note: See TracChangeset for help on using the changeset viewer.