mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
be86e183fd
nsAutoCopyListener is a singleton class but refcountable and a selection listener. nsFrameSelection adds it to only normal Selection when it's on macOS or it's enabled by the pref. Additionally, it's always first selection listener since it's added immediately after Selection instance is created. So, we can make it a static class, and normal Selection instance should have a bool to decide whether it should notify nsAutoCopyListener of its changes. Then, we can save the cost of grabbing it with local RefPtr and the virtual call. Additionally, this patch renames nsAutoCopyListener to mozilla::AutoCopyListener and optimizes constructor of nsFrameSelection (using bool var cache to retrieve the pref, avoid retrieving the pref on macOS). Differential Revision: https://phabricator.services.mozilla.com/D4504 --HG-- rename : layout/generic/nsAutoCopyListener.h => layout/generic/AutoCopyListener.h extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
brotli | ||
fdlibm | ||
freetype2 | ||
libjar | ||
libmar | ||
libpref | ||
pdfium | ||
woff2 | ||
xz-embedded | ||
zlib | ||
moz.build |