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

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

Issue 696123002: Revert of Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/ImagePainter.cpp ('k') | Source/core/rendering/RenderImage.h » ('j') | 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 3734 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 if (isInline() || !avoidsFloats() || isFloating()) 3745 if (isInline() || !avoidsFloats() || isFloating())
3746 return false; 3746 return false;
3747 3747
3748 // Only auto width objects can possibly shrink to avoid floats. 3748 // Only auto width objects can possibly shrink to avoid floats.
3749 return style()->width().isAuto(); 3749 return style()->width().isAuto();
3750 } 3750 }
3751 3751
3752 static bool isReplacedElement(Node* node) 3752 static bool isReplacedElement(Node* node)
3753 { 3753 {
3754 // Checkboxes and radioboxes are not isReplaced() nor do they have their own renderer in which to override avoidFloats(). 3754 // Checkboxes and radioboxes are not isReplaced() nor do they have their own renderer in which to override avoidFloats().
3755 return node && node->isElementNode() && (toElement(node)->isFormControlEleme nt() || isHTMLImageElement(toElement(node))); 3755 return node && node->isElementNode() && toElement(node)->isFormControlElemen t();
3756 } 3756 }
3757 3757
3758 bool RenderBox::avoidsFloats() const 3758 bool RenderBox::avoidsFloats() const
3759 { 3759 {
3760 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); 3760 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated();
3761 } 3761 }
3762 3762
3763 PaintInvalidationReason RenderBox::paintInvalidationReason(const RenderLayerMode lObject& paintInvalidationContainer, 3763 PaintInvalidationReason RenderBox::paintInvalidationReason(const RenderLayerMode lObject& paintInvalidationContainer,
3764 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec t& newBounds, const LayoutPoint& newLocation) const 3764 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec t& newBounds, const LayoutPoint& newLocation) const
3765 { 3765 {
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
4427 4427
4428 setLogicalTop(oldLogicalTop); 4428 setLogicalTop(oldLogicalTop);
4429 setLogicalWidth(oldLogicalWidth); 4429 setLogicalWidth(oldLogicalWidth);
4430 setMarginLeft(oldMarginLeft); 4430 setMarginLeft(oldMarginLeft);
4431 setMarginRight(oldMarginRight); 4431 setMarginRight(oldMarginRight);
4432 4432
4433 return borderBox; 4433 return borderBox;
4434 } 4434 }
4435 4435
4436 } // namespace blink 4436 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ImagePainter.cpp ('k') | Source/core/rendering/RenderImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698