Closed Bug 1790769 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 35890 - Add CSSTokenizer-created strings to CSSVariableData's backing strings

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 35890 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/35890
Details from upstream follow.

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

Add CSSTokenizer-created strings to CSSVariableData's backing strings

When computing the value of a registered custom property, we create
a CSSVariableData object equivalent to the computed CSSValue by
serializing that CSSValue to a String, then tokenizing that value.

The problem is that CSSTokenizer can create new string objects
during the tokenization process (see calls to CSSTokenizer::
RegisterString), without communicating that fact to the call-site.

Therefore, this CL adds a way to access those strings so they can
be added to the backing strings of the CSSVariableData.

Also added a DCHECK to verify that we don't have any tokens with
non-backed string pointers.

Fixed: 1358907
Change-Id: Ib4585cbb419b616713bb3709c7b81ca1708880ea
Reviewed-on: https://chromium-review.googlesource.com/3892782
WPT-Export-Revision: 6defa8daa0d9b07a2132c044790739c8d73f6ed0

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 61 subtests

Status Summary

Firefox

OK : 1
FAIL: 61

Chrome

OK : 1
PASS: 56
FAIL: 5

Safari

OK : 1
FAIL: 61

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-properties-values-api/registered-property-computation.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: OK, Safari: OK)
    • <length> values computed are correctly via var()-reference: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values computed are correctly via var()-reference when font-size is inherited: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly when font-size is inherited [14em]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly when font-size is inherited [calc(14em + 10px)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [12px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [13vw]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [14em]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [15vmin]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [calc(16px - 7em + 10vh)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [1in]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [2.54cm]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [25.4mm]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [6pc]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length> values are computed correctly [72pt]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage> values are computed correctly [17em]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage> values are computed correctly [18%]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage> values are computed correctly [calc(19em - 2%)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length># values are computed correctly [10px, 3em]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length># values are computed correctly [4em ,9px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length># values are computed correctly [8em]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage># values are computed correctly [3% , 10vmax , 22px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage># values are computed correctly [calc(50% + 1em), 4px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage># values are computed correctly [calc(13% + 37px)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length>+ values are computed correctly [10px 3em]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length>+ values are computed correctly [4em 9px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage>+ values are computed correctly [3% 10vmax 22px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <length-percentage>+ values are computed correctly [calc(50% + 1em) 4px]: FAIL (Chrome: PASS, Safari: FAIL)
    • <transform-function> values are computed correctly [translateX(2px)]: FAIL (Chrome: FAIL, Safari: FAIL)
    • <transform-function> values are computed correctly [translateX(10em)]: FAIL (Chrome: FAIL, Safari: FAIL)
    • <transform-function> values are computed correctly [translateX(calc(11em + 10%))]: FAIL (Chrome: FAIL, Safari: FAIL)
    • <transform-function>+ values are computed correctly [translateX(10%) scale(2)]: FAIL (Chrome: FAIL, Safari: FAIL)
    • <integer> values are computed correctly [15]: FAIL (Chrome: PASS, Safari: FAIL)
    • <integer> values are computed correctly [calc(15 + 15)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <integer> values are computed correctly [calc(2.4)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <integer> values are computed correctly [calc(2.6)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <integer> values are computed correctly [calc(2.6 + 3.1)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <integer>+ values are computed correctly [15 calc(2.4) calc(2.6)]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [#ff0000]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [#000f00]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [#00000a]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [#badbee]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [#badbee33]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [tomato]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [plum]: FAIL (Chrome: PASS, Safari: FAIL)
    • <color> values are computed correctly [currentcolor]: FAIL (Chrome: PASS, Safari: FAIL)
      • values are computed correctly [tomato]: FAIL (Chrome: PASS, Safari: FAIL)
    • tomato | plum values are computed correctly [plum]: FAIL (Chrome: PASS, Safari: FAIL)
    • tomato | plum | <color> values are computed correctly [plum]: FAIL (Chrome: PASS, Safari: FAIL)
      • values are computed correctly [-50grad]: FAIL (Chrome: PASS, Safari: FAIL)
    • <angle> values are computed correctly [180deg]: FAIL (Chrome: PASS, Safari: FAIL)
    • <angle> values are computed correctly [400grad]: FAIL (Chrome: PASS, Safari: FAIL)
    • <angle> values are computed correctly [calc(360deg + 400grad)]: FAIL (Chrome: PASS, Safari: FAIL)
      • values are computed correctly [50s]: FAIL (Chrome: PASS, Safari: FAIL)
    • <time> values are computed correctly [1s]: FAIL (Chrome: PASS, Safari: FAIL)
    • <time> values are computed correctly [1000ms]: FAIL (Chrome: PASS, Safari: FAIL)
    • <time> values are computed correctly [calc(1000ms + 1s)]: FAIL (Chrome: PASS, Safari: FAIL)
      • values are computed correctly [50dpi]: FAIL (Chrome: PASS, Safari: FAIL)
    • <resolution> values are computed correctly [1dppx]: FAIL (Chrome: PASS, Safari: FAIL)
    • <resolution> values are computed correctly [96dpi]: FAIL (Chrome: PASS, Safari: FAIL)
    • <resolution> values are computed correctly [calc(1dppx + 96dpi)]: FAIL (Chrome: FAIL, Safari: FAIL)
      • values are computed correctly [url(why)]: FAIL (Chrome: PASS, Safari: FAIL)

Tests Disabled in Gecko Infrastructure

  • /css/css-properties-values-api/registered-property-computation.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: OK, Safari: OK)
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0dfd97afd991
[wpt PR 35890] - Add CSSTokenizer-created strings to CSSVariableData's backing strings, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in before you can comment on or make changes to this bug.