Bug 122987 - Fix three bugs in the equals() implementations for css gradients.
Summary: Fix three bugs in the equals() implementations for css gradients.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nico Weber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 12:42 PDT by Nico Weber
Modified: 2013-10-17 14:13 PDT (History)
7 users (show)

See Also:


Attachments
Patch (8.17 KB, patch)
2013-10-17 13:05 PDT, Nico Weber
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2013-10-17 12:42:24 PDT
Fix three bugs in the equals() implementations for css gradients.
Comment 1 Nico Weber 2013-10-17 13:05:02 PDT
Created attachment 214492 [details]
Patch
Comment 2 Andreas Kling 2013-10-17 13:45:39 PDT
Comment on attachment 214492 [details]
Patch

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

r=me, but..

> Source/WebCore/css/CSSGradientValue.cpp:737
>      else
> -        equalXorY = !other.m_firstX || !other.m_firstY;
> +        equalXandY = !other.m_firstX && !other.m_firstY;

Don't we already know that both firstX and firstY are null at this point?

> Source/WebCore/css/CSSGradientValue.cpp:1149
>      else
> -        equalXorY == !other.m_firstX || !other.m_firstY;
> +        equalXandY = !other.m_firstX && !other.m_firstY;

And here?
Comment 3 Nico Weber 2013-10-17 13:46:35 PDT
Comment on attachment 214492 [details]
Patch

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

Thanks!

>> Source/WebCore/css/CSSGradientValue.cpp:737
>> +        equalXandY = !other.m_firstX && !other.m_firstY;
> 
> Don't we already know that both firstX and firstY are null at this point?

Yes, but only for this, not for other
Comment 4 Andreas Kling 2013-10-17 13:49:09 PDT
(In reply to comment #3)
> (From update of attachment 214492 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=214492&action=review
> 
> Thanks!
> 
> >> Source/WebCore/css/CSSGradientValue.cpp:737
> >> +        equalXandY = !other.m_firstX && !other.m_firstY;
> > 
> > Don't we already know that both firstX and firstY are null at this point?
> 
> Yes, but only for this, not for other

Durr. :|
Comment 5 WebKit Commit Bot 2013-10-17 14:13:09 PDT
Comment on attachment 214492 [details]
Patch

Clearing flags on attachment: 214492

Committed r157598: <http://trac.webkit.org/changeset/157598>
Comment 6 WebKit Commit Bot 2013-10-17 14:13:12 PDT
All reviewed patches have been landed.  Closing bug.