<!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>[185167] 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/185167">185167</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-06-03 13:52:42 -0700 (Wed, 03 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use modern for-loops in WebCore/page.
https://bugs.webkit.org/show_bug.cgi?id=145455
Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-06-03
Reviewed by Darin Adler.
No new tests, no behavior changes.
* page/Chrome.cpp:
(WebCore::Chrome::notifyPopupOpeningObservers):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPSourceList::matches):
(WebCore::CSPDirectiveList::gatherReportURIs):
(WebCore::ContentSecurityPolicy::copyStateFrom):
(WebCore::isAllowedByAll):
(WebCore::isAllowedByAllWithState):
(WebCore::isAllowedByAllWithContext):
(WebCore::isAllowedByAllWithURL):
(WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
(WebCore::ContentSecurityPolicy::allowPluginType):
(WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
(WebCore::ContentSecurityPolicy::gatherReportURIs):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
(WebCore::DOMWindow::willDestroyCachedFrame):
(WebCore::DOMWindow::willDestroyDocumentInFrame):
(WebCore::DOMWindow::willDetachDocumentFromFrame):
(WebCore::DOMWindow::disconnectDOMWindowProperties):
(WebCore::DOMWindow::reconnectDOMWindowProperties):
(WebCore::DOMWindow::getMatchedCSSRules):
* page/DeviceController.cpp:
(WebCore::DeviceController::dispatchDeviceEvent):
(WebCore::DeviceController::fireDeviceEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::handleTouchEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setIsVisibleAndActiveInternal):
* page/Frame.cpp:
(WebCore::Frame::orientationChanged):
(WebCore::Frame::injectUserScriptsForWorld):
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):
(WebCore::FrameView::serviceScriptedAnimations):
(WebCore::FrameView::trackedRepaintRectsAsText):
(WebCore::FrameView::updateWidgetPositions):
(WebCore::FrameView::notifyWidgets):
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::stringToViewMode):
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
(WebCore::Page::refreshPlugins):
(WebCore::Page::lockAllOverlayScrollbarsToHidden):
(WebCore::Page::pluginViews):
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::setIsVisibleInternal):
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferencesChanged):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/Performance.cpp:
(WebCore::Performance::webkitGetEntriesByType):
(WebCore::Performance::webkitGetEntriesByName):
* page/PerformanceResourceTiming.cpp:
(WebCore::passesTimingAllowCheck):
* page/PerformanceUserTiming.cpp:
(WebCore::convertToEntrySequence):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::isAccessWhiteListed):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::matchesPatterns):
* page/WindowFeatures.cpp:
(WebCore::WindowFeatures::parseDialogFeatures):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::ShorthandPropertyWrapper::equals):
(WebCore::ShorthandPropertyWrapper::blend):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
(WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageChromecpp">trunk/Source/WebCore/page/Chrome.cpp</a></li>
<li><a href="#trunkSourceWebCorepageContentSecurityPolicycpp">trunk/Source/WebCore/page/ContentSecurityPolicy.cpp</a></li>
<li><a href="#trunkSourceWebCorepageContextMenuControllercpp">trunk/Source/WebCore/page/ContextMenuController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDeviceControllercpp">trunk/Source/WebCore/page/DeviceController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFocusControllercpp">trunk/Source/WebCore/page/FocusController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageGroupcpp">trunk/Source/WebCore/page/PageGroup.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageGroupLoadDeferrercpp">trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageSerializercpp">trunk/Source/WebCore/page/PageSerializer.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformancecpp">trunk/Source/WebCore/page/Performance.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceResourceTimingcpp">trunk/Source/WebCore/page/PerformanceResourceTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceUserTimingcpp">trunk/Source/WebCore/page/PerformanceUserTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSecurityPolicycpp">trunk/Source/WebCore/page/SecurityPolicy.cpp</a></li>
<li><a href="#trunkSourceWebCorepageUserContentURLPatterncpp">trunk/Source/WebCore/page/UserContentURLPattern.cpp</a></li>
<li><a href="#trunkSourceWebCorepageWindowFeaturescpp">trunk/Source/WebCore/page/WindowFeatures.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationControllercpp">trunk/Source/WebCore/page/animation/AnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/ChangeLog        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -1,3 +1,98 @@
</span><ins>+2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com>
+
+ Use modern for-loops in WebCore/page.
+ https://bugs.webkit.org/show_bug.cgi?id=145455
+
+ Reviewed by Darin Adler.
+
+ No new tests, no behavior changes.
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::notifyPopupOpeningObservers):
+ * page/ContentSecurityPolicy.cpp:
+ (WebCore::CSPSourceList::matches):
+ (WebCore::CSPDirectiveList::gatherReportURIs):
+ (WebCore::ContentSecurityPolicy::copyStateFrom):
+ (WebCore::isAllowedByAll):
+ (WebCore::isAllowedByAllWithState):
+ (WebCore::isAllowedByAllWithContext):
+ (WebCore::isAllowedByAllWithURL):
+ (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
+ (WebCore::ContentSecurityPolicy::allowPluginType):
+ (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
+ (WebCore::ContentSecurityPolicy::gatherReportURIs):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::populate):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
+ (WebCore::DOMWindow::willDestroyCachedFrame):
+ (WebCore::DOMWindow::willDestroyDocumentInFrame):
+ (WebCore::DOMWindow::willDetachDocumentFromFrame):
+ (WebCore::DOMWindow::disconnectDOMWindowProperties):
+ (WebCore::DOMWindow::reconnectDOMWindowProperties):
+ (WebCore::DOMWindow::getMatchedCSSRules):
+ * page/DeviceController.cpp:
+ (WebCore::DeviceController::dispatchDeviceEvent):
+ (WebCore::DeviceController::fireDeviceEvent):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::updateMouseEventTargetNode):
+ (WebCore::EventHandler::handleTouchEvent):
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setIsVisibleAndActiveInternal):
+ * page/Frame.cpp:
+ (WebCore::Frame::orientationChanged):
+ (WebCore::Frame::injectUserScriptsForWorld):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollContentsFastPath):
+ (WebCore::FrameView::serviceScriptedAnimations):
+ (WebCore::FrameView::trackedRepaintRectsAsText):
+ (WebCore::FrameView::updateWidgetPositions):
+ (WebCore::FrameView::notifyWidgets):
+ * page/Page.cpp:
+ (WebCore::networkStateChanged):
+ (WebCore::Page::stringToViewMode):
+ (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
+ (WebCore::Page::refreshPlugins):
+ (WebCore::Page::lockAllOverlayScrollbarsToHidden):
+ (WebCore::Page::pluginViews):
+ (WebCore::Page::storageBlockingStateChanged):
+ (WebCore::Page::setIsVisibleInternal):
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::captionPreferencesChanged):
+ * page/PageGroupLoadDeferrer.cpp:
+ (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
+ (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
+ * page/PageSerializer.cpp:
+ (WebCore::PageSerializer::serializeFrame):
+ * page/Performance.cpp:
+ (WebCore::Performance::webkitGetEntriesByType):
+ (WebCore::Performance::webkitGetEntriesByName):
+ * page/PerformanceResourceTiming.cpp:
+ (WebCore::passesTimingAllowCheck):
+ * page/PerformanceUserTiming.cpp:
+ (WebCore::convertToEntrySequence):
+ * page/SecurityPolicy.cpp:
+ (WebCore::SecurityPolicy::isAccessWhiteListed):
+ * page/UserContentURLPattern.cpp:
+ (WebCore::UserContentURLPattern::matchesPatterns):
+ * page/WindowFeatures.cpp:
+ (WebCore::WindowFeatures::parseDialogFeatures):
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::updateAnimations):
+ (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
+ (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
+ (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
+ (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::ShorthandPropertyWrapper::equals):
+ (WebCore::ShorthandPropertyWrapper::blend):
+ * page/scrolling/AsyncScrollingCoordinator.cpp:
+ (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
+ (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
+
</ins><span class="cx"> 2015-06-03 Daniel Bates <dabates@apple.com>
</span><span class="cx">
</span><span class="cx"> AutoFill button should not be shown in read-only or disabled field
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Chrome.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Chrome.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/Chrome.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -635,8 +635,8 @@
</span><span class="cx"> void Chrome::notifyPopupOpeningObservers() const
</span><span class="cx"> {
</span><span class="cx"> const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers);
</span><del>- for (size_t i = 0; i < observers.size(); ++i)
- observers[i]->willOpenPopup();
</del><ins>+ for (auto& observer : observers)
+ observer->willOpenPopup();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Chrome::didBeginTrackingPotentialLongMousePress(const IntPoint& mouseDownPosition, const HitTestResult& hitTestResult)
</span></span></pre></div>
<a id="trunkSourceWebCorepageContentSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -343,8 +343,8 @@
</span><span class="cx">
</span><span class="cx"> URL effectiveURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
</span><span class="cx">
</span><del>- for (size_t i = 0; i < m_list.size(); ++i) {
- if (m_list[i].matches(effectiveURL))
</del><ins>+ for (auto& entry : m_list) {
+ if (entry.matches(effectiveURL))
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1100,8 +1100,8 @@
</span><span class="cx">
</span><span class="cx"> void CSPDirectiveList::gatherReportURIs(DOMStringList& list) const
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_reportURIs.size(); ++i)
- list.append(m_reportURIs[i].string());
</del><ins>+ for (auto& uri : m_reportURIs)
+ list.append(uri.string());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSPDirectiveList::allowFormAction(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="lines">@@ -1352,8 +1352,8 @@
</span><span class="cx"> void ContentSecurityPolicy::copyStateFrom(const ContentSecurityPolicy* other)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_policies.isEmpty());
</span><del>- for (CSPDirectiveListVector::const_iterator iter = other->m_policies.begin(); iter != other->m_policies.end(); ++iter)
- didReceiveHeader((*iter)->header(), (*iter)->headerType());
</del><ins>+ for (auto& policy : other->m_policies)
+ didReceiveHeader(policy->header(), policy->headerType());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ContentSecurityPolicy::didReceiveHeader(const String& header, HeaderType type)
</span><span class="lines">@@ -1401,8 +1401,8 @@
</span><span class="cx"> template<bool (CSPDirectiveList::*allowed)(ContentSecurityPolicy::ReportingStatus) const>
</span><span class="cx"> bool isAllowedByAll(const CSPDirectiveListVector& policies, ContentSecurityPolicy::ReportingStatus reportingStatus)
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < policies.size(); ++i) {
- if (!(policies[i].get()->*allowed)(reportingStatus))
</del><ins>+ for (auto& policy : policies) {
+ if (!(policy.get()->*allowed)(reportingStatus))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1411,8 +1411,8 @@
</span><span class="cx"> template<bool (CSPDirectiveList::*allowed)(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus) const>
</span><span class="cx"> bool isAllowedByAllWithState(const CSPDirectiveListVector& policies, JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus)
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < policies.size(); ++i) {
- if (!(policies[i].get()->*allowed)(state, reportingStatus))
</del><ins>+ for (auto& policy : policies) {
+ if (!(policy.get()->*allowed)(state, reportingStatus))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1421,8 +1421,8 @@
</span><span class="cx"> template<bool (CSPDirectiveList::*allowed)(const String&, const WTF::OrdinalNumber&, ContentSecurityPolicy::ReportingStatus) const>
</span><span class="cx"> bool isAllowedByAllWithContext(const CSPDirectiveListVector& policies, const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus)
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < policies.size(); ++i) {
- if (!(policies[i].get()->*allowed)(contextURL, contextLine, reportingStatus))
</del><ins>+ for (auto& policy : policies) {
+ if (!(policy.get()->*allowed)(contextURL, contextLine, reportingStatus))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1434,8 +1434,8 @@
</span><span class="cx"> if (SchemeRegistry::schemeShouldBypassContentSecurityPolicy(url.protocol()))
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- for (size_t i = 0; i < policies.size(); ++i) {
- if (!(policies[i].get()->*allowFromURL)(url, reportingStatus))
</del><ins>+ for (auto& policy : policies) {
+ if (!(policy.get()->*allowFromURL)(url, reportingStatus))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1470,17 +1470,17 @@
</span><span class="cx">
</span><span class="cx"> String ContentSecurityPolicy::evalDisabledErrorMessage() const
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_policies.size(); ++i) {
- if (!m_policies[i]->allowEval(0, SuppressReport))
- return m_policies[i]->evalDisabledErrorMessage();
</del><ins>+ for (auto& policy : m_policies) {
+ if (!policy->allowEval(0, SuppressReport))
+ return policy->evalDisabledErrorMessage();
</ins><span class="cx"> }
</span><span class="cx"> return String();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ContentSecurityPolicy::allowPluginType(const String& type, const String& typeAttribute, const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_policies.size(); ++i) {
- if (!m_policies[i]->allowPluginType(type, typeAttribute, url, reportingStatus))
</del><ins>+ for (auto& policy : m_policies) {
+ if (!policy->allowPluginType(type, typeAttribute, url, reportingStatus))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1544,17 +1544,17 @@
</span><span class="cx"> ContentSecurityPolicy::ReflectedXSSDisposition ContentSecurityPolicy::reflectedXSSDisposition() const
</span><span class="cx"> {
</span><span class="cx"> ReflectedXSSDisposition disposition = ReflectedXSSUnset;
</span><del>- for (size_t i = 0; i < m_policies.size(); ++i) {
- if (m_policies[i]->reflectedXSSDisposition() > disposition)
- disposition = std::max(disposition, m_policies[i]->reflectedXSSDisposition());
</del><ins>+ for (auto& policy : m_policies) {
+ if (policy->reflectedXSSDisposition() > disposition)
+ disposition = std::max(disposition, policy->reflectedXSSDisposition());
</ins><span class="cx"> }
</span><span class="cx"> return disposition;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ContentSecurityPolicy::gatherReportURIs(DOMStringList& list) const
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_policies.size(); ++i)
- m_policies[i]->gatherReportURIs(list);
</del><ins>+ for (auto& policy : m_policies)
+ policy->gatherReportURIs(list);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SecurityOrigin* ContentSecurityPolicy::securityOrigin() const
</span></span></pre></div>
<a id="trunkSourceWebCorepageContextMenuControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContextMenuController.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -959,8 +959,7 @@
</span><span class="cx"> bool badGrammar;
</span><span class="cx"> Vector<String> guesses = frame->editor().guessesForMisspelledOrUngrammatical(misspelling, badGrammar);
</span><span class="cx"> if (misspelling || badGrammar) {
</span><del>- size_t size = guesses.size();
- if (!size) {
</del><ins>+ if (guesses.isEmpty()) {
</ins><span class="cx"> // If there's bad grammar but no suggestions (e.g., repeated word), just leave off the suggestions
</span><span class="cx"> // list and trailing separator rather than adding a "No Guesses Found" item (matches AppKit)
</span><span class="cx"> if (misspelling) {
</span><span class="lines">@@ -968,8 +967,7 @@
</span><span class="cx"> appendItem(*separatorItem(), m_contextMenu.get());
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- for (unsigned i = 0; i < size; i++) {
- const String &guess = guesses[i];
</del><ins>+ for (const auto& guess : guesses) {
</ins><span class="cx"> if (!guess.isEmpty()) {
</span><span class="cx"> ContextMenuItem item(ActionType, ContextMenuItemTagSpellingGuess, guess);
</span><span class="cx"> appendItem(item, m_contextMenu.get());
</span><span class="lines">@@ -1002,8 +1000,8 @@
</span><span class="cx"> // Spelling and grammar checking is mutually exclusive with dictation alternatives.
</span><span class="cx"> Vector<String> dictationAlternatives = m_context.hitTestResult().dictationAlternatives();
</span><span class="cx"> if (!dictationAlternatives.isEmpty()) {
</span><del>- for (size_t i = 0; i < dictationAlternatives.size(); ++i) {
- ContextMenuItem item(ActionType, ContextMenuItemTagDictationAlternative, dictationAlternatives[i]);
</del><ins>+ for (auto& alternative : dictationAlternatives) {
+ ContextMenuItem item(ActionType, ContextMenuItemTagDictationAlternative, alternative);
</ins><span class="cx"> appendItem(item, m_contextMenu.get());
</span><span class="cx"> }
</span><span class="cx"> appendItem(*separatorItem(), m_contextMenu.get());
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -256,22 +256,21 @@
</span><span class="cx">
</span><span class="cx"> Vector<Ref<DOMWindow>> windows;
</span><span class="cx"> windows.reserveInitialCapacity(set.size());
</span><del>- for (auto it = set.begin(), end = set.end(); it != end; ++it)
- windows.uncheckedAppend(*it->key);
</del><ins>+ for (auto& window : set)
+ windows.uncheckedAppend(*window.key);
</ins><span class="cx">
</span><del>- for (Ref<DOMWindow>& windowRef : windows) {
- DOMWindow& window = windowRef;
- if (!set.contains(&window))
</del><ins>+ for (auto& window : windows) {
+ if (!set.contains(window.ptr()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- Frame* frame = window.frame();
</del><ins>+ Frame* frame = window->frame();
</ins><span class="cx"> if (!frame)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> if (!frame->loader().shouldClose())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- window.enableSuddenTermination();
</del><ins>+ window->enableSuddenTermination();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> alreadyDispatched = true;
</span><span class="lines">@@ -299,15 +298,14 @@
</span><span class="cx"> for (auto& keyValue : set)
</span><span class="cx"> windows.uncheckedAppend(*keyValue.key);
</span><span class="cx">
</span><del>- for (Ref<DOMWindow>& windowRef : windows) {
- DOMWindow& window = windowRef;
- if (!set.contains(&window))
</del><ins>+ for (auto& window : windows) {
+ if (!set.contains(window.ptr()))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- window.dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, false), window.document());
- window.dispatchEvent(Event::create(eventNames().unloadEvent, false, false), window.document());
</del><ins>+ window->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, false), window->document());
+ window->dispatchEvent(Event::create(eventNames().unloadEvent, false, false), window->document());
</ins><span class="cx">
</span><del>- window.enableSuddenTermination();
</del><ins>+ window->enableSuddenTermination();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> alreadyDispatched = true;
</span><span class="lines">@@ -495,8 +493,8 @@
</span><span class="cx"> // unregister themselves from the DOMWindow as a result of the call to willDestroyGlobalObjectInCachedFrame.
</span><span class="cx"> Vector<DOMWindowProperty*> properties;
</span><span class="cx"> copyToVector(m_properties, properties);
</span><del>- for (size_t i = 0; i < properties.size(); ++i)
- properties[i]->willDestroyGlobalObjectInCachedFrame();
</del><ins>+ for (auto& property : properties)
+ property->willDestroyGlobalObjectInCachedFrame();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::willDestroyDocumentInFrame()
</span><span class="lines">@@ -505,8 +503,8 @@
</span><span class="cx"> // unregister themselves from the DOMWindow as a result of the call to willDestroyGlobalObjectInFrame.
</span><span class="cx"> Vector<DOMWindowProperty*> properties;
</span><span class="cx"> copyToVector(m_properties, properties);
</span><del>- for (size_t i = 0; i < properties.size(); ++i)
- properties[i]->willDestroyGlobalObjectInFrame();
</del><ins>+ for (auto& property : properties)
+ property->willDestroyGlobalObjectInFrame();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::willDetachDocumentFromFrame()
</span><span class="lines">@@ -515,8 +513,8 @@
</span><span class="cx"> // unregister themselves from the DOMWindow as a result of the call to willDetachGlobalObjectFromFrame.
</span><span class="cx"> Vector<DOMWindowProperty*> properties;
</span><span class="cx"> copyToVector(m_properties, properties);
</span><del>- for (size_t i = 0; i < properties.size(); ++i)
- properties[i]->willDetachGlobalObjectFromFrame();
</del><ins>+ for (auto& property : properties)
+ property->willDetachGlobalObjectFromFrame();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(GAMEPAD)
</span><span class="lines">@@ -571,8 +569,8 @@
</span><span class="cx"> // unregister themselves from the DOMWindow as a result of the call to disconnectFrameForPageCache.
</span><span class="cx"> Vector<DOMWindowProperty*> properties;
</span><span class="cx"> copyToVector(m_properties, properties);
</span><del>- for (size_t i = 0; i < properties.size(); ++i)
- properties[i]->disconnectFrameForPageCache();
</del><ins>+ for (auto& property : properties)
+ property->disconnectFrameForPageCache();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::reconnectDOMWindowProperties()
</span><span class="lines">@@ -582,8 +580,8 @@
</span><span class="cx"> // unregister themselves from the DOMWindow as a result of the call to reconnectFromPageCache.
</span><span class="cx"> Vector<DOMWindowProperty*> properties;
</span><span class="cx"> copyToVector(m_properties, properties);
</span><del>- for (size_t i = 0; i < properties.size(); ++i)
- properties[i]->reconnectFrameFromPageCache(m_frame);
</del><ins>+ for (auto& property : properties)
+ property->reconnectFrameFromPageCache(m_frame);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::resetDOMWindowProperties()
</span><span class="lines">@@ -1453,8 +1451,8 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> RefPtr<StaticCSSRuleList> ruleList = StaticCSSRuleList::create();
</span><del>- for (unsigned i = 0; i < matchedRules.size(); ++i)
- ruleList->rules().append(matchedRules[i]->createCSSOMWrapper());
</del><ins>+ for (auto& rule : matchedRules)
+ ruleList->rules().append(rule->createCSSOMWrapper());
</ins><span class="cx">
</span><span class="cx"> return ruleList.release();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageDeviceControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DeviceController.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DeviceController.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/DeviceController.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -76,11 +76,10 @@
</span><span class="cx"> RefPtr<Event> event = prpEvent;
</span><span class="cx"> Vector<RefPtr<DOMWindow>> listenerVector;
</span><span class="cx"> copyToVector(m_listeners, listenerVector);
</span><del>- for (size_t i = 0; i < listenerVector.size(); ++i) {
- if (listenerVector[i]->document()
- && !listenerVector[i]->document()->activeDOMObjectsAreSuspended()
- && !listenerVector[i]->document()->activeDOMObjectsAreStopped())
- listenerVector[i]->dispatchEvent(event);
</del><ins>+ for (auto& listener : listenerVector) {
+ auto document = listener->document();
+ if (document && !document->activeDOMObjectsAreSuspended() && !document->activeDOMObjectsAreStopped())
+ listener->dispatchEvent(event);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -92,11 +91,10 @@
</span><span class="cx"> Vector<RefPtr<DOMWindow>> listenerVector;
</span><span class="cx"> copyToVector(m_lastEventListeners, listenerVector);
</span><span class="cx"> m_lastEventListeners.clear();
</span><del>- for (size_t i = 0; i < listenerVector.size(); ++i) {
- if (listenerVector[i]->document()
- && !listenerVector[i]->document()->activeDOMObjectsAreSuspended()
- && !listenerVector[i]->document()->activeDOMObjectsAreStopped())
- listenerVector[i]->dispatchEvent(getLastEvent());
</del><ins>+ for (auto& listener : listenerVector) {
+ auto document = listener->document();
+ if (document && !document->activeDOMObjectsAreSuspended() && !document->activeDOMObjectsAreStopped())
+ listener->dispatchEvent(getLastEvent());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -2555,9 +2555,9 @@
</span><span class="cx"> m_lastElementUnderMouse->dispatchMouseEvent(platformMouseEvent, eventNames().mouseoutEvent, 0, m_elementUnderMouse.get());
</span><span class="cx">
</span><span class="cx"> // Send mouseleave to the node hierarchy no longer under the mouse.
</span><del>- for (size_t i = 0; i < leftElementsChain.size(); ++i) {
- if (hasCapturingMouseLeaveListener || leftElementsChain[i]->hasEventListeners(eventNames().mouseleaveEvent))
- leftElementsChain[i]->dispatchMouseEvent(platformMouseEvent, eventNames().mouseleaveEvent, 0, m_elementUnderMouse.get());
</del><ins>+ for (auto& chain : leftElementsChain) {
+ if (hasCapturingMouseLeaveListener || chain->hasEventListeners(eventNames().mouseleaveEvent))
+ chain->dispatchMouseEvent(platformMouseEvent, eventNames().mouseleaveEvent, 0, m_elementUnderMouse.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Send mouseover event to the new node.
</span><span class="lines">@@ -2565,9 +2565,9 @@
</span><span class="cx"> m_elementUnderMouse->dispatchMouseEvent(platformMouseEvent, eventNames().mouseoverEvent, 0, m_lastElementUnderMouse.get());
</span><span class="cx">
</span><span class="cx"> // Send mouseleave event to the nodes hierarchy under the mouse.
</span><del>- for (size_t i = 0, size = enteredElementsChain.size(); i < size; ++i) {
- if (hasCapturingMouseEnterListener || enteredElementsChain[i]->hasEventListeners(eventNames().mouseenterEvent))
- enteredElementsChain[i]->dispatchMouseEvent(platformMouseEvent, eventNames().mouseenterEvent, 0, m_lastElementUnderMouse.get());
</del><ins>+ for (auto& chain : enteredElementsChain) {
+ if (hasCapturingMouseEnterListener || chain->hasEventListeners(eventNames().mouseenterEvent))
+ chain->dispatchMouseEvent(platformMouseEvent, eventNames().mouseenterEvent, 0, m_lastElementUnderMouse.get());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> m_lastElementUnderMouse = m_elementUnderMouse;
</span><span class="lines">@@ -3859,19 +3859,16 @@
</span><span class="cx">
</span><span class="cx"> UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture, m_frame.document());
</span><span class="cx">
</span><del>- unsigned i;
</del><span class="cx"> bool freshTouchEvents = true;
</span><span class="cx"> bool allTouchReleased = true;
</span><del>- for (i = 0; i < points.size(); ++i) {
- const PlatformTouchPoint& point = points[i];
</del><ins>+ for (auto& point : points) {
</ins><span class="cx"> if (point.state() != PlatformTouchPoint::TouchPressed)
</span><span class="cx"> freshTouchEvents = false;
</span><span class="cx"> if (point.state() != PlatformTouchPoint::TouchReleased && point.state() != PlatformTouchPoint::TouchCancelled)
</span><span class="cx"> allTouchReleased = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (i = 0; i < points.size(); ++i) {
- const PlatformTouchPoint& point = points[i];
</del><ins>+ for (auto& point : points) {
</ins><span class="cx"> PlatformTouchPoint::State pointState = point.state();
</span><span class="cx"> LayoutPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
</span><span class="cx">
</span><span class="lines">@@ -4015,10 +4012,9 @@
</span><span class="cx"> bool isTouchCancelEvent = (state == PlatformTouchPoint::TouchCancelled);
</span><span class="cx"> RefPtr<TouchList>& effectiveTouches(isTouchCancelEvent ? emptyList : touches);
</span><span class="cx"> const AtomicString& stateName(eventNameForTouchPointState(static_cast<PlatformTouchPoint::State>(state)));
</span><del>- const EventTargetSet& targetsForState = changedTouches[state].m_targets;
</del><span class="cx">
</span><del>- for (EventTargetSet::const_iterator it = targetsForState.begin(); it != targetsForState.end(); ++it) {
- EventTarget* touchEventTarget = it->get();
</del><ins>+ for (auto& taget : changedTouches[state].m_targets) {
+ EventTarget* touchEventTarget = taget.get();
</ins><span class="cx"> RefPtr<TouchList> targetTouches(isTouchCancelEvent ? emptyList : touchesByTarget.get(touchEventTarget));
</span><span class="cx"> ASSERT(targetTouches);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFocusControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FocusController.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FocusController.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/FocusController.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -700,8 +700,7 @@
</span><span class="cx"> if (!scrollableAreas)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
- ScrollableArea* scrollableArea = *it;
</del><ins>+ for (auto& scrollableArea : *scrollableAreas) {
</ins><span class="cx"> ASSERT(scrollableArea->scrollbarsCanBeActive() || m_page.shouldSuppressScrollbarAnimations());
</span><span class="cx">
</span><span class="cx"> contentAreaDidShowOrHide(scrollableArea, contentIsVisible);
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/Frame.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -295,9 +295,9 @@
</span><span class="cx"> for (Frame* frame = this; frame; frame = frame->tree().traverseNext())
</span><span class="cx"> frames.append(*frame);
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < frames.size(); i++) {
- if (Document* doc = frames[i]->document())
- doc->dispatchWindowEvent(Event::create(eventNames().orientationchangeEvent, false, false));
</del><ins>+ for (auto& frame : frames) {
+ if (Document* document = frame->document())
+ document->dispatchWindowEvent(Event::create(eventNames().orientationchangeEvent, false, false));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -719,10 +719,7 @@
</span><span class="cx"> if (!doc)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Vector<ScriptSourceCode> sourceCode;
- unsigned count = userScripts.size();
- for (unsigned i = 0; i < count; ++i) {
- UserScript* script = userScripts[i].get();
</del><ins>+ for (auto& script : userScripts) {
</ins><span class="cx"> if (script->injectedFrames() == InjectInTopFrameOnly && ownerElement())
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/FrameView.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -1878,10 +1878,7 @@
</span><span class="cx"> hostWindow()->scroll(scrollDelta, rectToScroll, clipRect);
</span><span class="cx">
</span><span class="cx"> // 2) update the area of fixed objects that has been invalidated
</span><del>- Vector<IntRect> subRectsToUpdate = regionToUpdate.rects();
- size_t viewportConstrainedObjectsCount = subRectsToUpdate.size();
- for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) {
- IntRect updateRect = subRectsToUpdate[i];
</del><ins>+ for (auto& updateRect : regionToUpdate.rects()) {
</ins><span class="cx"> IntRect scrolledRect = updateRect;
</span><span class="cx"> scrolledRect.move(scrollDelta);
</span><span class="cx"> updateRect.unite(scrolledRect);
</span><span class="lines">@@ -2682,8 +2679,8 @@
</span><span class="cx"> for (auto* frame = m_frame.ptr(); frame; frame = frame->tree().traverseNext())
</span><span class="cx"> documents.append(frame->document());
</span><span class="cx">
</span><del>- for (size_t i = 0; i < documents.size(); ++i)
- documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
</del><ins>+ for (auto& document : documents)
+ document->serviceScriptedAnimations(monotonicAnimationStartTime);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -4416,8 +4413,8 @@
</span><span class="cx"> TextStream ts;
</span><span class="cx"> if (!m_trackedRepaintRects.isEmpty()) {
</span><span class="cx"> ts << "(repaint rects\n";
</span><del>- for (size_t i = 0; i < m_trackedRepaintRects.size(); ++i)
- ts << " (rect " << LayoutUnit(m_trackedRepaintRects[i].x()) << " " << LayoutUnit(m_trackedRepaintRects[i].y()) << " " << LayoutUnit(m_trackedRepaintRects[i].width()) << " " << LayoutUnit(m_trackedRepaintRects[i].height()) << ")\n";
</del><ins>+ for (auto& rect : m_trackedRepaintRects)
+ ts << " (rect " << LayoutUnit(rect.x()) << " " << LayoutUnit(rect.y()) << " " << LayoutUnit(rect.width()) << " " << LayoutUnit(rect.height()) << ")\n";
</ins><span class="cx"> ts << ")\n";
</span><span class="cx"> }
</span><span class="cx"> return ts.release();
</span><span class="lines">@@ -4741,20 +4738,16 @@
</span><span class="cx"> // updateWidgetPosition() can possibly cause layout to be re-entered (via plug-ins running
</span><span class="cx"> // scripts in response to NPP_SetWindow, for example), so we need to keep the Widgets
</span><span class="cx"> // alive during enumeration.
</span><del>- auto protectedWidgets = collectAndProtectWidgets(m_widgetsInRenderTree);
-
- for (unsigned i = 0, size = protectedWidgets.size(); i < size; ++i) {
- if (RenderWidget* renderWidget = RenderWidget::find(protectedWidgets[i].get()))
</del><ins>+ for (auto& widget : collectAndProtectWidgets(m_widgetsInRenderTree)) {
+ if (RenderWidget* renderWidget = RenderWidget::find(widget.get()))
</ins><span class="cx"> renderWidget->updateWidgetPosition();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::notifyWidgets(WidgetNotification notification)
</span><span class="cx"> {
</span><del>- auto protectedWidgets = collectAndProtectWidgets(m_widgetsInRenderTree);
-
- for (unsigned i = 0, size = protectedWidgets.size(); i < size; ++i)
- protectedWidgets[i]->notifyWidget(notification);
</del><ins>+ for (auto& widget : collectAndProtectWidgets(m_widgetsInRenderTree))
+ widget->notifyWidget(notification);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::setExposedRect(FloatRect exposedRect)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/Page.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -121,15 +121,15 @@
</span><span class="cx"> Vector<Ref<Frame>> frames;
</span><span class="cx">
</span><span class="cx"> // Get all the frames of all the pages in all the page groups
</span><del>- for (auto it = allPages->begin(), end = allPages->end(); it != end; ++it) {
- for (Frame* frame = &(*it)->mainFrame(); frame; frame = frame->tree().traverseNext())
</del><ins>+ for (auto& page : *allPages) {
+ for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext())
</ins><span class="cx"> frames.append(*frame);
</span><del>- InspectorInstrumentation::networkStateChanged(*it);
</del><ins>+ InspectorInstrumentation::networkStateChanged(page);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> AtomicString eventName = isOnLine ? eventNames().onlineEvent : eventNames().offlineEvent;
</span><del>- for (unsigned i = 0; i < frames.size(); i++)
- frames[i]->document()->dispatchWindowEvent(Event::create(eventName, false, false));
</del><ins>+ for (auto& frame : frames)
+ frame->document()->dispatchWindowEvent(Event::create(eventName, false, false));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static const ViewState::Flags PageInitialViewState = ViewState::IsVisible | ViewState::IsInWindow;
</span><span class="lines">@@ -401,9 +401,9 @@
</span><span class="cx">
</span><span class="cx"> Page::ViewMode Page::stringToViewMode(const String& text)
</span><span class="cx"> {
</span><del>- for (int i = 0; i < viewModeMapSize; ++i) {
- if (text == viewModeMap[i].name)
- return viewModeMap[i].type;
</del><ins>+ for (auto& mode : viewModeMap) {
+ if (text == mode.name)
+ return mode.type;
</ins><span class="cx"> }
</span><span class="cx"> return Page::ViewModeInvalid;
</span><span class="cx"> }
</span><span class="lines">@@ -482,9 +482,8 @@
</span><span class="cx"> {
</span><span class="cx"> if (!allPages)
</span><span class="cx"> return;
</span><del>- HashSet<Page*>::iterator end = allPages->end();
- for (HashSet<Page*>::iterator it = allPages->begin(); it != end; ++it)
- for (Frame* frame = &(*it)->mainFrame(); frame; frame = frame->tree().traverseNext()) {
</del><ins>+ for (auto& page : *allPages) {
+ for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
</ins><span class="cx"> // If a change in the global environment has occurred, we need to
</span><span class="cx"> // make sure all the properties a recomputed, therefore we invalidate
</span><span class="cx"> // the properties cache.
</span><span class="lines">@@ -492,6 +491,7 @@
</span><span class="cx"> styleResolver->invalidateMatchedPropertiesCache();
</span><span class="cx"> frame->document()->scheduleForcedStyleRecalc();
</span><span class="cx"> }
</span><ins>+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Page::setNeedsRecalcStyleInAllFrames()
</span><span class="lines">@@ -511,21 +511,20 @@
</span><span class="cx">
</span><span class="cx"> Vector<Ref<Frame>> framesNeedingReload;
</span><span class="cx">
</span><del>- for (auto it = allPages->begin(), end = allPages->end(); it != end; ++it) {
- Page& page = **it;
- page.m_pluginData.clear();
</del><ins>+ for (auto& page : *allPages) {
+ page->m_pluginData.clear();
</ins><span class="cx">
</span><span class="cx"> if (!reload)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- for (Frame* frame = &page.mainFrame(); frame; frame = frame->tree().traverseNext()) {
</del><ins>+ for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
</ins><span class="cx"> if (frame->loader().subframeLoader().containsPlugins())
</span><span class="cx"> framesNeedingReload.append(*frame);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (size_t i = 0; i < framesNeedingReload.size(); ++i)
- framesNeedingReload[i]->loader().reload();
</del><ins>+ for (auto& frame : framesNeedingReload)
+ frame->loader().reload();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PluginData& Page::pluginData() const
</span><span class="lines">@@ -900,10 +899,8 @@
</span><span class="cx"> if (!scrollableAreas)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
- ScrollableArea* scrollableArea = *it;
</del><ins>+ for (auto& scrollableArea : *scrollableAreas)
</ins><span class="cx"> scrollableArea->lockOverlayScrollbarStateToHidden(lockOverlayScrollbars);
</span><del>- }
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1176,10 +1173,9 @@
</span><span class="cx"> if (!view)
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- for (auto it = view->children().begin(), end = view->children().end(); it != end; ++it) {
- Widget& widget = **it;
- if (is<PluginViewBase>(widget))
- views.append(downcast<PluginViewBase>(widget));
</del><ins>+ for (auto& widget : view->children()) {
+ if (is<PluginViewBase>(*widget))
+ views.append(downcast<PluginViewBase>(*widget));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1193,10 +1189,8 @@
</span><span class="cx">
</span><span class="cx"> // Collect the PluginViews in to a vector to ensure that action the plug-in takes
</span><span class="cx"> // from below storageBlockingStateChanged does not affect their lifetime.
</span><del>- auto views = pluginViews();
-
- for (unsigned i = 0; i < views.size(); ++i)
- views[i]->storageBlockingStateChanged();
</del><ins>+ for (auto& view : pluginViews())
+ view->storageBlockingStateChanged();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Page::enableLegacyPrivateBrowsing(bool privateBrowsingEnabled)
</span><span class="lines">@@ -1312,8 +1306,8 @@
</span><span class="cx"> for (Frame* frame = m_mainFrame.get(); frame; frame = frame->tree().traverseNext())
</span><span class="cx"> documents.append(*frame->document());
</span><span class="cx">
</span><del>- for (size_t i = 0, size = documents.size(); i < size; ++i)
- documents[i]->visibilityStateChanged();
</del><ins>+ for (auto& document : documents)
+ document->visibilityStateChanged();
</ins><span class="cx">
</span><span class="cx"> if (!isVisible) {
</span><span class="cx"> if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageGroup.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageGroup.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/PageGroup.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -109,8 +109,8 @@
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx"> void PageGroup::captionPreferencesChanged()
</span><span class="cx"> {
</span><del>- for (auto it = m_pages.begin(), end = m_pages.end(); it != end; ++it)
- (*it)->captionPreferencesChanged();
</del><ins>+ for (auto& page : m_pages)
+ page->captionPreferencesChanged();
</ins><span class="cx"> PageCache::singleton().markPagesForCaptionPreferencesChanged();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageGroupLoadDeferrercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/PageGroupLoadDeferrer.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -33,11 +33,7 @@
</span><span class="cx">
</span><span class="cx"> PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page& page, bool deferSelf)
</span><span class="cx"> {
</span><del>- const HashSet<Page*>& pages = page.group().pages();
-
- HashSet<Page*>::const_iterator end = pages.end();
- for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
- Page* otherPage = *it;
</del><ins>+ for (auto& otherPage : page.group().pages()) {
</ins><span class="cx"> if ((deferSelf || otherPage != &page)) {
</span><span class="cx"> if (!otherPage->defersLoading()) {
</span><span class="cx"> m_deferredFrames.append(&otherPage->mainFrame());
</span><span class="lines">@@ -50,16 +46,16 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- size_t count = m_deferredFrames.size();
- for (size_t i = 0; i < count; ++i)
- if (Page* page = m_deferredFrames[i]->page())
</del><ins>+ for (auto& deferredFrame : m_deferredFrames) {
+ if (Page* page = deferredFrame->page())
</ins><span class="cx"> page->setDefersLoading(true);
</span><ins>+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PageGroupLoadDeferrer::~PageGroupLoadDeferrer()
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_deferredFrames.size(); ++i) {
- if (Page* page = m_deferredFrames[i]->page()) {
</del><ins>+ for (auto& deferredFrame : m_deferredFrames) {
+ if (Page* page = deferredFrame->page()) {
</ins><span class="cx"> page->setDefersLoading(false);
</span><span class="cx">
</span><span class="cx"> for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext())
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageSerializercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageSerializer.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageSerializer.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/PageSerializer.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -221,8 +221,7 @@
</span><span class="cx"> m_resources->append(Resource(url, document->suggestedMIMEType(), SharedBuffer::create(frameHTML.data(), frameHTML.length())));
</span><span class="cx"> m_resourceURLs.add(url);
</span><span class="cx">
</span><del>- for (Vector<Node*>::iterator iter = nodes.begin(); iter != nodes.end(); ++iter) {
- Node* node = *iter;
</del><ins>+ for (auto& node : nodes) {
</ins><span class="cx"> if (!is<Element>(*node))
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/Performance.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -118,8 +118,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(RESOURCE_TIMING)
</span><span class="cx"> if (equalIgnoringCase(entryType, "resource"))
</span><del>- for (Vector<RefPtr<PerformanceEntry>>::const_iterator resource = m_resourceTimingBuffer.begin(); resource != m_resourceTimingBuffer.end(); ++resource)
- entries->append(*resource);
</del><ins>+ for (auto& resource : m_resourceTimingBuffer)
+ entries->append(resource);
</ins><span class="cx"> #endif // ENABLE(RESOURCE_TIMING)
</span><span class="cx">
</span><span class="cx"> #if ENABLE(USER_TIMING)
</span><span class="lines">@@ -141,9 +141,10 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(RESOURCE_TIMING)
</span><span class="cx"> if (entryType.isNull() || equalIgnoringCase(entryType, "resource"))
</span><del>- for (Vector<RefPtr<PerformanceEntry>>::const_iterator resource = m_resourceTimingBuffer.begin(); resource != m_resourceTimingBuffer.end(); ++resource)
- if ((*resource)->name() == name)
- entries->append(*resource);
</del><ins>+ for (auto& resource : m_resourceTimingBuffer) {
+ if (resource->name() == name)
+ entries->append(resource);
+ }
</ins><span class="cx"> #endif // ENABLE(RESOURCE_TIMING)
</span><span class="cx">
</span><span class="cx"> #if ENABLE(USER_TIMING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -68,9 +68,10 @@
</span><span class="cx"> const String& securityOrigin = requestingDocument->securityOrigin()->toString();
</span><span class="cx"> Vector<String> timingAllowOrigins;
</span><span class="cx"> timingAllowOriginString.split(' ', timingAllowOrigins);
</span><del>- for (size_t i = 0; i < timingAllowOrigins.size(); ++i)
- if (timingAllowOrigins[i] == securityOrigin)
</del><ins>+ for (auto& origin : timingAllowOrigins) {
+ if (origin == securityOrigin)
</ins><span class="cx"> return true;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceUserTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceUserTiming.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceUserTiming.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/PerformanceUserTiming.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -165,8 +165,8 @@
</span><span class="cx"> {
</span><span class="cx"> Vector<RefPtr<PerformanceEntry> > entries;
</span><span class="cx">
</span><del>- for (PerformanceEntryMap::const_iterator it = performanceEntryMap.begin(); it != performanceEntryMap.end(); ++it)
- entries.appendVector(it->value);
</del><ins>+ for (auto& entry : performanceEntryMap.values())
+ entries.appendVector(entry);
</ins><span class="cx">
</span><span class="cx"> return entries;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SecurityPolicy.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SecurityPolicy.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/SecurityPolicy.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -111,10 +111,10 @@
</span><span class="cx"> bool SecurityPolicy::isAccessWhiteListed(const SecurityOrigin* activeOrigin, const SecurityOrigin* targetOrigin)
</span><span class="cx"> {
</span><span class="cx"> if (OriginAccessWhiteList* list = originAccessMap().get(activeOrigin->toString())) {
</span><del>- for (size_t i = 0; i < list->size(); ++i) {
- if (list->at(i).matchesOrigin(*targetOrigin))
- return true;
- }
</del><ins>+ for (auto& entry : *list) {
+ if (entry.matchesOrigin(*targetOrigin))
+ return true;
+ }
</ins><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageUserContentURLPatterncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/UserContentURLPattern.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/UserContentURLPattern.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/UserContentURLPattern.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -37,9 +37,8 @@
</span><span class="cx"> // If there is no whitelist at all, then all URLs are assumed to be in the whitelist.
</span><span class="cx"> bool matchesWhitelist = whitelist.isEmpty();
</span><span class="cx"> if (!matchesWhitelist) {
</span><del>- size_t whitelistSize = whitelist.size();
- for (size_t i = 0; i < whitelistSize; ++i) {
- UserContentURLPattern contentPattern(whitelist[i]);
</del><ins>+ for (auto& entry : whitelist) {
+ UserContentURLPattern contentPattern(entry);
</ins><span class="cx"> if (contentPattern.matches(url)) {
</span><span class="cx"> matchesWhitelist = true;
</span><span class="cx"> break;
</span><span class="lines">@@ -49,9 +48,8 @@
</span><span class="cx">
</span><span class="cx"> bool matchesBlacklist = false;
</span><span class="cx"> if (!blacklist.isEmpty()) {
</span><del>- size_t blacklistSize = blacklist.size();
- for (size_t i = 0; i < blacklistSize; ++i) {
- UserContentURLPattern contentPattern(blacklist[i]);
</del><ins>+ for (auto& entry : blacklist) {
+ UserContentURLPattern contentPattern(entry);
</ins><span class="cx"> if (contentPattern.matches(url)) {
</span><span class="cx"> matchesBlacklist = true;
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceWebCorepageWindowFeaturescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/WindowFeatures.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/WindowFeatures.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/WindowFeatures.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -240,10 +240,7 @@
</span><span class="cx"> {
</span><span class="cx"> Vector<String> vector;
</span><span class="cx"> string.split(';', vector);
</span><del>- size_t size = vector.size();
- for (size_t i = 0; i < size; ++i) {
- const String& featureString = vector[i];
-
</del><ins>+ for (auto& featureString : vector) {
</ins><span class="cx"> size_t separatorPosition = featureString.find('=');
</span><span class="cx"> size_t colonPosition = featureString.find(':');
</span><span class="cx"> if (separatorPosition != notFound && colonPosition != notFound)
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/AnimationController.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/animation/AnimationController.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -115,9 +115,8 @@
</span><span class="cx"> double timeToNextService = -1;
</span><span class="cx"> bool calledSetChanged = false;
</span><span class="cx">
</span><del>- auto end = m_compositeAnimations.end();
- for (auto it = m_compositeAnimations.begin(); it != end; ++it) {
- CompositeAnimation& animation = *it->value;
</del><ins>+ for (auto& compositeAnimation : m_compositeAnimations) {
+ CompositeAnimation& animation = *compositeAnimation.value;
</ins><span class="cx"> if (!animation.isSuspended() && animation.hasAnimations()) {
</span><span class="cx"> double t = animation.timeToNextService();
</span><span class="cx"> if (t != -1 && (t < timeToNextService || timeToNextService == -1))
</span><span class="lines">@@ -125,7 +124,7 @@
</span><span class="cx"> if (!timeToNextService) {
</span><span class="cx"> if (callSetChanged != CallSetChanged)
</span><span class="cx"> break;
</span><del>- Element* element = it->key->element();
</del><ins>+ Element* element = compositeAnimation.key->element();
</ins><span class="cx"> ASSERT(element);
</span><span class="cx"> ASSERT(!element->document().inPageCache());
</span><span class="cx"> element->setNeedsStyleRecalc(SyntheticStyleChange);
</span><span class="lines">@@ -192,17 +191,16 @@
</span><span class="cx">
</span><span class="cx"> // fire all the events
</span><span class="cx"> Vector<EventToDispatch> eventsToDispatch = WTF::move(m_eventsToDispatch);
</span><del>- Vector<EventToDispatch>::const_iterator eventsToDispatchEnd = eventsToDispatch.end();
- for (Vector<EventToDispatch>::const_iterator it = eventsToDispatch.begin(); it != eventsToDispatchEnd; ++it) {
- Element* element = it->element.get();
- if (it->eventType == eventNames().transitionendEvent)
- element->dispatchEvent(TransitionEvent::create(it->eventType, it->name, it->elapsedTime, PseudoElement::pseudoElementNameForEvents(element->pseudoId())));
</del><ins>+ for (auto& event : eventsToDispatch) {
+ Element& element = *event.element;
+ if (event.eventType == eventNames().transitionendEvent)
+ element.dispatchEvent(TransitionEvent::create(event.eventType, event.name, event.elapsedTime, PseudoElement::pseudoElementNameForEvents(element.pseudoId())));
</ins><span class="cx"> else
</span><del>- element->dispatchEvent(AnimationEvent::create(it->eventType, it->name, it->elapsedTime));
</del><ins>+ element.dispatchEvent(AnimationEvent::create(event.eventType, event.name, event.elapsedTime));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- for (unsigned i = 0, size = m_elementChangesToDispatch.size(); i < size; ++i)
- m_elementChangesToDispatch[i]->setNeedsStyleRecalc(SyntheticStyleChange);
</del><ins>+ for (auto& change : m_elementChangesToDispatch)
+ change->setNeedsStyleRecalc(SyntheticStyleChange);
</ins><span class="cx">
</span><span class="cx"> m_elementChangesToDispatch.clear();
</span><span class="cx">
</span><span class="lines">@@ -311,9 +309,9 @@
</span><span class="cx"> {
</span><span class="cx"> AnimationPrivateUpdateBlock updateBlock(*this);
</span><span class="cx">
</span><del>- for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) {
- if (&it->key->document() == document)
- it->value->suspendAnimations();
</del><ins>+ for (auto& animation : m_compositeAnimations) {
+ if (&animation.key->document() == document)
+ animation.value->suspendAnimations();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> updateAnimationTimer();
</span><span class="lines">@@ -323,9 +321,9 @@
</span><span class="cx"> {
</span><span class="cx"> AnimationPrivateUpdateBlock updateBlock(*this);
</span><span class="cx">
</span><del>- for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) {
- if (&it->key->document() == document)
- it->value->resumeAnimations();
</del><ins>+ for (auto& animation : m_compositeAnimations) {
+ if (&animation.key->document() == document)
+ animation.value->resumeAnimations();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> updateAnimationTimer();
</span><span class="lines">@@ -435,9 +433,9 @@
</span><span class="cx"> {
</span><span class="cx"> unsigned count = 0;
</span><span class="cx">
</span><del>- for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) {
- if (&it->key->document() == document)
- count += it->value->numberOfActiveAnimations();
</del><ins>+ for (auto& animation : m_compositeAnimations) {
+ if (&animation.key->document() == document)
+ count += animation.value->numberOfActiveAnimations();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return count;
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -1044,9 +1044,8 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><del>- Vector<AnimationPropertyWrapperBase*>::const_iterator end = m_propertyWrappers.end();
- for (Vector<AnimationPropertyWrapperBase*>::const_iterator it = m_propertyWrappers.begin(); it != end; ++it) {
- if (!(*it)->equals(a, b))
</del><ins>+ for (auto& wrapper : m_propertyWrappers) {
+ if (!wrapper->equals(a, b))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1054,9 +1053,8 @@
</span><span class="cx">
</span><span class="cx"> virtual void blend(const AnimationBase* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const
</span><span class="cx"> {
</span><del>- Vector<AnimationPropertyWrapperBase*>::const_iterator end = m_propertyWrappers.end();
- for (Vector<AnimationPropertyWrapperBase*>::const_iterator it = m_propertyWrappers.begin(); it != end; ++it)
- (*it)->blend(anim, dst, a, b, progress);
</del><ins>+ for (auto& wrapper : m_propertyWrappers)
+ wrapper->blend(anim, dst, a, b, progress);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const Vector<AnimationPropertyWrapperBase*>& propertyWrappers() const { return m_propertyWrappers; }
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> // FIXME: Incorporate current page scale factor in snapping to device pixel. Perhaps we should just convert to float here and let UI process do the pixel snapping?
</span><span class="cx"> Vector<float> snapOffsetsAsFloat;
</span><span class="cx"> snapOffsetsAsFloat.reserveInitialCapacity(snapOffsets.size());
</span><del>- for (size_t i = 0; i < snapOffsets.size(); ++i)
- snapOffsetsAsFloat.append(roundToDevicePixel(snapOffsets[i], deviceScaleFactor, false));
</del><ins>+ for (auto& offset : snapOffsets)
+ snapOffsetsAsFloat.append(roundToDevicePixel(offset, deviceScaleFactor, false));
</ins><span class="cx">
</span><span class="cx"> if (axis == ScrollEventAxis::Horizontal)
</span><span class="cx"> node.setHorizontalSnapOffsets(snapOffsetsAsFloat);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (185166 => 185167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2015-06-03 20:44:56 UTC (rev 185166)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2015-06-03 20:52:42 UTC (rev 185167)
</span><span class="lines">@@ -128,8 +128,7 @@
</span><span class="cx"> // to not ask for regions at bad times.
</span><span class="cx">
</span><span class="cx"> if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {
</span><del>- for (FrameView::ScrollableAreaSet::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
- ScrollableArea* scrollableArea = *it;
</del><ins>+ for (auto& scrollableArea : *scrollableAreas) {
</ins><span class="cx"> // Composited scrollable areas can be scrolled off the main thread.
</span><span class="cx"> if (scrollableArea->usesAsyncScrolling())
</span><span class="cx"> continue;
</span><span class="lines">@@ -313,11 +312,10 @@
</span><span class="cx"> if (!viewportConstrainedObjects)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- for (FrameView::ViewportConstrainedObjectSet::const_iterator it = viewportConstrainedObjects->begin(), end = viewportConstrainedObjects->end(); it != end; ++it) {
- RenderObject& viewportConstrainedObject = **it;
- if (!is<RenderBoxModelObject>(viewportConstrainedObject) || !viewportConstrainedObject.hasLayer())
</del><ins>+ for (auto& viewportConstrainedObject : *viewportConstrainedObjects) {
+ if (!is<RenderBoxModelObject>(*viewportConstrainedObject) || !viewportConstrainedObject->hasLayer())
</ins><span class="cx"> return true;
</span><del>- RenderLayer& layer = *downcast<RenderBoxModelObject>(viewportConstrainedObject).layer();
</del><ins>+ RenderLayer& layer = *downcast<RenderBoxModelObject>(*viewportConstrainedObject).layer();
</ins><span class="cx"> // Any explicit reason that a fixed position element is not composited shouldn't cause slow scrolling.
</span><span class="cx"> if (!layer.isComposited() && layer.viewportConstrainedNotCompositedReason() == RenderLayer::NoNotCompositedReason)
</span><span class="cx"> return true;
</span></span></pre>
</div>
</div>
</body>
</html>