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

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

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated 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
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 3737 matching lines...) Expand 10 before | Expand all | Expand 10 after
3748 if (isInline() || !avoidsFloats() || isFloating()) 3748 if (isInline() || !avoidsFloats() || isFloating())
3749 return false; 3749 return false;
3750 3750
3751 // Only auto width objects can possibly shrink to avoid floats. 3751 // Only auto width objects can possibly shrink to avoid floats.
3752 return style()->width().isAuto(); 3752 return style()->width().isAuto();
3753 } 3753 }
3754 3754
3755 static bool isReplacedElement(Node* node) 3755 static bool isReplacedElement(Node* node)
3756 { 3756 {
3757 // Checkboxes and radioboxes are not isReplaced() nor do they have their own renderer in which to override avoidFloats(). 3757 // Checkboxes and radioboxes are not isReplaced() nor do they have their own renderer in which to override avoidFloats().
3758 return node && node->isElementNode() && toElement(node)->isFormControlElemen t(); 3758 return node && node->isElementNode() && (toElement(node)->isFormControlEleme nt() || isHTMLImageElement(toElement(node)));
3759 } 3759 }
3760 3760
3761 bool RenderBox::avoidsFloats() const 3761 bool RenderBox::avoidsFloats() const
3762 { 3762 {
3763 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); 3763 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated();
3764 } 3764 }
3765 3765
3766 PaintInvalidationReason RenderBox::paintInvalidationReason(const RenderLayerMode lObject& paintInvalidationContainer, 3766 PaintInvalidationReason RenderBox::paintInvalidationReason(const RenderLayerMode lObject& paintInvalidationContainer,
3767 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec t& newBounds, const LayoutPoint& newLocation) const 3767 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec t& newBounds, const LayoutPoint& newLocation) const
3768 { 3768 {
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
4438 4438
4439 setLogicalTop(oldLogicalTop); 4439 setLogicalTop(oldLogicalTop);
4440 setLogicalWidth(oldLogicalWidth); 4440 setLogicalWidth(oldLogicalWidth);
4441 setMarginLeft(oldMarginLeft); 4441 setMarginLeft(oldMarginLeft);
4442 setMarginRight(oldMarginRight); 4442 setMarginRight(oldMarginRight);
4443 4443
4444 return borderBox; 4444 return borderBox;
4445 } 4445 }
4446 4446
4447 } // namespace blink 4447 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698