1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibHTML: Rename HTMLImageElement::m_image_loader => m_image_decoder

This matches the new class name, ImageDecoder.
This commit is contained in:
Andreas Kling 2019-10-20 10:39:59 +02:00
parent 58f67c1ccb
commit 457e49f528
3 changed files with 10 additions and 10 deletions

View file

@ -34,7 +34,7 @@ void HTMLImageElement::load_image(const String& src)
}
m_image_data = data;
m_image_loader = ImageDecoder::create(m_image_data.data(), m_image_data.size());
m_image_decoder = ImageDecoder::create(m_image_data.data(), m_image_data.size());
document().update_layout();
});
}
@ -46,8 +46,8 @@ int HTMLImageElement::preferred_width() const
if (ok)
return width;
if (m_image_loader)
return m_image_loader->width();
if (m_image_decoder)
return m_image_decoder->width();
return 0;
}
@ -59,8 +59,8 @@ int HTMLImageElement::preferred_height() const
if (ok)
return height;
if (m_image_loader)
return m_image_loader->height();
if (m_image_decoder)
return m_image_decoder->height();
return 0;
}
@ -76,7 +76,7 @@ RefPtr<LayoutNode> HTMLImageElement::create_layout_node(const StyleProperties* p
const GraphicsBitmap* HTMLImageElement::bitmap() const
{
if (!m_image_loader)
if (!m_image_decoder)
return nullptr;
return m_image_loader->bitmap();
return m_image_decoder->bitmap();
}

View file

@ -17,14 +17,14 @@ public:
int preferred_height() const;
const GraphicsBitmap* bitmap() const;
const ImageDecoder* image_loader() const { return m_image_loader; }
const ImageDecoder* image_decoder() const { return m_image_decoder; }
private:
void load_image(const String& src);
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
RefPtr<ImageDecoder> m_image_loader;
RefPtr<ImageDecoder> m_image_decoder;
mutable RefPtr<GraphicsBitmap> m_bitmap;
ByteBuffer m_image_data;
};

View file

@ -56,5 +56,5 @@ void LayoutImage::render(RenderingContext& context)
bool LayoutImage::renders_as_alt_text() const
{
return !node().image_loader();
return !node().image_decoder();
}