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

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

Issue 458373003: Full invalidate <img> on resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 return; 544 return;
545 545
546 if (isHTMLInputElement(*node())) 546 if (isHTMLInputElement(*node()))
547 m_altText = toHTMLInputElement(node())->altText(); 547 m_altText = toHTMLInputElement(node())->altText();
548 else if (isHTMLImageElement(*node())) 548 else if (isHTMLImageElement(*node()))
549 m_altText = toHTMLImageElement(node())->altText(); 549 m_altText = toHTMLImageElement(node())->altText();
550 } 550 }
551 551
552 void RenderImage::layout() 552 void RenderImage::layout()
553 { 553 {
554 LayoutRect oldContentRect = replacedContentRect();
554 RenderReplaced::layout(); 555 RenderReplaced::layout();
555 updateInnerContentRect(); 556 if (replacedContentRect() != oldContentRect) {
557 setShouldDoFullPaintInvalidation(true);
558 updateInnerContentRect();
559 }
556 } 560 }
557 561
558 bool RenderImage::updateImageLoadingPriorities() 562 bool RenderImage::updateImageLoadingPriorities()
559 { 563 {
560 if (!m_imageResource || !m_imageResource->cachedImage() || m_imageResource-> cachedImage()->isLoaded()) 564 if (!m_imageResource || !m_imageResource->cachedImage() || m_imageResource-> cachedImage()->isLoaded())
561 return false; 565 return false;
562 566
563 LayoutRect viewBounds = viewRect(); 567 LayoutRect viewBounds = viewRect();
564 LayoutRect objectBounds = absoluteContentBox(); 568 LayoutRect objectBounds = absoluteContentBox();
565 569
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 if (!m_imageResource) 622 if (!m_imageResource)
619 return 0; 623 return 0;
620 624
621 ImageResource* cachedImage = m_imageResource->cachedImage(); 625 ImageResource* cachedImage = m_imageResource->cachedImage();
622 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 626 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
623 return toSVGImage(cachedImage->image())->embeddedContentBox(); 627 return toSVGImage(cachedImage->image())->embeddedContentBox();
624 628
625 return 0; 629 return 0;
626 } 630 }
627 631
632
leviw_travelin_and_unemployed 2014/08/11 22:09:26 Nit: remove
Xianzhu 2014/08/11 22:25:16 Done.
628 } // namespace blink 633 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698