Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Issue 2875013002: DataTransfer: Make |types| be a FrozenArray<DOMString>. (Closed)

Created:
3 years, 7 months ago by Raphael Kubo da Costa (rakuco)
Modified:
3 years, 7 months ago
Reviewers:
jsbell, foolip
CC:
chromium-reviews, blink-reviews, dcheng, Rick Byers
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DataTransfer: Make |types| be a FrozenArray<DOMString>. Fix a TODO item: https://github.com/whatwg/html/issues/11 was solved several months ago by https://github.com/whatwg/html/commit/466379ade56b8ba18584057085443844f4df5669, so we can finally use a FrozenArray here. Due to the way |types| is spec'ed, we need to use the [CachedAttribute] custom extended attribute so that we can tell the bindings layer when a new FrozenArray must be returned. Since the data store item list can change via calls to DataTransfer's setData() and DataTransfer.clearData(), as well as DataTransfer.items' add(), remove() clear(), DataTransfer itself is notified of changes via the newly-added DataObject::Observer whenever DataObject's underlying |item_list_| is modified. A new test has been added to verify this behavior. BUG=652815 R=foolip@chromium.org,jsbell@chromium.org Review-Url: https://codereview.chromium.org/2875013002 Cr-Commit-Position: refs/heads/master@{#472072} Committed: https://chromium.googlesource.com/chromium/src/+/fb8089d1d38e7573bbf99ea1828425bc25630c3d

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add new test, use CachedAttribute #

Total comments: 4

Patch Set 3 : Follow to jsbell's suggestions #

Patch Set 4 : Fix interactive_ui_tests #

Total comments: 3

Patch Set 5 : Use an observer to be notified of changes #

Total comments: 10

Patch Set 6 : Adjust to comments, add new unit test #

Patch Set 7 : Fix win_chromium_compile_dbg_ng #

Messages

Total messages: 48 (32 generated)
Raphael Kubo da Costa (rakuco)
PTAL There doesn't seem to be a clear set of owners for clipboard/, but this ...
3 years, 7 months ago (2017-05-11 11:17:25 UTC) #1
foolip
If you enjoy this kind, I also have a similar TODO in NavigatorLanguage.idl, for another ...
3 years, 7 months ago (2017-05-12 07:51:42 UTC) #6
Rick Byers
I believe the storage team now owns the clipboard APIs so cc/ jsbell (but either ...
3 years, 7 months ago (2017-05-12 13:31:28 UTC) #9
Raphael Kubo da Costa (rakuco)
Patch v2 is up, please take another look: - There's actually a bug about this, ...
3 years, 7 months ago (2017-05-12 15:26:56 UTC) #13
jsbell
mostly lg, one meaningful suggestion for the dirty flag. Also, can you update LayoutTests/external/wpt/interfaces/html.idl -- ...
3 years, 7 months ago (2017-05-12 17:07:35 UTC) #18
foolip
lgtm % question, but please wait for jsbell@ to confirm as well. https://codereview.chromium.org/2875013002/diff/60001/third_party/WebKit/LayoutTests/external/wpt/html/editing/dnd/datastore/datatransfer-types.html File third_party/WebKit/LayoutTests/external/wpt/html/editing/dnd/datastore/datatransfer-types.html ...
3 years, 7 months ago (2017-05-15 15:11:02 UTC) #23
Raphael Kubo da Costa (rakuco)
Thanks for the review; I'm actually making the patch a bit more complicated because the ...
3 years, 7 months ago (2017-05-15 15:17:59 UTC) #24
Raphael Kubo da Costa (rakuco)
PTAL at patch v5: it introduces DataObject::Observer as a way to notify DataTransfer to invalidate ...
3 years, 7 months ago (2017-05-15 15:55:56 UTC) #28
jsbell
lgtm Since we already have DataObjectTest.cpp it wouldn't be hard to add unit tests that ...
3 years, 7 months ago (2017-05-15 20:49:29 UTC) #31
Raphael Kubo da Costa (rakuco)
Thanks; I think I've addressed everything in patch v6. https://codereview.chromium.org/2875013002/diff/80001/third_party/WebKit/Source/core/clipboard/DataObject.cpp File third_party/WebKit/Source/core/clipboard/DataObject.cpp (right): https://codereview.chromium.org/2875013002/diff/80001/third_party/WebKit/Source/core/clipboard/DataObject.cpp#newcode97 third_party/WebKit/Source/core/clipboard/DataObject.cpp:97: ...
3 years, 7 months ago (2017-05-16 08:51:51 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2875013002/120001
3 years, 7 months ago (2017-05-16 13:02:37 UTC) #41
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/fb8089d1d38e7573bbf99ea1828425bc25630c3d
3 years, 7 months ago (2017-05-16 13:07:41 UTC) #44
jsbell
On 2017/05/16 08:51:51, Raphael Kubo da Costa (rakuco) wrote: > Thanks; I think I've addressed ...
3 years, 7 months ago (2017-05-16 16:46:44 UTC) #45
jeffcarp
On 2017/05/16 at 16:46:44, jsbell wrote: > On 2017/05/16 08:51:51, Raphael Kubo da Costa (rakuco) ...
3 years, 7 months ago (2017-05-16 18:26:24 UTC) #46
jsbell
On 2017/05/16 18:26:24, jeffcarp wrote: > An upstream export PR was created for this but ...
3 years, 7 months ago (2017-05-16 18:52:02 UTC) #47
foolip
3 years, 7 months ago (2017-05-17 11:41:37 UTC) #48
Message was sent while issue was closed.
On 2017/05/16 18:52:02, jsbell wrote:
> On 2017/05/16 18:26:24, jeffcarp wrote:
> > An upstream export PR was created for this but the results were unstable on
> > Edge:
> > https://github.com/w3c/web-platform-tests/pull/5942
> > 
> > Any help in resolving this would be appreciated. I can update the PR with
any
> > new patches.
> 
> Interesting... the failure looks unrelated to this change -- specifically,
it's
> validating an XMLDocument instance! 
> 
>
https://github.com/w3c/web-platform-tests/blob/master/html/dom/interfaces.htm...
> 
> The change to interfaces/html.idl may have tickled the bots. *sigh*
> 
> The Edge (and Safari) bots are new. Do we know how stable the results are for
a
> typical run?

As you're say they're brand new, activated on May 15. This is the first Edge
flakiness that I've seen, but I don't know what the general state is.

I'll ask @bobholt on https://github.com/w3c/web-platform-tests/pull/5942, which
I've now merged manually after confirming that the flakiness is not new.

Powered by Google App Engine
This is Rietveld 408576698