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

Side by Side Diff: sky/engine/core/rendering/RenderImage.cpp

Issue 709503003: Remove RenderObject::isVideo (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
10 * 10 *
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 if (intrinsicSize.isEmpty() && (m_imageResource->imageHasRelativeWidth() || m_imageResource->imageHasRelativeHeight())) { 513 if (intrinsicSize.isEmpty() && (m_imageResource->imageHasRelativeWidth() || m_imageResource->imageHasRelativeHeight())) {
514 RenderObject* containingBlock = isOutOfFlowPositioned() ? container() : this->containingBlock(); 514 RenderObject* containingBlock = isOutOfFlowPositioned() ? container() : this->containingBlock();
515 if (containingBlock->isBox()) { 515 if (containingBlock->isBox()) {
516 RenderBox* box = toRenderBox(containingBlock); 516 RenderBox* box = toRenderBox(containingBlock);
517 intrinsicSize.setWidth(box->availableLogicalWidth().toFloat()); 517 intrinsicSize.setWidth(box->availableLogicalWidth().toFloat());
518 intrinsicSize.setHeight(box->availableLogicalHeight(IncludeMarginBor derPadding).toFloat()); 518 intrinsicSize.setHeight(box->availableLogicalHeight(IncludeMarginBor derPadding).toFloat());
519 } 519 }
520 } 520 }
521 // Don't compute an intrinsic ratio to preserve historical WebKit behavior i f we're painting alt text and/or a broken image. 521 // Don't compute an intrinsic ratio to preserve historical WebKit behavior i f we're painting alt text and/or a broken image.
522 // Video is excluded from this behavior because video elements have a defaul t aspect ratio that a failed poster image load should not override. 522 // Video is excluded from this behavior because video elements have a defaul t aspect ratio that a failed poster image load should not override.
523 if (m_imageResource && m_imageResource->errorOccurred() && !isVideo()) { 523 if (m_imageResource && m_imageResource->errorOccurred()) {
524 intrinsicRatio = 1; 524 intrinsicRatio = 1;
525 return; 525 return;
526 } 526 }
527 } 527 }
528 528
529 bool RenderImage::needsPreferredWidthsRecalculation() const 529 bool RenderImage::needsPreferredWidthsRecalculation() const
530 { 530 {
531 return RenderReplaced::needsPreferredWidthsRecalculation(); 531 return RenderReplaced::needsPreferredWidthsRecalculation();
532 } 532 }
533 533
534 } // namespace blink 534 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderFlexibleBox.cpp ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698