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

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

Issue 2352193004: Document* -> Document& for loadSubimages and friends. (Closed)
Patch Set: Added constness Created 4 years, 3 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. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Stash the DocumentResource on the reference filter. 130 // Stash the DocumentResource on the reference filter.
131 ReferenceFilterBuilder::setDocumentResourceReference(referenceFilter , new DocumentResourceReference(resource)); 131 ReferenceFilterBuilder::setDocumentResourceReference(referenceFilter , new DocumentResourceReference(resource));
132 } 132 }
133 } 133 }
134 } 134 }
135 135
136 StyleImage* ElementStyleResources::loadPendingImage(ComputedStyle* style, StyleP endingImage* pendingImage, CrossOriginAttributeValue crossOrigin) 136 StyleImage* ElementStyleResources::loadPendingImage(ComputedStyle* style, StyleP endingImage* pendingImage, CrossOriginAttributeValue crossOrigin)
137 { 137 {
138 if (CSSImageValue* imageValue = pendingImage->cssImageValue()) 138 if (CSSImageValue* imageValue = pendingImage->cssImageValue())
139 return imageValue->cacheImage(m_document, crossOrigin); 139 return imageValue->cacheImage(*m_document, crossOrigin);
140 140
141 if (CSSPaintValue* paintValue = pendingImage->cssPaintValue()) { 141 if (CSSPaintValue* paintValue = pendingImage->cssPaintValue()) {
142 StyleGeneratedImage* image = StyleGeneratedImage::create(*paintValue); 142 StyleGeneratedImage* image = StyleGeneratedImage::create(*paintValue);
143 style->addPaintImage(image); 143 style->addPaintImage(image);
144 return image; 144 return image;
145 } 145 }
146 146
147 if (CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGene ratorValue()) { 147 if (CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGene ratorValue()) {
148 imageGeneratorValue->loadSubimages(m_document); 148 imageGeneratorValue->loadSubimages(*m_document);
149 return StyleGeneratedImage::create(*imageGeneratorValue); 149 return StyleGeneratedImage::create(*imageGeneratorValue);
150 } 150 }
151 151
152 if (CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu e()) 152 if (CSSCursorImageValue* cursorImageValue = pendingImage->cssCursorImageValu e())
153 return cursorImageValue->cacheImage(m_document, m_deviceScaleFactor); 153 return cursorImageValue->cacheImage(*m_document, m_deviceScaleFactor);
154 154
155 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue()) 155 if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue())
156 return imageSetValue->cacheImage(m_document, m_deviceScaleFactor, crossO rigin); 156 return imageSetValue->cacheImage(*m_document, m_deviceScaleFactor, cross Origin);
157 157
158 ASSERT_NOT_REACHED(); 158 ASSERT_NOT_REACHED();
159 return nullptr; 159 return nullptr;
160 } 160 }
161 161
162 void ElementStyleResources::loadPendingImages(ComputedStyle* style) 162 void ElementStyleResources::loadPendingImages(ComputedStyle* style)
163 { 163 {
164 // We must loop over the properties and then look at the style to see if 164 // We must loop over the properties and then look at the style to see if
165 // a pending image exists, and only load that image. For example: 165 // a pending image exists, and only load that image. For example:
166 // 166 //
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 } 253 }
254 254
255 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle) 255 void ElementStyleResources::loadPendingResources(ComputedStyle* computedStyle)
256 { 256 {
257 loadPendingImages(computedStyle); 257 loadPendingImages(computedStyle);
258 loadPendingSVGDocuments(computedStyle); 258 loadPendingSVGDocuments(computedStyle);
259 } 259 }
260 260
261 } // namespace blink 261 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698