From 457e49f528b0e71fd9e70ed5aec3c299c7db7fd0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 20 Oct 2019 10:39:59 +0200 Subject: [PATCH] LibHTML: Rename HTMLImageElement::m_image_loader => m_image_decoder This matches the new class name, ImageDecoder. --- Libraries/LibHTML/DOM/HTMLImageElement.cpp | 14 +++++++------- Libraries/LibHTML/DOM/HTMLImageElement.h | 4 ++-- Libraries/LibHTML/Layout/LayoutImage.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Libraries/LibHTML/DOM/HTMLImageElement.cpp b/Libraries/LibHTML/DOM/HTMLImageElement.cpp index 507bb69c17..7b422f5a1f 100644 --- a/Libraries/LibHTML/DOM/HTMLImageElement.cpp +++ b/Libraries/LibHTML/DOM/HTMLImageElement.cpp @@ -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 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(); } diff --git a/Libraries/LibHTML/DOM/HTMLImageElement.h b/Libraries/LibHTML/DOM/HTMLImageElement.h index cd7adea17f..941f4ba24b 100644 --- a/Libraries/LibHTML/DOM/HTMLImageElement.h +++ b/Libraries/LibHTML/DOM/HTMLImageElement.h @@ -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 create_layout_node(const StyleProperties* parent_style) const override; - RefPtr m_image_loader; + RefPtr m_image_decoder; mutable RefPtr m_bitmap; ByteBuffer m_image_data; }; diff --git a/Libraries/LibHTML/Layout/LayoutImage.cpp b/Libraries/LibHTML/Layout/LayoutImage.cpp index f25da78db5..158b2d9bb9 100644 --- a/Libraries/LibHTML/Layout/LayoutImage.cpp +++ b/Libraries/LibHTML/Layout/LayoutImage.cpp @@ -56,5 +56,5 @@ void LayoutImage::render(RenderingContext& context) bool LayoutImage::renders_as_alt_text() const { - return !node().image_loader(); + return !node().image_decoder(); }