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(Length& intrinsicWidth, Length& i
ntrinsicHeight, FloatSize& intrinsicRatio) | 242 void ImageResource::computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSi
ze& intrinsicRatio) |
243 { | 243 { |
244 if (m_image) | 244 if (m_image) |
245 m_image->computeIntrinsicDimensions(intrinsicWidth, intrinsicHeight, int
rinsicRatio); | 245 m_image->computeIntrinsicDimensions(intrinsicSize, intrinsicRatio); |
246 } | 246 } |
247 | 247 |
248 void ImageResource::notifyObservers(const IntRect* changeRect) | 248 void ImageResource::notifyObservers(const IntRect* changeRect) |
249 { | 249 { |
250 ResourceClientWalker<ImageResourceClient> w(m_clients); | 250 ResourceClientWalker<ImageResourceClient> w(m_clients); |
251 while (ImageResourceClient* c = w.next()) | 251 while (ImageResourceClient* c = w.next()) |
252 c->imageChanged(this, changeRect); | 252 c->imageChanged(this, changeRect); |
253 | 253 |
254 ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); | 254 ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); |
255 while (ImageResourceClient* c = w2.next()) | 255 while (ImageResourceClient* c = w2.next()) |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 return true; | 464 return true; |
465 return !securityOrigin->taintsCanvas(response().url()); | 465 return !securityOrigin->taintsCanvas(response().url()); |
466 } | 466 } |
467 | 467 |
468 bool ImageResource::loadingMultipartContent() const | 468 bool ImageResource::loadingMultipartContent() const |
469 { | 469 { |
470 return m_loader && m_loader->loadingMultipartContent(); | 470 return m_loader && m_loader->loadingMultipartContent(); |
471 } | 471 } |
472 | 472 |
473 } // namespace blink | 473 } // namespace blink |
OLD | NEW |