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

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

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review Created 7 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
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) 2006 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual LayoutUnit minimumReplacedHeight() const OVERRIDE; 94 virtual LayoutUnit minimumReplacedHeight() const OVERRIDE;
95 95
96 virtual void notifyFinished(Resource*) OVERRIDE FINAL; 96 virtual void notifyFinished(Resource*) OVERRIDE FINAL;
97 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE FINAL; 97 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE FINAL;
98 98
99 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const OVERRIDE FINAL; 99 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const OVERRIDE FINAL;
100 100
101 IntSize imageSizeForError(CachedImage*) const; 101 IntSize imageSizeForError(CachedImage*) const;
102 void imageDimensionsChanged(bool imageSizeChanged, const IntRect* = 0); 102 void imageDimensionsChanged(bool imageSizeChanged, const IntRect* = 0);
103 bool updateIntrinsicSizeIfNeeded(const LayoutSize&, bool imageSizeChanged); 103 bool updateIntrinsicSizeIfNeeded(const LayoutSize&, bool imageSizeChanged);
104 // Update the size of the image to be rendered. Object-fit may cause this to be different from the CSS box's content rect.
105 void updateInnerContentRect();
104 106
105 void paintAreaElementFocusRing(PaintInfo&); 107 void paintAreaElementFocusRing(PaintInfo&);
106 108
107 // Text to display as long as the image isn't available. 109 // Text to display as long as the image isn't available.
108 String m_altText; 110 String m_altText;
109 OwnPtr<RenderImageResource> m_imageResource; 111 OwnPtr<RenderImageResource> m_imageResource;
110 bool m_needsToSetSizeForAltText; 112 bool m_needsToSetSizeForAltText;
111 bool m_didIncrementVisuallyNonEmptyPixelCount; 113 bool m_didIncrementVisuallyNonEmptyPixelCount;
112 bool m_isGeneratedContent; 114 bool m_isGeneratedContent;
113 115
(...skipping 11 matching lines...) Expand all
125 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderImage()); 127 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderImage());
126 return static_cast<const RenderImage*>(object); 128 return static_cast<const RenderImage*>(object);
127 } 129 }
128 130
129 // This will catch anyone doing an unnecessary cast. 131 // This will catch anyone doing an unnecessary cast.
130 void toRenderImage(const RenderImage*); 132 void toRenderImage(const RenderImage*);
131 133
132 } // namespace WebCore 134 } // namespace WebCore
133 135
134 #endif // RenderImage_h 136 #endif // RenderImage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698