Bug 117782 - Simplify parsed CSS Calc expressions
Summary: Simplify parsed CSS Calc expressions
Status: RESOLVED DUPLICATE of bug 111149
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-06-18 20:56 PDT by Ryosuke Niwa
Modified: 2022-07-26 21:49 PDT (History)
10 users (show)

See Also:


Attachments
All browser slightly differ from each other (2.53 MB, image/png)
2022-07-24 08:07 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-06-18 20:56:40 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/334d7594dadde64b65b18f2ed9947c1d433e783d

Add simplification of calc expressions at parse time.
Numbers and compatible units are merged and evaluated.
"calc(4px + 1in + 10%)" gets simplified to "calc(100px + 10%)"
Comment 1 Ahmad Saleem 2022-07-24 08:07:30 PDT
Created attachment 461176 [details]
All browser slightly differ from each other

I took the test case from Blink patch and changed it into following JSFiddle:

Link - https://jsfiddle.net/4058z76y/show

All browsers slightly differ from each other and I am not sure on web-spec and which browser is right so just wanted to share updated results and I pointed to some quick ones in Safari 15.6, where there are some obvious changes compared to Firefox Nightly 104.

It is just updated testing results. Thanks!
Comment 2 Ryosuke Niwa 2022-07-24 14:03:12 PDT
We merged new CSS parser from Blink so this is moot.
Comment 3 Ahmad Saleem 2022-07-24 14:05:18 PDT
But even still Safari differs from even Chrome as can been seen in the screenshot. Is it something, we update CSS Parser code time to time to get latest fixes and we haven't taken recent fixes yet?
Comment 4 Ryosuke Niwa 2022-07-24 14:08:25 PDT
Hm... okay. I guess we're missing some pieces then.
Comment 5 Ryosuke Niwa 2022-07-26 21:49:41 PDT

*** This bug has been marked as a duplicate of bug 111149 ***