Changeset 201333 in webkit
- Timestamp:
- May 24, 2016, 9:50:26 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 47 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r201314 r201333 1 2016-05-24 Chris Dumez <cdumez@apple.com> 2 3 Use auto for some of our lambda function parameters 4 https://bugs.webkit.org/show_bug.cgi?id=158001 5 6 Reviewed by Darin Adler. 7 8 Use auto for some of our lambda function parameters now that we build with c++14. 9 10 * wtf/BubbleSort.h: 11 (WTF::bubbleSort): 12 1 13 2016-05-23 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WTF/wtf/BubbleSort.h
r192295 r201333 90 90 bubbleSort( 91 91 begin, end, 92 [] (const typename std::iterator_traits<IteratorType>::value_type& left, 93 const typename std::iterator_traits<IteratorType>::value_type& right) -> bool { 92 [](auto& left, auto& right) { 94 93 return left < right; 95 94 }); -
trunk/Source/WebCore/ChangeLog
r201332 r201333 1 2016-05-24 Chris Dumez <cdumez@apple.com> 2 3 Use auto for some of our lambda function parameters 4 https://bugs.webkit.org/show_bug.cgi?id=158001 5 6 Reviewed by Darin Adler. 7 8 Use auto for some of our lambda function parameters now that we build with c++14. 9 10 * Modules/mediasource/MediaSource.cpp: 11 (WebCore::MediaSource::buffered): 12 (WebCore::MediaSource::monitorSourceBuffers): 13 (WebCore::MediaSource::endOfStream): 14 * Modules/mediasource/SampleMap.cpp: 15 (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd): 16 * accessibility/AccessibilityRenderObject.cpp: 17 (WebCore::AccessibilityRenderObject::ariaSelectedRows): 18 * bindings/js/SerializedScriptValue.cpp: 19 (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB): 20 * css/CSSValueList.cpp: 21 (WebCore::CSSValueList::removeAll): 22 * css/MediaList.cpp: 23 (WebCore::MediaQuerySet::remove): 24 * css/MediaQuery.cpp: 25 (WebCore::MediaQuery::MediaQuery): 26 * css/MediaQueryMatcher.cpp: 27 (WebCore::MediaQueryMatcher::removeListener): 28 * dom/Document.cpp: 29 (WebCore::Document::validateAutoSizingNodes): 30 * dom/Element.cpp: 31 (WebCore::Element::detachAttrNodeFromElementWithValue): 32 * dom/MutationObserver.cpp: 33 (WebCore::MutationObserver::deliverAllMutations): 34 * dom/Node.cpp: 35 (WebCore::Node::unregisterMutationObserver): 36 * html/LinkIconCollector.cpp: 37 * inspector/InspectorIndexedDBAgent.cpp: 38 (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): 39 * loader/ResourceLoader.cpp: 40 (WebCore::ResourceLoader::loadDataURL): 41 * page/CaptionUserPreferences.cpp: 42 (WebCore::CaptionUserPreferences::sortedTrackListForMenu): 43 * page/CaptionUserPreferencesMediaAF.cpp: 44 (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): 45 * page/animation/AnimationController.cpp: 46 (WebCore::AnimationControllerPrivate::clear): 47 * platform/graphics/FontCascade.cpp: 48 (WebCore::pruneUnreferencedEntriesFromFontCascadeCache): 49 * platform/graphics/FontCascadeFonts.cpp: 50 (WebCore::FontCascadeFonts::pruneSystemFallbacks): 51 * platform/graphics/PathUtilities.cpp: 52 (WebCore::addIntersectionPoints): 53 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: 54 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): 55 * platform/graphics/texmap/TextureMapperGL.cpp: 56 (WebCore::TextureMapperGLData::SharedGLData::~SharedGLData): 57 * platform/mac/HIDGamepad.cpp: 58 (WebCore::HIDGamepad::initElements): 59 * svg/SVGToOTFFontConversion.cpp: 60 (WebCore::SVGToOTFFontConverter::appendLigatureSubtable): 61 (WebCore::SVGToOTFFontConverter::finishAppendingKERNSubtable): 62 1 63 2016-05-24 Antti Koivisto <antti@apple.com> 2 64 -
trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp
r200943 r201333 142 142 std::unique_ptr<PlatformTimeRanges> MediaSource::buffered() const 143 143 { 144 if (m_buffered && m_activeSourceBuffers->length() && std::all_of(m_activeSourceBuffers->begin(), m_activeSourceBuffers->end(), [] (RefPtr<SourceBuffer>& buffer) { return !buffer->isBufferedDirty(); }))144 if (m_buffered && m_activeSourceBuffers->length() && std::all_of(m_activeSourceBuffers->begin(), m_activeSourceBuffers->end(), [](auto& buffer) { return !buffer->isBufferedDirty(); })) 145 145 return std::make_unique<PlatformTimeRanges>(*m_buffered); 146 146 … … 265 265 auto begin = m_activeSourceBuffers->begin(); 266 266 auto end = m_activeSourceBuffers->end(); 267 if (std::all_of(begin, end, []( RefPtr<SourceBuffer>& sourceBuffer) {267 if (std::all_of(begin, end, [](auto& sourceBuffer) { 268 268 return !sourceBuffer->hasCurrentTime(); 269 269 })) { … … 279 279 // ↳ If buffered for all objects in activeSourceBuffers contain TimeRanges that include the current 280 280 // playback position and enough data to ensure uninterrupted playback: 281 if (std::all_of(begin, end, []( RefPtr<SourceBuffer>& sourceBuffer) {281 if (std::all_of(begin, end, [](auto& sourceBuffer) { 282 282 return sourceBuffer->hasFutureTime() && sourceBuffer->canPlayThrough(); 283 283 })) { … … 296 296 // ↳ If buffered for all objects in activeSourceBuffers contain a TimeRange that includes 297 297 // the current playback position and some time beyond the current playback position, then run the following steps: 298 if (std::all_of(begin, end, []( RefPtr<SourceBuffer>& sourceBuffer) {298 if (std::all_of(begin, end, [](auto& sourceBuffer) { 299 299 return sourceBuffer->hasFutureTime(); 300 300 })) { … … 427 427 // 2. If the updating attribute equals true on any SourceBuffer in sourceBuffers, then throw an 428 428 // INVALID_STATE_ERR exception and abort these steps. 429 if (std::any_of(m_sourceBuffers->begin(), m_sourceBuffers->end(), []( RefPtr<SourceBuffer>& sourceBuffer) { return sourceBuffer->updating(); })) {429 if (std::any_of(m_sourceBuffers->begin(), m_sourceBuffers->end(), [](auto& sourceBuffer) { return sourceBuffer->updating(); })) { 430 430 ec = INVALID_STATE_ERR; 431 431 return; -
trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp
r179956 r201333 245 245 PresentationOrderSampleMap::iterator_range PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd(const MediaTime& beginTime, const MediaTime& endTime) 246 246 { 247 reverse_iterator rangeEnd = std::find_if(rbegin(), rend(), [&beginTime] (PresentationOrderSampleMap::MapType::value_typevalue) {247 reverse_iterator rangeEnd = std::find_if(rbegin(), rend(), [&beginTime](auto& value) { 248 248 return value.second->presentationTime() <= beginTime; 249 249 }); 250 250 251 reverse_iterator rangeStart = std::find_if(rbegin(), rangeEnd, [&endTime] (PresentationOrderSampleMap::MapType::value_typevalue) {251 reverse_iterator rangeStart = std::find_if(rbegin(), rangeEnd, [&endTime](auto& value) { 252 252 return value.second->presentationTime() <= endTime; 253 253 }); -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r201205 r201333 3246 3246 3247 3247 // Get all the rows. 3248 auto rowsIteration = [&]( const AccessibilityChildrenVector& rows) {3248 auto rowsIteration = [&](auto& rows) { 3249 3249 for (auto& row : rows) { 3250 3250 if (row->isSelected()) { -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r201302 r201333 2803 2803 2804 2804 RefPtr<SerializedScriptValue> protectedThis(this); 2805 blobRegistry().writeBlobsToTemporaryFiles(m_blobURLs, [completionHandler = WTFMove(completionHandler), this, protectedThis = WTFMove(protectedThis)]( const Vector<String>& blobFilePaths) {2805 blobRegistry().writeBlobsToTemporaryFiles(m_blobURLs, [completionHandler = WTFMove(completionHandler), this, protectedThis = WTFMove(protectedThis)](auto& blobFilePaths) { 2806 2806 ASSERT(isMainThread()); 2807 2807 -
trunk/Source/WebCore/css/CSSValueList.cpp
r200626 r201333 61 61 return false; 62 62 63 return m_values.removeAllMatching([value] (const Ref<CSSValue>& current) {63 return m_values.removeAllMatching([value](auto& current) { 64 64 return current->equals(*value); 65 65 }) > 0; -
trunk/Source/WebCore/css/MediaList.cpp
r195452 r201333 187 187 return false; 188 188 189 return m_queries.removeFirstMatching([&parsedQuery] (const std::unique_ptr<MediaQuery>& query) {189 return m_queries.removeFirstMatching([&parsedQuery](auto& query) { 190 190 return *query == *parsedQuery; 191 191 }); -
trunk/Source/WebCore/css/MediaQuery.cpp
r195951 r201333 84 84 } 85 85 86 std::sort(m_expressions->begin(), m_expressions->end(), []( const std::unique_ptr<MediaQueryExp>& a, const std::unique_ptr<MediaQueryExp>& b) {86 std::sort(m_expressions->begin(), m_expressions->end(), [](auto& a, auto& b) { 87 87 return codePointCompare(a->serialize(), b->serialize()) < 0; 88 88 }); -
trunk/Source/WebCore/css/MediaQueryMatcher.cpp
r199964 r201333 132 132 return; 133 133 134 m_listeners.removeFirstMatching([listener, query] (const std::unique_ptr<Listener>& current) {134 m_listeners.removeFirstMatching([listener, query](auto& current) { 135 135 return *current->listener() == *listener && current->query() == query; 136 136 }); -
trunk/Source/WebCore/dom/Document.cpp
r201237 r201333 5300 5300 value->adjustNodeSizes(); 5301 5301 } 5302 m_textAutoSizedNodes.removeIf([] (TextAutoSizingMap::KeyValuePairType& keyAndValue) {5302 m_textAutoSizedNodes.removeIf([](auto& keyAndValue) { 5303 5303 return !keyAndValue.value->numNodes(); 5304 5304 }); -
trunk/Source/WebCore/dom/Element.cpp
r201332 r201333 3195 3195 3196 3196 auto& attrNodeList = *attrNodeListForElement(*this); 3197 bool found = attrNodeList.removeFirstMatching([attrNode] (const RefPtr<Attr>& attribute) {3197 bool found = attrNodeList.removeFirstMatching([attrNode](auto& attribute) { 3198 3198 return attribute->qualifiedName() == attrNode->qualifiedName(); 3199 3199 }); -
trunk/Source/WebCore/dom/MutationObserver.cpp
r200552 r201333 245 245 copyToVector(activeMutationObservers(), observers); 246 246 activeMutationObservers().clear(); 247 std::sort(observers.begin(), observers.end(), []( const RefPtr<MutationObserver>& lhs, const RefPtr<MutationObserver>& rhs) {247 std::sort(observers.begin(), observers.end(), [](auto& lhs, auto& rhs) { 248 248 return lhs->m_priority < rhs->m_priority; 249 249 }); -
trunk/Source/WebCore/dom/Node.cpp
r201305 r201333 2087 2087 return; 2088 2088 2089 registry->removeFirstMatching([registration] (const std::unique_ptr<MutationObserverRegistration>& current) {2089 registry->removeFirstMatching([registration](auto& current) { 2090 2090 return current.get() == registration; 2091 2091 }); -
trunk/Source/WebCore/html/LinkIconCollector.cpp
r200591 r201333 108 108 } 109 109 110 std::sort(icons.begin(), icons.end(), []( const LinkIconCollector::Icon& a, const LinkIconCollector::Icon& b) {110 std::sort(icons.begin(), icons.end(), [](auto& a, auto& b) { 111 111 return compareIcons(a, b) < 0; 112 112 }); -
trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
r201305 r201333 601 601 602 602 RefPtr<RequestDatabaseNamesCallback> callback = WTFMove(requestCallback); 603 idbFactory->getAllDatabaseNames(*topOrigin, *openingOrigin, [callback]( const Vector<String>& databaseNames) {603 idbFactory->getAllDatabaseNames(*topOrigin, *openingOrigin, [callback](auto& databaseNames) { 604 604 if (!callback->isActive()) 605 605 return; -
trunk/Source/WebCore/loader/ResourceLoader.cpp
r200895 r201333 254 254 scheduleContext.scheduledPairs = *scheduledPairs; 255 255 #endif 256 DataURLDecoder::decode(url, scheduleContext, [protectedThis, url] (Optional<DataURLDecoder::Result>decodeResult) {256 DataURLDecoder::decode(url, scheduleContext, [protectedThis, url](auto decodeResult) { 257 257 if (protectedThis->reachedTerminalState()) 258 258 return; -
trunk/Source/WebCore/page/CaptionUserPreferences.cpp
r200673 r201333 222 222 } 223 223 224 std::sort(tracksForMenu.begin(), tracksForMenu.end(), []( const RefPtr<TextTrack>& a, const RefPtr<TextTrack>& b) {224 std::sort(tracksForMenu.begin(), tracksForMenu.end(), [](auto& a, auto& b) { 225 225 return codePointCompare(trackDisplayName(a.get()), trackDisplayName(b.get())) < 0; 226 226 }); … … 257 257 } 258 258 259 std::sort(tracksForMenu.begin(), tracksForMenu.end(), []( const RefPtr<AudioTrack>& a, const RefPtr<AudioTrack>& b) {259 std::sort(tracksForMenu.begin(), tracksForMenu.end(), [](auto& a, auto& b) { 260 260 return codePointCompare(trackDisplayName(a.get()), trackDisplayName(b.get())) < 0; 261 261 }); -
trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
r201038 r201333 839 839 } 840 840 841 std::sort(tracksForMenu.begin(), tracksForMenu.end(), []( const RefPtr<AudioTrack>& a, const RefPtr<AudioTrack>& b) {841 std::sort(tracksForMenu.begin(), tracksForMenu.end(), [](auto& a, auto& b) { 842 842 return codePointCompare(trackDisplayName(a.get()), trackDisplayName(b.get())) < 0; 843 843 }); -
trunk/Source/WebCore/page/animation/AnimationController.cpp
r200164 r201333 108 108 }); 109 109 110 m_elementChangesToDispatch.removeAllMatching([element] (const Ref<Element>& currElement) {111 return &currElement.get() == element;110 m_elementChangesToDispatch.removeAllMatching([element](auto& currentElement) { 111 return currentElement.ptr() == element; 112 112 }); 113 113 -
trunk/Source/WebCore/platform/graphics/FontCascade.cpp
r199830 r201333 251 251 void pruneUnreferencedEntriesFromFontCascadeCache() 252 252 { 253 fontCascadeCache().removeIf([]( FontCascadeCache::KeyValuePairType& entry) {253 fontCascadeCache().removeIf([](auto& entry) { 254 254 return entry.value->fonts.get().hasOneRef(); 255 255 }); -
trunk/Source/WebCore/platform/graphics/FontCascadeFonts.cpp
r200601 r201333 455 455 if (m_cachedPageZero.isMixedFont()) 456 456 m_cachedPageZero = { }; 457 m_cachedPages.removeIf([]( decltype(m_cachedPages)::KeyValuePairType& keyAndValue) {457 m_cachedPages.removeIf([](auto& keyAndValue) { 458 458 return keyAndValue.value.isMixedFont(); 459 459 }); -
trunk/Source/WebCore/platform/graphics/PathUtilities.cpp
r198142 r201333 135 135 } 136 136 137 std::sort(intersectionPoints.begin(), intersectionPoints.end(), [edgeA] (FloatPointGraph::Node* a, FloatPointGraph::Node* b) {137 std::sort(intersectionPoints.begin(), intersectionPoints.end(), [edgeA](auto* a, auto* b) { 138 138 return FloatPoint(*edgeA.first - *b).lengthSquared() > FloatPoint(*edgeA.first - *a).lengthSquared(); 139 139 }); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
r197807 r201333 532 532 bool selectedVideoTrackChanged = false; 533 533 534 std::function<void(RefPtr<AudioTrackPrivateMediaStream>, int)> enableAudioTrack = [this]( RefPtr<AudioTrackPrivateMediaStream>track, int index)534 std::function<void(RefPtr<AudioTrackPrivateMediaStream>, int)> enableAudioTrack = [this](auto track, int index) 535 535 { 536 536 track->setTrackIndex(index); … … 539 539 updateTracksOfType(m_audioTrackMap, RealtimeMediaSource::Audio, currentTracks, &AudioTrackPrivateMediaStream::create, m_player, &MediaPlayer::removeAudioTrack, &MediaPlayer::addAudioTrack, enableAudioTrack); 540 540 541 std::function<void(RefPtr<VideoTrackPrivateMediaStream>, int)> enableVideoTrack = [this, &selectedVideoTrackChanged]( RefPtr<VideoTrackPrivateMediaStream>track, int index)541 std::function<void(RefPtr<VideoTrackPrivateMediaStream>, int)> enableVideoTrack = [this, &selectedVideoTrackChanged](auto track, int index) 542 542 { 543 543 bool wasSelected = track->selected(); -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
r200812 r201333 89 89 { 90 90 ASSERT(std::any_of(contextDataMap().begin(), contextDataMap().end(), 91 [this]( GLContextDataMap::KeyValuePairType& entry) { return entry.value == this; }));92 contextDataMap().removeIf([this] (GLContextDataMap::KeyValuePairType& entry) { return entry.value == this; });91 [this](auto& entry) { return entry.value == this; })); 92 contextDataMap().removeIf([this](auto& entry) { return entry.value == this; }); 93 93 } 94 94 -
trunk/Source/WebCore/platform/mac/HIDGamepad.cpp
r170869 r201333 75 75 76 76 // Buttons are specified to appear highest priority first in the array. 77 std::sort(m_buttons.begin(), m_buttons.end(), []( const std::unique_ptr<HIDGamepadButton>& a, const std::unique_ptr<HIDGamepadButton>& b) {77 std::sort(m_buttons.begin(), m_buttons.end(), [](auto& a, auto& b) { 78 78 return a->priority < b->priority; 79 79 }); -
trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp
r201228 r201333 755 755 if (ligaturePairs.size() > std::numeric_limits<uint16_t>::max()) 756 756 ligaturePairs.clear(); 757 std::sort(ligaturePairs.begin(), ligaturePairs.end(), []( const LigaturePair& lhs, const LigaturePair& rhs) {757 std::sort(ligaturePairs.begin(), ligaturePairs.end(), [](auto& lhs, auto& rhs) { 758 758 return lhs.first[0] < rhs.first[0]; 759 759 }); … … 1079 1079 size_t SVGToOTFFontConverter::finishAppendingKERNSubtable(Vector<KerningData> kerningData, uint16_t coverage) 1080 1080 { 1081 std::sort(kerningData.begin(), kerningData.end(), []( const KerningData& a, const KerningData& b) {1081 std::sort(kerningData.begin(), kerningData.end(), [](auto& a, auto& b) { 1082 1082 return a.glyph1 < b.glyph1 || (a.glyph1 == b.glyph1 && a.glyph2 < b.glyph2); 1083 1083 }); -
trunk/Source/WebKit2/ChangeLog
r201322 r201333 1 2016-05-24 Chris Dumez <cdumez@apple.com> 2 3 Use auto for some of our lambda function parameters 4 https://bugs.webkit.org/show_bug.cgi?id=158001 5 6 Reviewed by Darin Adler. 7 8 Use auto for some of our lambda function parameters now that we build with c++14. 9 10 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp: 11 (WebKit::WebIDBConnectionToClient::didGetRecord): 12 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 13 (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): 14 * NetworkProcess/NetworkProcess.cpp: 15 (WebKit::fetchDiskCacheEntries): 16 (WebKit::NetworkProcess::fetchWebsiteData): 17 (WebKit::clearDiskCacheEntries): 18 * NetworkProcess/NetworkResourceLoader.cpp: 19 (WebKit::NetworkResourceLoader::retrieveCacheEntry): 20 (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry): 21 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: 22 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading): 23 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: 24 (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad): 25 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage): 26 (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): 27 (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry): 28 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry): 29 * NetworkProcess/cache/NetworkCacheStorage.cpp: 30 (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations): 31 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 32 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]): 33 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]): 34 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: 35 (-[_WKRemoteObjectInterface debugDescription]): 36 * UIProcess/API/C/WKApplicationCacheManager.cpp: 37 (WKApplicationCacheManagerGetApplicationCacheOrigins): 38 * UIProcess/API/C/WKKeyValueStorageManager.cpp: 39 (WKKeyValueStorageManagerGetKeyValueStorageOrigins): 40 (WKKeyValueStorageManagerGetStorageDetailsByOrigin): 41 * UIProcess/API/C/WKResourceCacheManager.cpp: 42 (WKResourceCacheManagerGetCacheOrigins): 43 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: 44 (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]): 45 * UIProcess/UserContent/WebUserContentControllerProxy.cpp: 46 (WebKit::WebUserContentControllerProxy::removeAllUserScripts): 47 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets): 48 (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers): 49 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 50 (WebKit::PlatformCALayerRemote::removeAnimationForKey): 51 1 52 2016-05-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 53 -
trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
r199732 r201333 318 318 file->prepareForFileAccess(); 319 319 320 NetworkBlobRegistry::singleton().writeBlobsToTemporaryFiles(blobURLs, [this, protector, requestIdentifier, fileReferences]( const Vector<String>& fileNames) {320 NetworkBlobRegistry::singleton().writeBlobsToTemporaryFiles(blobURLs, [this, protector, requestIdentifier, fileReferences](auto& fileNames) { 321 321 for (auto& file : fileReferences) 322 322 file->revokeFileAccess(); -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r200142 r201333 315 315 auto* originsAndSizes = new HashMap<RefPtr<SecurityOrigin>, uint64_t>(); 316 316 317 NetworkCache::singleton().traverse([fetchOptions, completionHandler, originsAndSizes]( const NetworkCache::Cache::TraversalEntry *traversalEntry) {317 NetworkCache::singleton().traverse([fetchOptions, completionHandler, originsAndSizes](auto* traversalEntry) { 318 318 if (!traversalEntry) { 319 319 Vector<WebsiteData::Entry> entries; … … 380 380 }; 381 381 382 RefPtr<CallbackAggregator> callbackAggregator = adoptRef(new CallbackAggregator([this, callbackID] (WebsiteData websiteData) {382 RefPtr<CallbackAggregator> callbackAggregator = adoptRef(new CallbackAggregator([this, callbackID] (WebsiteData websiteData) { 383 383 parentProcessConnection()->send(Messages::NetworkProcessProxy::DidFetchWebsiteData(callbackID, websiteData), 0); 384 384 })); … … 390 390 391 391 if (websiteDataTypes.contains(WebsiteDataType::DiskCache)) { 392 fetchDiskCacheEntries(sessionID, fetchOptions, [callbackAggregator]( Vector<WebsiteData::Entry>entries) {392 fetchDiskCacheEntries(sessionID, fetchOptions, [callbackAggregator](auto entries) { 393 393 callbackAggregator->m_websiteData.entries.appendVector(entries); 394 394 }); … … 433 433 auto* cacheKeysToDelete = new Vector<NetworkCache::Key>; 434 434 435 NetworkCache::singleton().traverse([completionHandler, originsToDelete, cacheKeysToDelete](const NetworkCache::Cache::TraversalEntry *traversalEntry) { 436 435 NetworkCache::singleton().traverse([completionHandler, originsToDelete, cacheKeysToDelete](auto* traversalEntry) { 437 436 if (traversalEntry) { 438 437 if (originsToDelete->contains(SecurityOrigin::create(traversalEntry->entry.response().url()))) -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
r201255 r201333 166 166 167 167 RefPtr<NetworkResourceLoader> loader(this); 168 NetworkCache::singleton().retrieve(request, { m_parameters.webPageID, m_parameters.webFrameID }, [loader, request]( std::unique_ptr<NetworkCache::Entry>entry) {168 NetworkCache::singleton().retrieve(request, { m_parameters.webPageID, m_parameters.webFrameID }, [loader, request](auto entry) { 169 169 if (loader->hasOneRef()) { 170 170 // The loader has been aborted and is only held alive by this lambda. … … 517 517 RefPtr<NetworkConnectionToWebProcess> connection(&connectionToWebProcess()); 518 518 RefPtr<NetworkResourceLoader> loader(this); 519 NetworkCache::singleton().store(m_networkLoad->currentRequest(), m_response, WTFMove(m_bufferedDataForCache), [loader, connection]( NetworkCache::MappedBody& mappedBody) {519 NetworkCache::singleton().store(m_networkLoad->currentRequest(), m_response, WTFMove(m_bufferedDataForCache), [loader, connection](auto& mappedBody) { 520 520 #if ENABLE(SHAREABLE_RESOURCE) 521 521 if (mappedBody.shareableResourceHandle.isNull()) -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
r199521 r201333 106 106 { 107 107 if (!m_cacheEntryForValidation && m_bufferedDataForCache) 108 m_cacheEntryForValidation = NetworkCache::singleton().store(m_originalRequest, m_response, WTFMove(m_bufferedDataForCache), []( NetworkCache::MappedBody& mappedBody) { });108 m_cacheEntryForValidation = NetworkCache::singleton().store(m_originalRequest, m_response, WTFMove(m_bufferedDataForCache), [](auto& mappedBody) { }); 109 109 110 110 didComplete(); -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
r201255 r201333 410 410 void SpeculativeLoadManager::retrieveEntryFromStorage(const Key& key, const RetrieveCompletionHandler& completionHandler) 411 411 { 412 m_storage.retrieve(key, static_cast<unsigned>(ResourceLoadPriority::Medium), [completionHandler]( std::unique_ptr<Storage::Record>record) {412 m_storage.retrieve(key, static_cast<unsigned>(ResourceLoadPriority::Medium), [completionHandler](auto record) { 413 413 if (!record) { 414 414 completionHandler(nullptr); … … 538 538 ASSERT(storageKey.type() == "resource"); 539 539 auto subresourcesStorageKey = makeSubresourcesKey(storageKey); 540 m_storage.retrieve(subresourcesStorageKey, static_cast<unsigned>(ResourceLoadPriority::Medium), [completionHandler]( std::unique_ptr<Storage::Record>record) {540 m_storage.retrieve(subresourcesStorageKey, static_cast<unsigned>(ResourceLoadPriority::Medium), [completionHandler](auto record) { 541 541 if (!record) { 542 542 completionHandler(nullptr); -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp
r201255 r201333 527 527 { 528 528 while (true) { 529 auto found = m_pendingWriteOperations.findIf([&key]( const std::unique_ptr<WriteOperation>& operation) {529 auto found = m_pendingWriteOperations.findIf([&key](auto& operation) { 530 530 return operation->record.key == key; 531 531 }); -
trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r201295 r201333 124 124 if (auto* networkDataTask = _session->dataTaskForIdentifier(task.taskIdentifier, storedCredentials)) { 125 125 auto completionHandlerCopy = Block_copy(completionHandler); 126 networkDataTask->willPerformHTTPRedirection(response, request, [completionHandlerCopy, taskIdentifier]( const WebCore::ResourceRequest& request) {126 networkDataTask->willPerformHTTPRedirection(response, request, [completionHandlerCopy, taskIdentifier](auto& request) { 127 127 LOG(NetworkSession, "%llu willPerformHTTPRedirection completionHandler (%s)", taskIdentifier, request.url().string().utf8().data()); 128 128 completionHandlerCopy(request.nsURLRequest(WebCore::UpdateHTTPBody)); … … 143 143 if (auto* networkDataTask = _session->dataTaskForIdentifier(taskIdentifier, storedCredentials)) { 144 144 auto completionHandlerCopy = Block_copy(completionHandler); 145 networkDataTask->willPerformHTTPRedirection(WebCore::synthesizeRedirectResponseIfNecessary([task currentRequest], request, nil), request, [completionHandlerCopy, taskIdentifier]( const WebCore::ResourceRequest& request) {145 networkDataTask->willPerformHTTPRedirection(WebCore::synthesizeRedirectResponseIfNecessary([task currentRequest], request, nil), request, [completionHandlerCopy, taskIdentifier](auto& request) { 146 146 LOG(NetworkSession, "%llu _schemeUpgraded completionHandler (%s)", taskIdentifier, request.url().string().utf8().data()); 147 147 completionHandlerCopy(request.nsURLRequest(WebCore::UpdateHTTPBody)); -
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm
r194496 r201333 211 211 auto result = adoptNS([[NSMutableString alloc] initWithFormat:@"<%@: %p; protocol = \"%@\"; identifier = \"%@\"\n", NSStringFromClass(self.class), self, _identifier.get(), NSStringFromProtocol(_protocol)]); 212 212 213 auto descriptionForClasses = []( const Vector<HashSet<Class>>& allowedClasses) {213 auto descriptionForClasses = [](auto& allowedClasses) { 214 214 auto result = adoptNS([[NSMutableString alloc] initWithString:@"["]); 215 215 bool needsComma = false; 216 216 217 auto descriptionForArgument = []( const HashSet<Class>& allowedArgumentClasses) {217 auto descriptionForArgument = [](auto& allowedArgumentClasses) { 218 218 auto result = adoptNS([[NSMutableString alloc] initWithString:@"{"]); 219 219 -
trunk/Source/WebKit2/UIProcess/API/C/WKApplicationCacheManager.cpp
r197203 r201333 41 41 { 42 42 auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore(); 43 websiteDataStore.fetchData(WebsiteDataType::OfflineWebApplicationCache, { }, [context, callback]( Vector<WebsiteDataRecord>dataRecords) {43 websiteDataStore.fetchData(WebsiteDataType::OfflineWebApplicationCache, { }, [context, callback](auto dataRecords) { 44 44 Vector<RefPtr<API::Object>> securityOrigins; 45 45 for (const auto& dataRecord : dataRecords) { -
trunk/Source/WebKit2/UIProcess/API/C/WKKeyValueStorageManager.cpp
r194496 r201333 70 70 } 71 71 72 storageManager->getLocalStorageOrigins([context, callback]( HashSet<RefPtr<WebCore::SecurityOrigin>>&& securityOrigins) {72 storageManager->getLocalStorageOrigins([context, callback](auto&& securityOrigins) { 73 73 Vector<RefPtr<API::Object>> webSecurityOrigins; 74 74 webSecurityOrigins.reserveInitialCapacity(securityOrigins.size()); … … 90 90 } 91 91 92 storageManager->getLocalStorageOriginDetails([context, callback]( Vector<LocalStorageDatabaseTracker::OriginDetails>storageDetails) {92 storageManager->getLocalStorageOriginDetails([context, callback](auto storageDetails) { 93 93 HashMap<String, RefPtr<API::Object>> detailsMap; 94 94 Vector<RefPtr<API::Object>> result; -
trunk/Source/WebKit2/UIProcess/API/C/WKResourceCacheManager.cpp
r197203 r201333 53 53 { 54 54 auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(cacheManager))->websiteDataStore(); 55 websiteDataStore.fetchData(toWebsiteDataTypes(WKResourceCachesToClearAll), { }, [context, callback]( Vector<WebsiteDataRecord>dataRecords) {55 websiteDataStore.fetchData(toWebsiteDataTypes(WKResourceCachesToClearAll), { }, [context, callback](auto dataRecords) { 56 56 Vector<RefPtr<API::Object>> securityOrigins; 57 57 for (const auto& dataRecord : dataRecords) { -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
r197592 r201333 154 154 fetchOptions |= WebKit::WebsiteDataFetchOption::ComputeSizes; 155 155 156 _websiteDataStore->websiteDataStore().fetchData(WebKit::toWebsiteDataTypes(dataTypes), fetchOptions, [completionHandlerCopy]( Vector<WebKit::WebsiteDataRecord>websiteDataRecords) {156 _websiteDataStore->websiteDataStore().fetchData(WebKit::toWebsiteDataTypes(dataTypes), fetchOptions, [completionHandlerCopy](auto websiteDataRecords) { 157 157 Vector<RefPtr<API::Object>> elements; 158 158 elements.reserveInitialCapacity(websiteDataRecords.size()); -
trunk/Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.cpp
r199020 r201333 190 190 process->connection()->send(Messages::WebUserContentController::RemoveAllUserScripts({ world.identifier() }), m_identifier); 191 191 192 unsigned userScriptsRemoved = m_userScripts->removeAllOfTypeMatching<API::UserScript>([&] (const RefPtr<API::UserScript>& userScript) -> bool{192 unsigned userScriptsRemoved = m_userScripts->removeAllOfTypeMatching<API::UserScript>([&](const auto& userScript) { 193 193 return &userScript->userContentWorld() == &world; 194 194 }); … … 245 245 process->connection()->send(Messages::WebUserContentController::RemoveAllUserStyleSheets({ world.identifier() }), m_identifier); 246 246 247 unsigned userStyleSheetsRemoved = m_userStyleSheets->removeAllOfTypeMatching<API::UserStyleSheet>([&] (const RefPtr<API::UserStyleSheet>& userStyleSheet) -> bool{247 unsigned userStyleSheetsRemoved = m_userStyleSheets->removeAllOfTypeMatching<API::UserStyleSheet>([&](const auto& userStyleSheet) { 248 248 return &userStyleSheet->userContentWorld() == &world; 249 249 }); … … 311 311 312 312 unsigned numberRemoved = 0; 313 m_scriptMessageHandlers.removeIf([&]( HashMap<uint64_t, RefPtr<WebScriptMessageHandler>>::KeyValuePairType& entry) {313 m_scriptMessageHandlers.removeIf([&](auto& entry) { 314 314 if (&entry.value->userContentWorld() == &world) { 315 315 ++numberRemoved; -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r200602 r201333 351 351 { 352 352 if (m_animations.remove(key)) { 353 m_properties.addedAnimations.removeFirstMatching([&key] (const std::pair<String, PlatformCAAnimationRemote::Properties>& pair) {353 m_properties.addedAnimations.removeFirstMatching([&key](auto& pair) { 354 354 return pair.first == key; 355 355 }); -
trunk/Tools/ChangeLog
r201288 r201333 1 2016-05-24 Chris Dumez <cdumez@apple.com> 2 3 Use auto for some of our lambda function parameters 4 https://bugs.webkit.org/show_bug.cgi?id=158001 5 6 Reviewed by Darin Adler. 7 8 Use auto for some of our lambda function parameters now that we build with c++14. 9 10 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: 11 (WTR::InjectedBundle::willDestroyPage): 12 1 13 2016-05-23 Brady Eidson <beidson@apple.com> 2 14 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
r201288 r201333 2434 2434 and line.count('(') == line.count(')') 2435 2435 and not search(r'(\s*(if|for|while|switch|NS_ENUM|@synchronized)|} @catch)\b', line) 2436 and line.find("](") < 0 2436 2437 and not match(r'\s+[A-Z_][A-Z_0-9]+\b', line)): 2437 2438 error(line_number, 'whitespace/braces', 4, -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r201288 r201333 1767 1767 'int foo() override\n' 1768 1768 '{\n' 1769 '}\n', 1770 '') 1771 self.assert_multi_line_lint( 1772 '[]() {\n' 1769 1773 '}\n', 1770 1774 '') -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
r200945 r201333 110 110 void InjectedBundle::willDestroyPage(WKBundlePageRef page) 111 111 { 112 m_pages.removeFirstMatching([page] (const std::unique_ptr<InjectedBundlePage>& current) {112 m_pages.removeFirstMatching([page](auto& current) { 113 113 return current->page() == page; 114 114 });
Note:
See TracChangeset
for help on using the changeset viewer.