Remove last CJX_ classes that do not meaningfully extend superclasses

Add a comment to cjx_object.h to describe new situation.

Change-Id: I8e5ae815d3f9cad8b022e83dc491a8c0ce07a62a
Reviewed-on: https://pdfium-review.googlesource.com/c/48950
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/BUILD.gn b/fxjs/BUILD.gn
index 39c0d7f..c3c4970 100644
--- a/fxjs/BUILD.gn
+++ b/fxjs/BUILD.gn
@@ -142,8 +142,6 @@
         "xfa/cjx_comb.h",
         "xfa/cjx_container.cpp",
         "xfa/cjx_container.h",
-        "xfa/cjx_content.cpp",
-        "xfa/cjx_content.h",
         "xfa/cjx_datavalue.cpp",
         "xfa/cjx_datavalue.h",
         "xfa/cjx_datawindow.cpp",
@@ -156,8 +154,6 @@
         "xfa/cjx_decimal.h",
         "xfa/cjx_delta.cpp",
         "xfa/cjx_delta.h",
-        "xfa/cjx_deltas.cpp",
-        "xfa/cjx_deltas.h",
         "xfa/cjx_desc.cpp",
         "xfa/cjx_desc.h",
         "xfa/cjx_draw.cpp",
@@ -214,8 +210,6 @@
         "xfa/cjx_signaturepseudomodel.h",
         "xfa/cjx_source.cpp",
         "xfa/cjx_source.h",
-        "xfa/cjx_sourceset.cpp",
-        "xfa/cjx_sourceset.h",
         "xfa/cjx_subform.cpp",
         "xfa/cjx_subform.h",
         "xfa/cjx_subformset.cpp",
diff --git a/fxjs/xfa/cjx_boolean.cpp b/fxjs/xfa/cjx_boolean.cpp
index c62f24d..d44e039 100644
--- a/fxjs/xfa/cjx_boolean.cpp
+++ b/fxjs/xfa/cjx_boolean.cpp
@@ -9,7 +9,7 @@
 #include "fxjs/xfa/cfxjse_value.h"
 #include "xfa/fxfa/parser/cxfa_boolean.h"
 
-CJX_Boolean::CJX_Boolean(CXFA_Boolean* node) : CJX_Content(node) {}
+CJX_Boolean::CJX_Boolean(CXFA_Boolean* node) : CJX_Object(node) {}
 
 CJX_Boolean::~CJX_Boolean() = default;
 
diff --git a/fxjs/xfa/cjx_boolean.h b/fxjs/xfa/cjx_boolean.h
index ed1f3dd..d2a85ba 100644
--- a/fxjs/xfa/cjx_boolean.h
+++ b/fxjs/xfa/cjx_boolean.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_BOOLEAN_H_
 #define FXJS_XFA_CJX_BOOLEAN_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Boolean;
 
