Bug 115979

Summary: [Mac] Give every Clipboard an underlying Pasteboard
Product: WebKit Reporter: Darin Adler <darin>
Component: PlatformAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 115980    
Attachments:
Description Flags
Patch kling: review+, darin: commit-queue-

Description Darin Adler 2013-05-11 22:45:44 PDT
[Mac] Give every Clipboard an underlying Pasteboard
Comment 1 Darin Adler 2013-05-11 22:49:19 PDT
Created attachment 201481 [details]
Patch
Comment 2 Andreas Kling 2013-05-12 15:45:46 PDT
Comment on attachment 201481 [details]
Patch

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

r=me, glad to see this is moving :)

> Source/WebCore/dom/Clipboard.h:37
> +#define USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS !PLATFORM(MAC)

I would have named this WTF_USE_LEGACY_... and used #if USE(LEGACY_...)

> Source/WebCore/platform/mac/ClipboardMac.mm:60
> -    : Clipboard(policy, clipboardType)
> +    : Clipboard(policy, clipboardType, Pasteboard::create(m_pasteboardName))
>      , m_pasteboardName(pasteboardName)

Is m_pasteboardName guaranteed to be initialized before you pass it to the base class ctor here?
Comment 3 Darin Adler 2013-05-12 18:20:15 PDT
(In reply to comment #2)
> > Source/WebCore/dom/Clipboard.h:37
> > +#define USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS !PLATFORM(MAC)
> 
> I would have named this WTF_USE_LEGACY_... and used #if USE(LEGACY_...)

OK. I can change that.

> > Source/WebCore/platform/mac/ClipboardMac.mm:60
> > -    : Clipboard(policy, clipboardType)
> > +    : Clipboard(policy, clipboardType, Pasteboard::create(m_pasteboardName))
> >      , m_pasteboardName(pasteboardName)
> 
> Is m_pasteboardName guaranteed to be initialized before you pass it to the base class ctor here?

It’s not. I thought I had fixed that! I’ll land with it fixed.
Comment 4 Darin Adler 2013-05-12 18:25:05 PDT
Committed r149972: <http://trac.webkit.org/changeset/149972>