Bug 55792 - Add plumbing for paste support to ChromiumDataObject::types()
Summary: Add plumbing for paste support to ChromiumDataObject::types()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Daniel Cheng
URL:
Keywords:
Depends on: 55891
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-04 14:40 PST by Daniel Cheng
Modified: 2011-03-08 09:43 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.90 KB, patch)
2011-03-04 14:58 PST, Daniel Cheng
no flags Details | Formatted Diff | Diff
Patch (4.90 KB, patch)
2011-03-04 15:26 PST, Daniel Cheng
no flags Details | Formatted Diff | Diff
Patch (8.07 KB, patch)
2011-03-05 18:13 PST, Daniel Cheng
no flags Details | Formatted Diff | Diff
Patch (9.05 KB, patch)
2011-03-07 12:00 PST, Daniel Cheng
no flags Details | Formatted Diff | Diff
Patch (9.05 KB, patch)
2011-03-07 12:12 PST, Daniel Cheng
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Cheng 2011-03-04 14:40:24 PST
Don't return "Files" from ChromiumDataObject::types()
Comment 1 Daniel Cheng 2011-03-04 14:58:07 PST
Created attachment 84806 [details]
Patch
Comment 2 WebKit Review Bot 2011-03-04 15:06:11 PST
Attachment 84806 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/8098013
Comment 3 Tony Chang 2011-03-04 15:21:42 PST
Comment on attachment 84806 [details]
Patch

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

mostly just style nits

> Source/WebCore/platform/chromium/ChromiumDataObject.cpp:-104
> -    // This is currently broken for pasteboard events, and always has been.

Can we write a layout test for this?

> Source/WebCore/platform/chromium/ChromiumDataObject.cpp:111
> +        results = PlatformBridge::clipboardReadAvailableTypes(PasteboardPrivate::StandardBuffer,
> +                                                              &ignoredContainsFilenames);
> +    } else {
> +        if (!m_plainText.isEmpty()) {

Nit: You could just early return in the CopyAndPaste case to avoid having to indent/reformat this.

> Source/WebCore/platform/chromium/ChromiumDataObject.cpp:232
> +    if (m_clipboardType == Clipboard::CopyAndPaste)

The if part needs {} because the body is more than 1 line.

> Source/WebCore/platform/chromium/ClipboardChromium.cpp:136
> +        results.add("Files");

Should we put this in ClipboardMimeTypes?  The other elements in results are mime types, right?
Comment 4 Daniel Cheng 2011-03-04 15:26:07 PST
Created attachment 84814 [details]
Patch
Comment 5 Daniel Cheng 2011-03-05 18:13:47 PST
Created attachment 84883 [details]
Patch
Comment 6 WebKit Review Bot 2011-03-05 18:16:03 PST
Attachment 84883 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/edit..." exit_code: 1

Source/WebCore/platform/chromium/ChromiumDataObject.cpp:238:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Daniel Cheng 2011-03-05 18:17:20 PST
(In reply to comment #3)
> (From update of attachment 84806 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=84806&action=review
> 
> mostly just style nits
> 
> > Source/WebCore/platform/chromium/ChromiumDataObject.cpp:-104
> > -    // This is currently broken for pasteboard events, and always has been.
> 
> Can we write a layout test for this?
> 

Done, though this change is now blocked on http://codereview.chromium.org/6635003.

> > Source/WebCore/platform/chromium/ChromiumDataObject.cpp:111
> > +        results = PlatformBridge::clipboardReadAvailableTypes(PasteboardPrivate::StandardBuffer,
> > +                                                              &ignoredContainsFilenames);
> > +    } else {
> > +        if (!m_plainText.isEmpty()) {
> 
> Nit: You could just early return in the CopyAndPaste case to avoid having to indent/reformat this.
> 

Done.

> > Source/WebCore/platform/chromium/ChromiumDataObject.cpp:232
> > +    if (m_clipboardType == Clipboard::CopyAndPaste)
> 
> The if part needs {} because the body is more than 1 line.
> 

I did that but the style checker complained.

> > Source/WebCore/platform/chromium/ClipboardChromium.cpp:136
> > +        results.add("Files");
> 
> Should we put this in ClipboardMimeTypes?  The other elements in results are mime types, right?

Done.
Comment 8 Tony Chang 2011-03-07 08:59:58 PST
Comment on attachment 84883 [details]
Patch

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

Please fix the style nit before landing.

>> Source/WebCore/platform/chromium/ChromiumDataObject.cpp:238
>> +    }
> 
> One line control clauses should not use braces.  [whitespace/braces] [4]

The if should have {}, but the else shouldn't.
Comment 9 Daniel Cheng 2011-03-07 11:48:59 PST
Committed r80484: <http://trac.webkit.org/changeset/80484>
Comment 10 Daniel Cheng 2011-03-07 12:00:41 PST
Created attachment 84968 [details]
Patch
Comment 11 Daniel Cheng 2011-03-07 12:09:05 PST
I reverted the change since I forgot to include the DEPS roll.
Comment 12 Daniel Cheng 2011-03-07 12:12:07 PST
Created attachment 84969 [details]
Patch
Comment 13 WebKit Review Bot 2011-03-07 12:33:52 PST
Attachment 84969 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/8103593
Comment 14 Daniel Cheng 2011-03-07 13:32:25 PST
Committed r80493: <http://trac.webkit.org/changeset/80493>
Comment 15 WebKit Review Bot 2011-03-07 14:09:55 PST
http://trac.webkit.org/changeset/80493 might have broken Qt Linux Release
The following tests are not passing:
editing/pasteboard/onpaste-text-html-types.html
Comment 16 Ryosuke Niwa 2011-03-07 20:04:14 PST
It seems like the test added by this patch has been failing on Qt.

Could you look into it? http://build.webkit.org/builders/Qt%20Linux%20Release/builds/29419
Comment 17 Tony Chang 2011-03-08 09:43:13 PST
(In reply to comment #16)
> It seems like the test added by this patch has been failing on Qt.
> 
> Could you look into it? http://build.webkit.org/builders/Qt%20Linux%20Release/builds/29419

Looks like dcheng updated the qt and win Skipped list in http://trac.webkit.org/changeset/80531 .