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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 381473002: Use reference for FillLayer if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 static void appendImageIfNotNull(Vector<ImageResource*>& imageResources, const S tyleImage* styleImage) 186 static void appendImageIfNotNull(Vector<ImageResource*>& imageResources, const S tyleImage* styleImage)
187 { 187 {
188 if (styleImage && styleImage->cachedImage()) { 188 if (styleImage && styleImage->cachedImage()) {
189 ImageResource* imageResource = styleImage->cachedImage(); 189 ImageResource* imageResource = styleImage->cachedImage();
190 if (imageResource && !imageResource->isLoaded()) 190 if (imageResource && !imageResource->isLoaded())
191 imageResources.append(styleImage->cachedImage()); 191 imageResources.append(styleImage->cachedImage());
192 } 192 }
193 } 193 }
194 194
195 static void appendLayers(Vector<ImageResource*>& images, const FillLayer* styleL ayer) 195 static void appendLayers(Vector<ImageResource*>& images, const FillLayer& styleL ayer)
196 { 196 {
197 for (const FillLayer* layer = styleLayer; layer; layer = layer->next()) { 197 for (const FillLayer* layer = &styleLayer; layer; layer = layer->next())
198 appendImageIfNotNull(images, layer->image()); 198 appendImageIfNotNull(images, layer->image());
199 }
200 } 199 }
201 200
202 static void appendImagesFromStyle(Vector<ImageResource*>& images, RenderStyle& b lockStyle) 201 static void appendImagesFromStyle(Vector<ImageResource*>& images, RenderStyle& b lockStyle)
203 { 202 {
204 appendLayers(images, blockStyle.backgroundLayers()); 203 appendLayers(images, blockStyle.backgroundLayers());
205 appendLayers(images, blockStyle.maskLayers()); 204 appendLayers(images, blockStyle.maskLayers());
206 205
207 const ContentData* contentData = blockStyle.contentData(); 206 const ContentData* contentData = blockStyle.contentData();
208 if (contentData && contentData->isImage()) { 207 if (contentData && contentData->isImage()) {
209 const ImageContentData* imageContentData = static_cast<const ImageConten tData*>(contentData); 208 const ImageContentData* imageContentData = static_cast<const ImageConten tData*>(contentData);
(...skipping 4846 matching lines...) Expand 10 before | Expand all | Expand 10 after
5056 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5055 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5057 { 5056 {
5058 showRenderObject(); 5057 showRenderObject();
5059 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5058 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5060 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5059 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5061 } 5060 }
5062 5061
5063 #endif 5062 #endif
5064 5063
5065 } // namespace WebCore 5064 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698