Bug 180471

Summary: Implement {DOMMimeTypeArray, DOMPluginArray}::supportedPropertyNames().
Product: WebKit Reporter: Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger>
Component: DOMAssignee: Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Ms2ger (he/him; ⌚ UTC+1/+2)
Reported 2017-12-06 07:05:17 PST
.
Attachments
Patch (6.78 KB, patch)
2017-12-06 07:22 PST, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags
Patch (6.61 KB, patch)
2017-12-12 03:15 PST, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags
Patch (6.62 KB, patch)
2017-12-12 04:58 PST, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 1 2017-12-06 07:22:24 PST
Darin Adler
Comment 2 2017-12-11 21:36:49 PST
Comment on attachment 328565 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328565&action=review > Source/WebCore/plugins/DOMMimeTypeArray.cpp:97 > + unsigned size = mimes.size(); > + > + Vector<AtomicString> result; > + result.reserveInitialCapacity(size); > + > + for (unsigned i = 0; i < size; ++i) > + result.uncheckedAppend(AtomicString(mimes[i].type)); Writing it like this gets rid of an unnecessary local variable, uses a modern for loop, gets rid of unnecessary explicit conversion to AtomicString, and saves a little bit of reference count churn by using WTFMove. Vector<AtomicString> result; result.reserveInitialCapacity(mimes.size()); for (auto& info : mimes) result.uncheckedAppend(WTFMove(info.type)); > Source/WebCore/plugins/DOMPluginArray.cpp:85 > + const Vector<PluginInfo>& plugins = data->publiclyVisiblePlugins(); > + unsigned size = plugins.size(); > + > + Vector<AtomicString> result; > + result.reserveInitialCapacity(size); > + > + for (unsigned i = 0; i < size; ++i) > + result.uncheckedAppend(AtomicString(plugins[i].name)); Writing it like this gets rid of an unnecessary written-out type, an unnecessary local variable, uses a modern for loop, and gets rid of unnecessary explicit conversion to AtomicString. auto& plugins = data->publiclyVisiblePlugins(); Vector<AtomicString> result; result.reserveInitialCapacity(plugins.size()); for (auto& plugin : plugins) result.uncheckedAppend(plugin.name);
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 3 2017-12-12 03:15:23 PST
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 4 2017-12-12 04:58:39 PST
WebKit Commit Bot
Comment 5 2017-12-12 06:29:05 PST
Comment on attachment 329108 [details] Patch Clearing flags on attachment: 329108 Committed r225779: <https://trac.webkit.org/changeset/225779>
WebKit Commit Bot
Comment 6 2017-12-12 06:29:07 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2017-12-12 06:30:36 PST
Note You need to log in before you can comment on or make changes to this bug.