-class CJX_Boolean final : public CJX_Content {
+class CJX_Boolean final : public CJX_Object {
  public:
   explicit CJX_Boolean(CXFA_Boolean* node);
   ~CJX_Boolean() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Boolean;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Boolean;
 };
diff --git a/fxjs/xfa/cjx_content.cpp b/fxjs/xfa/cjx_content.cpp
deleted file mode 100644
index 68dda17..0000000
--- a/fxjs/xfa/cjx_content.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "fxjs/xfa/cjx_content.h"
-
-#include "fxjs/xfa/cfxjse_value.h"
-#include "xfa/fxfa/parser/cxfa_object.h"
-
-CJX_Content::CJX_Content(CXFA_Object* obj) : CJX_Object(obj) {}
-
-CJX_Content::~CJX_Content() {}
diff --git a/fxjs/xfa/cjx_content.h b/fxjs/xfa/cjx_content.h
deleted file mode 100644
index 0e5a4f9..0000000
--- a/fxjs/xfa/cjx_content.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FXJS_XFA_CJX_CONTENT_H_
-#define FXJS_XFA_CJX_CONTENT_H_
-
-#include "fxjs/xfa/cjx_object.h"
-
-class CXFA_Content;
-
-class CJX_Content : public CJX_Object {
- public:
-  explicit CJX_Content(CXFA_Object* obj);
-  ~CJX_Content() override;
-};
-
-#endif  // FXJS_XFA_CJX_CONTENT_H_
diff --git a/fxjs/xfa/cjx_date.cpp b/fxjs/xfa/cjx_date.cpp
index d6db61b..45df800 100644
--- a/fxjs/xfa/cjx_date.cpp
+++ b/fxjs/xfa/cjx_date.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_date.h"
 
-CJX_Date::CJX_Date(CXFA_Date* node) : CJX_Content(node) {}
+CJX_Date::CJX_Date(CXFA_Date* node) : CJX_Object(node) {}
 
 CJX_Date::~CJX_Date() = default;
 
diff --git a/fxjs/xfa/cjx_date.h b/fxjs/xfa/cjx_date.h
index e151fcc..f8dd60f 100644
--- a/fxjs/xfa/cjx_date.h
+++ b/fxjs/xfa/cjx_date.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_DATE_H_
 #define FXJS_XFA_CJX_DATE_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Date;
 
-class CJX_Date final : public CJX_Content {
+class CJX_Date final : public CJX_Object {
  public:
   explicit CJX_Date(CXFA_Date* node);
   ~CJX_Date() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Date;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Date;
 };
diff --git a/fxjs/xfa/cjx_decimal.cpp b/fxjs/xfa/cjx_decimal.cpp
index 20a5de7..1539fc6 100644
--- a/fxjs/xfa/cjx_decimal.cpp
+++ b/fxjs/xfa/cjx_decimal.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_decimal.h"
 
-CJX_Decimal::CJX_Decimal(CXFA_Decimal* node) : CJX_Content(node) {}
+CJX_Decimal::CJX_Decimal(CXFA_Decimal* node) : CJX_Object(node) {}
 
 CJX_Decimal::~CJX_Decimal() = default;
 
diff --git a/fxjs/xfa/cjx_decimal.h b/fxjs/xfa/cjx_decimal.h
index 59b5153..f756147 100644
--- a/fxjs/xfa/cjx_decimal.h
+++ b/fxjs/xfa/cjx_decimal.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_DECIMAL_H_
 #define FXJS_XFA_CJX_DECIMAL_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Decimal;
 
-class CJX_Decimal final : public CJX_Content {
+class CJX_Decimal final : public CJX_Object {
  public:
   explicit CJX_Decimal(CXFA_Decimal* node);
   ~CJX_Decimal() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Decimal;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Decimal;
 };
diff --git a/fxjs/xfa/cjx_deltas.cpp b/fxjs/xfa/cjx_deltas.cpp
deleted file mode 100644
index e8969fb..0000000
--- a/fxjs/xfa/cjx_deltas.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "fxjs/xfa/cjx_deltas.h"
-
-#include "xfa/fxfa/parser/cxfa_deltas.h"
-
-CJX_Deltas::CJX_Deltas(CXFA_Deltas* src) : CJX_List(src) {}
-
-CJX_Deltas::~CJX_Deltas() {}
diff --git a/fxjs/xfa/cjx_deltas.h b/fxjs/xfa/cjx_deltas.h
deleted file mode 100644
index 7b07a7c..0000000
--- a/fxjs/xfa/cjx_deltas.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FXJS_XFA_CJX_DELTAS_H_
-#define FXJS_XFA_CJX_DELTAS_H_
-
-#include "fxjs/xfa/cjx_list.h"
-
-class CXFA_Deltas;
-
-class CJX_Deltas final : public CJX_List {
- public:
-  explicit CJX_Deltas(CXFA_Deltas* node);
-  ~CJX_Deltas() override;
-};
-
-#endif  // FXJS_XFA_CJX_DELTAS_H_
diff --git a/fxjs/xfa/cjx_exdata.cpp b/fxjs/xfa/cjx_exdata.cpp
index 45f6d81..68ed582 100644
--- a/fxjs/xfa/cjx_exdata.cpp
+++ b/fxjs/xfa/cjx_exdata.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_exdata.h"
 
-CJX_ExData::CJX_ExData(CXFA_ExData* node) : CJX_Content(node) {}
+CJX_ExData::CJX_ExData(CXFA_ExData* node) : CJX_Object(node) {}
 
 CJX_ExData::~CJX_ExData() = default;
 
diff --git a/fxjs/xfa/cjx_exdata.h b/fxjs/xfa/cjx_exdata.h
index 7d504ea..9a5c2f3 100644
--- a/fxjs/xfa/cjx_exdata.h
+++ b/fxjs/xfa/cjx_exdata.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_EXDATA_H_
 #define FXJS_XFA_CJX_EXDATA_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_ExData;
 
-class CJX_ExData final : public CJX_Content {
+class CJX_ExData final : public CJX_Object {
  public:
   explicit CJX_ExData(CXFA_ExData* node);
   ~CJX_ExData() override;
@@ -24,7 +24,7 @@
 
  private:
   using Type__ = CJX_ExData;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::ExData;
 };
diff --git a/fxjs/xfa/cjx_float.cpp b/fxjs/xfa/cjx_float.cpp
index 5223f9f..27670dc 100644
--- a/fxjs/xfa/cjx_float.cpp
+++ b/fxjs/xfa/cjx_float.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_float.h"
 
-CJX_Float::CJX_Float(CXFA_Float* node) : CJX_Content(node) {}
+CJX_Float::CJX_Float(CXFA_Float* node) : CJX_Object(node) {}
 
 CJX_Float::~CJX_Float() = default;
 
diff --git a/fxjs/xfa/cjx_float.h b/fxjs/xfa/cjx_float.h
index 473d8d6..da10465 100644
--- a/fxjs/xfa/cjx_float.h
+++ b/fxjs/xfa/cjx_float.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_FLOAT_H_
 #define FXJS_XFA_CJX_FLOAT_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Float;
 
-class CJX_Float final : public CJX_Content {
+class CJX_Float final : public CJX_Object {
  public:
   explicit CJX_Float(CXFA_Float* node);
   ~CJX_Float() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Float;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Float;
 };
diff --git a/fxjs/xfa/cjx_integer.cpp b/fxjs/xfa/cjx_integer.cpp
index 08aac94..d2fc180 100644
--- a/fxjs/xfa/cjx_integer.cpp
+++ b/fxjs/xfa/cjx_integer.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_integer.h"
 
-CJX_Integer::CJX_Integer(CXFA_Integer* node) : CJX_Content(node) {}
+CJX_Integer::CJX_Integer(CXFA_Integer* node) : CJX_Object(node) {}
 
 CJX_Integer::~CJX_Integer() = default;
 
diff --git a/fxjs/xfa/cjx_integer.h b/fxjs/xfa/cjx_integer.h
index 06b997c..7f4265b 100644
--- a/fxjs/xfa/cjx_integer.h
+++ b/fxjs/xfa/cjx_integer.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_INTEGER_H_
 #define FXJS_XFA_CJX_INTEGER_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Integer;
 
-class CJX_Integer final : public CJX_Content {
+class CJX_Integer final : public CJX_Object {
  public:
   explicit CJX_Integer(CXFA_Integer* node);
   ~CJX_Integer() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Integer;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Integer;
 };
diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h
index 914c4f1..d94dcea 100644
--- a/fxjs/xfa/cjx_object.h
+++ b/fxjs/xfa/cjx_object.h
@@ -56,8 +56,7 @@
 
 class CJX_Object {
  public:
-  // Similar, but not exactly equal to XFA_Element enum.
-  // TODO(tsepez): unify with XFA_Element.
+  // Corresponds 1:1 with CJX_ subclasses.
   enum class TypeTag {
     Boolean,
     Comb,
diff --git a/fxjs/xfa/cjx_sourceset.cpp b/fxjs/xfa/cjx_sourceset.cpp
deleted file mode 100644
index a45f3f6..0000000
--- a/fxjs/xfa/cjx_sourceset.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "fxjs/xfa/cjx_sourceset.h"
-
-#include "xfa/fxfa/parser/cxfa_sourceset.h"
-
-CJX_SourceSet::CJX_SourceSet(CXFA_SourceSet* node) : CJX_Model(node) {}
-
-CJX_SourceSet::~CJX_SourceSet() = default;
diff --git a/fxjs/xfa/cjx_sourceset.h b/fxjs/xfa/cjx_sourceset.h
deleted file mode 100644
index 88f4d98..0000000
--- a/fxjs/xfa/cjx_sourceset.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2017 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FXJS_XFA_CJX_SOURCESET_H_
-#define FXJS_XFA_CJX_SOURCESET_H_
-
-#include "fxjs/xfa/cjx_model.h"
-#include "fxjs/xfa/jse_define.h"
-
-class CXFA_SourceSet;
-
-class CJX_SourceSet final : public CJX_Model {
- public:
-  explicit CJX_SourceSet(CXFA_SourceSet* node);
-  ~CJX_SourceSet() override;
-};
-
-#endif  // FXJS_XFA_CJX_SOURCESET_H_
diff --git a/fxjs/xfa/cjx_text.cpp b/fxjs/xfa/cjx_text.cpp
index ddccb7e..ed2748c 100644
--- a/fxjs/xfa/cjx_text.cpp
+++ b/fxjs/xfa/cjx_text.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_text.h"
 
-CJX_Text::CJX_Text(CXFA_Text* node) : CJX_Content(node) {}
+CJX_Text::CJX_Text(CXFA_Text* node) : CJX_Object(node) {}
 
 CJX_Text::~CJX_Text() = default;
 
diff --git a/fxjs/xfa/cjx_text.h b/fxjs/xfa/cjx_text.h
index 4109056..f8c3a9a 100644
--- a/fxjs/xfa/cjx_text.h
+++ b/fxjs/xfa/cjx_text.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_TEXT_H_
 #define FXJS_XFA_CJX_TEXT_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Text;
 
-class CJX_Text final : public CJX_Content {
+class CJX_Text final : public CJX_Object {
  public:
   explicit CJX_Text(CXFA_Text* node);
   ~CJX_Text() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Text;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Text;
 };
diff --git a/fxjs/xfa/cjx_time.cpp b/fxjs/xfa/cjx_time.cpp
index b58a25d..99c785b 100644
--- a/fxjs/xfa/cjx_time.cpp
+++ b/fxjs/xfa/cjx_time.cpp
@@ -8,7 +8,7 @@
 
 #include "xfa/fxfa/parser/cxfa_time.h"
 
-CJX_Time::CJX_Time(CXFA_Time* node) : CJX_Content(node) {}
+CJX_Time::CJX_Time(CXFA_Time* node) : CJX_Object(node) {}
 
 CJX_Time::~CJX_Time() = default;
 
diff --git a/fxjs/xfa/cjx_time.h b/fxjs/xfa/cjx_time.h
index 67fa31f..9efa894 100644
--- a/fxjs/xfa/cjx_time.h
+++ b/fxjs/xfa/cjx_time.h
@@ -7,12 +7,12 @@
 #ifndef FXJS_XFA_CJX_TIME_H_
 #define FXJS_XFA_CJX_TIME_H_
 
-#include "fxjs/xfa/cjx_content.h"
+#include "fxjs/xfa/cjx_object.h"
 #include "fxjs/xfa/jse_define.h"
 
 class CXFA_Time;
 
-class CJX_Time final : public CJX_Content {
+class CJX_Time final : public CJX_Object {
  public:
   explicit CJX_Time(CXFA_Time* node);
   ~CJX_Time() override;
@@ -25,7 +25,7 @@
 
  private:
   using Type__ = CJX_Time;
-  using ParentType__ = CJX_Content;
+  using ParentType__ = CJX_Object;
 
   static const TypeTag static_type__ = TypeTag::Time;
 };