| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 StyleGeneratedImage::StyleGeneratedImage(const CSSImageGeneratorValue& value) | 32 StyleGeneratedImage::StyleGeneratedImage(const CSSImageGeneratorValue& value) |
| 33 : m_imageGeneratorValue(const_cast<CSSImageGeneratorValue*>(&value)) | 33 : m_imageGeneratorValue(const_cast<CSSImageGeneratorValue*>(&value)) |
| 34 , m_fixedSize(m_imageGeneratorValue->isFixedSize()) | 34 , m_fixedSize(m_imageGeneratorValue->isFixedSize()) |
| 35 { | 35 { |
| 36 m_isGeneratedImage = true; | 36 m_isGeneratedImage = true; |
| 37 } | 37 } |
| 38 | 38 |
| 39 PassRefPtrWillBeRawPtr<CSSValue> StyleGeneratedImage::cssValue() const | 39 RawPtr<CSSValue> StyleGeneratedImage::cssValue() const |
| 40 { | 40 { |
| 41 return m_imageGeneratorValue.get(); | 41 return m_imageGeneratorValue.get(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 PassRefPtrWillBeRawPtr<CSSValue> StyleGeneratedImage::computedCSSValue() const | 44 RawPtr<CSSValue> StyleGeneratedImage::computedCSSValue() const |
| 45 { | 45 { |
| 46 return m_imageGeneratorValue->valueWithURLsMadeAbsolute(); | 46 return m_imageGeneratorValue->valueWithURLsMadeAbsolute(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 LayoutSize StyleGeneratedImage::imageSize(const LayoutObject& layoutObject, floa
t multiplier, const LayoutSize& defaultObjectSize) const | 49 LayoutSize StyleGeneratedImage::imageSize(const LayoutObject& layoutObject, floa
t multiplier, const LayoutSize& defaultObjectSize) const |
| 50 { | 50 { |
| 51 if (m_fixedSize) { | 51 if (m_fixedSize) { |
| 52 FloatSize unzoomedDefaultObjectSize(defaultObjectSize); | 52 FloatSize unzoomedDefaultObjectSize(defaultObjectSize); |
| 53 unzoomedDefaultObjectSize.scale(1 / multiplier); | 53 unzoomedDefaultObjectSize.scale(1 / multiplier); |
| 54 return applyZoom(LayoutSize(m_imageGeneratorValue->fixedSize(layoutObjec
t, unzoomedDefaultObjectSize)), multiplier); | 54 return applyZoom(LayoutSize(m_imageGeneratorValue->fixedSize(layoutObjec
t, unzoomedDefaultObjectSize)), multiplier); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 77 return m_imageGeneratorValue->knownToBeOpaque(layoutObject); | 77 return m_imageGeneratorValue->knownToBeOpaque(layoutObject); |
| 78 } | 78 } |
| 79 | 79 |
| 80 DEFINE_TRACE(StyleGeneratedImage) | 80 DEFINE_TRACE(StyleGeneratedImage) |
| 81 { | 81 { |
| 82 visitor->trace(m_imageGeneratorValue); | 82 visitor->trace(m_imageGeneratorValue); |
| 83 StyleImage::trace(visitor); | 83 StyleImage::trace(visitor); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| OLD | NEW |