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

Unified Diff: sky/engine/core/rendering/RenderImage.h

Issue 732163004: Teach HTMLImageElement that it doesn't need ::attach. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Swap logic. 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/rendering/RenderImage.h
diff --git a/sky/engine/core/rendering/RenderImage.h b/sky/engine/core/rendering/RenderImage.h
index 70400bbf390e0257b2cbd478565c7977c4a6986f..438d47ac72677bf976e3f483f627c9d3c68ec6c8 100644
--- a/sky/engine/core/rendering/RenderImage.h
+++ b/sky/engine/core/rendering/RenderImage.h
@@ -30,7 +30,7 @@
namespace blink {
-class RenderImage : public RenderReplaced {
+class RenderImage final : public RenderReplaced {
public:
RenderImage(Element*);
virtual ~RenderImage();
@@ -49,13 +49,9 @@ public:
inline void setImageDevicePixelRatio(float factor) { m_imageDevicePixelRatio = factor; }
float imageDevicePixelRatio() const { return m_imageDevicePixelRatio; }
- virtual void intrinsicSizeChanged() override
- {
- if (m_imageResource)
- imageChanged(m_imageResource->imagePtr());
- }
+ virtual void intrinsicSizeChanged() override;
-protected:
+private:
virtual bool needsPreferredWidthsRecalculation() const override final;
virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, double& intrinsicRatio) const override final;
@@ -65,7 +61,6 @@ protected:
virtual void paint(PaintInfo&, const LayoutPoint&) override final;
virtual void layout() override;
-private:
virtual const char* renderName() const override { return "RenderImage"; }
virtual bool isImage() const override { return true; }
@@ -84,7 +79,7 @@ private:
virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const override final;
void paintInvalidationOrMarkForLayout(const IntRect* = 0);
- void updateIntrinsicSizeIfNeeded(const LayoutSize&);
+ void updateIntrinsicSizeIfNeeded(const LayoutSize& newSize);
// Update the size of the image to be rendered. Object-fit may cause this to be different from the CSS box's content rect.
void updateInnerContentRect();

Powered by Google App Engine
This is Rietveld 408576698