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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSFontFace.cpp

Issue 2957513002: Removed calls to RefPtr::Release in return statements with auto move. (Closed)
Patch Set: rebased Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return nullptr; 94 return nullptr;
95 95
96 while (!sources_.IsEmpty()) { 96 while (!sources_.IsEmpty()) {
97 Member<CSSFontFaceSource>& source = sources_.front(); 97 Member<CSSFontFaceSource>& source = sources_.front();
98 if (RefPtr<SimpleFontData> result = source->GetFontData(font_description)) { 98 if (RefPtr<SimpleFontData> result = source->GetFontData(font_description)) {
99 if (LoadStatus() == FontFace::kUnloaded && 99 if (LoadStatus() == FontFace::kUnloaded &&
100 (source->IsLoading() || source->IsLoaded())) 100 (source->IsLoading() || source->IsLoaded()))
101 SetLoadStatus(FontFace::kLoading); 101 SetLoadStatus(FontFace::kLoading);
102 if (LoadStatus() == FontFace::kLoading && source->IsLoaded()) 102 if (LoadStatus() == FontFace::kLoading && source->IsLoaded())
103 SetLoadStatus(FontFace::kLoaded); 103 SetLoadStatus(FontFace::kLoaded);
104 return result.Release(); 104 return result;
105 } 105 }
106 sources_.pop_front(); 106 sources_.pop_front();
107 } 107 }
108 108
109 if (LoadStatus() == FontFace::kUnloaded) 109 if (LoadStatus() == FontFace::kUnloaded)
110 SetLoadStatus(FontFace::kLoading); 110 SetLoadStatus(FontFace::kLoading);
111 if (LoadStatus() == FontFace::kLoading) 111 if (LoadStatus() == FontFace::kLoading)
112 SetLoadStatus(FontFace::kError); 112 SetLoadStatus(FontFace::kError);
113 return nullptr; 113 return nullptr;
114 } 114 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 FontFaceSet::From(*document)->BeginFontLoading(font_face_); 189 FontFaceSet::From(*document)->BeginFontLoading(font_face_);
190 } 190 }
191 191
192 DEFINE_TRACE(CSSFontFace) { 192 DEFINE_TRACE(CSSFontFace) {
193 visitor->Trace(segmented_font_face_); 193 visitor->Trace(segmented_font_face_);
194 visitor->Trace(sources_); 194 visitor->Trace(sources_);
195 visitor->Trace(font_face_); 195 visitor->Trace(font_face_);
196 } 196 }
197 197
198 } // namespace blink 198 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp ('k') | third_party/WebKit/Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698