Bug 37353 - [RenderStyle Cleanup] Clean up CursorData, CursorList
Summary: [RenderStyle Cleanup] Clean up CursorData, CursorList
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-09 13:29 PDT by Dave Hyatt
Modified: 2010-04-09 13:44 PDT (History)
0 users

See Also:


Attachments
Patch (4.35 KB, patch)
2010-04-09 13:37 PDT, Dave Hyatt
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2010-04-09 13:29:58 PDT
Style cleanup on the cursor classes used by RenderStyle.
Comment 1 Dave Hyatt 2010-04-09 13:37:45 PDT
Created attachment 52986 [details]
Patch
Comment 2 Adam Roben (:aroben) 2010-04-09 13:40:15 PDT
Comment on attachment 52986 [details]
Patch

>  void RenderStyle::addCursor(CachedImage* image, const IntPoint& hotSpot)
>  {
> -    CursorData data;
> -    data.cursorImage = image;
> -    data.hotSpot = hotSpot;
> +    CursorData data(image, hotSpot);
>      if (!inherited.access()->cursorData)
>          inherited.access()->cursorData = CursorList::create();
>      inherited.access()->cursorData->append(data);

I don't think you need a local variable here at all.

r=me
Comment 3 Dave Hyatt 2010-04-09 13:44:25 PDT
Fixed in r57358.