Bug 37353

Summary: [RenderStyle Cleanup] Clean up CursorData, CursorList
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: CSSAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch aroben: review+

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.