Bug 66356 - Represent RenderStyle::textOverflow property using an enum instead of a bool.
Summary: Represent RenderStyle::textOverflow property using an enum instead of a bool.
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: Luke Macpherson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-16 17:25 PDT by Luke Macpherson
Modified: 2011-08-16 21:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.57 KB, patch)
2011-08-16 17:29 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Macpherson 2011-08-16 17:25:34 PDT
Represent RenderStyle::textOverflow property using an enum instead of a bool.
Comment 1 Luke Macpherson 2011-08-16 17:29:58 PDT
Created attachment 104130 [details]
Patch
Comment 2 mitz 2011-08-16 18:14:47 PDT
Comment on attachment 104130 [details]
Patch

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

It would be nicer if you also changed the one or two places in rendering code that query this property to use the enum.

> Source/WebCore/rendering/style/RenderStyleConstants.h:437
> +enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis };

Why the = 0?
Comment 3 Luke Macpherson 2011-08-16 18:24:58 PDT
Comment on attachment 104130 [details]
Patch

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

>> Source/WebCore/rendering/style/RenderStyleConstants.h:437
>> +enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis };
> 
> Why the = 0?

Existing code does if (style()->textOverflow()), so it's a good idea to make the behavior of a cast from TextOverflow to boolean explicit.
Comment 4 WebKit Review Bot 2011-08-16 21:51:39 PDT
Comment on attachment 104130 [details]
Patch

Clearing flags on attachment: 104130

Committed r93195: <http://trac.webkit.org/changeset/93195>
Comment 5 WebKit Review Bot 2011-08-16 21:51:44 PDT
All reviewed patches have been landed.  Closing bug.