[webkit-changes] [WebKit/WebKit] a3717f: Prevent counter values from over/underflowing

Vitor Roriz noreply at github.com
Fri Aug 11 08:48:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a3717f099f7779455b1f37625f208f6115dba449
      https://github.com/WebKit/WebKit/commit/a3717f099f7779455b1f37625f208f6115dba449
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-lists/counter-reset-increment-overflow-underflow-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-lists/counter-reset-increment-overflow-underflow-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-lists/counter-reset-increment-overflow-underflow.html
    M Source/WTF/wtf/CheckedArithmetic.h
    M Source/WebCore/rendering/CounterNode.cpp

  Log Message:
  -----------
  Prevent counter values from over/underflowing
https://bugs.webkit.org/show_bug.cgi?id=258730
rdar://111743827

Reviewed by Chris Dumez.

We will ignore the counter-increment() operation if
this would result in overflow/underflow for compatibility
with other vendors (https://github.com/w3c/csswg-drafts/issues/9029).

 * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/counter-reset-increment-overflow-underflow-expected.html: Added.
 * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/counter-reset-increment-overflow-underflow-ref.html: Added.
 * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/counter-reset-increment-overflow-underflow.html: Added.
 * Source/WTF/wtf/CheckedArithmetic.h:
 (WTF::sumIfNoOverflowOrFirstValue):
 * Source/WebCore/rendering/CounterNode.cpp:
 (WebCore::CounterNode::computeCountInParent const):

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




More information about the webkit-changes mailing list