Add a LazyNeverDestroyed class template and use it
https://bugs.webkit.org/show_bug.cgi?id=133425

Reviewed by Darin Adler.

Source/JavaScriptCore:
* dfg/DFGFunctionWhitelist.cpp:
(JSC::DFG::FunctionWhitelist::ensureGlobalWhitelist):
* dfg/DFGFunctionWhitelist.h:

Source/WebCore:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::guidMutex):
* crypto/CryptoAlgorithmRegistry.cpp:
(WebCore::registryMutex):
* inspector/WorkerDebuggerAgent.cpp:
* loader/CrossOriginAccessControl.cpp:
(WebCore::isOnAccessControlResponseHeaderWhitelist):
* platform/network/NetworkStateNotifier.cpp:
(WebCore::networkStateNotifier):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::instance):
* workers/DefaultSharedWorkerRepository.h:
* workers/WorkerThread.cpp:
(WebCore::threadSetMutex):
* xml/XMLHttpRequest.cpp:
(WebCore::staticData):

Source/WebKit2:
* Shared/mac/SecItemShim.cpp:
(WebKit::responseMap):

Source/WTF:
LazyNeverDestroyed is similar to NeverDestroyed, except it's lazily constructed
by calling construct(). This makes it useful for using inside std::call_once functions.

* wtf/Forward.h:
* wtf/NeverDestroyed.h:
(WTF::LazyNeverDestroyed::construct):
(WTF::LazyNeverDestroyed::operator T&):
(WTF::LazyNeverDestroyed::get):
(WTF::LazyNeverDestroyed::asPtr):
(WTF::LazyNeverDestroyed::MaybeRelax::MaybeRelax):
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::atomicallyInitializedStaticMutex):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::cachedCollatorMutex):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't scroll to non-integral scroll offsets
https://bugs.webkit.org/show_bug.cgi?id=133436
<rdar://problem/17088336>

Reviewed by Darin Adler.

With the gradual migration of scroll offsets to floating point, we ended
up with a fully floating point code path been event scroll deltas and
setting scroll positions in the scrolling tree.

With some input devices (e.g. Logitech scrollwheel mice), the scroll deltas
come in with non-integral values, and that caused the scroll offset to be non-integral,
resulting in fuzzy layer contents. So round the scroll position.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169519 268f45cc-cd09-0410-ab3c-d52691b4dbfc