зеркало из https://github.com/mozilla/gecko-dev.git
535e3c83a1
Currently, in order to retrieve supported clipboard formats DataTransfer::CacheExternalClipboardFormats repeatedly makes the same calls to clipboard->HasDataMatchingFlavors. In the case when aPlainTextOnly == true only 1 call is made - clipboard->HasDataMatchingFlavors(kUnicodeMime, ...), and when aPlainTextOnly == false we have 1 call made for every member of the list { kCustomTypesMime, kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime, kUnicodeMime, kPNGImageMime } - a total of 8 calls. We can see that in nsClipboardProxy::HasDataMatchingFlavors, there is a call to ContentChild::GetSingleton()->SendClipboardHasType. So when aPlainTextOnly == true, we will have 1 sync message, and when aPlainTextOnly == false, we will have 8 sync messages. With the proposed solution, in DataTransfer::CacheExternalClipboardFormats we will only have 1 sync message regardless of the case because GetExternalClipboardFormats() will retrieve all supported clipboard formats at once. MozReview-Commit-ID: CAmBfqB459v --HG-- extra : rebase_source : 27f1b420f2613e6a747ed63762f1583ab71ba3e0 |
||
---|---|---|
.. | ||
ipdl | ||
test | ||
Makefile.in | ||
ipdl.py | ||
message-metadata.ini | ||
moz.build | ||
msgtype-components | ||
sync-messages.ini |