<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163882] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163882">163882</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-02-11 09:36:07 -0800 (Tue, 11 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Correct some uses of 'auto'
https://bugs.webkit.org/show_bug.cgi?id=128578
Reviewed by Anders Carlsson.
Correct the following instances of "for (auto ...)" to use reference or
const references to avoid copies.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::elementsFromAttribute):
* css/CSSGridTemplateValue.cpp:
(WebCore::stringForPosition):
* dom/Node.cpp:
(WebCore::NodeListsNodeData::invalidateCaches):
* inspector/PageInjectedScriptManager.cpp:
(WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
* page/WheelEventDeltaTracker.cpp:
(WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
* platform/graphics/mac/WebLayer.mm:
(WebCore::drawLayerContents):
* platform/ios/TileGrid.mm:
(WebCore::TileGrid::dropTilesBetweenRects):
(WebCore::TileGrid::dropDistantTiles):
(WebCore::TileGrid::dropInvalidTiles):
* rendering/InlineTextBox.cpp:
(WebCore::translateIntersectionPointsToSkipInkBoundaries):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::restoreTo):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGridTemplateValuecpp">trunk/Source/WebCore/css/CSSGridTemplateValue.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageInjectedScriptManagercpp">trunk/Source/WebCore/inspector/PageInjectedScriptManager.cpp</a></li>
<li><a href="#trunkSourceWebCorepageWheelEventDeltaTrackercpp">trunk/Source/WebCore/page/WheelEventDeltaTracker.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacWebLayermm">trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformiosTileGridmm">trunk/Source/WebCore/platform/ios/TileGrid.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingscpp">trunk/Source/WebCore/testing/InternalSettings.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/ChangeLog        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-02-11 Brent Fulgham <bfulgham@apple.com>
+
+ Correct some uses of 'auto'
+ https://bugs.webkit.org/show_bug.cgi?id=128578
+
+ Reviewed by Anders Carlsson.
+
+ Correct the following instances of "for (auto ...)" to use reference or
+ const references to avoid copies.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::elementsFromAttribute):
+ * css/CSSGridTemplateValue.cpp:
+ (WebCore::stringForPosition):
+ * dom/Node.cpp:
+ (WebCore::NodeListsNodeData::invalidateCaches):
+ * inspector/PageInjectedScriptManager.cpp:
+ (WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
+ * page/WheelEventDeltaTracker.cpp:
+ (WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
+ * platform/graphics/mac/WebLayer.mm:
+ (WebCore::drawLayerContents):
+ * platform/ios/TileGrid.mm:
+ (WebCore::TileGrid::dropTilesBetweenRects):
+ (WebCore::TileGrid::dropDistantTiles):
+ (WebCore::TileGrid::dropInvalidTiles):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::translateIntersectionPointsToSkipInkBoundaries):
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::Backup::restoreTo):
+
</ins><span class="cx"> 2014-02-10 David Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> [New Multicolumn] Make columns work with line grids
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -2265,7 +2265,7 @@
</span><span class="cx"> Vector<String> idVector;
</span><span class="cx"> idList.split(' ', idVector);
</span><span class="cx">
</span><del>- for (auto idName : idVector) {
</del><ins>+ for (const auto& idName : idVector) {
</ins><span class="cx"> if (Element* idElement = treeScope.getElementById(idName))
</span><span class="cx"> elements.append(idElement);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGridTemplateValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGridTemplateValue.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGridTemplateValue.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/css/CSSGridTemplateValue.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -51,16 +51,16 @@
</span><span class="cx"> {
</span><span class="cx"> Vector<String> candidates;
</span><span class="cx">
</span><del>- for (auto it = gridAreaMap.begin(), end = gridAreaMap.end(); it != end; ++it) {
- const GridCoordinate& coordinate = it->value;
</del><ins>+ for (const auto& it : gridAreaMap) {
+ const GridCoordinate& coordinate = it.value;
</ins><span class="cx"> if (row >= coordinate.rows.initialPositionIndex && row <= coordinate.rows.finalPositionIndex)
</span><del>- candidates.append(it->key);
</del><ins>+ candidates.append(it.key);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- for (auto it = gridAreaMap.begin(), end = gridAreaMap.end(); it != end; ++it) {
- const GridCoordinate& coordinate = it->value;
- if (column >= coordinate.columns.initialPositionIndex && column <= coordinate.columns.finalPositionIndex && candidates.contains(it->key))
- return it->key;
</del><ins>+ for (const auto& it : gridAreaMap) {
+ const GridCoordinate& coordinate = it.value;
+ if (column >= coordinate.columns.initialPositionIndex && column <= coordinate.columns.finalPositionIndex && candidates.contains(it.key))
+ return it.key;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return ".";
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/dom/Node.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -1694,20 +1694,20 @@
</span><span class="cx">
</span><span class="cx"> void NodeListsNodeData::invalidateCaches(const QualifiedName* attrName)
</span><span class="cx"> {
</span><del>- for (auto it = m_atomicNameCaches.begin(), end = m_atomicNameCaches.end(); it != end; ++it)
- it->value->invalidateCache(attrName);
</del><ins>+ for (auto& atomicName : m_atomicNameCaches)
+ atomicName.value->invalidateCache(attrName);
</ins><span class="cx">
</span><del>- for (auto it = m_nameCaches.begin(), end = m_nameCaches.end(); it != end; ++it)
- it->value->invalidateCache(attrName);
</del><ins>+ for (auto& name : m_nameCaches)
+ name.value->invalidateCache(attrName);
</ins><span class="cx">
</span><del>- for (auto it = m_cachedCollections.begin(), end = m_cachedCollections.end(); it != end; ++it)
- it->value->invalidateCache(attrName);
</del><ins>+ for (auto& collection : m_cachedCollections)
+ collection.value->invalidateCache(attrName);
</ins><span class="cx">
</span><span class="cx"> if (attrName)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- for (auto it = m_tagNodeListCacheNS.begin(), end = m_tagNodeListCacheNS.end(); it != end; ++it)
- it->value->invalidateCache();
</del><ins>+ for (auto& tagNodeList : m_tagNodeListCacheNS)
+ tagNodeList.value->invalidateCache();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Node::getSubresourceURLs(ListHashSet<URL>& urls) const
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageInjectedScriptManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageInjectedScriptManager.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageInjectedScriptManager.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/inspector/PageInjectedScriptManager.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -60,12 +60,12 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Vector<long> idsToRemove;
</span><del>- for (auto it = m_idToInjectedScript.begin(), end = m_idToInjectedScript.end(); it != end; ++it) {
- JSC::ExecState* scriptState = it->value.scriptState();
</del><ins>+ for (const auto& it : m_idToInjectedScript) {
+ JSC::ExecState* scriptState = it.value.scriptState();
</ins><span class="cx"> if (window != domWindowFromExecState(scriptState))
</span><span class="cx"> continue;
</span><span class="cx"> m_scriptStateToId.remove(scriptState);
</span><del>- idsToRemove.append(it->key);
</del><ins>+ idsToRemove.append(it.key);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (size_t i = 0; i < idsToRemove.size(); i++)
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx">
</span><span class="cx"> // Now remove script states that have id but no injected script.
</span><span class="cx"> Vector<JSC::ExecState*> scriptStatesToRemove;
</span><del>- for (auto it = m_scriptStateToId.begin(), end = m_scriptStateToId.end(); it != end; ++it) {
- JSC::ExecState* scriptState = it->key;
</del><ins>+ for (const auto& it : m_scriptStateToId) {
+ JSC::ExecState* scriptState = it.key;
</ins><span class="cx"> if (window == domWindowFromExecState(scriptState))
</span><span class="cx"> scriptStatesToRemove.append(scriptState);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageWheelEventDeltaTrackercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/WheelEventDeltaTracker.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/WheelEventDeltaTracker.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/page/WheelEventDeltaTracker.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -68,9 +68,8 @@
</span><span class="cx"> bool allVertical = m_recentWheelEventDeltas.size();
</span><span class="cx"> bool allHorizontal = m_recentWheelEventDeltas.size();
</span><span class="cx">
</span><del>- auto end = m_recentWheelEventDeltas.end();
- for (auto it = m_recentWheelEventDeltas.begin(); it != end; ++it) {
- bool isVertical = deltaIsPredominantlyVertical(*it);
</del><ins>+ for (const auto& delta : m_recentWheelEventDeltas) {
+ bool isVertical = deltaIsPredominantlyVertical(delta);
</ins><span class="cx"> allVertical &= isVertical;
</span><span class="cx"> allHorizontal &= !isVertical;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> document->getTouchRects(touchRects);
</span><span class="cx">
</span><span class="cx"> Region touchRegion;
</span><del>- for (auto rect : touchRects)
</del><ins>+ for (const auto& rect : touchRects)
</ins><span class="cx"> touchRegion.unite(rect);
</span><span class="cx">
</span><span class="cx"> return touchRegion;
</span><span class="lines">@@ -132,10 +132,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (auto it = frameView->children().begin(), end = frameView->children().end(); it != end; ++it) {
- if (!(*it)->isPluginViewBase())
</del><ins>+ for (const auto& child : frameView->children()) {
+ if (!child->isPluginViewBase())
</ins><span class="cx"> continue;
</span><del>- PluginViewBase* pluginViewBase = toPluginViewBase((*it).get());
</del><ins>+ PluginViewBase* pluginViewBase = toPluginViewBase(child.get());
</ins><span class="cx"> if (pluginViewBase->wantsWheelEvents())
</span><span class="cx"> nonFastScrollableRegion.unite(pluginViewBase->frameRect());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacWebLayermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> ThemeMac::setFocusRingClipRect(focusRingClipRect);
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx">
</span><del>- for (auto rect : dirtyRects) {
</del><ins>+ for (const auto& rect : dirtyRects) {
</ins><span class="cx"> GraphicsContextStateSaver stateSaver(graphicsContext);
</span><span class="cx"> graphicsContext.clip(rect);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosTileGridmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/TileGrid.mm (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/TileGrid.mm        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/platform/ios/TileGrid.mm        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> void TileGrid::dropTilesBetweenRects(const IntRect& dropRect, const IntRect& keepRect)
</span><span class="cx"> {
</span><span class="cx"> Vector<TileIndex> toRemove;
</span><del>- for (auto tile : m_tiles) {
</del><ins>+ for (const auto& tile : m_tiles) {
</ins><span class="cx"> TileIndex& index = tile.key;
</span><span class="cx"> IntRect tileRect = tile.value->rect();
</span><span class="cx"> if (tileRect.intersects(dropRect) && !tileRect.intersects(keepRect))
</span><span class="lines">@@ -124,9 +124,9 @@
</span><span class="cx">
</span><span class="cx"> IntRect visibleRect = this->visibleRect();
</span><span class="cx"> Vector<std::pair<double, TileIndex>> toRemove;
</span><del>- for (auto tile : m_tiles) {
</del><ins>+ for (const auto& tile : m_tiles) {
</ins><span class="cx"> TileIndex& index = tile.key;
</span><del>- IntRect tileRect = tile.value->rect();
</del><ins>+ const IntRect& tileRect = tile.value->rect();
</ins><span class="cx"> double distance = tileDistance2(visibleRect, tileRect);
</span><span class="cx"> if (distance <= shortestDistance)
</span><span class="cx"> continue;
</span><span class="lines">@@ -316,9 +316,9 @@
</span><span class="cx"> IntRect bounds = this->bounds();
</span><span class="cx"> IntRect dropBounds = intersection(m_validBounds, bounds);
</span><span class="cx"> Vector<TileIndex> toRemove;
</span><del>- for (auto tile : m_tiles) {
</del><ins>+ for (const auto& tile : m_tiles) {
</ins><span class="cx"> TileIndex& index = tile.key;
</span><del>- IntRect tileRect = tile.value->rect();
</del><ins>+ const IntRect& tileRect = tile.value->rect();
</ins><span class="cx"> IntRect expectedTileRect = tileRectForIndex(index);
</span><span class="cx"> if (expectedTileRect != tileRect || !dropBounds.contains(tileRect))
</span><span class="cx"> toRemove.append(index);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -103,12 +103,12 @@
</span><span class="cx"> // Step 3: Output the space between the ranges, but only if the space warrants an underline.
</span><span class="cx"> float previous = 0;
</span><span class="cx"> DashArray result;
</span><del>- for (auto i = intermediateTuples.begin(); i != intermediateTuples.end(); i++) {
- if (i->first - previous > dilationAmount) {
</del><ins>+ for (const auto& tuple : intermediateTuples) {
+ if (tuple.first - previous > dilationAmount) {
</ins><span class="cx"> result.append(previous);
</span><del>- result.append(i->first);
</del><ins>+ result.append(tuple.first);
</ins><span class="cx"> }
</span><del>- previous = i->second;
</del><ins>+ previous = tuple.second;
</ins><span class="cx"> }
</span><span class="cx"> if (totalWidth - previous > dilationAmount) {
</span><span class="cx"> result.append(previous);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (163881 => 163882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.cpp        2014-02-11 17:34:39 UTC (rev 163881)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp        2014-02-11 17:36:07 UTC (rev 163882)
</span><span class="lines">@@ -107,32 +107,32 @@
</span><span class="cx"> #endif
</span><span class="cx"> settings.setEditingBehaviorType(m_originalEditingBehavior);
</span><span class="cx">
</span><del>- for (auto iter = m_standardFontFamilies.begin(); iter != m_standardFontFamilies.end(); ++iter)
- settings.setStandardFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& standardFont : m_standardFontFamilies)
+ settings.setStandardFontFamily(standardFont.value, static_cast<UScriptCode>(standardFont.key));
</ins><span class="cx"> m_standardFontFamilies.clear();
</span><span class="cx">
</span><del>- for (auto iter = m_fixedFontFamilies.begin(); iter != m_fixedFontFamilies.end(); ++iter)
- settings.setFixedFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& fixedFont : m_fixedFontFamilies)
+ settings.setFixedFontFamily(fixedFont.value, static_cast<UScriptCode>(fixedFont.key));
</ins><span class="cx"> m_fixedFontFamilies.clear();
</span><span class="cx">
</span><del>- for (auto iter = m_serifFontFamilies.begin(); iter != m_serifFontFamilies.end(); ++iter)
- settings.setSerifFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& serifFont : m_serifFontFamilies)
+ settings.setSerifFontFamily(serifFont.value, static_cast<UScriptCode>(serifFont.key));
</ins><span class="cx"> m_serifFontFamilies.clear();
</span><span class="cx">
</span><del>- for (auto iter = m_sansSerifFontFamilies.begin(); iter != m_sansSerifFontFamilies.end(); ++iter)
- settings.setSansSerifFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& sansSerifFont : m_sansSerifFontFamilies)
+ settings.setSansSerifFontFamily(sansSerifFont.value, static_cast<UScriptCode>(sansSerifFont.key));
</ins><span class="cx"> m_sansSerifFontFamilies.clear();
</span><span class="cx">
</span><del>- for (auto iter = m_cursiveFontFamilies.begin(); iter != m_cursiveFontFamilies.end(); ++iter)
- settings.setCursiveFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& cursiveFont : m_cursiveFontFamilies)
+ settings.setCursiveFontFamily(cursiveFont.value, static_cast<UScriptCode>(cursiveFont.key));
</ins><span class="cx"> m_cursiveFontFamilies.clear();
</span><span class="cx">
</span><del>- for (auto iter = m_fantasyFontFamilies.begin(); iter != m_fantasyFontFamilies.end(); ++iter)
- settings.setFantasyFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& fantasyFont : m_fantasyFontFamilies)
+ settings.setFantasyFontFamily(fantasyFont.value, static_cast<UScriptCode>(fantasyFont.key));
</ins><span class="cx"> m_fantasyFontFamilies.clear();
</span><span class="cx">
</span><del>- for (auto iter = m_pictographFontFamilies.begin(); iter != m_pictographFontFamilies.end(); ++iter)
- settings.setPictographFontFamily(iter->value, static_cast<UScriptCode>(iter->key));
</del><ins>+ for (const auto& pictographFont : m_pictographFontFamilies)
+ settings.setPictographFontFamily(pictographFont.value, static_cast<UScriptCode>(pictographFont.key));
</ins><span class="cx"> m_pictographFontFamilies.clear();
</span><span class="cx">
</span><span class="cx"> #if ENABLE(TEXT_AUTOSIZING)
</span></span></pre>
</div>
</div>
</body>
</html>