[webkit-changes] [WebKit/WebKit] a331ed: Improve divide-by-zero workaround in `AutoTableLay...

Ahmad Saleem noreply at github.com
Fri Jan 24 22:03:32 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a331ed86d3b809ddef882898f5370ccca3738926
      https://github.com/WebKit/WebKit/commit/a331ed86d3b809ddef882898f5370ccca3738926
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    A LayoutTests/fast/table/auto-layout-close-to-max-width-expected.txt
    A LayoutTests/fast/table/auto-layout-close-to-max-width.html
    A LayoutTests/fast/table/auto-layout-width-percentage-exceed-hundred-expected.txt
    A LayoutTests/fast/table/auto-layout-width-percentage-exceed-hundred.html
    M Source/WebCore/rendering/AutoTableLayout.cpp

  Log Message:
  -----------
  Improve divide-by-zero workaround in `AutoTableLayout`

https://bugs.webkit.org/show_bug.cgi?id=276283
rdar://131669385

Reviewed by Alan Baradlay and Antti Koivisto.

Merge: https://chromium.googlesource.com/chromium/src.git/+/6c84d2ae7c82ce83fb9ce9c3124917933d4c863c

In some situations, table percentage widths exceed 100%, causing
division by zero. The previous code would divide by an arbitrarily
small number to avoid division by zero and get an arbitrary high
value. Since FF/Edge always set to a max width (which is still
unspecified), we now also set to a max width (maxTableWidth).

* Source/WebCore/rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
* LayoutTests/fast/table/auto-layout-close-to-max-width.html: Add Test Case
* LayoutTests/fast/table/auto-layout-close-to-max-width-expected.txt: Add Test Case Expectation
* LayoutTests/fast/table/auto-layout-width-percentage-exceed-hundred.html: Add Test Case
* LayoutTests/fast/table/auto-layout-width-percentage-exceed-hundred-expected.txt: Add Test Case Expectation

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



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


More information about the webkit-changes mailing list