Bug 144584 - REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
Summary: REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-04 10:09 PDT by Chris Dumez
Modified: 2015-05-04 13:29 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.56 KB, patch)
2015-05-04 12:07 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (12.35 KB, patch)
2015-05-04 13:14 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.