Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: Source/core/css/CSSSegmentedFontFace.cpp

Issue 645743003: Use C++11 range-based loop for core/css (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: better variable names Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSGridTemplateAreasValue.cpp ('k') | Source/core/css/ElementRuleCollector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSegmentedFontFace.cpp
diff --git a/Source/core/css/CSSSegmentedFontFace.cpp b/Source/core/css/CSSSegmentedFontFace.cpp
index 854f80f038ab4091ff2de6bea6d7aa2aa2d233ec..34fa69cd505daa8dea251efe4c63db065b1020c6 100644
--- a/Source/core/css/CSSSegmentedFontFace.cpp
+++ b/Source/core/css/CSSSegmentedFontFace.cpp
@@ -48,8 +48,8 @@ CSSSegmentedFontFace::~CSSSegmentedFontFace()
{
pruneTable();
#if !ENABLE(OILPAN)
- for (FontFaceList::iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it)
- (*it)->cssFontFace()->clearSegmentedFontFace();
+ for (const auto& fontFace : m_fontFaces)
+ fontFace->cssFontFace()->clearSegmentedFontFace();
#endif
}
@@ -65,8 +65,8 @@ void CSSSegmentedFontFace::pruneTable()
bool CSSSegmentedFontFace::isValid() const
{
// Valid if at least one font face is valid.
- for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it) {
- if ((*it)->cssFontFace()->isValid())
+ for (const auto& fontFace : m_fontFaces) {
+ if (fontFace->cssFontFace()->isValid())
return true;
}
return false;
@@ -167,8 +167,8 @@ PassRefPtr<FontData> CSSSegmentedFontFace::getFontData(const FontDescription& fo
bool CSSSegmentedFontFace::isLoading() const
{
- for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it) {
- if ((*it)->loadStatus() == FontFace::Loading)
+ for (const auto& fontFace : m_fontFaces) {
+ if (fontFace->loadStatus() == FontFace::Loading)
return true;
}
return false;
@@ -176,8 +176,8 @@ bool CSSSegmentedFontFace::isLoading() const
bool CSSSegmentedFontFace::isLoaded() const
{
- for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it) {
- if ((*it)->loadStatus() != FontFace::Loaded)
+ for (const auto& fontFace : m_fontFaces) {
+ if (fontFace->loadStatus() != FontFace::Loaded)
return false;
}
return true;
@@ -195,8 +195,8 @@ void CSSSegmentedFontFace::willUseFontData(const FontDescription& fontDescriptio
bool CSSSegmentedFontFace::checkFont(const String& text) const
{
- for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it) {
- if ((*it)->loadStatus() != FontFace::Loaded && (*it)->cssFontFace()->ranges().intersectsWith(text))
+ for (const auto& fontFace : m_fontFaces) {
+ if (fontFace->loadStatus() != FontFace::Loaded && fontFace->cssFontFace()->ranges().intersectsWith(text))
return false;
}
return true;
@@ -204,9 +204,9 @@ bool CSSSegmentedFontFace::checkFont(const String& text) const
void CSSSegmentedFontFace::match(const String& text, WillBeHeapVector<RefPtrWillBeMember<FontFace> >& faces) const
{
- for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFaces.end(); ++it) {
- if ((*it)->cssFontFace()->ranges().intersectsWith(text))
- faces.append(*it);
+ for (const auto& fontFace : m_fontFaces) {
+ if (fontFace->cssFontFace()->ranges().intersectsWith(text))
+ faces.append(fontFace);
}
}
« no previous file with comments | « Source/core/css/CSSGridTemplateAreasValue.cpp ('k') | Source/core/css/ElementRuleCollector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698