Bug 31003 - Using dataTransfer format = "text" not HTML 5 compliant in Safari, but is in Chrome
Summary: Using dataTransfer format = "text" not HTML 5 compliant in Safari, but is in ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-01 23:24 PST by Daniel Bates
Modified: 2024-03-11 05:22 PDT (History)
9 users (show)

See Also:


Attachments
Layout test (4.88 KB, patch)
2009-11-01 23:40 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Self-contained test (9.99 KB, text/html)
2009-11-01 23:45 PST, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2009-11-01 23:24:47 PST
Section 7.9.2 of the HTML 5 spec <http://dev.w3.org/html5/spec/Overview.html#datatransfer> states: "If format is the value 'Text', then it must be treated as 'text/plain'".

For reasons that are unclear at the moment, the Chrome build correctly implements this, but the Safari build does not.

Safari allows format 'text', but not 'Text'.

Chome allows format 'Text', but not 'text'.

By the spec, only 'Text' is valid.
Comment 1 Daniel Bates 2009-11-01 23:40:54 PST
Created attachment 42304 [details]
Layout test

Modified the layout test for bug #30266 to show this bug.
Comment 2 Daniel Bates 2009-11-01 23:45:05 PST
Created attachment 42305 [details]
Self-contained test

For convenience, here is a self-contained version of the layout test.
Comment 3 Eric Seidel (no email) 2009-11-01 23:47:13 PST
What does IE allow?  "Text" came from IE.  If IE allows "text" as well, then we should allow both.  If IE does not allow "text" then we should match the spec and IE I guess.
Comment 4 Oliver Hunt 2009-11-02 11:47:26 PST
ClipboardWin.cpp is looking for text rather than Text, mac safari does a compare to Text so this appears to be a win only bug
Comment 5 Daniel Bates 2009-11-02 12:41:16 PST
Oliver, have you tried running the self-contained test <https://bugs.webkit.org/attachment.cgi?id=42305>?

I just ran it using r50423 and it fails. I haven't tried running the test with the ToT (r50425), but the latest commits don't appear to address this issue.

(In reply to comment #4)
> ClipboardWin.cpp is looking for text rather than Text, mac safari does a
> compare to Text so this appears to be a win only bug
Comment 6 Daniel Bates 2009-11-02 12:43:06 PST
I mean to say I ran the test with r50423 on my Mac. So, this is also a Mac issue. I haven't yet looked at the code with respect to this bug.
Comment 7 Ahmad Saleem 2023-07-20 15:21:09 PDT
Using 'self-contained' test, all browsers (STP174, Chrome Canary 117 & Firefox Nightly 117) show:

FAIL event.dataTransfer.types should contain format "Text", but it does not.