WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176980
On iOS, getData can't get text set by setData during copy event
https://bugs.webkit.org/show_bug.cgi?id=176980
Summary
On iOS, getData can't get text set by setData during copy event
Ryosuke Niwa
Reported
2017-09-14 23:06:13 PDT
On iOS, calling getData('text/plain') after calling setData('text/plain', 'foo') doesn't return 'foo'.
Attachments
WIP
(5.46 KB, patch)
2017-09-15 00:10 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Fixes the bug by refactoring
(32.51 KB, patch)
2017-09-18 22:55 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Patch for landing
(32.99 KB, patch)
2017-09-19 12:34 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-09-14 23:20:36 PDT
<
rdar://problem/34453915
>
Ryosuke Niwa
Comment 2
2017-09-15 00:10:13 PDT
Created
attachment 320872
[details]
WIP
Ryosuke Niwa
Comment 3
2017-09-15 02:22:40 PDT
Let me fix this myself. I need to apply one more fix to dataTransfer.types, which always returns the list of all supported types at the moment :(
Ryosuke Niwa
Comment 4
2017-09-18 22:55:06 PDT
Created
attachment 321183
[details]
Fixes the bug by refactoring
Darin Adler
Comment 5
2017-09-19 09:29:50 PDT
Comment on
attachment 321183
[details]
Fixes the bug by refactoring View in context:
https://bugs.webkit.org/attachment.cgi?id=321183&action=review
> Source/WebCore/platform/Pasteboard.h:189 > + virtual void commitToPasteboard(Pasteboard&) { ASSERT_NOT_REACHED(); }
Can we make this pure virtual instead? I’m sure there is some reason we can’t, but failing at runtime instead of compile time is not a good pattern.
Ryosuke Niwa
Comment 6
2017-09-19 12:14:49 PDT
(In reply to Darin Adler from
comment #5
)
> Comment on
attachment 321183
[details]
> Fixes the bug by refactoring > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=321183&action=review
> > > Source/WebCore/platform/Pasteboard.h:189 > > + virtual void commitToPasteboard(Pasteboard&) { ASSERT_NOT_REACHED(); } > > Can we make this pure virtual instead? I’m sure there is some reason we > can’t, but failing at runtime instead of compile time is not a good pattern.
So Pasteboard is the "real" pasteboard we use to write to pasteboard so we can't quite do that. I think the cleaner approach is to only add this to StaticPasteboard and just dynamic_cast dataTransfer->pasteboard(). I was debating that and just adding a virtual function but I'd just add a dynamic_cast instead.
Ryosuke Niwa
Comment 7
2017-09-19 12:17:53 PDT
Well, an even cleaner approach is if there was a local variable referencing to a StaticPasteboard in dispatchClipboardEvent itself but that's a bit tricky because StaticPasteboard is not ref-counted (uses unique_ptr).
Ryosuke Niwa
Comment 8
2017-09-19 12:34:28 PDT
Created
attachment 321232
[details]
Patch for landing
Ryosuke Niwa
Comment 9
2017-09-19 12:38:08 PDT
Comment on
attachment 321232
[details]
Patch for landing Wait for EWS.
WebKit Commit Bot
Comment 10
2017-09-19 14:50:07 PDT
Comment on
attachment 321232
[details]
Patch for landing Clearing flags on attachment: 321232 Committed
r222228
: <
http://trac.webkit.org/changeset/222228
>
WebKit Commit Bot
Comment 11
2017-09-19 14:50:09 PDT
All reviewed patches have been landed. Closing bug.
Wenson Hsieh
Comment 12
2017-11-09 16:09:26 PST
***
Bug 179439
has been marked as a duplicate of this bug. ***
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