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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.cpp

Issue 2847303002: Remove unnecessary zoom argument from GetImage() as its value is always available through the Layou… (Closed)
Patch Set: (rebased) Created 3 years, 7 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 void StyleFetchedImage::ImageNotifyFinished(ImageResourceContent*) { 112 void StyleFetchedImage::ImageNotifyFinished(ImageResourceContent*) {
113 if (document_ && image_ && image_->GetImage() && 113 if (document_ && image_ && image_->GetImage() &&
114 image_->GetImage()->IsSVGImage()) 114 image_->GetImage()->IsSVGImage())
115 ToSVGImage(image_->GetImage())->UpdateUseCounters(*document_); 115 ToSVGImage(image_->GetImage())->UpdateUseCounters(*document_);
116 // Oilpan: do not prolong the Document's lifetime. 116 // Oilpan: do not prolong the Document's lifetime.
117 document_.Clear(); 117 document_.Clear();
118 } 118 }
119 119
120 PassRefPtr<Image> StyleFetchedImage::GetImage(const LayoutObject&, 120 PassRefPtr<Image> StyleFetchedImage::GetImage(
121 const IntSize& container_size, 121 const LayoutObject& obj,
122 float zoom) const { 122 const IntSize& container_size) const {
123 if (!image_->GetImage()->IsSVGImage()) 123 if (!image_->GetImage()->IsSVGImage())
124 return image_->GetImage(); 124 return image_->GetImage();
125 125
126 return SVGImageForContainer::Create(ToSVGImage(image_->GetImage()), 126 return SVGImageForContainer::Create(ToSVGImage(image_->GetImage()),
127 container_size, zoom, url_); 127 container_size,
128 obj.StyleRef().EffectiveZoom(), url_);
128 } 129 }
129 130
130 bool StyleFetchedImage::KnownToBeOpaque( 131 bool StyleFetchedImage::KnownToBeOpaque(
131 const LayoutObject& layout_object) const { 132 const LayoutObject& layout_object) const {
132 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", 133 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage",
133 "data", 134 "data",
134 InspectorPaintImageEvent::Data(&layout_object, *image_.Get())); 135 InspectorPaintImageEvent::Data(&layout_object, *image_.Get()));
135 return image_->GetImage()->CurrentFrameKnownToBeOpaque( 136 return image_->GetImage()->CurrentFrameKnownToBeOpaque(
136 Image::kPreCacheMetadata); 137 Image::kPreCacheMetadata);
137 } 138 }
138 139
139 DEFINE_TRACE(StyleFetchedImage) { 140 DEFINE_TRACE(StyleFetchedImage) {
140 visitor->Trace(image_); 141 visitor->Trace(image_);
141 visitor->Trace(document_); 142 visitor->Trace(document_);
142 StyleImage::Trace(visitor); 143 StyleImage::Trace(visitor);
143 } 144 }
144 145
145 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImage.h ('k') | third_party/WebKit/Source/core/style/StyleFetchedImageSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698