Diff
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1,3 +1,13 @@
+2015-10-13 Chris Dumez <cdu...@apple.com>
+
+ Avoid useless copies in range-loops that are using 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=150091
+
+ Reviewed by Sam Weinig.
+
+ Avoid useless copies in range-loops that are using 'auto'. Also use
+ 'auto*' instead of 'auto' when range values are pointers for clarity.
+
2015-10-12 Simon Fraser <simon.fra...@apple.com>
Clip-path transitions sometimes trigger endless animation timers
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/accessibility/AccessibilityTable.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/accessibility/AccessibilityTable.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/accessibility/AccessibilityTable.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -474,7 +474,7 @@
addTableCellChild(obj, appendedRows, maxColumnCount);
continue;
}
- for (auto child = obj->firstChild(); child; child = child->nextSibling())
+ for (auto* child = obj->firstChild(); child; child = child->nextSibling())
queue.append(child);
}
} else
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/accessibility/AccessibilityTree.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/accessibility/AccessibilityTree.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/accessibility/AccessibilityTree.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -77,7 +77,7 @@
return false;
Deque<Node*> queue;
- for (auto child = node->firstChild(); child; child = child->nextSibling())
+ for (auto* child = node->firstChild(); child; child = child->nextSibling())
queue.append(child);
while (!queue.isEmpty()) {
@@ -90,7 +90,7 @@
if (!nodeHasRole(child, "group"))
return false;
- for (auto groupChild = child->firstChild(); groupChild; groupChild = groupChild->nextSibling())
+ for (auto* groupChild = child->firstChild(); groupChild; groupChild = groupChild->nextSibling())
queue.append(groupChild);
}
return true;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/css/CSSParser.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/css/CSSParser.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/css/CSSParser.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -9872,7 +9872,7 @@
{
// The filter is a list of functional primitives that specify individual operations.
RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- for (auto value = valueList.current(); value; value = valueList.next()) {
+ for (auto* value = valueList.current(); value; value = valueList.next()) {
if (value->unit != CSSPrimitiveValue::CSS_URI && (value->unit != CSSParserValue::Function || !value->function))
return false;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Document.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Document.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Document.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -2302,7 +2302,7 @@
if (!m_clientToIDMap.isEmpty() && page()) {
Vector<WebCore::MediaPlaybackTargetClient*> clients;
copyKeysToVector(m_clientToIDMap, clients);
- for (auto client : clients)
+ for (auto* client : clients)
removePlaybackTargetPickerClient(*client);
}
#endif
@@ -3529,7 +3529,7 @@
void Document::updateIsPlayingMedia(uint64_t sourceElementID)
{
MediaProducer::MediaStateFlags state = MediaProducer::IsNotPlaying;
- for (auto audioProducer : m_audioProducers)
+ for (auto* audioProducer : m_audioProducers)
state |= audioProducer->mediaState();
#if ENABLE(MEDIA_SESSION)
@@ -3560,7 +3560,7 @@
void Document::pageMutedStateDidChange()
{
- for (auto audioProducer : m_audioProducers)
+ for (auto* audioProducer : m_audioProducers)
audioProducer->pageMutedStateDidChange();
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Position.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Position.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/Position.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -710,7 +710,7 @@
unsigned textOffset = currentPos.offsetInLeafNode();
auto lastTextBox = textRenderer.lastTextBox();
- for (auto box = textRenderer.firstTextBox(); box; box = box->nextTextBox()) {
+ for (auto* box = textRenderer.firstTextBox(); box; box = box->nextTextBox()) {
if (textOffset <= box->start() + box->len()) {
if (textOffset > box->start())
return currentPos;
@@ -838,7 +838,7 @@
unsigned textOffset = currentPos.offsetInLeafNode();
auto lastTextBox = textRenderer.lastTextBox();
- for (auto box = textRenderer.firstTextBox(); box; box = box->nextTextBox()) {
+ for (auto* box = textRenderer.firstTextBox(); box; box = box->nextTextBox()) {
if (textOffset <= box->end()) {
if (textOffset >= box->start())
return currentPos;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -273,7 +273,7 @@
ASSERT(!url.hasFragmentIdentifier());
// Check if an appropriate cache already exists in memory.
- for (auto group : m_cachesInMemory.values()) {
+ for (auto* group : m_cachesInMemory.values()) {
ASSERT(!group->isObsolete());
if (ApplicationCache* cache = group->newestCache()) {
@@ -1287,7 +1287,7 @@
// Clear the storage IDs for the caches in memory.
// The caches will still work, but cached resources will not be saved to disk
// until a cache update process has been initiated.
- for (auto group : m_cachesInMemory.values())
+ for (auto* group : m_cachesInMemory.values())
group->clearStorageID();
checkForDeletedResources();
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/page/DragController.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/page/DragController.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/page/DragController.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -650,7 +650,7 @@
state.type = DragSourceActionNone;
#endif
- for (auto renderer = startElement->renderer(); renderer; renderer = renderer->parent()) {
+ for (auto* renderer = startElement->renderer(); renderer; renderer = renderer->parent()) {
Element* element = renderer->nonPseudoElement();
if (!element) {
// Anonymous render blocks don't correspond to actual DOM elements, so we skip over them
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/page/animation/CompositeAnimation.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/page/animation/CompositeAnimation.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/page/animation/CompositeAnimation.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -293,7 +293,7 @@
}
// Now remove the animations from the list.
- for (auto nameForRemoval : animsToBeRemoved)
+ for (auto* nameForRemoval : animsToBeRemoved)
m_keyframeAnimations.remove(nameForRemoval);
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -334,7 +334,7 @@
if (m_interrupted)
return;
- for (auto session : m_sessions)
+ for (auto* session : m_sessions)
session->beginInterruption(PlatformMediaSession::SystemSleep);
}
@@ -343,7 +343,7 @@
if (m_interrupted)
return;
- for (auto session : m_sessions)
+ for (auto* session : m_sessions)
session->endInterruption(PlatformMediaSession::MayResumePlaying);
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/FontCache.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/FontCache.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/FontCache.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -441,7 +441,7 @@
if (entry.value && !cachedFonts().contains(*entry.value))
keysToRemove.append(entry.key);
}
- for (auto key : keysToRemove)
+ for (auto& key : keysToRemove)
fontPlatformDataCache().remove(key);
#if ENABLE(OPENTYPE_VERTICAL)
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/PathUtilities.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/PathUtilities.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/PathUtilities.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -159,7 +159,7 @@
// point with the greatest internal angle.
FloatPointGraph::Node* nextNode = nullptr;
float nextNodeAngle = 0;
- for (auto potentialNextNode : currentNode->nextPoints()) {
+ for (auto* potentialNextNode : currentNode->nextPoints()) {
if (potentialNextNode == currentNode)
continue;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm 2015-10-14 06:16:36 UTC (rev 191035)
@@ -145,7 +145,7 @@
}
}
m_previewLayer = nullptr;
- for (auto track : m_MediaStreamPrivate->tracks()) {
+ for (auto& track : m_MediaStreamPrivate->tracks()) {
if (track->type() == RealtimeMediaSource::Type::Video)
m_previewLayer = static_cast<AVVideoCaptureSource*>(track->source())->previewLayer();
}
@@ -189,7 +189,7 @@
{
m_playing = true;
- for (auto track : m_MediaStreamPrivate->tracks())
+ for (auto& track : m_MediaStreamPrivate->tracks())
track->source()->startProducingData();
}
@@ -207,7 +207,7 @@
{
m_playing = false;
- for (auto track : m_MediaStreamPrivate->tracks())
+ for (auto& track : m_MediaStreamPrivate->tracks())
track->source()->stopProducingData();
}
@@ -228,7 +228,7 @@
void MediaPlayerPrivateMediaStreamAVFObjC::setMuted(bool muted)
{
- for (auto track : m_MediaStreamPrivate->tracks()) {
+ for (auto& track : m_MediaStreamPrivate->tracks()) {
if (track->type() == RealtimeMediaSource::Type::Audio)
track->source()->setMuted(muted);
}
@@ -237,7 +237,7 @@
FloatSize MediaPlayerPrivateMediaStreamAVFObjC::naturalSize() const
{
FloatSize floatSize(0, 0);
- for (auto track : m_MediaStreamPrivate->tracks()) {
+ for (auto& track : m_MediaStreamPrivate->tracks()) {
if (track->type() == RealtimeMediaSource::Type::Video) {
AVVideoCaptureSource* source = (AVVideoCaptureSource*)track->source();
if (!source->stopped() && track->enabled()) {
@@ -253,7 +253,7 @@
bool MediaPlayerPrivateMediaStreamAVFObjC::hasVideo() const
{
- for (auto track : m_MediaStreamPrivate->tracks()) {
+ for (auto& track : m_MediaStreamPrivate->tracks()) {
if (track->type() == RealtimeMediaSource::Type::Video)
return true;
}
@@ -262,7 +262,7 @@
bool MediaPlayerPrivateMediaStreamAVFObjC::hasAudio() const
{
- for (auto track : m_MediaStreamPrivate->tracks()) {
+ for (auto& track : m_MediaStreamPrivate->tracks()) {
if (track->type() == RealtimeMediaSource::Type::Audio)
return true;
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1790,7 +1790,7 @@
primaryLayer()->setSublayerTransform(m_childrenTransform);
if (LayerMap* layerCloneMap = primaryLayerClones()) {
- for (auto & layer : layerCloneMap->values())
+ for (auto& layer : layerCloneMap->values())
layer->setSublayerTransform(m_childrenTransform);
}
}
@@ -1800,7 +1800,7 @@
m_layer->setMasksToBounds(m_masksToBounds);
if (LayerMap* layerCloneMap = m_layerClones.get()) {
- for (auto & layer : layerCloneMap->values())
+ for (auto& layer : layerCloneMap->values())
layer->setMasksToBounds(m_masksToBounds);
}
}
@@ -1815,7 +1815,7 @@
m_layer->setContents(nullptr);
if (LayerMap* layerCloneMap = m_layerClones.get()) {
- for (auto & layer : layerCloneMap->values())
+ for (auto& layer : layerCloneMap->values())
layer->setContents(nullptr);
}
}
@@ -1833,7 +1833,7 @@
m_layer->setOpaque(contentsOpaque);
if (LayerMap* layerCloneMap = m_layerClones.get()) {
- for (auto & layer : layerCloneMap->values())
+ for (auto& layer : layerCloneMap->values())
layer->setOpaque(contentsOpaque);
}
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm 2015-10-14 06:16:36 UTC (rev 191035)
@@ -88,7 +88,7 @@
m_videoElement->setVideoFullscreenLayer(nullptr);
if (m_videoElement && m_isListening) {
- for (auto eventName : observedEventNames())
+ for (auto& eventName : observedEventNames())
m_videoElement->removeEventListener(eventName, this, false);
}
m_isListening = false;
@@ -98,7 +98,7 @@
if (!m_videoElement)
return;
- for (auto eventName : observedEventNames())
+ for (auto& eventName : observedEventNames())
m_videoElement->addEventListener(eventName, this, false);
m_isListening = true;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -110,7 +110,7 @@
m_stopped = true;
- for (auto observer : m_observers) {
+ for (auto* observer : m_observers) {
if (observer != callingObserver)
observer->sourceStopped();
}
@@ -123,7 +123,7 @@
if (stopped())
return;
- for (auto observer : m_observers) {
+ for (auto* observer : m_observers) {
if (observer->preventSourceFromStopping())
return;
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/InlineFlowBox.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/InlineFlowBox.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/InlineFlowBox.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1156,7 +1156,7 @@
containingBlockPaintsContinuationOutline = false;
else {
containingBlock = enclosingAnonymousBlock->containingBlock();
- for (auto box = &renderer(); box != containingBlock; box = &box->parent()->enclosingBoxModelObject()) {
+ for (auto* box = &renderer(); box != containingBlock; box = &box->parent()->enclosingBoxModelObject()) {
if (box->hasSelfPaintingLayer()) {
containingBlockPaintsContinuationOutline = false;
break;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlock.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlock.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlock.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1039,7 +1039,7 @@
void RenderBlock::addOverflowFromBlockChildren()
{
- for (auto child = firstChildBox(); child; child = child->nextSiblingBox()) {
+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
if (!child->isFloatingOrOutOfFlowPositioned())
addOverflowFromChild(child);
}
@@ -1192,7 +1192,7 @@
box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap);
}
} else {
- for (auto box = firstChildBox(); box; box = box->nextSiblingBox()) {
+ for (auto* box = firstChildBox(); box; box = box->nextSiblingBox()) {
if (!box->isOutOfFlowPositioned())
box->layoutIfNeeded();
}
@@ -1450,7 +1450,7 @@
void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)
{
- for (auto child = firstChildBox(); child; child = child->nextSiblingBox()) {
+ for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect))
return;
}
@@ -2505,7 +2505,7 @@
HitTestAction childHitTest = hitTestAction;
if (hitTestAction == HitTestChildBlockBackgrounds)
childHitTest = HitTestChildBlockBackground;
- for (auto child = lastChildBox(); child; child = child->previousSiblingBox()) {
+ for (auto* child = lastChildBox(); child; child = child->previousSiblingBox()) {
LayoutPoint childPoint = flipForWritingModeForChild(child, accumulatedOffset);
if (!child->hasSelfPaintingLayer() && !child->isFloating() && child->nodeAtPoint(request, result, locationInContainer, childPoint, childHitTest))
return true;
@@ -2627,7 +2627,7 @@
|| (!blocksAreFlipped && pointInLogicalContents.y() == logicalTopForChild(*lastCandidateBox)))
return positionForPointRespectingEditingBoundaries(*this, *lastCandidateBox, pointInContents);
- for (auto childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
+ for (auto* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
if (!isChildHitTestCandidate(*childBox, region, pointInLogicalContents))
continue;
LayoutUnit childLogicalBottom = logicalTopForChild(*childBox) + logicalHeightForChild(*childBox);
@@ -2913,7 +2913,7 @@
return Optional<int>();
bool haveNormalFlowChild = false;
- for (auto box = lastChildBox(); box; box = box->previousSiblingBox()) {
+ for (auto* box = lastChildBox(); box; box = box->previousSiblingBox()) {
if (box->isFloatingOrOutOfFlowPositioned())
continue;
haveNormalFlowChild = true;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlockFlow.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -161,7 +161,7 @@
// that will outlast this block. In the non-anonymous block case those
// children will be destroyed by the time we return from this function.
if (isAnonymousBlock()) {
- for (auto box = firstRootBox(); box; box = box->nextRootBox()) {
+ for (auto* box = firstRootBox(); box; box = box->nextRootBox()) {
while (auto childBox = box->firstChild())
childBox->removeFromParent();
}
@@ -2032,7 +2032,7 @@
void RenderBlockFlow::updateStylesForColumnChildren()
{
- for (auto child = firstChildBox(); child && (child->isInFlowRenderFlowThread() || child->isRenderMultiColumnSet()); child = child->nextSiblingBox())
+ for (auto* child = firstChildBox(); child && (child->isInFlowRenderFlowThread() || child->isRenderMultiColumnSet()); child = child->nextSiblingBox())
child->setStyle(RenderStyle::createAnonymousStyleWithDisplay(&style(), BLOCK));
}
@@ -2928,7 +2928,7 @@
if (childrenInline()) {
const_cast<RenderBlockFlow&>(*this).ensureLineBoxes();
- for (auto box = firstRootBox(); box; box = box->nextRootBox()) {
+ for (auto* box = firstRootBox(); box; box = box->nextRootBox()) {
if (box->firstChild())
left = std::min(left, x + LayoutUnit(box->firstChild()->x()));
if (box->lastChild())
@@ -3213,7 +3213,7 @@
return nullptr;
if (childrenInline()) {
- for (auto box = firstRootBox(); box; box = box->nextRootBox()) {
+ for (auto* box = firstRootBox(); box; box = box->nextRootBox()) {
if (!i--)
return box;
}
@@ -3242,8 +3242,8 @@
ASSERT(!stopRootInlineBox);
return simpleLineLayout->lineCount();
}
- for (auto box = firstRootBox(); box; box = box->nextRootBox()) {
- count++;
+ for (auto* box = firstRootBox(); box; box = box->nextRootBox()) {
+ ++count;
if (box == stopRootInlineBox) {
if (found)
*found = true;
@@ -3274,13 +3274,13 @@
return -1;
if (block.childrenInline()) {
- for (auto box = block.firstRootBox(); box; box = box->nextRootBox()) {
+ for (auto* box = block.firstRootBox(); box; box = box->nextRootBox()) {
if (++count == lineCount)
return box->lineBottom() + (includeBottom ? (block.borderBottom() + block.paddingBottom()) : LayoutUnit());
}
} else {
RenderBox* normalFlowChildWithoutLines = nullptr;
- for (auto obj = block.firstChildBox(); obj; obj = obj->nextSiblingBox()) {
+ for (auto* obj = block.firstChildBox(); obj; obj = obj->nextSiblingBox()) {
if (is<RenderBlockFlow>(*obj) && shouldCheckLines(downcast<RenderBlockFlow>(*obj))) {
int result = getHeightForLineCount(downcast<RenderBlockFlow>(*obj), lineCount, false, count);
if (result != -1)
@@ -3310,7 +3310,7 @@
ensureLineBoxes();
setHasMarkupTruncation(false);
- for (auto box = firstRootBox(); box; box = box->nextRootBox())
+ for (auto* box = firstRootBox(); box; box = box->nextRootBox())
box->clearTruncation();
return;
}
@@ -3323,8 +3323,8 @@
bool RenderBlockFlow::containsNonZeroBidiLevel() const
{
- for (auto root = firstRootBox(); root; root = root->nextRootBox()) {
- for (auto box = root->firstLeafChild(); box; box = box->nextLeafChild()) {
+ for (auto* root = firstRootBox(); root; root = root->nextRootBox()) {
+ for (auto* box = root->firstLeafChild(); box; box = box->nextLeafChild()) {
if (box->bidiLevel())
return true;
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBox.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBox.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBox.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -3291,7 +3291,7 @@
// FIXME: The static distance computation has not been patched for mixed writing modes yet.
if (child->parent()->style().direction() == LTR) {
LayoutUnit staticPosition = child->layer()->staticInlinePosition() - containerBlock->borderLogicalLeft();
- for (auto current = child->parent(); current && current != containerBlock; current = current->container()) {
+ for (auto* current = child->parent(); current && current != containerBlock; current = current->container()) {
if (is<RenderBox>(*current)) {
staticPosition += downcast<RenderBox>(*current).logicalLeft();
if (region && is<RenderBlock>(*current)) {
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderInline.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderInline.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderInline.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -96,7 +96,7 @@
// not have a parent that means they are either already disconnected or
// root lines that can just be destroyed without disconnecting.
if (firstLineBox()->parent()) {
- for (auto box = firstLineBox(); box; box = box->nextLineBox())
+ for (auto* box = firstLineBox(); box; box = box->nextLineBox())
box->removeFromParent();
}
} else if (parent())
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderLayer.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -909,7 +909,7 @@
void RenderLayer::updateAncestorChainHasBlendingDescendants()
{
- for (auto layer = this; layer; layer = layer->parent()) {
+ for (auto* layer = this; layer; layer = layer->parent()) {
if (!layer->hasNotIsolatedBlendingDescendantsStatusDirty() && layer->hasNotIsolatedBlendingDescendants())
break;
layer->m_hasNotIsolatedBlendingDescendants = true;
@@ -924,7 +924,7 @@
void RenderLayer::dirtyAncestorChainHasBlendingDescendants()
{
- for (auto layer = this; layer; layer = layer->parent()) {
+ for (auto* layer = this; layer; layer = layer->parent()) {
if (layer->hasNotIsolatedBlendingDescendantsStatusDirty())
break;
@@ -1280,13 +1280,13 @@
// Transformed or preserve-3d descendants can only be in the z-order lists, not
// in the normal flow list, so we only need to check those.
if (Vector<RenderLayer*>* positiveZOrderList = posZOrderList()) {
- for (auto layer : *positiveZOrderList)
+ for (auto* layer : *positiveZOrderList)
m_has3DTransformedDescendant |= layer->update3DTransformedDescendantStatus();
}
// Now check our negative z-index children.
if (Vector<RenderLayer*>* negativeZOrderList = negZOrderList()) {
- for (auto layer : *negativeZOrderList)
+ for (auto* layer : *negativeZOrderList)
m_has3DTransformedDescendant |= layer->update3DTransformedDescendantStatus();
}
@@ -3843,7 +3843,7 @@
request.key->setOverlapTestResult(true);
overlappedRequestClients.append(request.key);
}
- for (auto client : overlappedRequestClients)
+ for (auto* client : overlappedRequestClients)
overlapTestRequests.remove(client);
}
@@ -4200,7 +4200,7 @@
renderer().view().flowThreadController().collectFixedPositionedLayers(fixedLayers);
// Paint the layers
- for (auto fixedLayer : fixedLayers)
+ for (auto* fixedLayer : fixedLayers)
fixedLayer->paintLayer(context, paintingInfo, paintFlags);
}
@@ -4422,7 +4422,7 @@
LayerListMutationDetector mutationChecker(this);
#endif
- for (auto childLayer : *list) {
+ for (auto* childLayer : *list) {
if (childLayer->isFlowThreadCollectingGraphicsLayersUnderRegions())
continue;
childLayer->paintLayer(context, paintingInfo, paintFlags);
@@ -5966,7 +5966,7 @@
#endif
if (Vector<RenderLayer*>* negZOrderList = this->negZOrderList()) {
- for (auto curLayer : *negZOrderList) {
+ for (auto* curLayer : *negZOrderList) {
if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
LayoutRect childUnionBounds = curLayer->calculateLayerBounds(this, curLayer->offsetFromAncestor(this), descendantFlags);
unionBounds.unite(childUnionBounds);
@@ -5975,7 +5975,7 @@
}
if (Vector<RenderLayer*>* posZOrderList = this->posZOrderList()) {
- for (auto curLayer : *posZOrderList) {
+ for (auto* curLayer : *posZOrderList) {
// The RenderNamedFlowThread is ignored when we calculate the bounds of the RenderView.
if ((flags & IncludeCompositedDescendants || !curLayer->isComposited()) && !curLayer->isFlowThreadCollectingGraphicsLayersUnderRegions()) {
LayoutRect childUnionBounds = curLayer->calculateLayerBounds(this, curLayer->offsetFromAncestor(this), descendantFlags);
@@ -5985,7 +5985,7 @@
}
if (Vector<RenderLayer*>* normalFlowList = this->normalFlowList()) {
- for (auto curLayer : *normalFlowList) {
+ for (auto* curLayer : *normalFlowList) {
// RenderView will always return the size of the document, before reaching this point,
// so there's no way we could hit a RenderNamedFlowThread here.
ASSERT(!curLayer->isFlowThreadCollectingGraphicsLayersUnderRegions());
@@ -6340,24 +6340,24 @@
if (isStackingContainer()) {
if (Vector<RenderLayer*>* list = negZOrderList()) {
- for (auto childLayer : *list)
+ for (auto* childLayer : *list)
layersToUpdate.append(childLayer);
}
}
if (Vector<RenderLayer*>* list = normalFlowList()) {
- for (auto childLayer : *list)
+ for (auto* childLayer : *list)
layersToUpdate.append(childLayer);
}
if (isStackingContainer()) {
if (Vector<RenderLayer*>* list = posZOrderList()) {
- for (auto childLayer : *list)
+ for (auto* childLayer : *list)
layersToUpdate.append(childLayer);
}
}
- for (auto childLayer : layersToUpdate) {
+ for (auto* childLayer : layersToUpdate) {
childLayer->updateLayerListsIfNeeded();
if (recursive)
childLayer->updateDescendantsLayerListsIfNeeded(true);
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderObject.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderObject.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderObject.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1733,7 +1733,7 @@
// If we hit the anonymous renderers inside generated content we should
// actually hit the generated content so walk up to the PseudoElement.
if (!node && parent() && parent()->isBeforeOrAfterContent()) {
- for (auto renderer = parent(); renderer && !node; renderer = renderer->parent())
+ for (auto* renderer = parent(); renderer && !node; renderer = renderer->parent())
node = renderer->element();
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTextLineBoxes.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTextLineBoxes.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTextLineBoxes.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -64,7 +64,7 @@
if (box.prevTextBox())
box.prevTextBox()->setNextTextBox(nullptr);
box.setPreviousTextBox(nullptr);
- for (auto current = &box; current; current = current->nextTextBox())
+ for (auto* current = &box; current; current = current->nextTextBox())
current->setExtracted();
checkConsistency();
@@ -80,7 +80,7 @@
} else
m_first = &box;
InlineTextBox* last = nullptr;
- for (auto current = &box; current; current = current->nextTextBox()) {
+ for (auto* current = &box; current; current = current->nextTextBox()) {
current->setExtracted(false);
last = current;
}
@@ -112,7 +112,7 @@
renderer.parent()->dirtyLinesFromChangedChild(renderer);
return;
}
- for (auto box = m_first; box; box = box->nextTextBox())
+ for (auto* box = m_first; box; box = box->nextTextBox())
box->removeFromParent();
}
@@ -121,7 +121,7 @@
if (!m_first)
return;
InlineTextBox* next;
- for (auto current = m_first; current; current = next) {
+ for (auto* current = m_first; current; current = next) {
next = current->nextTextBox();
delete current;
}
@@ -153,7 +153,7 @@
// Return the width of the minimal left side and the maximal right side.
float logicalLeftSide = 0;
float logicalRightSide = 0;
- for (auto current = m_first; current; current = current->nextTextBox()) {
+ for (auto* current = m_first; current; current = current->nextTextBox()) {
if (current == m_first || current->logicalLeft() < logicalLeftSide)
logicalLeftSide = current->logicalLeft();
if (current == m_first || current->logicalRight() > logicalRightSide)
@@ -184,7 +184,7 @@
// Return the width of the minimal left side and the maximal right side.
auto logicalLeftSide = LayoutUnit::max();
auto logicalRightSide = LayoutUnit::min();
- for (auto current = m_first; current; current = current->nextTextBox()) {
+ for (auto* current = m_first; current; current = current->nextTextBox()) {
logicalLeftSide = std::min(logicalLeftSide, current->logicalLeftVisualOverflow());
logicalRightSide = std::max(logicalRightSide, current->logicalRightVisualOverflow());
}
@@ -201,7 +201,7 @@
bool RenderTextLineBoxes::hasRenderedText() const
{
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
if (box->len())
return true;
}
@@ -233,7 +233,7 @@
bool RenderTextLineBoxes::containsOffset(const RenderText& renderer, unsigned offset, OffsetType type) const
{
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
if (offset < box->start() && !renderer.containsReversedText())
return false;
unsigned boxEnd = box->start() + box->len();
@@ -252,7 +252,7 @@
unsigned RenderTextLineBoxes::countCharacterOffsetsUntil(unsigned offset) const
{
unsigned result = 0;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
if (offset < box->start())
return result;
if (offset <= box->start() + box->len()) {
@@ -402,7 +402,7 @@
bool blocksAreFlipped = renderer.style().isFlippedBlocksWritingMode();
InlineTextBox* lastBox = nullptr;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
if (box->isLineBreak() && !box->prevLeafChild() && box->nextLeafChild() && !box->nextLeafChild()->isLineBreak())
box = box->nextTextBox();
@@ -440,7 +440,7 @@
void RenderTextLineBoxes::setSelectionState(RenderText& renderer, RenderObject::SelectionState state)
{
if (state == RenderObject::SelectionInside || state == RenderObject::SelectionNone) {
- for (auto box = m_first; box; box = box->nextTextBox())
+ for (auto* box = m_first; box; box = box->nextTextBox())
box->root().setHasSelectedChildren(state == RenderObject::SelectionInside);
return;
}
@@ -456,7 +456,7 @@
} else if (state == RenderObject::SelectionEnd)
start = 0;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
if (box->isSelected(start, end))
box->root().setHasSelectedChildren(true);
}
@@ -487,7 +487,7 @@
LayoutRect RenderTextLineBoxes::selectionRectForRange(unsigned start, unsigned end)
{
LayoutRect rect;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
rect.unite(box->localSelectionRect(start, end));
rect.unite(ellipsisRectForBox(*box, start, end));
}
@@ -496,7 +496,7 @@
void RenderTextLineBoxes::collectSelectionRectsForRange(unsigned start, unsigned end, Vector<LayoutRect>& rects)
{
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
LayoutRect rect;
rect.unite(box->localSelectionRect(start, end));
rect.unite(ellipsisRectForBox(*box, start, end));
@@ -508,7 +508,7 @@
Vector<IntRect> RenderTextLineBoxes::absoluteRects(const LayoutPoint& accumulatedOffset) const
{
Vector<IntRect> rects;
- for (auto box = m_first; box; box = box->nextTextBox())
+ for (auto* box = m_first; box; box = box->nextTextBox())
rects.append(enclosingIntRect(FloatRect(accumulatedOffset + box->topLeft(), box->size())));
return rects;
}
@@ -536,7 +536,7 @@
Vector<IntRect> RenderTextLineBoxes::absoluteRectsForRange(const RenderText& renderer, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const
{
Vector<IntRect> rects;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
// Note: box->end() returns the index of the last character, not the index past it
if (start <= box->start() && box->end() < end) {
FloatRect boundaries = box->calculateBoundaries();
@@ -564,7 +564,7 @@
Vector<FloatQuad> RenderTextLineBoxes::absoluteQuads(const RenderText& renderer, bool* wasFixed, ClippingOption option) const
{
Vector<FloatQuad> quads;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
FloatRect boundaries = box->calculateBoundaries();
// Shorten the width of this text box if it ends in an ellipsis.
@@ -584,7 +584,7 @@
Vector<FloatQuad> RenderTextLineBoxes::absoluteQuadsForRange(const RenderText& renderer, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const
{
Vector<FloatQuad> quads;
- for (auto box = m_first; box; box = box->nextTextBox()) {
+ for (auto* box = m_first; box; box = box->nextTextBox()) {
// Note: box->end() returns the index of the last character, not the index past it
if (start <= box->start() && box->end() < end) {
FloatRect boundaries = box->calculateBoundaries();
@@ -610,7 +610,7 @@
void RenderTextLineBoxes::dirtyAll()
{
- for (auto box = m_first; box; box = box->nextTextBox())
+ for (auto* box = m_first; box; box = box->nextTextBox())
box->dirtyLineBoxes();
}
@@ -621,7 +621,7 @@
// Dirty all text boxes that include characters in between offset and offset+len.
bool dirtiedLines = false;
- for (auto current = m_first; current; current = current->nextTextBox()) {
+ for (auto* current = m_first; current; current = current->nextTextBox()) {
// FIXME: This shouldn't rely on the end of a dirty line box. See https://bugs.webkit.org/show_bug.cgi?id=97264
// Text run is entirely before the affected range.
if (current->end() < start)
@@ -675,7 +675,7 @@
firstRootBox->markDirty();
dirtiedLines = true;
}
- for (auto current = firstRootBox; current && current != lastRootBox; current = current->nextRootBox()) {
+ for (auto* current = firstRootBox; current && current != lastRootBox; current = current->nextRootBox()) {
if (current->lineBreakObj() == &renderer && current->lineBreakPos() > end)
current->setLineBreakPos(current->lineBreakPos() + lengthDelta);
}
@@ -693,7 +693,7 @@
#if !ASSERT_DISABLED
#ifdef CHECK_CONSISTENCY
const InlineTextBox* prev = nullptr;
- for (auto child = m_first; child; child = child->nextTextBox()) {
+ for (auto* child = m_first; child; child = child->nextTextBox()) {
ASSERT(child->renderer() == this);
ASSERT(child->prevTextBox() == prev);
prev = child;
@@ -714,7 +714,7 @@
#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
void RenderTextLineBoxes::invalidateParentChildLists()
{
- for (auto box = m_first; box; box = box->nextTextBox())
+ for (auto* box = m_first; box; box = box->nextTextBox())
box->invalidateParentChildList();
}
#endif
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderTreeAsText.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -549,7 +549,7 @@
writeSimpleLine(ts, text, run.rect(), run.text());
}
} else {
- for (auto box = text.firstTextBox(); box; box = box->nextTextBox()) {
+ for (auto* box = text.firstTextBox(); box; box = box->nextTextBox()) {
writeIndent(ts, indent + 1);
writeTextRun(ts, text, *box);
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -176,7 +176,7 @@
void SVGTextMetricsBuilder::walkTree(RenderElement& start, RenderSVGInlineText* stopAtLeaf, MeasureTextData* data)
{
- for (auto child = start.firstChild(); child; child = child->nextSibling()) {
+ for (auto* child = start.firstChild(); child; child = child->nextSibling()) {
if (is<RenderSVGInlineText>(*child)) {
RenderSVGInlineText& text = downcast<RenderSVGInlineText>(*child);
if (stopAtLeaf && stopAtLeaf != &text) {
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/SVGSVGElement.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/SVGSVGElement.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/SVGSVGElement.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -676,7 +676,7 @@
if (element && element->isDescendantOf(this))
return element;
if (treeScope().containsMultipleElementsWithId(id)) {
- for (auto element : *treeScope().getAllElementsById(id)) {
+ for (auto* element : *treeScope().getAllElementsById(id)) {
if (element->isDescendantOf(this))
return element;
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/ChangeLog 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1,3 +1,16 @@
+2015-10-13 Chris Dumez <cdu...@apple.com>
+
+ Avoid useless copies in range-loops that are using 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=150091
+
+ Reviewed by Sam Weinig.
+
+ Avoid useless copies in range-loops that are using 'auto'. Also use
+ 'auto*' instead of 'auto' when range values are pointers for clarity.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame getDictationResultRanges:andMetadatas:]):
+
2015-09-22 Tim Horton <timothy_hor...@apple.com>
Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebView/WebFrame.mm (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebView/WebFrame.mm 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit/mac/WebView/WebFrame.mm 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1736,7 +1736,7 @@
for (Node* node = root; node; node = NodeTraversal::next(*node)) {
auto markers = document->markers().markersFor(node);
- for (auto marker : markers) {
+ for (auto* marker : markers) {
if (marker->type() != DocumentMarker::DictationResult)
continue;
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1,3 +1,23 @@
+2015-10-13 Chris Dumez <cdu...@apple.com>
+
+ Avoid useless copies in range-loops that are using 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=150091
+
+ Reviewed by Sam Weinig.
+
+ Avoid useless copies in range-loops that are using 'auto'. Also use
+ 'auto*' instead of 'auto' when range values are pointers for clarity.
+
+ * UIProcess/VisitedLinkStore.cpp:
+ (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
+ (WebKit::VisitedLinkStore::resizeTable):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::fetchData):
+ (WebKit::WebsiteDataStore::removeData):
+ (WebKit::WebsiteDataStore::plugins):
+
2015-10-13 Sergio Villar Senin <svil...@igalia.com>
[GTK] Fix build for ENABLE_TOUCH_EVENTS=OFF
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebProcessProxy.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -464,10 +464,10 @@
if (!iconDatabase)
return;
- for (auto iter : m_pageURLRetainCountMap) {
- uint64_t count = iter.value;
+ for (auto& entry : m_pageURLRetainCountMap) {
+ uint64_t count = entry.value;
for (uint64_t i = 0; i < count; ++i)
- iconDatabase->releaseIconForPageURL(iter.key);
+ iconDatabase->releaseIconForPageURL(entry.key);
}
m_pageURLRetainCountMap.clear();
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -244,7 +244,7 @@
auto networkProcessAccessType = computeNetworkProcessAccessTypeForDataFetch(dataTypes, !isPersistent());
if (networkProcessAccessType != ProcessAccessType::None) {
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
switch (networkProcessAccessType) {
case ProcessAccessType::OnlyIfLaunched:
if (!processPool->networkProcess())
@@ -360,7 +360,7 @@
#if ENABLE(DATABASE_PROCESS)
if (dataTypes & WebsiteDataTypeIndexedDBDatabases && isPersistent()) {
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
processPool->ensureDatabaseProcess();
callbackAggregator->addPendingCallback();
@@ -512,7 +512,7 @@
auto networkProcessAccessType = computeNetworkProcessAccessTypeForDataRemoval(dataTypes, !isPersistent());
if (networkProcessAccessType != ProcessAccessType::None) {
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
switch (networkProcessAccessType) {
case ProcessAccessType::OnlyIfLaunched:
if (!processPool->networkProcess())
@@ -607,7 +607,7 @@
#if ENABLE(DATABASE_PROCESS)
if (dataTypes & WebsiteDataTypeIndexedDBDatabases && isPersistent()) {
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
processPool->ensureDatabaseProcess();
callbackAggregator->addPendingCallback();
@@ -727,7 +727,7 @@
auto networkProcessAccessType = computeNetworkProcessAccessTypeForDataRemoval(dataTypes, !isPersistent());
if (networkProcessAccessType != ProcessAccessType::None) {
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
switch (networkProcessAccessType) {
case ProcessAccessType::OnlyIfLaunched:
if (!processPool->networkProcess())
@@ -843,7 +843,7 @@
#if ENABLE(DATABASE_PROCESS)
if (dataTypes & WebsiteDataTypeIndexedDBDatabases && isPersistent()) {
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
processPool->ensureDatabaseProcess();
callbackAggregator->addPendingCallback();
@@ -1001,7 +1001,7 @@
{
Vector<PluginModuleInfo> plugins;
- for (auto processPool : processPools()) {
+ for (auto& processPool : processPools()) {
for (auto& plugin : processPool->pluginInfoStore().plugins())
plugins.append(plugin);
}
Modified: releases/WebKitGTK/webkit-2.10/Source/bmalloc/ChangeLog (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/bmalloc/ChangeLog 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/bmalloc/ChangeLog 2015-10-14 06:16:36 UTC (rev 191035)
@@ -1,3 +1,16 @@
+2015-10-13 Chris Dumez <cdu...@apple.com>
+
+ Avoid useless copies in range-loops that are using 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=150091
+
+ Reviewed by Sam Weinig.
+
+ Avoid useless copies in range-loops that are using 'auto'. Also use
+ 'auto*' instead of 'auto' when range values are pointers for clarity.
+
+ * bmalloc/Deallocator.cpp:
+ (bmalloc::Deallocator::processObjectLog):
+
2015-07-24 Geoffrey Garen <gga...@apple.com>
vmmap crash at _javascript_Core: 0x31cd12f6 (the _javascript_ malloc zone enumerator)
Modified: releases/WebKitGTK/webkit-2.10/Source/bmalloc/bmalloc/Deallocator.cpp (191034 => 191035)
--- releases/WebKitGTK/webkit-2.10/Source/bmalloc/bmalloc/Deallocator.cpp 2015-10-14 06:11:37 UTC (rev 191034)
+++ releases/WebKitGTK/webkit-2.10/Source/bmalloc/bmalloc/Deallocator.cpp 2015-10-14 06:16:36 UTC (rev 191035)
@@ -76,7 +76,7 @@
std::lock_guard<StaticMutex> lock(PerProcess<Heap>::mutex());
Heap* heap = PerProcess<Heap>::getFastCase();
- for (auto object : m_objectLog) {
+ for (auto* object : m_objectLog) {
if (isSmall(object)) {
SmallLine* line = SmallLine::get(object);
heap->derefSmallLine(lock, line);