Bug 128056 - Subpixel rendering: LayoutUnit operator++ is broken.
Summary: Subpixel rendering: LayoutUnit operator++ is broken.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks: 127524 128036
  Show dependency treegraph
 
Reported: 2014-02-01 19:06 PST by zalan
Modified: 2014-02-01 23:40 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2014-02-01 19:27 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (1.21 KB, patch)
2014-02-01 21:40 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2014-02-01 19:06:59 PST
It defines post-increment only and implements it as if it was pre-increment.
Comment 1 zalan 2014-02-01 19:27:46 PST
Created attachment 222899 [details]
Patch
Comment 2 Darin Adler 2014-02-01 21:17:05 PST
Comment on attachment 222899 [details]
Patch

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

> Source/WebCore/platform/LayoutUnit.h:197
> -    LayoutUnit operator++(int)
> +    LayoutUnit& operator++()
>      {
>          m_value += kEffectiveFixedPointDenominator;
>          return *this;
>      }

Great fix!

> Source/WebCore/platform/LayoutUnit.h:204
> +    LayoutUnit operator++(int)
> +    {
> +        LayoutUnit result = *this;
> +        ++(*this);
> +        return result;
> +    }

Not sure we really need to add this, although I suppose it does little harm.

On a separate note, if it was me I would have written ++*this without parentheses.
Comment 3 zalan 2014-02-01 21:20:46 PST
(In reply to comment #2)
> (From update of attachment 222899 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=222899&action=review
> 
> > Source/WebCore/platform/LayoutUnit.h:197
> > -    LayoutUnit operator++(int)
> > +    LayoutUnit& operator++()
> >      {
> >          m_value += kEffectiveFixedPointDenominator;
> >          return *this;
> >      }
> 
> Great fix!
> 
> > Source/WebCore/platform/LayoutUnit.h:204
> > +    LayoutUnit operator++(int)
> > +    {
> > +        LayoutUnit result = *this;
> > +        ++(*this);
> > +        return result;
> > +    }
> 
> Not sure we really need to add this, although I suppose it does little harm.
Indeed! I guess we can add it back when it is actually needed. I'll land this without the post increment. Thanks!
Comment 4 zalan 2014-02-01 21:40:48 PST
Created attachment 222907 [details]
Patch
Comment 5 zalan 2014-02-01 21:41:12 PST
Comment on attachment 222907 [details]
Patch

EWS testing
Comment 6 WebKit Commit Bot 2014-02-01 23:40:47 PST
Comment on attachment 222907 [details]
Patch

Clearing flags on attachment: 222907

Committed r163260: <http://trac.webkit.org/changeset/163260>
Comment 7 WebKit Commit Bot 2014-02-01 23:40:49 PST
All reviewed patches have been landed.  Closing bug.