OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 return size; | 232 return size; |
233 | 233 |
234 // Don't let images that have a width/height >= 1 shrink below 1 when zoomed
. | 234 // Don't let images that have a width/height >= 1 shrink below 1 when zoomed
. |
235 LayoutSize minimumSize(size.width() > LayoutUnit() ? LayoutUnit(1) : LayoutU
nit(), | 235 LayoutSize minimumSize(size.width() > LayoutUnit() ? LayoutUnit(1) : LayoutU
nit(), |
236 LayoutUnit(size.height() > LayoutUnit() ? LayoutUnit(1) : LayoutUnit()))
; | 236 LayoutUnit(size.height() > LayoutUnit() ? LayoutUnit(1) : LayoutUnit()))
; |
237 size.scale(multiplier); | 237 size.scale(multiplier); |
238 size.clampToMinimumSize(minimumSize); | 238 size.clampToMinimumSize(minimumSize); |
239 return size; | 239 return size; |
240 } | 240 } |
241 | 241 |
242 void ImageResource::computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSi
ze& intrinsicRatio) | |
243 { | |
244 if (m_image) | |
245 m_image->computeIntrinsicDimensions(intrinsicSize, intrinsicRatio); | |
246 } | |
247 | |
248 void ImageResource::notifyObservers(const IntRect* changeRect) | 242 void ImageResource::notifyObservers(const IntRect* changeRect) |
249 { | 243 { |
250 ResourceClientWalker<ImageResourceClient> w(m_clients); | 244 ResourceClientWalker<ImageResourceClient> w(m_clients); |
251 while (ImageResourceClient* c = w.next()) | 245 while (ImageResourceClient* c = w.next()) |
252 c->imageChanged(this, changeRect); | 246 c->imageChanged(this, changeRect); |
253 | 247 |
254 ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); | 248 ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); |
255 while (ImageResourceClient* c = w2.next()) | 249 while (ImageResourceClient* c = w2.next()) |
256 c->imageChanged(this, changeRect); | 250 c->imageChanged(this, changeRect); |
257 } | 251 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 return true; | 458 return true; |
465 return !securityOrigin->taintsCanvas(response().url()); | 459 return !securityOrigin->taintsCanvas(response().url()); |
466 } | 460 } |
467 | 461 |
468 bool ImageResource::loadingMultipartContent() const | 462 bool ImageResource::loadingMultipartContent() const |
469 { | 463 { |
470 return m_loader && m_loader->loadingMultipartContent(); | 464 return m_loader && m_loader->loadingMultipartContent(); |
471 } | 465 } |
472 | 466 |
473 } // namespace blink | 467 } // namespace blink |
OLD | NEW |