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

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

Issue 1720853002: Remove Image::computeIntrinsicDimensions() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-and-use-updateconcretesize-upload
Patch Set: Avoid using the size of the error image. Null-check in ImageResource saved the day in previous patc… Created 4 years, 9 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 LayoutSize scaledImageSize = m_bestFitImage->imageSize(DoNotRespectImageOrie ntation, multiplier); 106 LayoutSize scaledImageSize = m_bestFitImage->imageSize(DoNotRespectImageOrie ntation, multiplier);
107 scaledImageSize.scale(1 / m_imageScaleFactor); 107 scaledImageSize.scale(1 / m_imageScaleFactor);
108 return scaledImageSize; 108 return scaledImageSize;
109 } 109 }
110 110
111 bool StyleFetchedImageSet::imageHasRelativeSize() const 111 bool StyleFetchedImageSet::imageHasRelativeSize() const
112 { 112 {
113 return m_bestFitImage->imageHasRelativeSize(); 113 return m_bestFitImage->imageHasRelativeSize();
114 } 114 }
115 115
116 void StyleFetchedImageSet::computeIntrinsicDimensions(const LayoutObject*, Float Size& intrinsicSize, FloatSize& intrinsicRatio)
117 {
118 m_bestFitImage->computeIntrinsicDimensions(intrinsicSize, intrinsicRatio);
119 }
120
121 bool StyleFetchedImageSet::usesImageContainerSize() const 116 bool StyleFetchedImageSet::usesImageContainerSize() const
122 { 117 {
123 return m_bestFitImage->usesImageContainerSize(); 118 return m_bestFitImage->usesImageContainerSize();
124 } 119 }
125 120
126 void StyleFetchedImageSet::addClient(LayoutObject* layoutObject) 121 void StyleFetchedImageSet::addClient(LayoutObject* layoutObject)
127 { 122 {
128 m_bestFitImage->addClient(layoutObject); 123 m_bestFitImage->addClient(layoutObject);
129 } 124 }
130 125
(...skipping 17 matching lines...) Expand all
148 } 143 }
149 144
150 DEFINE_TRACE(StyleFetchedImageSet) 145 DEFINE_TRACE(StyleFetchedImageSet)
151 { 146 {
152 visitor->trace(m_bestFitImage); 147 visitor->trace(m_bestFitImage);
153 visitor->trace(m_imageSetValue); 148 visitor->trace(m_imageSetValue);
154 StyleImage::trace(visitor); 149 StyleImage::trace(visitor);
155 } 150 }
156 151
157 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698