diff --git a/Userland/Libraries/LibGfx/WebPLoader.cpp b/Userland/Libraries/LibGfx/WebPLoader.cpp index ca9644dea2..c66f6b6ae1 100644 --- a/Userland/Libraries/LibGfx/WebPLoader.cpp +++ b/Userland/Libraries/LibGfx/WebPLoader.cpp @@ -86,7 +86,7 @@ struct WebPLoadingContext { NotDecoded = 0, Error, HeaderDecoded, - FirstChunkDecoded, + FirstChunkRead, SizeDecoded, ChunksDecoded, BitmapDecoded, @@ -361,9 +361,9 @@ static ErrorOr decode_webp_extended(WebPLoadingContext& context, ReadonlyB return {}; } -static ErrorOr decode_webp_first_chunk(WebPLoadingContext& context) +static ErrorOr read_webp_first_chunk(WebPLoadingContext& context) { - if (context.state >= WebPLoadingContext::State::FirstChunkDecoded) + if (context.state >= WebPLoadingContext::State::FirstChunkRead) return {}; if (context.state < WebPLoadingContext::HeaderDecoded) @@ -376,7 +376,7 @@ static ErrorOr decode_webp_first_chunk(WebPLoadingContext& context) return context.error("WebPImageDecoderPlugin: Invalid first chunk type"); context.first_chunk = first_chunk; - context.state = WebPLoadingContext::State::FirstChunkDecoded; + context.state = WebPLoadingContext::State::FirstChunkRead; if (first_chunk.type == FourCC("VP8 ") || first_chunk.type == FourCC("VP8L")) context.image_data_chunk = first_chunk; @@ -389,8 +389,8 @@ static ErrorOr decode_webp_size(WebPLoadingContext& context) if (context.state >= WebPLoadingContext::State::SizeDecoded) return {}; - if (context.state < WebPLoadingContext::FirstChunkDecoded) - TRY(decode_webp_first_chunk(context)); + if (context.state < WebPLoadingContext::FirstChunkRead) + TRY(read_webp_first_chunk(context)); if (context.first_chunk->type == FourCC("VP8 ")) { auto header = TRY(decode_webp_chunk_VP8_header(context, context.first_chunk.value()));