From 98e272ce156aaf5e1a2fe405ea2939d9d7115920 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 2 Mar 2024 14:16:26 -0500 Subject: [PATCH] LibPDF: Silently ignore BX / EX operators See the added comment for reasoning. --- Userland/Libraries/LibPDF/Renderer.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibPDF/Renderer.cpp b/Userland/Libraries/LibPDF/Renderer.cpp index 4502b725e6..fd7bfb5384 100644 --- a/Userland/Libraries/LibPDF/Renderer.cpp +++ b/Userland/Libraries/LibPDF/Renderer.cpp @@ -938,8 +938,20 @@ RENDERER_HANDLER(marked_content_end) return {}; } -RENDERER_TODO(compatibility_begin) -RENDERER_TODO(compatibility_end) +RENDERER_HANDLER(compatibility_begin) +{ + // We're supposed to ignore unknown operands in compatibility_begin / compatibility_end sections. + // But we want to know about all operands, so we just ignore this. + // In practice, it seems like compatibility_begin / compatibility_end were introduced when + // `sh` was added, and they're used exlusively around `sh`. + return {}; +} + +RENDERER_HANDLER(compatibility_end) +{ + // See comment in compatibility_begin. + return {}; +} template Gfx::Point Renderer::map(T x, T y) const