Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 return m_bestFitImage->isLoaded(); | 79 return m_bestFitImage->isLoaded(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool StyleFetchedImageSet::errorOccurred() const | 82 bool StyleFetchedImageSet::errorOccurred() const |
| 83 { | 83 { |
| 84 return m_bestFitImage->errorOccurred(); | 84 return m_bestFitImage->errorOccurred(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 LayoutSize StyleFetchedImageSet::imageSize(const LayoutObject* layoutObject, flo at multiplier) const | 87 LayoutSize StyleFetchedImageSet::imageSize(const LayoutObject* layoutObject, flo at multiplier) const |
| 88 { | 88 { |
| 89 LayoutSize scaledImageSize = m_bestFitImage->imageSizeForLayoutObject(layout Object, multiplier); | 89 RespectImageOrientationEnum shouldRespectImageOrientation = layoutObject ? l ayoutObject->shouldRespectImageOrientation() : DoNotRespectImageOrientation; |
| 90 LayoutSize scaledImageSize = m_bestFitImage->imageSize(shouldRespectImageOri entation, multiplier); | |
|
Yoav Weiss
2015/11/24 10:29:07
and here as well :)
davve
2015/11/24 12:49:13
If I had such a function, yes. (again)
| |
| 90 scaledImageSize.scale(1 / m_imageScaleFactor); | 91 scaledImageSize.scale(1 / m_imageScaleFactor); |
| 91 return scaledImageSize; | 92 return scaledImageSize; |
| 92 } | 93 } |
| 93 | 94 |
| 94 bool StyleFetchedImageSet::imageHasRelativeWidth() const | 95 bool StyleFetchedImageSet::imageHasRelativeWidth() const |
| 95 { | 96 { |
| 96 return m_bestFitImage->imageHasRelativeWidth(); | 97 return m_bestFitImage->imageHasRelativeWidth(); |
| 97 } | 98 } |
| 98 | 99 |
| 99 bool StyleFetchedImageSet::imageHasRelativeHeight() const | 100 bool StyleFetchedImageSet::imageHasRelativeHeight() const |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 return m_bestFitImage->currentFrameKnownToBeOpaque(layoutObject); | 135 return m_bestFitImage->currentFrameKnownToBeOpaque(layoutObject); |
| 135 } | 136 } |
| 136 | 137 |
| 137 DEFINE_TRACE(StyleFetchedImageSet) | 138 DEFINE_TRACE(StyleFetchedImageSet) |
| 138 { | 139 { |
| 139 visitor->trace(m_imageSetValue); | 140 visitor->trace(m_imageSetValue); |
| 140 StyleImage::trace(visitor); | 141 StyleImage::trace(visitor); |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |