[webkit-changes] [WebKit/WebKit] e864f3: Update isValueOutOfRangeForProperty() to account f...

Chris Dumez noreply at github.com
Mon Dec 12 14:42:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e864f3817fb82d58b9a9c874ab45e35c8c40e0ae
      https://github.com/WebKit/WebKit/commit/e864f3817fb82d58b9a9c874ab45e35c8c40e0ae
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-12-12 (Mon, 12 Dec 2022)

  Changed paths:
    M LayoutTests/fast/css/css-typed-om/style-property-map-set-negative-value-expected.txt
    M LayoutTests/fast/css/css-typed-om/style-property-map-set-negative-value.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/animation-duration-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/animation-iteration-count-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/border-width-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/column-width-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-basis-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-weight-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/gap-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-auto-columns-rows-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/height-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/line-height-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/logical-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/outline-width-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/stroke-miterlimit-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/width-expected.txt
    M Source/WebCore/css/typedom/CSSUnitValue.cpp

  Log Message:
  -----------
  Update isValueOutOfRangeForProperty() to account for more CSS properties
https://bugs.webkit.org/show_bug.cgi?id=249050

Reviewed by Sam Weinig.

Update isValueOutOfRangeForProperty() to account for more CSS properties that
have range limits:
- border-image-width: length or percentage or number >= 0
  https://w3c.github.io/csswg-drafts/css-backgrounds/#border-image-width

- border-top-width, border-right-width, border-bottom-width, border-left-width: length >= 0
  https://w3c.github.io/csswg-drafts/css-backgrounds/#the-border-width

- row-gap, column-gap: length or percentage >= 0
  https://w3c.github.io/csswg-drafts/css-align/#column-row-gap

- column-width: length >= 0
  https://w3c.github.io/csswg-drafts/css-multicol-1/#propdef-column-width

- flex-basis: length or percentage >= 0
  https://w3c.github.io/csswg-drafts/css-flexbox/#flex-basis-property

- grid-auto-columns, grid-auto-rows: length or percentage >= 0
  https://w3c.github.io/csswg-drafts/css-grid/#auto-tracks

- line-height: length, number or percentage >= 0
  https://w3c.github.io/csswg-drafts/css-inline/#line-height-property

- max-height: length or percentage >= 0
  https://w3c.github.io/csswg-drafts/css2/#propdef-max-height

- max-width: length or percentage >= 0
  https://w3c.github.io/csswg-drafts/css2/#propdef-max-width

- outline-width: length >= 0
  https://w3c.github.io/csswg-drafts/css-ui/#outline-width

- scroll-padding-inline-start, scroll-padding-block-start, scroll-padding-inline-end, scroll-padding-block-end: length or percentage >= 0
  https://w3c.github.io/csswg-drafts/css-scroll-snap/#padding-longhands-logical

- stroke-miterlimit: number >= 0
  https://svgwg.org/svg2-draft/painting.html#StrokeMiterlimitProperty

- font-weight: number in range [1, 1000]
  https://w3c.github.io/csswg-drafts/css-fonts/#font-weight-prop

All these properties are covered by the WPT tests but the tests still fail because of:
- https://github.com/WebKit/WebKit/pull/7387 (a lot more tests start passing with this PR)

For now, I have extracted these test cases into their own layout test.

* LayoutTests/fast/css/css-typed-om/style-property-map-set-negative-value-expected.txt:
* LayoutTests/fast/css/css-typed-om/style-property-map-set-negative-value.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/animation-duration-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/animation-iteration-count-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/border-width-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/column-width-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-basis-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-weight-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/gap-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-auto-columns-rows-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/height-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/line-height-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/logical-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/outline-width-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/stroke-miterlimit-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/width-expected.txt:
* Source/WebCore/css/typedom/CSSUnitValue.cpp:
(WebCore::isValueOutOfRangeForProperty):

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




More information about the webkit-changes mailing list