Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: Source/WebCore/rendering/RenderImage.cpp

Issue 7696019: Merge 93441 - REGRESSION(r91628): 3 canvas tests crash on Chromium Linux and one test fail on Chr... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698