Bug 115979 - [Mac] Give every Clipboard an underlying Pasteboard
Summary: [Mac] Give every Clipboard an underlying Pasteboard
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks: 115980
  Show dependency treegraph
 
Reported: 2013-05-11 22:45 PDT by Darin Adler
Modified: 2013-05-12 18:25 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.53 KB, patch)
2013-05-11 22:49 PDT, Darin Adler
kling: review+
darin: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>