Bug 116009 - [Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
Summary: [Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks: 115980
  Show dependency treegraph
 
Reported: 2013-05-12 22:39 PDT by Darin Adler
Modified: 2013-05-13 08:28 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.68 KB, patch)
2013-05-12 22:47 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-12 22:39:36 PDT
[Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
Comment 1 Darin Adler 2013-05-12 22:47:57 PDT
Created attachment 201529 [details]
Patch
Comment 2 Andreas Kling 2013-05-13 07:43:41 PDT
Comment on attachment 201529 [details]
Patch

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

r=me

> Source/WebCore/dom/Clipboard.cpp:321
> +void Clipboard::writeRange(Range* range, Frame* frame)
> +{
> +    ASSERT(range);
> +    ASSERT(frame);

I'm starting to wonder why we bother with things like this instead of passing things by reference where they are always supposed to be non-null.

> Source/WebCore/dom/Clipboard.cpp:322
> +    // FIXME: This is design mistake, a layering violation that should be fixed.

a* design mistake

> Source/WebCore/dom/Clipboard.cpp:336
> +    // FIXME: This is design mistake, a layering violation that should be fixed.

*a design mistake
Comment 3 Darin Adler 2013-05-13 07:53:34 PDT
Comment on attachment 201529 [details]
Patch

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

>> Source/WebCore/dom/Clipboard.cpp:321
>> +    ASSERT(frame);
> 
> I'm starting to wonder why we bother with things like this instead of passing things by reference where they are always supposed to be non-null.

I agree, but it’s a bit of a deep subject since it’s about idiom, not just null-ness.
Comment 4 Darin Adler 2013-05-13 08:28:56 PDT
Committed r150016: <http://trac.webkit.org/changeset/150016>