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

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

Issue 2812743003: Rename cleanup in comments in css/ directory. (Closed)
Patch Set: Created 3 years, 8 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // a pending image exists, and only load that image. For example: 146 // a pending image exists, and only load that image. For example:
147 // 147 //
148 // <style> 148 // <style>
149 // div { background-image: url(a.png); } 149 // div { background-image: url(a.png); }
150 // div { background-image: url(b.png); } 150 // div { background-image: url(b.png); }
151 // div { background-image: none; } 151 // div { background-image: none; }
152 // </style> 152 // </style>
153 // <div></div> 153 // <div></div>
154 // 154 //
155 // We call styleImage() for both a.png and b.png adding the 155 // We call styleImage() for both a.png and b.png adding the
156 // CSSPropertyBackgroundImage property to the m_pendingImageProperties set, 156 // CSSPropertyBackgroundImage property to the pending_image_properties_ set,
157 // then we null out the background image because of the "none". 157 // then we null out the background image because of the "none".
158 // 158 //
159 // If we eagerly loaded the images we'd fetch a.png, even though it's not 159 // If we eagerly loaded the images we'd fetch a.png, even though it's not
160 // used. If we didn't null check below we'd crash since the none actually 160 // used. If we didn't null check below we'd crash since the none actually
161 // removed all background images. 161 // removed all background images.
162 162
163 for (CSSPropertyID property : pending_image_properties_) { 163 for (CSSPropertyID property : pending_image_properties_) {
164 switch (property) { 164 switch (property) {
165 case CSSPropertyBackgroundImage: { 165 case CSSPropertyBackgroundImage: {
166 for (FillLayer* background_layer = &style->AccessBackgroundLayers(); 166 for (FillLayer* background_layer = &style->AccessBackgroundLayers();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 } 259 }
260 260
261 void ElementStyleResources::LoadPendingResources( 261 void ElementStyleResources::LoadPendingResources(
262 ComputedStyle* computed_style) { 262 ComputedStyle* computed_style) {
263 LoadPendingImages(computed_style); 263 LoadPendingImages(computed_style);
264 LoadPendingSVGDocuments(computed_style); 264 LoadPendingSVGDocuments(computed_style);
265 } 265 }
266 266
267 } // namespace blink 267 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698