Mark CFWL_ThemeBackground as stack-allocated.

There are two sub-classes using implementation inheritance with
non-virtual destructors, so cleanup works as long as we always
know the actual type. Being stack-allocated ensures this.

Change-Id: I3ce51b929dc493fd2f7d215af5d2d35f8f2fe2b0
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96517
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/cfwl_themebackground.h b/xfa/fwl/cfwl_themebackground.h
index bb34f01..c252cf8 100644
--- a/xfa/fwl/cfwl_themebackground.h
+++ b/xfa/fwl/cfwl_themebackground.h
@@ -7,6 +7,7 @@
 #ifndef XFA_FWL_CFWL_THEMEBACKGROUND_H_
 #define XFA_FWL_CFWL_THEMEBACKGROUND_H_
 
+#include "core/fxcrt/fx_memory.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "xfa/fwl/cfwl_themepart.h"
 
@@ -15,6 +16,8 @@
 
 class CFWL_ThemeBackground final : public CFWL_ThemePart {
  public:
+  FX_STACK_ALLOCATED();
+
   CFWL_ThemeBackground(CFWL_Widget* pWidget, CFGAS_GEGraphics* pGraphics);
   ~CFWL_ThemeBackground();
 
diff --git a/xfa/fwl/cfwl_themepart.h b/xfa/fwl/cfwl_themepart.h
index a49bc8e..e286620 100644
--- a/xfa/fwl/cfwl_themepart.h
+++ b/xfa/fwl/cfwl_themepart.h
@@ -10,6 +10,7 @@
 #include <stdint.h>
 
 #include "core/fxcrt/fx_coordinates.h"
+#include "core/fxcrt/fx_memory.h"
 #include "core/fxcrt/mask.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "xfa/fwl/theme/cfwl_utils.h"
@@ -81,6 +82,8 @@
     kWeekNumSep
   };
 
+  FX_STACK_ALLOCATED();
+
   explicit CFWL_ThemePart(CFWL_Widget* pWidget);
   ~CFWL_ThemePart();
 
diff --git a/xfa/fwl/cfwl_themetext.h b/xfa/fwl/cfwl_themetext.h
index a0e9f31..aa164f7 100644
--- a/xfa/fwl/cfwl_themetext.h
+++ b/xfa/fwl/cfwl_themetext.h
@@ -7,6 +7,7 @@
 #ifndef XFA_FWL_CFWL_THEMETEXT_H_
 #define XFA_FWL_CFWL_THEMETEXT_H_
 
+#include "core/fxcrt/fx_memory.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "core/fxcrt/widestring.h"
 #include "xfa/fde/cfde_data.h"
@@ -16,6 +17,8 @@
 
 class CFWL_ThemeText final : public CFWL_ThemePart {
  public:
+  FX_STACK_ALLOCATED();
+
   CFWL_ThemeText(CFWL_Widget* pWidget, CFGAS_GEGraphics* pGraphics);
   ~CFWL_ThemeText();