OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // Background paints under borders. | 401 // Background paints under borders. |
402 if (backgroundClip == BorderFillBox && style()->hasBorder() && !borderObscur
esBackground()) | 402 if (backgroundClip == BorderFillBox && style()->hasBorder() && !borderObscur
esBackground()) |
403 return false; | 403 return false; |
404 | 404 |
405 // Background shows in padding area. | 405 // Background shows in padding area. |
406 if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) &&
style()->hasPadding()) | 406 if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) &&
style()->hasPadding()) |
407 return false; | 407 return false; |
408 | 408 |
409 // Check for bitmap image with alpha. | 409 // Check for bitmap image with alpha. |
410 Image* image = m_imageResource->image().get(); | 410 Image* image = m_imageResource->image().get(); |
411 if (!image || !image->isBitmapImage()) | 411 if (!image || !image->isBitmapImage() || image->currentFrameHasAlpha()) |
412 return false; | 412 return false; |
413 | 413 |
414 BitmapImage* bitmapImage = static_cast<BitmapImage*>(image); | |
415 if (bitmapImage->currentFrameHasAlpha()) | |
416 return false; | |
417 | |
418 return true; | 414 return true; |
419 } | 415 } |
420 | 416 |
421 int RenderImage::minimumReplacedHeight() const | 417 int RenderImage::minimumReplacedHeight() const |
422 { | 418 { |
423 return m_imageResource->errorOccurred() ? intrinsicSize().height() : 0; | 419 return m_imageResource->errorOccurred() ? intrinsicSize().height() : 0; |
424 } | 420 } |
425 | 421 |
426 HTMLMapElement* RenderImage::imageMap() const | 422 HTMLMapElement* RenderImage::imageMap() const |
427 { | 423 { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 int intrinsicWidth = intrinsicLogicalWidth(); | 545 int intrinsicWidth = intrinsicLogicalWidth(); |
550 int intrinsicHeight = intrinsicLogicalHeight(); | 546 int intrinsicHeight = intrinsicLogicalHeight(); |
551 if (!intrinsicWidth) | 547 if (!intrinsicWidth) |
552 return 0; | 548 return 0; |
553 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) | 549 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) |
554 return intrinsicHeight; // Don't bother scaling. | 550 return intrinsicHeight; // Don't bother scaling. |
555 return RenderBox::computeReplacedLogicalWidth() * intrinsicHeight / intrinsi
cWidth; | 551 return RenderBox::computeReplacedLogicalWidth() * intrinsicHeight / intrinsi
cWidth; |
556 } | 552 } |
557 | 553 |
558 } // namespace WebCore | 554 } // namespace WebCore |
OLD | NEW |