WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
113094
[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
https://bugs.webkit.org/show_bug.cgi?id=113094
Summary
[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.ht...
Ryosuke Niwa
Reported
2013-03-22 13:41:32 PDT
Two tests added by
http://trac.webkit.org/changeset/146644
fails on Mac port:
http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK1%20(Tests)/r146644%20(8256)/results.html
--- /Volumes/Data/slave/mountainlion-release-tests-wk1/build/layout-test-results/editing/pasteboard/can-read-in-copy-and-cut-events-expected.txt +++ /Volumes/Data/slave/mountainlion-release-tests-wk1/build/layout-test-results/editing/pasteboard/can-read-in-copy-and-cut-events-actual.txt @@ -1,5 +1,5 @@ +CONSOLE MESSAGE: line 13: TypeError: 'null' is not an object (evaluating 'event.clipboardData.types.indexOf') +CONSOLE MESSAGE: line 22: TypeError: 'null' is not an object (evaluating 'event.clipboardData.types.indexOf') Simple test that data set during a copy/cut event can be read back. To run the test manually, simply select any text and initiate a copy/cut operation. -copy: SUCCESS -cut: SUCCESS --- /Volumes/Data/slave/mountainlion-release-tests-wk1/build/layout-test-results/editing/pasteboard/can-read-in-dragstart-event-expected.txt +++ /Volumes/Data/slave/mountainlion-release-tests-wk1/build/layout-test-results/editing/pasteboard/can-read-in-dragstart-event-actual.txt @@ -1,5 +1,5 @@ +CONSOLE MESSAGE: line 13: TypeError: 'null' is not an object (evaluating 'event.dataTransfer.types.indexOf') Simple test that data set during a dragstart event can be read back. To run the test manually, simply start dragging the 'Drag Me' element below. Drag Me -dragstart: SUCCESS
Attachments
proposed fix
(49.83 KB, patch)
2013-08-26 13:04 PDT
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
proposed fix
(49.96 KB, patch)
2013-08-26 14:07 PDT
,
Alexey Proskuryakov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-03-22 13:44:11 PDT
Committed
r146652
: <
http://trac.webkit.org/changeset/146652
>
Daniel Cheng
Comment 2
2013-03-22 14:18:54 PDT
This is a problem specific to the Mac port. In the new tests, we verify that the data object is both readable and writable in the dragstart/copy/cut events, which the spec and Firefox both allow. However, the Mac implementation of the Clipboard getters contains the following check: if (m_changeCount != platformStrategies()->pasteboardStrategy()->changeCount(m_pasteboardName)) return ListHashSet<String>(); Unfortunately, by definition, the change count will be always be different, since we're mutating the clipboard in the first part of the test. One possibility is to relax this check by skipping the change count check if the clipboard is in a writable state as well, but that seems like a hack. Another possibility would be to update the change count every time an item is written to the clipboard.
Antoine Quint
Comment 3
2013-07-30 05:09:26 PDT
The test editing/pasteboard/can-read-in-copy-and-cut-events.html now passes on wk2.
Antoine Quint
Comment 4
2013-07-30 05:12:17 PDT
Retitled the bug to reflect the single test failure. Test expectations updated in
http://trac.webkit.org/changeset/153465
.
Alexey Proskuryakov
Comment 5
2013-07-30 15:02:08 PDT
This test still fails on wk1 though, so updated results again in <
http://trac.webkit.org/r153496
>. Re-titling the bug, too. I'm not actually sure if wk2 success is true, or a consequence of some other bug.
Alexey Proskuryakov
Comment 6
2013-08-26 13:04:11 PDT
> Another possibility would be to update the change count every time an item is written to the clipboard.
That seems like the way to go to me.
Alexey Proskuryakov
Comment 7
2013-08-26 13:04:43 PDT
Created
attachment 209672
[details]
proposed fix
Alexey Proskuryakov
Comment 8
2013-08-26 13:44:37 PDT
Unsure why WK2 EWS is still unhappy (can-read-in-copy-and-cut-events.html often fails on EWS, but not on regular WK2 bots). I have another patch for pasteboard in WTR, hopefully together they will make EWS happier.
Alexey Proskuryakov
Comment 9
2013-08-26 14:03:56 PDT
Actually, a crash on EWS is real, will post a patch with a null check in a moment.
Alexey Proskuryakov
Comment 10
2013-08-26 14:07:38 PDT
Created
attachment 209676
[details]
proposed fix editing/pasteboard/dataTransfer-setData-getData.html was crashing because URL it was trying to set was invalid. This used to fail silently with a nil receiver in -writeToPasteboard:. Not sure what the best behavior in this case is; updated patch proceeds with setting an empty URL in all flavors.
Alexey Proskuryakov
Comment 11
2013-08-26 14:10:42 PDT
Committed <
http://trac.webkit.org/r154639
>.
Alexey Proskuryakov
Comment 12
2013-08-26 16:44:36 PDT
Updated test results in <
http://trac.webkit.org/r154653
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug