Summary: | getComputedStyle on animation from pixels to percent returns null or asserts | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Elliott Sprehn <esprehn> | ||||
Component: | Layout and Rendering | Assignee: | Mike Lawther <mikelawther> | ||||
Status: | RESOLVED CONFIGURATION CHANGED | ||||||
Severity: | Normal | CC: | ahmad.saleem792, ap, dino, eric, esprehn, johnlarsene, menard, mikelawther, mithro, payoroj929, simon.fraser, tabatkins | ||||
Priority: | P2 | Keywords: | HasReduction | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 29084 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
+ccing Mike Lawther, as he's the calc() author. This appears to actually be related to Bug 29084, top/bottom/left/right all seem to work differently and hence behave as this bug reports. Width works as expected by this test. This issue is fixed by the patch found in Bug 29084. I am not able to reproduce this bug in Safari 15.6.1 and it shows as intended all values (though it shows animation is 60 fps compared to other browser, which show 120 fps) but since all other browsers (Chrome Canary 107 and Firefox Nightly 106) also work. I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks! |
Created attachment 182263 [details] Reduction If you're transitioning on a length property from a pixel value to a percent and you call getComputedStyle to check the current value we return null because you end up in CSSPrimitiveValue::CSSPrimitiveValue(const Length& length) with the type Calculated which hits an ASSERT_NOT_REACHED(); In a release build we return null because of error handling in CSSComputedStyleDeclaration.