mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 04:39:07 -10:00
Automatic update from web-platform-tests[css-properties-values-api] Store initial variables on ComputedStyle. Initial values are currently not stored at all on ComputedStyle, and we must refer to the PropertyRegistration to figure out what the initial value for a given property is. The problem with this, is that registering a property also has the effect of giving all styles that are already computed new values (effectively). For example, if a property '--x' is not registered (and not applied on any style), the computed value of that property is the "empty value" as described in css-variables. If the property then becomes registered, the initial value suddenly becomes whatever is specified by the registration, even on the ComputedStyle objects that already exist. This causes problems for calculating transitions, because we incorrectly consider the previous computed value to be "initialValue" from the registration rather than what it really was: "empty value". This CL adds a StyleInitialData class which contains the initial values for all registered variables. This class is instantiated for the initial style, and then referenced by all ComputedStyles that inherit from that style. This makes it possible to know what the initial value was for a certain property at the time style calculation took place. [email protected] Bug: 848250 Change-Id: I0a44e06608738aab15cb35fbc448a47188932600 Reviewed-on: https://chromium-review.googlesource.com/c/1309736 Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Anders Ruud <[email protected]> Cr-Commit-Position: refs/heads/master@{#604580} -- wpt-commits: bce35cc67fe84021df94dc52e60522b1f1b46e8b wpt-pr: 13816