| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) 2013 Google Inc. All rights reserved. | 6 * Copyright (C) 2013 Google Inc. 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 destRect.intersect(requestedRect); | 127 destRect.intersect(requestedRect); |
| 128 addAbsolutePaintRect(destRect); | 128 addAbsolutePaintRect(destRect); |
| 129 return destRect; | 129 return destRect; |
| 130 } | 130 } |
| 131 | 131 |
| 132 LayoutObject* FEImage::referencedLayoutObject() const | 132 LayoutObject* FEImage::referencedLayoutObject() const |
| 133 { | 133 { |
| 134 if (!m_treeScope) | 134 if (!m_treeScope) |
| 135 return 0; | 135 return nullptr; |
| 136 Element* hrefElement = SVGURIReference::targetElementFromIRIString(m_href, *
m_treeScope); | 136 Element* hrefElement = SVGURIReference::targetElementFromIRIString(m_href, *
m_treeScope); |
| 137 if (!hrefElement || !hrefElement->isSVGElement()) | 137 if (!hrefElement || !hrefElement->isSVGElement()) |
| 138 return 0; | 138 return nullptr; |
| 139 return hrefElement->layoutObject(); | 139 return hrefElement->layoutObject(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 TextStream& FEImage::externalRepresentation(TextStream& ts, int indent) const | 142 TextStream& FEImage::externalRepresentation(TextStream& ts, int indent) const |
| 143 { | 143 { |
| 144 IntSize imageSize; | 144 IntSize imageSize; |
| 145 if (m_image) | 145 if (m_image) |
| 146 imageSize = m_image->size(); | 146 imageSize = m_image->size(); |
| 147 else if (LayoutObject* layoutObject = referencedLayoutObject()) | 147 else if (LayoutObject* layoutObject = referencedLayoutObject()) |
| 148 imageSize = enclosingIntRect(getLayoutObjectRepaintRect(layoutObject)).s
ize(); | 148 imageSize = enclosingIntRect(getLayoutObjectRepaintRect(layoutObject)).s
ize(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 m_preserveAspectRatio->transformRect(dstRect, srcRect); | 204 m_preserveAspectRatio->transformRect(dstRect, srcRect); |
| 205 | 205 |
| 206 SkBitmap bitmap; | 206 SkBitmap bitmap; |
| 207 if (!m_image->bitmapForCurrentFrame(&bitmap)) | 207 if (!m_image->bitmapForCurrentFrame(&bitmap)) |
| 208 return adoptRef(SkBitmapSource::Create(SkBitmap())); | 208 return adoptRef(SkBitmapSource::Create(SkBitmap())); |
| 209 | 209 |
| 210 return adoptRef(SkBitmapSource::Create(bitmap, srcRect, dstRect)); | 210 return adoptRef(SkBitmapSource::Create(bitmap, srcRect, dstRect)); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace blink | 213 } // namespace blink |
| OLD | NEW |