Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6c79b0f1e81e72b7b8cba08969633ca2f54e6316
      
https://github.com/WebKit/WebKit/commit/6c79b0f1e81e72b7b8cba08969633ca2f54e6316
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-030-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-030.html
    M Source/WebCore/rendering/shapes/RasterLayoutShape.cpp

  Log Message:
  -----------
  shape-margin above 65535px on an image shape-outside produces a much smaller 
float area
https://bugs.webkit.org/show_bug.cgi?id=326186
rdar://189069223

Reviewed by Simon Fraser.

MarginIntervalGenerator computed radius * radius as unsigned, which
overflows when the shape-margin is above 65535px. For a radius of
65536px the square wraps to 0, so the margin on each row of the
shape itself became 0. Larger radii wrapped to other small values.
A float with a huge shape-margin then had a float area far smaller
than its margin box, and text wrapped into the space the margin
should have covered.

This patch does the squaring in 64 bits.

Test: 
imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-030.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-030-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-030.html:
 Added.
* Source/WebCore/rendering/shapes/RasterLayoutShape.cpp:
(WebCore::MarginIntervalGenerator::MarginIntervalGenerator):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to