Bug 144584

Summary: REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, jonlee, kling, koivisto
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2015-05-04 10:09:32 PDT
After <http://trac.webkit.org/changeset/178156>, the CSS Parser sometimes rejects valid CSS calculations for CSS properties whose value cannot be negative (e.g. padding-right) because it thinks the calculation is negative.

Radar: <rdar://problem/20796829>
Comment 1 Chris Dumez 2015-05-04 12:07:14 PDT
Created attachment 252322 [details]
Patch
Comment 2 Darin Adler 2015-05-04 12:51:38 PDT
Comment on attachment 252322 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=252322&action=review

> Source/WebCore/css/CSSParser.cpp:-1678
> -        if (isValid && mustBeNonNegative && calculation->isNegative())

Are there any call sites calling CSSCalcValue::isNegative after this change? If so, what for?
Comment 3 Chris Dumez 2015-05-04 13:13:28 PDT
(In reply to comment #2)
> Comment on attachment 252322 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=252322&action=review
> 
> > Source/WebCore/css/CSSParser.cpp:-1678
> > -        if (isValid && mustBeNonNegative && calculation->isNegative())
> 
> Are there any call sites calling CSSCalcValue::isNegative after this change?
> If so, what for?

No, it is no longer used. I will drop the method.
Comment 4 Chris Dumez 2015-05-04 13:14:25 PDT
Created attachment 252328 [details]
Patch
Comment 5 WebKit Commit Bot 2015-05-04 13:29:10 PDT
Comment on attachment 252328 [details]
Patch

Clearing flags on attachment: 252328

Committed r183765: <http://trac.webkit.org/changeset/183765>
Comment 6 WebKit Commit Bot 2015-05-04 13:29:15 PDT
All reviewed patches have been landed.  Closing bug.