Improve use of NeverDestroyed
[WebKit-https.git] / Source / WebCore / ChangeLog
index 9940877..c3e6223 100644 (file)
+2017-07-17  Darin Adler  <darin@apple.com>
+
+        Improve use of NeverDestroyed
+        https://bugs.webkit.org/show_bug.cgi?id=174348
+
+        Reviewed by Sam Weinig.
+
+        * Modules/encryptedmedia/MediaKeySession.cpp: Removed unneeded include of
+        NeverDestroyed.h.
+
+        * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
+        (WebCore::installedCDMFactories): Use makeNeverDestroyed and a lambda rather
+        than a separate boolean for initialization.
+
+        * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
+        (WebCore::clearKeyVM): Removed unneeded use of NeverDestroyed to hold a
+        RefPtr. Simple to just use leakRef instead.
+
+        * Modules/gamepad/GamepadManager.cpp: Added an include of NeverDestroyed.h.
+
+        * Modules/indexeddb/IDBTransaction.cpp: Removed unneeded include of
+        NeverDestroyed.h.
+        * Modules/indexeddb/server/MemoryObjectStore.cpp: Ditto.
+
+        * Modules/mediasession/MediaSessionManager.cpp: Moved include of
+        NeverDestroyed.h here ...
+        * Modules/mediasession/MediaSessionManager.h: ... from here.
+
+        * Modules/mediasource/MediaSourceRegistry.cpp: Moved include of
+        NeverDestroyed.h here ...
+        * Modules/mediasource/MediaSourceRegistry.h: ... from here.
+
+        * Modules/mediasource/SourceBuffer.cpp: Removed unneeded include of
+        NeverDestroyed.h.
+
+        * Modules/plugins/QuickTimePluginReplacement.h: Initialize
+        m_scriptObject in the class definition.
+
+        * Modules/plugins/QuickTimePluginReplacement.mm:
+        (WebCore::QuickTimePluginReplacement::supportsMimeType): Use
+        makeNeverDestroyed and the HashSet constructor instead of a loop.
+        (WebCore::QuickTimePluginReplacement::supportsFileExtension): Ditto.
+        (WebCore::QuickTimePluginReplacement::QuickTimePluginReplacement): Did a
+        slight cleanup of the initializers.
+        (WebCore::QuickTimePluginReplacement::~QuickTimePluginReplacement): Added
+        a FIXME; unclear why there is code here at all.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::inheritsPresentationalRole): Use
+        makeNeverDestroyed and the Vector constructor instead of using empty
+        vector checks and Vector::add. Use std::any_of rather than Vector::contains
+        since we now are matching against pointers.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateEnumerationImplementationContent): Use const NeverDestroyed.
+
+        * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
+        * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
+        Regenerated.
+
+        * css/CSSProperty.cpp:
+        (WebCore::borderDirections): Removed unnecesssary use of NeverDestroyed
+        for a global object that has a trivial destructor.
+
+        * css/ElementRuleCollector.cpp:
+        (WebCore::leftToRightDeclaration): Removed unneeded use of NeverDestroyed to hold a
+        Ref. Simple to just use leakRef instead. Also use a lambda instead of an explicit
+        isEmpty check each time this is called.
+        (WebCore::rightToLeftDeclaration): Ditto.
+
+        * css/makeprop.pl: Removed unneeded include of NeverDestroyed.h and the
+        uneeded global emptyShorthand. Constructing an empty StylePropertyShorthand
+        is no less efficient than copying a global empty one was.
+
+        * dom/CustomElementReactionQueue.cpp: Added an include of NeverDestroyed.h.
+
+        * dom/DOMImplementation.cpp: Removed unneeded include of NeverDestroyed.h.
+        * dom/InputEvent.cpp: Ditto.
+
+        * dom/Microtasks.cpp: Moved include of NeverDestroyed.h here ...
+        * dom/Microtasks.h: ... from here.
+
+        * dom/MutationObserver.cpp: Added an include of NeverDestroyed.h.
+
+        * dom/ScopedEventQueue.cpp: Moved include of NeverDestroyed.h here ...
+        * dom/ScopedEventQueue.h: ... from here. Added Forward.h.
+
+        * dom/ScriptElement.cpp:
+        (WebCore::isLegacySupportedJavaScriptLanguage): Use makeNeverDestroyed
+        and the HashSet constructor rather than an isEmpty check and a lot of
+        add function calls. Also removed comments that don't have value any more,
+        with dubious no longer relevant claims about the behavior of old web browsers.
+        The function that calls this one already has sufficient comments about why we
+        hope some day this function can be eliminated.
+
+        * dom/SecurityContext.cpp: Removed unneeded include of NeverDestroyed.h.
+
+        * dom/make_names.pl:
+        (printFactoryCppFile): Instead of using a "populate" function, use a function
+        that creates as HashMap. Then use const auto and makeNeverDestroyed.
+        (printWrapperFactoryCppFile): Ditto.
+
+        * editing/AlternativeTextController.cpp:
+        (WebCore::markerTypesForAutocorrection): Use makeNeverDestroyed
+        and the Vector constructor rather than an isEmpty check and a lot of
+        append function calls.
+        (WebCore::markerTypesForReplacement): Ditto.
+        (WebCore::markerTypesForAppliedDictationAlternative): Ditto.
+
+        * editing/EditingStyle.cpp:
+        (WebCore::htmlElementEquivalents): Use const auto, makeNeverDestroyed,
+        the Vector constructor, and new rather than make_unique. Changed return
+        type to use const pointers rather than unique_ptr with non-const type.
+        (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Updated
+        for the above change to htmlElementEquivalents.
+        (WebCore::htmlAttributeEquivalents): Same approach as above.
+        (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes): Ditto.
+        (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Take
+        references instead of pointers.
+        (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): Updated
+        for the above.
+
+        * editing/FormatBlockCommand.cpp:
+        (WebCore::isElementForFormatBlock): Use const auto, makeNeverDestroyed,
+        and the HashSet constructor rather than isEmpty and a lot of calls to add.
+        * editing/RemoveFormatCommand.cpp:
+        (WebCore::isElementForRemoveFormatCommand): Ditto.
+
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::isProhibitedParagraphChild): Use const auto, makeNeverDestroyed,
+        and a lambda, rather than isEmpty and a lot of calls to add.
+
+        * html/Autofill.cpp:
+        (WebCore::fieldNameMap): Changed return type to be const. Use const auto,
+        makeNeverDestroyed, a lambda, and an array of values rather than isEmpty
+        and a lot of calls to add. Stopped doing the ConstructFromLiteral
+        optimization here. (Easy to add it back if that is a mistake.)
+
+        * html/HTMLObjectElement.cpp:
+        (WebCore::isRecognizedTagName): Use const auto, makeNeverDestroyed, and
+        a lambda rather than isEmpty.
+
+        * html/HTMLStyleElement.cpp: Added include of NeverDestroyed.h.
+
+        * html/HTMLVideoElement.cpp: Removed uneeded include of NeverDestroyed.h.
+
+        * html/InputType.cpp:
+        (WebCore::createInputTypeFactoryMap): Replaced the populate function
+        with this create function.
+        (WebCore::InputType::create): Use const auto and makeNeverDestroyed
+        istead of isEmpty. Also put the map right where it is used so it's
+        not initialized in code path where not needed.
+
+        * html/parser/HTMLParserIdioms.cpp: Removed uneeded include of
+        NeverDestroyed.h.
+
+        * inspector/InspectorApplicationCacheAgent.cpp:
+        (WebCore::InspectorApplicationCacheAgent::networkStateChanged):
+        Merged into a single line.
+
+        * loader/ContentFilter.cpp:
+        (WebCore::blockedPageURL): Use const auto and makeNeverDestroyed
+        rather than std::call_once. Since this is a URL and has a non-thread-safe
+        reference count, this was not thread safe before, so no need to use the
+        more roundabout and less efficient idiom for its thread safety.
+
+        * loader/CrossOriginAccessControl.cpp:
+        (WebCore::isOnAccessControlResponseHeaderWhitelist): Deleted.
+        * loader/CrossOriginAccessControl.h: Deleted unused function
+        isOnAccessControlResponseHeaderWhitelist.
+
+        * loader/EmptyClients.cpp: Use leakRef instead of NeverDestroyed<Ref>.
+
+        * loader/appcache/ApplicationCacheStorage.cpp: Removed unneeded include of
+        NeverDestroyed.h.
+        * page/CaptionUserPreferences.cpp: Ditto.
+
+        * page/DebugPageOverlays.cpp:
+        (WebCore::touchEventRegionColors): Changed the return type to const, since
+        the callers do not modify the map. Use const auto, makeNeverDestroyed, and
+        a lambda rather than isEmpty and repeated calls to add.
+
+        * page/MainFrame.cpp: Removed unneeded include of NeverDestroyed.h.
+
+        * page/MemoryRelease.cpp:
+        (WebCore::releaseMemory): Use a function directly instead of calling it
+        inside a lambda.
+
+        * page/NavigatorBase.cpp:
+        (WebCore::NavigatorBase::onLine): Updated to call
+        NetworkStateNotifier::singleton.
+
+        * page/Page.cpp:
+        (WebCore::allPages): Made this a function instead of a global to use the
+        normal idiom for such globals.
+        (WebCore::Page::forEachPage): Updated for change to allPages.
+        (WebCore::networkStateChanged): Ditto. Also removed a bit of unnecessary
+        churn by using const AtomicString& instead of AtomicString.
+        (WebCore::Page::Page): Moved initialization of most data members to the
+        class definition. Removed initialiation of allPages. Updated the use of
+        NetworkStateNotifier for its new slightly changed  interface.
+        (WebCore::Page::~Page): Updated for change to allPages.
+        (WebCore::Page::clearPreviousItemFromAllPages): Ditto.
+        (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment): Ditto.
+        (WebCore::Page::refreshPlugins): Ditto.
+
+        * page/Page.h: Moved initialization of most data members here.
+
+        * page/PerformanceUserTiming.cpp: Removed many unneded includes.
+        (WebCore::restrictedMarkFunction): Use const auto, makeNeverDestroyed, and
+        a lambda instead of isEmpty. Also use an array rather than std::array and
+        got rid fo the unneeded use of anonymous namespace since this is fine in
+        the top level WebCore namespace.
+        (WebCore::clearPerformanceEntries): Tweaked coding style.
+        (WebCore::UserTiming::mark): Ditto.
+        (WebCore::UserTiming::findExistingMarkStartTime): Got rid of double hash
+        table lookup by using find instead of using contains followed by get.
+        removed unneeded explicit cast to double. Tweaked coding style.
+        (WebCore::convertToEntrySequence): Tweaked coding style.
+        (WebCore::getEntrySequenceByName): Deleted.
+        (WebCore::UserTiming::getMarks): Call get directly instead of getEntrySequenceByName.
+        (WebCore::UserTiming::getMeasures): Ditto.
+
+        * page/RuntimeEnabledFeatures.cpp: Moved include of NeverDestroyed.h here ...
+        * page/RuntimeEnabledFeatures.h: ... from here. Added Forward.h and Noncopyable.h.
+
+        * platform/LocalizedStrings.cpp: Removed unneeded include of NeverDestroyed.h.
+
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::initializeSupportedImageMIMETypes): Added a missing const for a global
+        constant array.
+        (WebCore::initializeSupportedJavaScriptMIMETypes): Ditto.
+        (WebCore::initializeSupportedNonImageMimeTypes): Ditto.
+        (WebCore::typesForCommonExtension): Replaced the old mediaMIMETypeMap function
+        with this one. Moved the common media types array here since it's only used here.
+        Use const auto, makeNeverDestroyed, and a lambda instead of using an isEmpty check.
+        Iterate the array using a mdoern for loop. Use HashMap::ensure to avoid the
+        double hashing that the old code was doing. And moved the code to find an entry
+        in the map in here from the client functions.
+        (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension): Updated to use the
+        typesForCommonExtension, and changed logic to use this first, and only call
+        getMIMETypeForExtension for extensions not in the map. This gives the same
+        result but should be slightly more efficient.
+        (WebCore::MIMETypeRegistry::getMediaMIMETypesForExtension): Updated to use the
+        typesForCommonExtension function. Comment about strategy is now in there.
+        (WebCore::initializeUnsupportedTextMIMETypes): Added a missing const for a global
+        constant array. Also started using ASCIILiteral.
+
+        * platform/MainThreadSharedTimer.cpp: Moved include of NeverDestroyed.h here ...
+        * platform/MainThreadSharedTimer.h: ... from here. Added Forward.h.
+
+        * platform/SchemeRegistry.cpp:
+        (WebCore::add): Added helper functions to keep code below simpler.
+        (WebCore::makeNeverDestroyedSchemeSet): Ditto.
+        (WebCore::allBuiltinSchemes): Use const auto, makeNeverDestroyed, a lambda,
+        and the helper functions above, rather than isEmpty.
+        (WebCore::builtinLocalURLSchemes): Use const auto, makeNeverDestroyed, and
+        the HashSet constructor instead of isEmpty and add calls. Also changed the
+        return type to be const.
+        (WebCore::localURLSchemes): Copy the map using assignment instead of an
+        isEmpty function and a loop with calls to add.
+        (WebCore::builtinSecureSchemes): Use const auto, makeNeverDestroyed, and
+        the Vector constructor rather than isEmpty, repeated calls to append,
+        and shrinkToFit.
+        (WebCore::secureSchemes): Use auto and makeNeverDestroyedSchemeSet rather
+        than isEmpty and repeated calls to add.
+        (WebCore::builtinSchemesWithUniqueOrigins): More of the same.
+        (WebCore::schemesWithUniqueOrigins): Ditto.
+        (WebCore::builtinEmptyDocumentSchemes): Ditto.
+        (WebCore::emptyDocumentSchemes): Ditto.
+        (WebCore::schemesForbiddenFromDomainRelaxation): Ditto.
+        (WebCore::builtinCanDisplayOnlyIfCanRequestSchemes): Ditto.
+        (WebCore::canDisplayOnlyIfCanRequestSchemes): Ditto.
+        (WebCore::builtinCORSEnabledSchemes): Ditto.
+        (WebCore::CORSEnabledSchemes): Ditto.
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): Replaced check for
+        empty string with check for null string, since that's slightly more efficient
+        for non-null, non-empty strings, and the hash table can handle empty strings
+        just fine.
+        (WebCore::SchemeRegistry::registerURLSchemeAsNoAccess): Added null check here.
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated): Ditto.
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsSecure): Ditto.
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument): Ditto.
+        (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument): Ditto.
+        (WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme): Ditto.
+        (WebCore::SchemeRegistry::isDomainRelaxationForbiddenForURLScheme): Ditto.
+        (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest): Ditto.
+        (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): Ditto.
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing): Ditto.
+        (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing): Ditto.
+        (WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsCORSEnabled): Ditto.
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): Ditto.
+        (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): Ditto.
+        (WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated): Ditto.
+        (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme): Ditto.
+        (WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned): Ditto.
+        (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme): Ditto.
+        (WebCore::SchemeRegistry::isUserExtensionScheme): Tweaked #if a bit.
+        (WebCore::SchemeRegistry::isBuiltinScheme): Added null check.
+
+        * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
+        (WebVideoFullscreenModelVideoElement::observedEventNames): Use const auto,
+        makeNeverDestroyed, and the Vector constructor rather than a call to size
+        and then append eacn time this funciton is called.
+
+        * platform/gamepad/cocoa/GameControllerGamepadProvider.h: Moved include of
+        NeverDestroyed.h from here ...
+        * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: ... to here.
+
+        * platform/gamepad/mac/HIDGamepadProvider.cpp: Moved include of
+        NeverDestroyed.h here ...
+        * platform/gamepad/mac/HIDGamepadProvider.h: ... from here.
+
+        * platform/graphics/FontCascade.cpp:
+        (WebCore::FontCascade::hasValidAverageCharWidth): Use const auto,
+        makeNeverDestroyed, and the HashSet constructor.
+
+        * platform/graphics/ImageBuffer.cpp:
+        (WebCore::ImageBuffer::transformColorSpace): Removed unneeded use of
+        NeverDestroyed<Vector<int>> here, instead using const std::array.
+
+        * platform/graphics/ImageBuffer.h: Changed platformTransformColorSpace to take
+        const std::array<uint8_t, 256>& instead of const Vector<int>&, since the whole
+        pointer of the argument is that it's a table to map bytes onto other bytes.
+
+        * platform/graphics/MediaPlaybackTarget.h: Removed unneeded include of
+        NeverDestroyed.h, unneeded unused noMediaPlaybackTargetContext function,
+        and unneeded include of MediaPlaybackTargetContext.h, forward declaring instead.
+        Made most functions in this class pure virtual instead of having default
+        implementations.
+
+        * platform/graphics/avfoundation/MediaPlaybackTargetMac.h: Added include
+        of MediaPlaybackTargetContext.h now that it was removed above.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Use const auto,
+        makeNeverDestroyed, and the HashSet constructor.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Reversed the sense
+        of the boolean logic here to make this simpler and easier to read.
+        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes): Changed
+        the implementation here, which empties out the passed in hash set, to use
+        the clear function rather than assignment from a global empty hash set. Added
+        a FIXME because it seems peculiar that this would be considered OK.
+        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType): Used ? : to make
+        this a little more terse; I think it's clearer.
+
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        (WebCore::ImageBuffer::platformTransformColorSpace): Updated for change to
+        argument type.
+
+        * platform/graphics/cg/ImageDecoderCG.cpp: Removed unneeded include of
+        NeverDestroyed.h.
+        (WebCore::appendImageSourceOption): Streamlined code using auto with
+        adoptCF; there is no need to write out the type of the RetainPtr.
+        (WebCore::imageSourceOptions): Instead of NeverDestroyed<RetainPtr>, just use
+        const auto and leakRef.
+        (WebCore::imageSourceAsyncOptions): Ditto.
+
+        * platform/graphics/gtk/GdkCairoUtilities.cpp:
+        (WebCore::getDefaultCairoFontOptions): Instead of using LazyNeverDestroyed
+        on a pointer, just use a global pointer. There is no need to use any kind
+        of NeverDestroyed on a type with a trivial destructor such as a pointer.
+
+        * platform/graphics/ios/FontCacheIOS.mm:
+        (WebCore::platformFontWithFamilySpecialCase): Instead of using
+        NeverDestroyed<RetainPtr> just use a raw pointer global.
+        * platform/graphics/mac/FontCacheMac.mm:
+        (WebCore::platformFontWithFamilySpecialCase): Ditto.
+
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::createFileTypesSet): Return the HashSet instead of adding to it.
+        Use Objective-C for/in syntax for an NSArray, not C++ for syntax, although
+        it seems the C++ syntax was working fine.
+        (WebCore::mimeCommonTypesCache): Fixed return type so we won't copy the
+        HashMap every time this function is called. Use const auto and makeNeverDestroyed
+        instead of using a boolean to do one time initialization.
+        (WebCore::mimeModernTypesCache): Ditto.
+        (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Marked a
+        constant array const.
+
+        * platform/ios/Device.cpp:
+        (WebCore::deviceClass): Use a lambda to initialize a variable here instead
+        of using std::call_once. This function does not need to be thread safe.
+        (WebCore::deviceName): Use const NeverDestroyed instead of LazyNeverDestroyed
+        and std::call_once. This function does not need to be thread safe.
+
+        * platform/ios/DragImageIOS.mm: Make defaultLinkIndicatorOptions be a
+        constant instead of a variable.
+        (WebCore::cascadeForSystemFont): Added helper function.
+        (WebCore::createDragImageForLink): Use const auto and makeNeverDestroyed
+        instead of LazyNeverDestroyed and dispatch_once. This code does not need
+        to be thread safe since its arguments include, for example, a DOM element.
+
+        * platform/ios/LegacyTileLayerPool.h: Removed unneeded include of
+        NeverDestroyed.h.
+
+        * platform/ios/QuickLook.mm:
+        (WebCore::QLPreviewGetSupportedMIMETypesSet): Use a global raw pointer
+        instead of NeverDestroyed<RetainPtr<NSSet>>.
+        (WebCore::createQLPreviewProtocol): Deleted.
+        (WebCore::QLPreviewProtocol): Use a global raw pointer instead of
+        a NeverDestroyed<Vector<char>>. It's cleaner to use fastStrdup instead
+        of appending to an array, and less wasteful of memory too.
+
+        * platform/ios/WebCoreMotionManager.mm: Removed unneeded include of
+        NeverDestroyed.h.
+        * platform/ios/WebSQLiteDatabaseTrackerClient.h: Ditto.
+        * platform/mac/DragImageMac.mm: Ditto.
+        * platform/mediastream/CaptureDeviceManager.cpp: Ditto.
+        * platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Ditto.
+
+        * platform/mock/MockRealtimeMediaSource.cpp:
+        (WebCore::MockRealtimeMediaSource::audioDevices): Use auto,
+        makeNeverDestroyed, and a lambda instead of checking size each time.
+        (WebCore::MockRealtimeMediaSource::videoDevices): Ditto.
+
+        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
+        (WebCore::mimeTypeCache): Use const auto, makeNeverDestroyed, and the
+        HashSet constructor instead of an explicit boolean to initialize.
+
+        * platform/network/BlobRegistryImpl.cpp:
+        (WebCore::blobUtilityQueue): Use a global with a raw reference instead
+        of a NeverDestroyed<Ref>.
+
+        * platform/network/NetworkStateNotifier.cpp:
+        (WebCore::NetworkStateNotifier::singleton): Renamed this from
+        networkStateNotifier. We must have missed this when we changed to use the
+        singleton idiom consistently. Also changed to use normal NeverDestroyed
+        rather than using LazyNeverDestroyed and call_once, because this is not
+        used from multiple threads and has no special thread safety requirements.
+        (WebCore::NetworkStateNotifier::NetworkStateNotifier): Moved the constructor
+        here and construct the timer. Before the timer was used only on the Mac
+        platform but now it is there for all platforms.
+        (WebCore::NetworkStateNotifier::onLine): Moved function here from the header.
+        It's a littlel less trivial than before because it now triggers a call to
+        updateState as needed.
+        (WebCore::NetworkStateNotifier::addListener): Renamed from
+        addNetworkStateChangeListener since there is only one kind of listener and
+        the old name was too wordy. Changed to call the new startObserving function,
+        and guaranteed to call it onlh once. The platform-specific logic for iOS is
+        now inside the iOS version of that function instead of here.
+        (WebCore::NetworkStateNotifier::updateState): Moved here now that it is the
+        same for all platforms. The actual state updating is done in a function named
+        updateStateWithoutNotifying, which is implemented for each platform.
+        (WebCore::NetworkStateNotifier::updateStateSoon): New function which takes
+        advantage of the timer to coalesce network state updates.
+        (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): Empty stub
+        version of this function.
+        (WebCore::NetworkStateNotifier::startObserving): Ditto.
+        (WebCore::NetworkStateNotifier::notifyNetworkStateChange): Deleted. Code from
+        this has moved into updateState.
+
+        * platform/network/NetworkStateNotifier.h: Greatly cut down what part of this
+        class is platform-specific.
+
+        * platform/network/ios/NetworkStateNotifierIOS.mm:
+        (-[WebNetworkStateObserver initWithBlock:]): Simplified this class so it
+        takes a block, rather than using a pointer to the C++ notifier and doing
+        WebThreadRun.
+        (-[WebNetworkStateObserver dealloc]): Ditto.
+        (-[WebNetworkStateObserver networkStateChanged:]): Ditto.
+        (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
+        This now calls isNetworkReachable.
+        (WebCore::NetworkStateNotifier::startObserving): Check the
+        Settings::shouldOptOutOfNetworkStateObservation function, and if it's OK
+        to observe, then create the observer. This code now takes care of the
+        WebThreadRun and calls updateStateSoon.
+        (WebCore::NetworkStateNotifier::NetworkStateNotifier): Deleted. The
+        constructor is now platform independent.
+        (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Deleted. This
+        object is never destroyed so we should not write a destructor for it.
+        (WebCore::NetworkStateNotifier::registerObserverIfNecessary): Deleted.
+        Replaced by startObserving.
+        (WebCore::NetworkStateNotifier::onLine): Deleted. This function is now
+        platform-independent.
+        (WebCore::setOnLine): Deleted. The logic from this is now in
+        updateState and updateStateWithoutNotifying.
+
+        * platform/network/mac/NetworkStateNotifierMac.cpp:
+        (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): Renamed
+        this from updateState and tightened up the code a bit. Also changed
+        to not assume anything. If there is an error, we leave m_isOnLine alone.
+        Default behavior is now in the platform-independent code, and the default
+        is to treat things as on-line if updateStateWithoutNotifying was called
+        and it was never able to update the state even once.
+        (WebCore::NetworkStateNotifier::startObserving): Moved most of the code
+        from the constructor into this function.
+        (WebCore::NetworkStateNotifier::dynamicStoreCallback): Deleted. This is
+        now a lambda inside startObserving.
+        (WebCore::NetworkStateNotifier::networkStateChangeTimerFired): Deleted.
+        This function is now platform-independent and is named updateState.
+
+        * platform/network/win/NetworkStateNotifierWin.cpp:
+        (WebCore::NetworkStateNotifier::updateStateWithoutNotifying): Renamed
+        from updateState and tightened the code up a bit. Also changed
+        to not assume anything. If there is an error, we leave m_isOnLine alone.
+        Default behavior is now in the platform-independent code, and the default
+        is to treat things as on-line if updateStateWithoutNotifying was called
+        and it was never able to update the state even once.
+        (WebCore::NetworkStateNotifier::addressChanged): Deleted.
+        This function is now platform-independent and is named updateState.
+        (WebCore::NetworkStateNotifier::addressChangeCallback): Renamed from
+        addrChangeCallback. Simplified by using the singleton function instead
+        of relying on the context pointer.
+        (WebCore::NetworkStateNotifier::startObserving): Moved most of the code
+        from the constructor here.
+
+        * platform/text/LocaleToScriptMappingDefault.cpp:
+        (WebCore::scriptNameToCode): Use makeNeverDestroyed.
+        (WebCore::localeToScriptCodeForFontSelection): Ditto.
+
+        * platform/text/ios/LocalizedDateCache.h: Moved include of
+        NeverDestroyed.h from here ...
+        * platform/text/ios/LocalizedDateCache.mm: ... to here.
+
+        * platform/wpe/RenderThemeWPE.cpp:
+        (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
+        rather than Ref that is never destroyed.
+
+        * platform/wpe/RenderThemeWPE.h: Use friend NeverDestroyed rather than
+        a create function since RenderTheme is no longer reference counted.
+
+        * rendering/RenderTheme.h: Made RenderTheme no longer reference counted.
+
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::create): Deleted.
+        (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
+        rather than Ref that is never destroyed.
+
+        * rendering/RenderThemeGtk.h: Use friend NeverDestroyed rather than
+        a create function since RenderTheme is no longer reference counted.
+        * rendering/RenderThemeIOS.h: Ditto.
+
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::create): Deleted.
+        (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
+        rather than Ref that is never destroyed.
+
+        * rendering/RenderThemeMac.h: Use friend NeverDestroyed rather than
+        a create function since RenderTheme is no longer reference counted.
+        Also marked a lot of functions final rather than override and initialized
+        data members in the class deifnition.
+
+        * rendering/RenderThemeMac.mm: Moved some SPI interfaces to the top of the
+        file. They should really go into SPI headers.
+        (-[WebCoreRenderThemeNotificationObserver init]): Removed the theme argument
+        here because the theme is a singleton and we don't need a pointer to it.
+        Add the observer here instead of doing it in the caller.
+        (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]): Call
+        platformColorsDidChange through the singleton rather than using a pointer.
+        (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
+        Tightened up the code a bit by using CFAutorelease instead of using a
+        combination of NSMakeCollectable, autorelease, and a typecast to accomplish
+        the same thing.
+        (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
+        rather than Ref that is never destroyed.
+        (WebCore::RenderThemeMac::create): Deleted.
+        (WebCore::RenderThemeMac::RenderThemeMac): Moved initialization into the
+        class definition and observing into the WebCoreRenderThemeNotificationObserver
+        init function.
+        (WebCore::RenderThemeMac::~RenderThemeMac): Deleted. No need for this since
+        the object will never be destroyed.
+        (WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType):
+        Removed an unnecessary conversion from C string literal to WTF::String and
+        then to NSString. Instead, just use an NSString literal.
+
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::create): Deleted.
+        (WebCore::RenderTheme::singleton): Use a theme that is never destroyed
+        rather than Ref that is never destroyed.
+
+        * rendering/RenderThemeWin.h: Use friend NeverDestroyed rather than
+        a create function since RenderTheme is no longer reference counted.
+
+        * rendering/svg/RenderSVGResource.cpp:
+        (WebCore::removeFromCacheAndInvalidateDependencies): Moved a global into
+        the code where it is used.
+
+        * svg/SVGAnimatedLength.cpp: Removed unneeded include of NeverDestroyed.h.
+
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::isSupportedAttribute): Use const auto,
+        makeNeverDestroyed, a lambda, and the new HashSet::add overload instead of
+        an isEmpty check and lots of separate add function calls.
+        * svg/SVGClipPathElement.cpp:
+        (WebCore::SVGClipPathElement::isSupportedAttribute): Ditto.
+        * svg/SVGComponentTransferFunctionElement.cpp:
+        (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): Ditto.
+        * svg/SVGCursorElement.cpp:
+        (WebCore::SVGCursorElement::isSupportedAttribute): Ditto.
+
+        * svg/SVGElement.cpp:
+        (WebCore::createAttributeNameToCSSPropertyIDMap): Replaced the populate
+        function with this create function.
+        (WebCore::createAttributeNameToAnimatedPropertyTypeMap): Ditto.
+        (WebCore::attributeNameToAnimatedPropertyTypeMap): Changed return type to
+        const reference. Use const auto and makeNeverDestroyed instead of using
+        isEmpty and a populate function.
+        (WebCore::createCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
+        More of the same.
+        (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Ditto.
+        (WebCore::SVGElement::childShouldCreateRenderer): Use an array instead of
+        a HashSet since we are checking against only 3 or 4 values.
+        (WebCore::addQualifiedName): Deleted.
+        (WebCore::SVGElement::animatableAttributeForName): Use const auto,
+        makeNeverDestroyed, and a lambda to efficiently build the map in this function.
+        (WebCore::SVGElement::cssPropertyIdForSVGAttributeName): Use const auto and
+        makeNeverDestroyed instead of using isEmpty and a populate function.
+
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::isSupportedAttribute): Use const auto,
+        makeNeverDestroyed, a lambda, and the new HashSet::add overload instead of
+        an isEmpty check and lots of separate add function calls.
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): Ditto.
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::isSupportedAttribute): Ditto.
+        * svg/SVGGElement.cpp:
+        (WebCore::SVGGElement::isSupportedAttribute): Ditto.
+        * svg/SVGGradientElement.cpp:
+        (WebCore::SVGGradientElement::isSupportedAttribute): Ditto.
+        * svg/SVGGraphicsElement.cpp:
+        (WebCore::SVGGraphicsElement::isSupportedAttribute): Ditto.
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::isSupportedAttribute): Ditto.
+        * svg/SVGLangSpace.cpp:
+        (WebCore::addWithAndWithoutXMLPrefix): Added helper. Uses xmlAtom instead
+        of making our own NeverDestroyed local xmlPrefix.
+        (WebCore::SVGLangSpace::addSupportedAttributes): Rewrote to use helper.
+        * svg/SVGLineElement.cpp:
+        (WebCore::SVGLineElement::isSupportedAttribute): Use const auto,
+        makeNeverDestroyed, a lambda, and the new HashSet::add overload instead of
+        an isEmpty check and lots of separate add function calls.
+        * svg/SVGLinearGradientElement.cpp:
+        (WebCore::SVGLinearGradientElement::isSupportedAttribute): Ditto.
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::isSupportedAttribute): Ditto.
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::isSupportedAttribute): Ditto.
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::isSupportedAttribute): Ditto.
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::isSupportedAttribute): Ditto.
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::isSupportedAttribute): Ditto.
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::isSupportedAttribute): Ditto.
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::isSupportedAttribute): Ditto.
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::isSupportedAttribute): Ditto.
+
+        * testing/MockContentFilterSettings.h: Removed unneeded include of
+        NeverDestroyed.h.
+
+        * testing/MockGamepadProvider.cpp: Moved include of
+        NeverDestroyed.h here ...
+        * testing/MockGamepadProvider.h: ... from here.
+
+        * testing/MockPreviewLoaderClient.h: Removed unneeded include of
+        NeverDestroyed.h.
+
+        * workers/Worker.cpp:
+        (WebCore::allWorkers): Changed this from a global to a function.
+        (WebCore::Worker::networkStateChanged): Updated for above change and
+        made this a member function.
+        (WebCore::Worker::Worker): Updated for above change and
+        change to NetworkStateNotifier.
+        (WebCore::Worker::~Worker): Ditto.
+        * workers/Worker.h: Made networkStateChanged a static member instead of
+        a friend since that is a cleaner way to give it access to private member
+        functions.
+
+        * xml/XPathFunctions.cpp:
+        (WebCore::XPath::createFunctionMap): Use create instead of populate style.
+        (WebCore::XPath::Function::create): Use const auto and makeNeverDestroyed
+        instead of an isEmpty check.
+
+        * xml/XPathParser.cpp:
+        (WebCore::XPath::createAxisNamesMap): Use create instead of populate style.
+        (WebCore::XPath::parseAxisName): Use const auto and makeNeverDestroyed
+        instead of an isEmpty check.
+
+2017-07-17  Brady Eidson  <beidson@apple.com>
+
+        REGRESSION(r219298): imported/w3c/IndexedDB-private-browsing/idbfactory_open.html is crashing occassionaly (UniqueIDBDatabase being taken from the IDBServer set twice).
+        <rdar://problem/33294987> and https://bugs.webkit.org/show_bug.cgi?id=174354
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by existing tests).
+
+        * Modules/indexeddb/server/IDBServer.cpp:
+        (WebCore::IDBServer::IDBServer::postDatabaseTaskReply): Remove a now invalid ASSERT
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose): Add a RELEASE_ASSERT.
+        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Instead of an ad-hoc main thread dispatch, use the "schedule task reply" system
+          to keep dispatch ordering in tact.
+        (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): Remove a now invalid ASSERT
+        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Only take the owning pointer if the object doesn't already own itself.
+
+2017-07-17  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [iOS DnD] Web process uses too much memory when beginning a drag on a very large image
+        https://bugs.webkit.org/show_bug.cgi?id=174585
+        <rdar://problem/33302541>
+
+        Reviewed by Tim Horton.
+
+        Currently, attempting to drag a very large image fails, either due to us telling CoreGraphics to create an image
+        buffer that is too large, or because the web process exceeds its memory limit and gets jetsamed. There are two
+        places where we can optimize our memory use during the drag initialization sequence, and this patch improves
+        both.
+
+        First, on iOS, we attempt to encode and send over a WebCore::Image in the PasteboardImage when writing to the
+        item providers upon starting a drag. Currently, this Image is only used in the drag and drop codepath, in
+        PlatformPasteboard::writeObjectRepresentations, to grab the size of the image being written for the purpose of
+        specifying estimated display size. Serializing and deserializing an Image calls into Image::nativeImage, which
+        attempts to draw the contents of the image into a buffer so that it can be shipped across to the UI process.
+        Instead, we can simply compute the size in the web process while we already have the Image, and simply send that
+        across. For copy/paste, this doesn't result in any behavior change, since we don't use the PasteboardImage's
+        image in the first place.
+
+        Secondly, when starting a drag, we try to allocate create an image buffer the size of the WebCore::Image for the
+        purpose of generating the drag preview. Instead, this patch establishes a limit on the size of this drag preview
+        image, such that if the Image's size is larger, we'll scale down the drag preview image to be the maximum
+        allowed size.
+
+        Test: DataInteractionTests.CanStartDragOnEnormousImage.
+
+        * editing/ios/EditorIOS.mm:
+        (WebCore::Editor::writeImageToPasteboard):
+        * platform/Pasteboard.h:
+        * platform/graphics/GeometryUtilities.cpp:
+        (WebCore::sizeWithAreaAndAspectRatio):
+
+        Introduce a new helper function to compute a size with the given aspect ratio and area.
+
+        * platform/graphics/GeometryUtilities.h:
+        * platform/ios/DragImageIOS.mm:
+        (WebCore::createDragImageFromImage):
+        * platform/ios/PlatformPasteboardIOS.mm:
+        (WebCore::PlatformPasteboard::writeObjectRepresentations):
+
+2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Include most CMake modules from WebKitCommon.cmake
+        https://bugs.webkit.org/show_bug.cgi?id=174546
+
+        Reviewed by Konstantin Tokarev.
+
+        * WebCoreMacros.cmake:
+
+2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
+        https://bugs.webkit.org/show_bug.cgi?id=174547
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt:
+        * WebCoreMacros.cmake:
+
+2017-07-17  Alex Christensen  <achristensen@webkit.org>
+
+        Modernize content extension code
+        https://bugs.webkit.org/show_bug.cgi?id=174588
+
+        Reviewed by Sam Weinig.
+
+        No change in behavior.  Just use Ref instead of RefPtr where possible.
+
+        * contentextensions/ContentExtension.cpp:
+        (WebCore::ContentExtensions::ContentExtension::create):
+        * contentextensions/ContentExtension.h:
+        * contentextensions/ContentExtensionsBackend.cpp:
+        (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
+        (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
+        * contentextensions/ContentExtensionsBackend.h:
+
+2017-07-17  Simon Fraser  <simon.fraser@apple.com>
+
+        clientX/clientY on TouchEvent.touches are wrong
+        https://bugs.webkit.org/show_bug.cgi?id=174561
+        rdar://problem/33336041
+
+        Reviewed by Tim Horton.
+        
+        Do some refactoring so that WebKitAdditions code that computes Touch coordinates can use
+        the same code that MouseRelatedEvent uses.
+        
+        There is no behavior change in this patch, but the test exercises a behavior change in
+        WebKitAdditions code.
+
+        Test: fast/events/touch/ios/touches-client-coords-after-zoom.html
+
+        * dom/MouseRelatedEvent.cpp:
+        (WebCore::MouseRelatedEvent::init):
+        (WebCore::MouseRelatedEvent::frameViewFromDOMWindow):
+        (WebCore::MouseRelatedEvent::pagePointToClientPoint):
+        (WebCore::MouseRelatedEvent::pagePointToAbsolutePoint):
+        (WebCore::MouseRelatedEvent::initCoordinates):
+        (WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor):
+        (WebCore::MouseRelatedEvent::computePageLocation):
+        (WebCore::MouseRelatedEvent::locationInRootViewCoordinates):
+        (WebCore::MouseRelatedEvent::frameView): Deleted.
+        * dom/MouseRelatedEvent.h:
+
+2017-07-17  Jeremy Jones  <jeremyj@apple.com>
+
+        Add video fullscreen transition logging.
+        https://bugs.webkit.org/show_bug.cgi?id=174474
+
+        Reviewed by Jer Noble.
+
+        No new tests, because there is no functional change.
+
+        This change just adds logging.
+
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::webkitEnterFullscreen):
+        (WebCore::HTMLVideoElement::webkitExitFullscreen):
+        (WebCore::HTMLVideoElement::webkitSetPresentationMode):
+
+2017-07-17  Chris Dumez  <cdumez@apple.com>
+
+        click event does not dispatch to parent when child target stops hit testing after mousedown
+        https://bugs.webkit.org/show_bug.cgi?id=174564
+        <rdar://problem/33340234>
+
+        Reviewed by Simon Fraser.
+
+        As per [1], if the mouse down node and the mouse release node differ, then we are supposed to
+        fire the click event at their common ancestor, if such node exists. This patch implements this
+        logic. This also aligns our behavior with Blink.
+
+        [1] https://w3c.github.io/uievents/#events-mouseevent-event-order
+
+        Test: fast/events/mouse-click-different-mouseDown-mouseUp-nodes.html
+
+        * page/EventHandler.cpp:
+        (WebCore::targetNodeForClickEvent):
+
+2017-07-17  Brady Eidson  <beidson@apple.com>
+
+        WKHTTPCookieStore observing only works on the default cookie store.
+        <rdar://problem/33330724> and https://bugs.webkit.org/show_bug.cgi?id=174580
+
+        Reviewed by Sam Weinig.
+
+        Covered by new API tests.
+        
+        startObservingCookieChanges and stopObservingCookieChanges are passed a NetworkStorageSession to observe.
+        On Mac/iOS, the passed-in storage session was ignored and the shared cookie storage was assumed.
+        Let's fix that.
+        
+        Also, since using NSNotification based observing only works reliably for the shared cookie storage,
+        switch to direct CFHTTPCookieStorageRef observing.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        
+        * platform/network/NetworkStorageSession.h:
+        
+        * platform/network/cocoa/CookieStorageObserver.h: Added.
+        * platform/network/cocoa/CookieStorageObserver.mm: Added.
+        (WebCore::cookiesChanged):
+        (WebCore::CookieStorageObserver::create):
+        (WebCore::CookieStorageObserver::CookieStorageObserver):
+        (WebCore::CookieStorageObserver::~CookieStorageObserver):
+        (WebCore::CookieStorageObserver::startObserving):
+        (WebCore::CookieStorageObserver::stopObserving):
+        (WebCore::CookieStorageObserver::cookiesDidChange):
+        
+        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
+        (WebCore::NetworkStorageSession::cookieStorageObserver):
+        
+        * platform/network/mac/CookieStorageMac.mm:
+        (WebCore::startObservingCookieChanges):
+        (WebCore::stopObservingCookieChanges):
+        (-[WebCookieStorageObjCAdapter notifyCookiesChangedOnMainThread]): Deleted.
+        (-[WebCookieStorageObjCAdapter cookiesChangedNotificationHandler:]): Deleted.
+        (-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]): Deleted.
+        (-[WebCookieStorageObjCAdapter stopListeningForCookieChangeNotifications]): Deleted.
+        
+        * platform/spi/cf/CFNetworkSPI.h:
+
+2017-07-17  Sam Weinig  <sam@webkit.org>
+
+        [WebIDL] Rename JSCSSValueCustom.cpp to JSDeprecatedCSSOMValueCustom.cpp to match the underlying class
+        https://bugs.webkit.org/show_bug.cgi?id=174550
+
+        Reviewed by Brady Eidson.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSCSSValueCustom.cpp: Removed.
+        * bindings/js/JSDeprecatedCSSOMValueCustom.cpp: Renamed from bindings/js/JSCSSValueCustom.cpp.
+        Rename file and update references.
+
+2017-07-17  Antoine Quint  <graouts@apple.com>
+
+        REGRESSION: order of AirPlay and volume controls is inconsistent between <audio> and <video>
+        https://bugs.webkit.org/show_bug.cgi?id=174581
+        <rdar://problem/33297519>
+
+        Reviewed by Sam Weinig.
+
+        We had an inconsistency between <audio> and <video> controls for the relative order of the
+        volume and AirPlay buttons. The <video> layout was correct (volume first and AirPlay after)
+        and the <audio> layout now is the same.
+
+        * Modules/modern-media-controls/controls/inline-media-controls.js:
+        (InlineMediaControls.prototype._rightContainerButtons):
+
+2017-07-17  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [CMake] Create targets before WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS is called
+        https://bugs.webkit.org/show_bug.cgi?id=174557
+
+        Reviewed by Michael Catanzaro.
+
+        No new tests needed.
+
+        * CMakeLists.txt:
+
+2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        Unreviewed, rolling out r219556.
+
+        Broke build without WebCrypto
+
+        Reverted changeset:
+
+        "[CMake] Clean up Web Crypto build targets"
+        https://bugs.webkit.org/show_bug.cgi?id=174253
+        http://trac.webkit.org/changeset/219556
+
+2017-07-17  Antoine Quint  <graouts@apple.com>
+
+        Media controls draw behind captions
+        https://bugs.webkit.org/show_bug.cgi?id=174579
+        <rdar://problem/33295427>
+
+        Reviewed by Dean Jackson.
+
+        Ensure the captions container is added as a previous sibling to the controls container.
+
+        Test: media/modern-media-controls/media-controls/media-controls-display-above-captions.html
+
+        * Modules/modern-media-controls/media/media-controller.js:
+        (MediaController):
+
+2017-07-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        [CMake] Clean up Web Crypto build targets
+        https://bugs.webkit.org/show_bug.cgi?id=174253
+
+        Reviewed by Michael Catanzaro.
+
+        Gather the common WebCrypto source files in CMakeLists.txt, including them
+        in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO
+        build guards to exclude the code from compilation if the feature is disabled.
+
+        PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove
+        duplicated build targets. PlatformMac.cmake still lists all the Mac-specific
+        Web Crypto build targets.
+
+        PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the build
+        was configured to enable the use of libgcrypt. The new CMake file adds the
+        libgcrypt-specific Web Crypto build targets to the build if the feature was
+        enabled, and also sets up libgcrypt include directiories and libraries.
+
+        No new tests -- no change in behavior.
+
+        * CMakeLists.txt:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+        * PlatformWPE.cmake:
+        * platform/GCrypt.cmake: Added.
+
+2017-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        -Wreorder warning caused by GraphicsContext3D cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=174511
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
+        (WebCore::GraphicsContext3D::GraphicsContext3D):
+        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
+        (WebCore::GraphicsContext3D::GraphicsContext3D):
+
+2017-07-16  Antoine Quint  <graouts@apple.com>
+
+        Dismissing the captions panel using the mouse is too eager to remove the captions panel and media controls
+        https://bugs.webkit.org/show_bug.cgi?id=174571
+        <rdar://problem/33294968>
+
+        Reviewed by Eric Carlson.
+
+        We did several things wrong when dismissing the tracks panel:
+
+            - we did not check whether we were hosted in a shadow root when figuring if a click was on the tracks panel
+            - we did not check whether we clicked over the media when dismissing the tracks panel
+            - we did not check whether auto-hide was on before fading the media controls out when we clicked outside
+              the media controls bounds
+
+        We now correctly account for all of those cases and implement the following behavior when clickng as the tracks
+        panel is presented:
+        
+            - dismiss the panel if the click is outside of the panel
+            - dismiss the panel and the media controls if the click is outside the video and the media controls have
+              auto-hide on (ie. media is playing)
+            - dismiss the panel and the media controls after the track selection animation is finished if a track is selected
+
+        Tests: media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html
+               media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html
+
+        * Modules/modern-media-controls/controls/media-controls.js:
+        (MediaControls.prototype.hideTracksPanel): Only hide the media controls if we clicked outside of the media
+        controls bounds and if we have auto-hide on when idle (ie. the media is playing).
+        (MediaControls.prototype.isPointInControls): Add an option to specify whether the container should be
+        considered when checking if a point is contained within the media controls bounds.
+        * Modules/modern-media-controls/controls/tracks-panel.js:
+        (TracksPanel.prototype._handleMousedown):
+        (TracksPanel.prototype._isPointInTracksPanel): Correctly check whether the element that we started pressing
+        on is contained within the tracks panel, accounting for the case where we are presented within a shadow root
+        (ie. always when runing inside a Web page).
+
+2017-07-16  Ali Juma  <ajuma@chromium.org>
+
+        DisallowUserAgentShadowContent moves out of non-UA shadow roots
+        https://bugs.webkit.org/show_bug.cgi?id=165647
+
+        Reviewed by Ryosuke Niwa.
+
+        Make rect-based hit-testing include nodes in non-UA shadow trees when the
+        HitTestRequest has type DisallowUserAgentShadowContent.
+
+        Test: fast/dom/nodesFromRect/nodesFromRect-shadow.html
+
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::addNodeToRectBasedTestResult):
+        * testing/Internals.cpp:
+        (WebCore::Internals::nodesFromRect):
+        * testing/Internals.h:
+
+2017-07-16  Antoine Quint  <graouts@apple.com>
+
+        Clicking edges of media control buttons changes visual state of button (pressed) but doesn't execute action
+        https://bugs.webkit.org/show_bug.cgi?id=174565
+        <rdar://problem/33294833>
+
+        Reviewed by Dean Jackson.
+
+        WebCore doesn't dispatch a "click" event to a parent element when a child that was the original target when
+        the "mousedown" occured is no longer hit-testing at the location where the mouse pointer is at when the "mouseup"
+        occurs (see webkit.org/b/174564). Since button icons, which are a <picture> element that is a child of the
+        <button> element for media controls buttons, shrink to 89% of their size when the ":active" pseudo-class matches,
+        clicking on the edges of the media controls buttons would not trigger the expected action.
+
+        Test: media/modern-media-controls/button/button-click-on-edges.html
+
+        * Modules/modern-media-controls/controls/button.css:
+        (button > picture):
+
+2017-07-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Make the decision for asynchronously decoding an image be in one place
+        https://bugs.webkit.org/show_bug.cgi?id=174479
+
+        Reviewed by Tim Horton.
+
+        Move all the logic of whether a large image should be asynchronously decoded 
+        or not be in one place: RenderBoxModelObject::decodingModeForImageDraw().
+
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::addPendingImageDrawingClient): Fixing unrelated 
+        spelling error.
+        * platform/RuntimeApplicationChecks.h:
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::IOSApplication::isIBooks):
+        (WebCore::IOSApplication::isIBooksStorytime):
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::updateFromSettings): Remove reading the setting
+        largeImageAsyncDecodingEnabled from this function because it will be read
+        by RenderBoxModelObject::decodingModeForImageDraw().
+        (WebCore::BitmapImage::dataChanged):
+        (WebCore::BitmapImage::draw):
+        (WebCore::BitmapImage::shouldAnimate):
+        (WebCore::BitmapImage::canAnimate):
+        (WebCore::BitmapImage::canUseAsyncDecodingForLargeImages):
+        (WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImages):
+        (WebCore::BitmapImage::canDestroyDecodedData):
+        (WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages): Deleted.
+        * platform/graphics/BitmapImage.h:
+        * platform/graphics/ImageSource.cpp:
+        (WebCore::ImageSource::canUseAsyncDecoding): It is okay to keep the 
+        decoded frame if canUseAsyncDecodingForLargeImages() is true by the setting
+        largeImageAsyncDecodingEnabled is false.
+        (WebCore::ImageSource::shouldUseAsyncDecoding): Deleted.
+        * platform/graphics/ImageSource.h:
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::decodingModeForImageDraw): The plan is to
+        add a new Internal settings to force asynchronous image decoding regardless
+        of the image size and the settings.
+        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paintIntoRect):
+
+2017-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Raise minimum CMake requirement
+        https://bugs.webkit.org/show_bug.cgi?id=174545
+
+        Reviewed by Konstantin Tokarev.
+
+        * WebCoreMacros.cmake:
+
+2017-07-15  Brady Eidson  <beidson@apple.com>
+
+        Make sure all CFHTTPCookieStorageRefs we create are scheduled.
+        <rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513
+
+        Reviewed by Tim Horton.
+
+        * platform/spi/cf/CFNetworkSPI.h:
+
+2017-07-15  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Rename RenderStyle::fontSize() to RenderStyle::computedFontPixelSize()
+        https://bugs.webkit.org/show_bug.cgi?id=174509
+
+        Reviewed by Simon Fraser.
+
+        We have three font size functions:
+        - computedFontSize(): returns a float
+        - specifiedFontSize(): also returns a float
+        - fontSize(): returns the rounded computedFontSize()
+
+        FontDescription uses the convention of labelling rounded values as "pixel",
+        so a better name font fontSize() is computedFontPixelSize().
+
+        Also, because font sizes can never be negative, switch the type from an int
+        to an unsigned.
+
+        No new tests because there is no behavior change.
+
+        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
+        (getAttributeSetForAccessibilityObject):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::adjustRenderStyle):
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::computedPixelSize):
+        (WebCore::FontDescription::fontSelectionRequest):
+        * rendering/RenderBlock.cpp:
+        (WebCore::styleForFirstLetter):
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::shouldOverhang):
+        (WebCore::RenderRubyRun::getOverhang):
+        * rendering/RenderRubyText.cpp:
+        (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::adjustSearchFieldIconStyle):
+        (WebCore::paintSearchFieldIcon):
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::adjustCheckboxStyle):
+        (WebCore::RenderThemeIOS::adjustRadioStyle):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::controlSizeForFont):
+        (WebCore::RenderThemeMac::controlSizeForSystemFont):
+        (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
+        (WebCore::RenderThemeMac::popupInternalPaddingBox):
+        (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
+        * rendering/TextDecorationPainter.cpp:
+        (WebCore::TextDecorationPainter::paintTextDecoration):
+        * rendering/mathml/RenderMathMLRow.cpp:
+        (WebCore::RenderMathMLRow::computeLineVerticalStretch):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::computedFontPixelSize):
+        (WebCore::RenderStyle::computedLineHeight):
+        (WebCore::RenderStyle::fontSize): Deleted.
+        * rendering/style/RenderStyle.h:
+        * style/InlineTextBoxStyle.cpp:
+        (WebCore::visualOverflowForDecorations):
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::TreeResolver::resolveElement):
+        * svg/SVGLengthContext.cpp:
+        (WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):
+        (WebCore::SVGLengthContext::convertValueFromEMSToUserUnits):
+
+2017-07-15  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        line-height: <number> gets visually applied twice when text autosizing is in effect
+        https://bugs.webkit.org/show_bug.cgi?id=174536
+        <rdar://problem/33338259>
+
+        Reviewed by Simon Fraser.
+
+        StyleBuilderConverter::convertLineHeight() converts line-height: <number> into a
+        "percentage" length. Then, when layout needs to know what the computed value of
+        line-height is, RenderStyle::computedLineHeight() multiplies this percentage by
+        the computed font size.
+
+        With autosizing, the computed font size already incorporates the autosizing
+        multiplier, so we shouldn't also incorporate this multiplier into the percentage
+        value itself. getComputedStyle()'s lineHeightFromStyle() was compensating for
+        this double application by multiplying the percentage by the font-size's specified
+        value instead of its computed value, which is incorrect.
+
+        Test: fast/text-autosizing/line-height-number.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::lineHeightFromStyle):
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertLineHeight):
+
+2017-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [iOS WK2] Presenting an action sheet on an image map prevents selection UI from updating
+        https://bugs.webkit.org/show_bug.cgi?id=174539
+        <rdar://problem/33307395>
+
+        Reviewed by Darin Adler.
+
+        Currently, if TextIndicator fails to take a snapshot in TextIndicator::createWithRange, we will enter an
+        inconsistent state in the web process where Editor will continue to ignore selection changes until the next time
+        Editor::setIgnoreSelectionChanges(false) is called. This causes us to indefinitely defer EditorState updates to
+        the UI process, which leads to selection UI appearing unresponsive.
+
+        To fix this, we introduce a new TemporarySelectionChange object to simplify selection changes and/or
+        EditorState-update-ignoring behaviors within the scope of a single function. The constructor applies these
+        temporary changes, and the destructor reverts them as needed to their prior values.
+
+        This patch only adopts TemporarySelectionChange in order to fix this bug, but future patches will replace the
+        remaining places where we temporarily change selection and/or ignore selection with this helper.
+
+        Test: ActionSheetTests.ImageMapDoesNotDestroySelection.
+
+        * editing/Editor.cpp:
+        (WebCore::TemporarySelectionChange::TemporarySelectionChange):
+        (WebCore::TemporarySelectionChange::~TemporarySelectionChange):
+        * editing/Editor.h:
+        * editing/FrameSelection.h:
+        (WebCore::FrameSelection::isUpdateAppearanceEnabled):
+        * page/TextIndicator.cpp:
+        (WebCore::TextIndicator::createWithRange):
+
+2017-07-15  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Clean up line-height and minimumFontSize functions
+        https://bugs.webkit.org/show_bug.cgi?id=174535
+
+        Reviewed by Simon Fraser.
+
+        No behavior change.
+
+        No new tests because there is no behavior change.
+
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertLineHeight):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::styleForKeyframe):
+        (WebCore::StyleResolver::adjustRenderStyle):
+        (WebCore::StyleResolver::pseudoStyleRulesForElement):
+        (WebCore::StyleResolver::applyMatchedProperties):
+        (WebCore::StyleResolver::cascadedPropertiesForRollback):
+        (WebCore::StyleResolver::applyProperty):
+        (WebCore::StyleResolver::checkForZoomChange):
+        (WebCore::StyleResolver::createFilterOperations):
+        (WebCore::StyleResolver::CascadedProperties::set):
+        (WebCore::StyleResolver::applyCascadedProperties):
+        * style/StyleFontSizeFunctions.cpp:
+        (WebCore::Style::computedFontSizeFromSpecifiedSize):
+        (WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
+        (): Deleted.
+
+2017-07-14  Jonathan Bedard  <jbedard@apple.com>
+
+        Add iOS 11 SPI
+        https://bugs.webkit.org/show_bug.cgi?id=174430
+        <rdar://problem/33269288>
+
+        Reviewed by Tim Horton.
+
+        * WebCore.xcodeproj/project.pbxproj: Add sqlite3SPI.h header.
+        * platform/ios/PlatformPasteboardIOS.mm: Move UIKit SPI to UIKitSPI.h.
+        * platform/ios/WebItemProviderPasteboard.mm: Ditto.
+        * platform/network/cf/FormDataStreamCFNet.cpp: Explicitly define fnfErr and remove
+        MacErrors.h header for iOS.
+        * platform/spi/cocoa/IOSurfaceSPI.h: IOSurface is no longer SPI in iOS 11.
+        * platform/spi/cocoa/PassKitSPI.h: Do not re-define setRequiredShippingContactFields
+        and setRequiredBillingContactFields in iOS 11.
+        * platform/spi/cocoa/QuartzCoreSPI.h: Added QuartzCoreSPI used in iOS 11.
+        * platform/spi/ios/UIKitSPI.h: Add drag-and-drop SPI.
+        * platform/spi/ios/sqlite3SPI.h: Define required sqlite3 macros.
+        * platform/sql/SQLiteFileSystem.cpp: Use sqlite3SPI.h.
+
+2017-07-14  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GCrypt] Implement CryptoKeyRSA PKCS#8 exports
+        https://bugs.webkit.org/show_bug.cgi?id=173697
+
+        Reviewed by Jiewen Tan.
+
+        Implement the PKCS#8 import operation for RSA keys for platforms that use
+        libgcrypt.
+
+        In CryptoKeyRSA::exportPkcs8(), we bail early with an invalid access exception if
+        this export is not being done for a private key. Otherwise, we start with creating
+        the `RSAPrivateKey` ASN.1 structure, writing out '0' under the `version` element
+        and then retrieving the modulus, public and private exponent and both primes.
+        MPI data for those parameters is written out into corresponding elements in the
+        `RSAPrivateKey` structure. We then manually compute values of both exponents and
+        the coefficient parameters, using the private exponent's and both primes' MPI
+        values. The p and q parameters (i.e. the primes) are switched in libgcrypt,
+        deviating from the standard practice, so we have to operate with those two
+        accordingly. We eliminate the optional `otherPrimeInfos` attribute on the
+        `RSAPrivateKey` structure. Support for this attribute will be added later.
+
+        We then create the `PrivateKeyInfo` ASN.1 structure, and write out '0' under the
+        `version` element. The id-rsaEncryption object identifier is written out under
+        the `algorithm.algorithm` element. In the future, an object identifier that
+        matches this key's algorithm will have to be written out here (id-RSASSA-PSS or
+        id-RSAES-OAEP), along with the appropriate parameters structure, but no test in
+        WebKit or the web-platform-tests suite covers this detail. For now, a null value
+        is written out under the `algorithm.parameters` element.
+
+        Data for the `RSAPrivateKey` structure is retrieved and written out under the
+        `privateKey` element.  The optional `attributes` element on the `PrivateKeyInfo`
+        structure is eliminated.
+
+        Data that was encoded through the `PrivateKeyInfo` structure is then retrieved
+        and returned from the exportPkcs8() method.
+
+        No new tests -- related tests are now passing and are unskipped.
+
+        * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
+        (WebCore::CryptoKeyRSA::exportPkcs8):
+
+2017-07-14  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GCrypt] Implement CryptoKeyRSA PKCS#8 imports
+        https://bugs.webkit.org/show_bug.cgi?id=173696
+
+        Reviewed by Jiewen Tan.
+
+        Implement the PKCS#8 import operation for RSA keys for platforms that use
+        libgcrypt.
+
+        In CryptoKeyRSA::importPkcs8(), the provided key data is decoded against the
+        'PrivateKeyInfo` ASN.1 structure. We then validate the `version` element and
+        check that the `privateKeyAlgorithm.algorithm` element contains a supported
+        object identifier. This check is for now mostly superficial, only ensuring
+        that the object identifier is either id-rsaEncryption, id-RSAES-OAEP or
+        id-RSASSA-PSS. This has to be further extended to also check the
+        id-sha{1,256,384,512}WithRSAEncryption identifiers as well as decoding the
+        `privateKeyAlgorithm.parameters` element against a specific ASN.1 structure, if
+        necessary (RSASSA-PSS-params or RSAES-OAEP-params), and cross-checking the
+        specified digest algorithm with the algorithm that's specified through the main
+        object identifier or the structure contained in `privateKeyAlgorithm.parameters`.
+        This is avoided for now because no test in WebKit or the web-platform-tests
+        suite covers this detail of the specification.
+
+        Data under the `privateKey` element is decoded against the `RSAPrivateKey` ASN.1
+        structure, and the `version` element of that structure is validated. We then
+        retrieve data from that structure for the modulus, public exponent, private
+        exponent, both primes, both exponents and the coefficient parameters, bailing if
+        any of them is missing. Because libgcrypt switches the use of p and q parameters,
+        deviating from the standard use, we have to recompute the u parameter (the
+        coefficient). With that calculated, we're then able to construct the `private-key`
+        s-expression, embedding into it all the necessary parameters, and transferring
+        the ownership of this object to the new CryptoKeyRSA object that's then returned
+        from the importPkcs8() method.
+
+        No new tests -- related tests are now passing and are unskipped.
+
+        * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
+        (WebCore::CryptoKeyRSA::importPkcs8):
+
+2017-07-14  Chris Dumez  <cdumez@apple.com>
+
+        Possible crash in ~UserGestureIndicator() when on non-main thread
+        https://bugs.webkit.org/show_bug.cgi?id=174522
+        <rdar://problem/30283071>
+
+        Reviewed by Sam Weinig.
+
+        UserGestureIndicator objects may be constructed / destructed in worker thread
+        (e.g. in DOMTimer::fired()). The UserGestureIndicator constructor / destructor
+        are supposed to be no-op on non-main threads so that it is safe. However,
+        we were mistakenly initializing m_previousToken data member in the constructor
+        on background thread, which meant that we could crash later on in the
+        UserGestureIndicator destructor when destroying m_previousToken.
+
+        Test: fast/workers/worker-user-gesture.html
+
+        * dom/UserGestureIndicator.cpp:
+        (WebCore::currentToken):
+        (WebCore::UserGestureIndicator::UserGestureIndicator):
+
+2017-07-14  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r219516.
+
+        This caused an API failure on macOS.
+
+        Reverted changeset:
+
+        "Make sure all CFHTTPCookieStorageRefs we create are
+        scheduled."
+        https://bugs.webkit.org/show_bug.cgi?id=174513
+        http://trac.webkit.org/changeset/219516
+
+2017-07-14  Jer Noble  <jer.noble@apple.com>
+
+        Allow clients to override their own hardware media requirements where no fallback media exists.
+        https://bugs.webkit.org/show_bug.cgi?id=174426
+        <rdar://problem/32537704>
+
+        Reviewed by Eric Carlson.
+
+        Add a new setting which allows clients to specify their own mediaContentTypesRequiringHardwareSupport should be
+        ignared in the case where no fallback exists, such as the case of a single <source> element, or setting the src
+        attribute directly.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::havePotentialSourceChild):
+        (WebCore::HTMLMediaElement::selectNextSourceChild):
+        (WebCore::HTMLMediaElement::sourceWasAdded):
+        (WebCore::HTMLMediaElement::sourceWasRemoved):
+        (WebCore::HTMLMediaElement::mediaPlayerShouldCheckHardwareSupport):
+        * html/HTMLMediaElement.h:
+        * page/Settings.h:
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::MediaPlayer::shouldCheckHardwareSupport):
+        * platform/graphics/MediaPlayer.h:
+        (WebCore::MediaPlayerClient::mediaPlayerShouldCheckHardwareSupport):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus):
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+        (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
+
+2017-07-14  Chris Dumez  <cdumez@apple.com>
+
+        Possible crash under NetworkSocketStream::didFailSocketStream()
+        https://bugs.webkit.org/show_bug.cgi?id=174526
+        <rdar://problem/32831441>
+
+        Reviewed by Brent Fulgham.
+
+        Call m_client.didFailSocketStream() asynchronously in the constructor as our
+        caller (the client) is also being initialized at this point.
+
+        * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
+        (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
+
+2017-07-14  Youenn Fablet  <youenn@apple.com>
+
+        WebRTC: silence data not sent for disabled audio track
+        https://bugs.webkit.org/show_bug.cgi?id=174456
+        <rdar://problem/33284623>
+
+        Reviewed by Eric Carlson.
+
+        Test: webrtc/audio-muted-stats.html
+              webrtc/audio-muted-stats2.html
+
+        Adding a timer-based approach to send 10ms of silence every second.
+        This is consistent with how muted video tracks are implemented.
+        In case the audio track is muted at the time it is added, no silence data is sent.
+
+        * platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
+        (WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
+        (WebCore::RealtimeOutgoingAudioSource::initializeConverter):
+        (WebCore::RealtimeOutgoingAudioSource::stop):
+        (WebCore::RealtimeOutgoingAudioSource::sourceMutedChanged):
+        (WebCore::RealtimeOutgoingAudioSource::sourceEnabledChanged):
+        (WebCore::RealtimeOutgoingAudioSource::handleMutedIfNeeded):
+        (WebCore::RealtimeOutgoingAudioSource::sendSilence):
+        * platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
+
+2017-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Unclear distinction between WebKitHelpers and WebKitMacros
+        https://bugs.webkit.org/show_bug.cgi?id=153189
+
+        Reviewed by Antonio Gomes.
+
+        * CMakeLists.txt: Include WebCoreMacros.cmake.
+        * WebCoreMacros.cmake: Added.
+
+2017-07-14  Jeremy Jones  <jeremyj@apple.com>
+
+        Fix style for name of class alloc function in WebVideoFullscreenInterfaceAVKit.
+        https://bugs.webkit.org/show_bug.cgi?id=174476
+
+        Reviewed by Alex Christensen.
+
+        No new tests because no behavior change.
+
+        This is a rename for per style requirements.
+
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (allocWebAVPictureInPicturePlayerLayerViewInstance):
+        (WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
+        (allocWebAVPlayerLayerViewInstance):
+        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
+        (getWebAVPictureInPicturePlayerLayerViewClass): Deleted.
+        (getWebAVPlayerLayerViewClass): Deleted.
+
+2017-07-14  Jer Noble  <jer.noble@apple.com>
+
+        [MSE] Removing samples when presentation order does not match decode order can cause bad behavior.
+        https://bugs.webkit.org/show_bug.cgi?id=174514
+
+        Reviewed by Sam Weinig.
+
+        Test: media/media-source/media-source-remove-decodeorder-crash.html
+
+        Fix the algorithm in removeCodedFrames() so that it's not possible to have a removePresentationStart >
+        removePresentationEnd (and also removeDecodeStart > removeDecodeEnd).
+
+        * Modules/mediasource/SampleMap.cpp:
+        (WebCore::PresentationOrderSampleMap::findSampleContainingOrAfterPresentationTime):
+        (WebCore::PresentationOrderSampleMap::findSampleStartingAfterPresentationTime):
+        * Modules/mediasource/SampleMap.h:
+        * Modules/mediasource/SourceBuffer.cpp:
+        (WebCore::SourceBuffer::removeCodedFrames):
+
+2017-07-14  Youenn Fablet  <youenn@apple.com>
+
+        Increase CoreAudio render audio buffer sizes for WebRTC
+        https://bugs.webkit.org/show_bug.cgi?id=174508
+
+        Reviewed by Eric Carlson.
+
+        Covered by manually testing audio rendering through WebRTC sites.
+
+        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
+        (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit): Setting audio buffer size equivalent to 20 ms.
+
+2017-07-14  Brady Eidson  <beidson@apple.com>
+
+        Make sure all CFHTTPCookieStorageRefs we create are scheduled.
+        <rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513
+
+        Reviewed by Tim Horton.
+
+        * platform/spi/cf/CFNetworkSPI.h:
+
+2017-07-14  Youenn Fablet  <youenn@apple.com>
+
+        Remove CoreAudioCaptureSource speaker configuration
+        https://bugs.webkit.org/show_bug.cgi?id=174512
+
+        Reviewed by Eric Carlson.
+
+        Covered by manually testing audio rendering through WebRTC sites.
+
+        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+        (WebCore::CoreAudioSharedUnit::setupAudioUnit):
+
+2017-07-14  Eric Carlson  <eric.carlson@apple.com>
+
+        [MediaStream] Limit the number of remote video samples queued
+        https://bugs.webkit.org/show_bug.cgi?id=174505
+        <rdar://problem/33223015>
+
+        Reviewed by Youenn Fablet.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeOldSamplesFromPendingQueue): Only
+        enqueue a fixed number of frames with invalid or negative decode times.
+
+2017-07-14  Youenn Fablet  <youenn@apple.com>
+
+        Report CoreAudioCaptureSource failure in case shared unit stops working properly
+        https://bugs.webkit.org/show_bug.cgi?id=174494
+
+        Reviewed by Eric Carlson.
+
+        Manual test by interrupting an audio capture on Mac.
+
+        This patch adds a timer to CoreAudioSharedUnit.
+        In case the capture callback is not called after one second, the shared unit is said to fail.
+        Each source is notified that capture is failing.
+        This will in turn trigger onend track event so that web pages can remedy capture failure.
+
+        Timer starts with 10 seconds for audio data to start being captured.
+        It is then decreased to 2 seconds.
+
+        * platform/mediastream/RealtimeMediaSource.cpp:
+        (WebCore::RealtimeMediaSource::captureFailed):
+        * platform/mediastream/RealtimeMediaSource.h:
+        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+        (WebCore::CoreAudioSharedUnit::CoreAudioSharedUnit):
+        (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
+        (WebCore::CoreAudioSharedUnit::startInternal):
+        (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
+        (WebCore::CoreAudioSharedUnit::stopInternal):
+
+2017-07-14  Jer Noble  <jer.noble@apple.com>
+
+        Adding the 'autoplay' attribute to a media element during a user gesture should remove user gesture restrictions.
+        https://bugs.webkit.org/show_bug.cgi?id=174373
+
+        Reviewed by Eric Carlson.
+
+        Test: media/video-add-autoplay-user-gesture.html
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::parseAttribute):
+
+2017-07-14  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r219500.
+
+        The test is consistently failing on iOS simulator.
+
+        Reverted changeset:
+
+        "AX: VoiceOver silent or skipping over time values on media
+        player."
+        https://bugs.webkit.org/show_bug.cgi?id=174324
+        http://trac.webkit.org/changeset/219500
+
+2017-07-14  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [WinCairo] error 'm_compositorTexture': undeclared identifier since Bug 174345
+        https://bugs.webkit.org/show_bug.cgi?id=174493
+
+        Reviewed by Alex Christensen.
+
+        Compilation errors are reported by the code using a member
+        m_compositorTexture of GraphicsContext3D which exists only if
+        USE(COORDINATED_GRAPHICS_THREADED). WinCairo port doesn't use it.
+
+        * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
+        (WebCore::GraphicsContext3D::GraphicsContext3D):
+        Use m_compositorTexture only if USE(COORDINATED_GRAPHICS_THREADED).
+        (WebCore::GraphicsContext3D::~GraphicsContext3D): Ditto.
+        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
+        (WebCore::GraphicsContext3D::reshapeFBOs):
+        Ditto. Fix the wrong indentation level.
+
+2017-07-14  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=174418
+
+        Reviewed by Michael Catanzaro.
+
+        HarfBuzzShaper should normalize the input text before collecting
+        HarfBuzzRuns. Actually, HarfBuzzShaper::setNormalizedBuffer does
+        the task. But, this function hasn't been called from anywhere
+        since Bug 108077.
+
+        Test: fast/text/international/vietnamese-nfd.html
+
+        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+        (WebCore::HarfBuzzShaper::HarfBuzzShaper):
+        Call setNormalizedBuffer instead of normalizeCharacters.
+        (WebCore::normalizeCharacters): Deleted.
+
+2017-07-14  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [WinCairo] Build broken "Cannot open include file: 'GL/glext.h'" since Bug 172104
+        https://bugs.webkit.org/show_bug.cgi?id=174492
+
+        Reviewed by Žan Doberšek.
+
+        WinCairo port uses GLES. OpenGLShims.h shouldn't be included.
+
+        * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
+        Include "OpenGLShims.h" only if !USE(OPENGL_ES_2) instead of USE(OPENGL).
+
+2017-07-14  Chris Dumez  <cdumez@apple.com>
+
+        PageCache::removeAllItemsForPage(Page&) may reenter itself and cause crashes
+        https://bugs.webkit.org/show_bug.cgi?id=174473
+        <rdar://problem/32177485>
+
+        Reviewed by Antti Koivisto.
+
+        This could happen when a Page containing an SVGImage is removed from PageCache and
+        this resulted in the destruction of the SVGImage. Because the SVGImage has an internal
+        utility Page, it will also call PageCache::removeAllItemsForPage(WebCore::Page&) upon
+        destruction, causing us to reenter.
+
+        Address the issue by not calling PageCache::removeAllItemsForPage() for utility pages
+        since those cannot be in PageCache in the first place.
+
+        Also add assertions to make sure:
+        1. We never insert a utility page into PageCache
+        2. PageCache::removeAllItemsForPage() does not reenter
+
+        No new tests, because I was unable to write a test which reproduced the crash. This
+        is in theory testable using an API test which enables PageCache, loads a page
+        containing an SVGImage, navigates away from this page so that it goes into PageCache,
+        and then calls [WebView _close]. However, when I tried writing such test, I could
+        not get the SVGImage to get destroyed while PageCache::removeAllItemsForPage() is
+        called for the top-level page for some reason. Something seems to be keeping the
+        SVGImage alive longer. I tried disabling the MemoryCache but it did not help.
+
+        * history/PageCache.cpp:
+        (WebCore::PageCache::addIfCacheable):
+        (WebCore::PageCache::removeAllItemsForPage):
+        * history/PageCache.h:
+        * page/Page.cpp:
+        (WebCore::Page::~Page):
+
+2017-07-14  Aaron Chu  <aaron_chu@apple.com>
+
+        AX: VoiceOver silent or skipping over time values on media player.
+        https://bugs.webkit.org/show_bug.cgi?id=174324
+        <rdar://problem/32021784>
+
+        Reviewed by Antoine Quint.
+
+        Added role attribute to modern media controls time lable class so that VoiceOver can access the time label when the media is playing.
+
+        Updated: media/modern-media-controls/time-label/time-label.html
+
+        * Modules/modern-media-controls/controls/time-label.js:
+
+2017-07-13  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        Fix compiler warnings when building with GCC 7
+        https://bugs.webkit.org/show_bug.cgi?id=174463
+
+        Reviewed by Darin Adler.
+
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::setShouldManageAudioSessionCategory):
+
+2017-07-13  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        Incorrect call to StyledElement::setInlineStyleProperty in ImageDocument::createDocumentStructure
+        https://bugs.webkit.org/show_bug.cgi?id=174470
+
+        Reviewed by Darin Adler.
+
+        * html/ImageDocument.cpp:
+        (WebCore::ImageDocument::createDocumentStructure):
+
+2017-07-13  Dean Jackson  <dino@apple.com>
+
+        Fix iOS build.
+
+        * platform/graphics/GraphicsContext3D.h:
+
+2017-07-12  Dean Jackson  <dino@apple.com>
+
+        Rename GraphicsContext[3D]Mac to Cocoa and move things into graphics/cocoa
+        https://bugs.webkit.org/show_bug.cgi?id=174453
+        <rdar://problem/33281481>
+
+        Reviewed by Simon Fraser.
+
+        Two renames, two moves:
+        graphics/mac/GraphicsContext3DMac.mm -> graphics/cocoa/GraphicsContext3DCocoa.mm
+        graphics/mac/GraphicsContext.mm -> graphics/cocoa/GraphicsContextCocoa.mm
+        graphics/mac/WebGLLayer.h -> graphics/cocoa/WebGLLayer.h
+        graphics/mac/WebGLLayer.mm -> graphics/cocoa/WebGLLayer.mm
+
+        * PlatformMac.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: Renamed from Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm.
+        * platform/graphics/cocoa/GraphicsContextCocoa.mm: Renamed from Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm.
+        * platform/graphics/cocoa/WebGLLayer.h: Renamed from Source/WebCore/platform/graphics/mac/WebGLLayer.h.
+        * platform/graphics/cocoa/WebGLLayer.mm: Renamed from Source/WebCore/platform/graphics/mac/WebGLLayer.mm.
+
+2017-07-12  Dean Jackson  <dino@apple.com>
+
+        Clean-up some things in GraphicsContext3D
+        https://bugs.webkit.org/show_bug.cgi?id=174452
+        <rdar://problem/33281257>
+
+        Reviewed by Simon Fraser.
+
+        General clean-up in GC3D.
+
+        Covered by existing tests.
+
+        * platform/graphics/GraphicsContext3D.h: Use initial values where possible.
+        (WebCore::GraphicsContext3D::GraphicsContext3DState::GraphicsContext3DState): Deleted.
+        * platform/graphics/mac/GraphicsContext3DMac.mm:
+        (WebCore::GraphicsContext3D::GraphicsContext3D): Nearly everything can come from the
+        initial values now.
+        (WebCore::GraphicsContext3D::~GraphicsContext3D): Remove code that won't be enabled
+        on this platform.
+        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): While unlikely to happen,
+        and possibly harmless in this case, add some checked arithmetic to make sure we don't overflow
+        when working out how big a buffer to create.
+        (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): Ditto.
+        (WebCore::GraphicsContext3D::reshape): Do nothing if we are ever given negative
+        width or height. Again unlikely.
+
+2017-07-13  Dean Jackson  <dino@apple.com>
+
+        Avoid unnecessary copy of framebuffer into WebGL Layer
+        https://bugs.webkit.org/show_bug.cgi?id=174345
+        <rdar://problem/33228950>
+
+        Reviewed by Sam Weinig.
+
+        On macOS, we're unnecessarily copying the framebuffer into another
+        texture before pushing it into the compositing layer. Instead we
+        should simply render the FBO into the CALayer we use to draw on
+        the screen.
+
+        Covered by the existing WebGL tests.
+
+        * platform/graphics/GraphicsContext3D.h:
+        (WebCore::GraphicsContext3D::platformTexture): Return the FBO texture instead.
+        * platform/graphics/mac/GraphicsContext3DMac.mm:
+        (WebCore::GraphicsContext3D::GraphicsContext3D): No need to have a compositing
+        texture.
+        (WebCore::GraphicsContext3D::~GraphicsContext3D):
+        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
+        (WebCore::GraphicsContext3D::reshapeFBOs):
+        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+        (WebCore::GraphicsContext3D::prepareTexture): Don't copy the pixels from
+        the FBO into the compositing texture
+
+2017-07-13  Mark Lam  <mark.lam@apple.com>
+
+        Implementors of memoryCost() need to be thread-safe.
+        https://bugs.webkit.org/show_bug.cgi?id=172738
+        <rdar://problem/32474881>
+
+        Reviewed by Keith Miller.
+
+        No new tests. This patch fixes a race condition bug that can result in random
+        crashes (and other unpredictable behavior), and is very difficult to test for.
+
+        * Modules/webaudio/AudioBuffer.cpp:
+        (WebCore::AudioBuffer::releaseMemory):
+        (WebCore::AudioBuffer::memoryCost):
+        * Modules/webaudio/AudioBuffer.h:
+        * dom/ChildNodeList.h:
+        * dom/CollectionIndexCache.h:
+        (WebCore::CollectionIndexCache::memoryCost):
+        * dom/LiveNodeList.h:
+        * html/CachedHTMLCollection.h:
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::memoryCost):
+        (WebCore::HTMLCanvasElement::externalMemoryCost):
+        (WebCore::HTMLCanvasElement::setImageBuffer):
+        * html/HTMLCanvasElement.h:
+        * html/HTMLCollection.cpp:
+        (WebCore::HTMLCollection::invalidateNamedElementCache):
+        * html/HTMLCollection.h:
+        (WebCore::CollectionNamedElementCache::memoryCost):
+        (WebCore::HTMLCollection::memoryCost):
+        (WebCore::HTMLCollection::setNamedItemCache):
+        * platform/graphics/ImageBuffer.cpp:
+        (WebCore::ImageBuffer::memoryCost):
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::memoryCost):
+        (WebCore::ImageBuffer::externalMemoryCost):
+
+2017-07-13  Jeremy Jones  <jeremyj@apple.com>
+
+        Fix style. Use #pragma once in VideoFullscreen and PlaybackSession headers.
+        https://bugs.webkit.org/show_bug.cgi?id=174448
+
+        Reviewed by Eric Carlson.
+
+        No behavior change.
+
+        * platform/cocoa/WebPlaybackSessionInterface.h:
+        * platform/cocoa/WebVideoFullscreenChangeObserver.h:
+        * platform/cocoa/WebVideoFullscreenModel.h:
+        * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
+        * platform/ios/WebPlaybackSessionInterfaceAVKit.h:
+        * platform/ios/WebVideoFullscreenControllerAVKit.h:
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
+        * platform/mac/WebVideoFullscreenInterfaceMac.h:
+
+2017-07-13  Alex Christensen  <achristensen@webkit.org>
+
+        Deleting last URLSearchParams key should remove trailing ? in associated URL
+        https://bugs.webkit.org/show_bug.cgi?id=174465
+
+        Reviewed by Chris Dumez.
+
+        This makes us match the behavior of Chrome and Firefox, and the spec after https://github.com/whatwg/url/issues/332 is approved.
+        This will be covered by an upcoming web platform test, and I updated fast/dom/DOMURL/searchparams.html to cover it now.
+
+        * platform/URLParser.cpp:
+        (WebCore::URLParser::serialize):
+        If there are no tuples, serialize to the null string instead of a non-null empty string.
+        This makes it so URL::setQuery removes the ?
+
+2017-07-13  Jeremy Jones  <jeremyj@apple.com>
+
+        Style fix. Replace strongThis with protectedThis.
+        https://bugs.webkit.org/show_bug.cgi?id=174444
+
+        Reviewed by Eric Carlson.
+
+        Rename, no behavior change.
+
+        * Modules/webaudio/AudioScheduledSourceNode.cpp:
+        (WebCore::AudioScheduledSourceNode::finish):
+        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
+        (WebCore::WebCoreDecompressionSession::maybeBecomeReadyForMoreMediaData):
+        (WebCore::WebCoreDecompressionSession::enqueueSample):
+        (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
+        (WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
+        (WebCore::WebCoreDecompressionSession::requestMediaDataWhenReady):
+        (WebCore::WebCoreDecompressionSession::flush):
+
+2017-07-13  Jeremy Jones  <jeremyj@apple.com>
+
+        Fix block style in WebVideoFullscreen classes.
+        https://bugs.webkit.org/show_bug.cgi?id=174446
+
+        Reviewed by Eric Carlson.
+
+        No behavior change.
+
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (WebVideoFullscreenControllerContext::setVideoLayerFrame):
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (-[WebAVPlayerLayer layoutSublayers]):
+        (getWebAVPictureInPicturePlayerLayerViewClass):
+        (getWebAVPlayerLayerViewClass):
+
+2017-07-13  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove unused and untested Page domain commands
+        https://bugs.webkit.org/show_bug.cgi?id=174429
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::disable):
+        (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
+        (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad): Deleted.
+        (WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad): Deleted.
+        * inspector/InspectorPageAgent.h:
+
+2017-07-13  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GCrypt] Implement CryptoKeyRSA SPKI exports
+        https://bugs.webkit.org/show_bug.cgi?id=173695
+
+        Reviewed by Jiewen Tan.
+
+        Implement the SPKI export operation for RSA keys for platforms that use
+        libgcrypt.
+
+        In CryptoKeyRSA::exportSpki(), we bail early with an invalid access exception if
+        this export is not being done for a public key. Otherwise, we start with creating
+        the `RSAPublicKey` ASN.1 structure, filling in the modulus and public exponent
+        data that's retrieved from the `public-key` s-expression in the signed MPI format.
+
+        We then create the `SubjectPublicKeyInfo` ASN.1 structure and fill it out with
+        the necessary data. The id-rsaEncryption object identifier is written out under
+        the `algorithm.algorithm` element, and a null value is written out under the
+        `algorithm.parameters` element. This doesn't follow the specification at the
+        moment, since id-RSASSA-PSS would have to be written for the RSA-PSS algorithm,
+        and id-RSAES-OAEP for the RSA-OAEP algorithm, along with specific parameter
+        structures. But no test in WebKit or the web-platform-tests suite covers this,
+        so this deviation should be addressed later.
+
+        Data of the previously-constructed `RSAPublicKey` structure is retrieved and
+        written out under the `subjectPublicKey` element, before finally retrieving
+        data of the `SubjectPublicKeyInfo` structure and returning that to the caller.
+
+        A helper mpiSignedData() function is added, providing overloads for gcry_mpi_t
+        and gcry_sexp_t parameters. MPI data for that parameter is retrieved and the
+        first byte of that data is tested, inserting an additional 0x00 byte at the
+        beginning of the Vector if that first byte has the first bit set, avoiding this
+        data accidentally being interpreted as a signed integer.
+
+        No new tests -- related tests are now passing and are unskipped.
+
+        * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
+        (WebCore::CryptoKeyRSA::exportSpki):
+        * crypto/gcrypt/GCryptUtilities.h:
+        (WebCore::mpiSignedData):
+
+2017-07-13  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GCrypt] Implement CryptoKeyRSA SPKI imports
+        https://bugs.webkit.org/show_bug.cgi?id=173694
+
+        Reviewed by Jiewen Tan.
+
+        Implement the SPKI import operation for RSA keys for platforms that use
+        libgcrypt.
+
+        The passed-in key data is decoded against the `SubjectPublicKeyInfo` ASN.1
+        structure. We then validate the `algorithm.algorithm` element, ensuring that
+        the value under that represents a supported object identifier. This check is
+        for now mostly superficial, only ensuring that the object identifier is either
+        id-rsaEncryption, id-RSAES-OAEP or id-RSASSA-PSS. This has to be further extended
+        to also check the id-sha{1,256,384,512}WithRSAEncryption identifiers as well as
+        decoding the `algorithm.parameters` element against a specific ASN.1 structure,
+        if necessary (RSASSA-PSS-params or RSAES-OAEP-params), and cross-checking the
+        specified digest algorithm with the algorithm that's specified through the main
+        object identifier or the structure contained in `algorithm.parameters`. This is
+        avoided for now because no test in WebKit or the web-platform-tests suite covers
+        this detail of the specification.
+
+        After the algorithm is identified as supported, we proceed with decoding the
+        `subjectPublicKey` data against the `RSAPublicKey` ASN.1 structure. From there,
+        we retrieve the `modulus` and `publicExponent` data from which we can construct
+        an RSA `public-key` s-expression that can be used through libgcrypt. A new
+        CryptoKeyRSA object is then created, taking over ownership of the `public-key`
+        s-expression, and returned.
+
+        No new tests -- related tests are now passing and are unskipped.
+
+        * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
+        (WebCore::supportedAlgorithmIdentifier):
+        (WebCore::CryptoKeyRSA::importSpki):
+
+2017-07-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        REGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests
+        https://bugs.webkit.org/show_bug.cgi?id=174395
+
+        Reviewed by Carlos Garcia Campos.
+
+        Covered by existing tests.
+
+        Before r219332 the height of the spin button widget was
+        calculated as the maximum value between the individual button
+        ( the [+] or [-] ) width (33 pixels) and height (16 pixels).
+        And r219332 caused the height of the widget to be calculated as
+        the height of the button (16 pixels), which was incorrect as
+        each button should be first expanded vertically to fit the
+        preferred size of the widget.
+
+        Fix this by making the calculations about the spin button widget
+        on a new function spinButtonSize() that takes this into account,
+        and use this values both for adjusting the style of the input
+        field and the spin button widget itself.
+
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::spinButtonSize):
+        (WebCore::RenderThemeGtk::adjustTextFieldStyle):
+        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
+
 2017-07-13  Miguel Gomez  <magomez@igalia.com>
 
         [GTK][WPE] border-radius with non visible border doesn't work on images that have their own RenderLayer