Update PDF 1.7 spec references to ISO 32000-1:2008.

Update comments referencing the "PDF 1.7 spec" to point to their
corresponding tables and sections in the ISO 32000-1:2008 specification.
Hopefully nobody will need to open pdf_reference_1-7.pdf anymore after
this.

TAG=agy
CONV=e172d025-7526-4dbc-b51d-9fdabcf46a76

Change-Id: I80544bd4df3829cb9292199e9dac7d223b2377a1
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/149091
Reviewed-by: Andy Phan <andyphan@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/constants/access_permissions.h b/constants/access_permissions.h
index b95f7e9..e2dbe0d 100644
--- a/constants/access_permissions.h
+++ b/constants/access_permissions.h
@@ -8,7 +8,7 @@
 namespace pdfium {
 namespace access_permissions {
 
-// PDF 1.7 spec, table 3.20.
+// ISO 32000-1:2008 spec, table 22.
 // User access permissions.
 constexpr uint32_t kModifyContent = 1 << 3;
 constexpr uint32_t kModifyAnnotation = 1 << 5;
diff --git a/constants/annotation_common.h b/constants/annotation_common.h
index b1bf878..890f84c 100644
--- a/constants/annotation_common.h
+++ b/constants/annotation_common.h
@@ -8,7 +8,7 @@
 namespace pdfium {
 namespace annotation {
 
-// PDF 1.7 spec, table 8.15.
+// ISO 32000-1:2008 spec, table 164.
 // Entries common to all annotation dictionaries.
 inline constexpr char kType[] = "Type";
 inline constexpr char kSubtype[] = "Subtype";
diff --git a/constants/annotation_flags.h b/constants/annotation_flags.h
index d44a0c1..22d28c6 100644
--- a/constants/annotation_flags.h
+++ b/constants/annotation_flags.h
@@ -10,7 +10,7 @@
 namespace pdfium {
 namespace annotation_flags {
 
-// PDF 1.7 spec, table 8.16.
+// ISO 32000-1:2008 spec, table 165.
 constexpr uint32_t kInvisible = 1 << 0;
 constexpr uint32_t kHidden = 1 << 1;
 constexpr uint32_t kPrint = 1 << 2;
diff --git a/constants/form_flags.h b/constants/form_flags.h
index 602a164..5e45fe8 100644
--- a/constants/form_flags.h
+++ b/constants/form_flags.h
@@ -8,20 +8,20 @@
 namespace pdfium {
 namespace form_flags {
 
-// PDF 1.7 spec, table 8.70.
+// ISO 32000-1:2008 spec, table 221.
 // Field flags common to all field types.
 constexpr uint32_t kReadOnly = 1 << 0;
 constexpr uint32_t kRequired = 1 << 1;
 constexpr uint32_t kNoExport = 1 << 2;
 
-// PDF 1.7 spec, table 8.75.
+// ISO 32000-1:2008 spec, table 226.
 // Field flags specific to button fields.
 constexpr uint32_t kButtonNoToggleToOff = 1 << 14;
 constexpr uint32_t kButtonRadio = 1 << 15;
 constexpr uint32_t kButtonPushbutton = 1 << 16;
 constexpr uint32_t kButtonRadiosInUnison = 1 << 25;
 
-// PDF 1.7 spec, table 8.77.
+// ISO 32000-1:2008 spec, table 228.
 // Field flags specific to text fields.
 constexpr uint32_t kTextMultiline = 1 << 12;
 constexpr uint32_t kTextPassword = 1 << 13;
@@ -31,7 +31,7 @@
 constexpr uint32_t kTextComb = 1 << 24;
 constexpr uint32_t kTextRichText = 1 << 25;
 
-// PDF 1.7 spec, table 8.79.
+// ISO 32000-1:2008 spec, table 230.
 // Field flags specific to choice fields.
 constexpr uint32_t kChoiceCombo = 1 << 17;
 constexpr uint32_t kChoiceEdit = 1 << 18;
diff --git a/constants/page_object.h b/constants/page_object.h
index f5a7799..2bbdfc1 100644
--- a/constants/page_object.h
+++ b/constants/page_object.h
@@ -8,7 +8,7 @@
 namespace pdfium {
 namespace page_object {
 
-// PDF 1.7 spec, table 3.27.
+// ISO 32000-1:2008 spec, table 30.
 // Entries in a page object.
 const char kType[] = "Type";
 const char kParent[] = "Parent";
diff --git a/constants/stream_dict_common.h b/constants/stream_dict_common.h
index 3852881..ad61f38 100644
--- a/constants/stream_dict_common.h
+++ b/constants/stream_dict_common.h
@@ -8,7 +8,7 @@
 namespace pdfium {
 namespace stream {
 
-// PDF 1.7 spec, table 3.4.
+// ISO 32000-1:2008 spec, table 5.
 // Entries common to all stream dictionaries.
 //
 // TODO(https://crbug.com/42270045): Examine all usages of "Length",
diff --git a/constants/transparency.h b/constants/transparency.h
index 86d2d45..6b2144e 100644
--- a/constants/transparency.h
+++ b/constants/transparency.h
@@ -8,7 +8,7 @@
 namespace pdfium {
 namespace transparency {
 
-// PDF 1.7 spec, table 7.2.
+// ISO 32000-1:2008 spec, table 136.
 // Standard separable blend modes.
 inline constexpr char kNormal[] = "Normal";
 inline constexpr char kMultiply[] = "Multiply";
@@ -23,14 +23,14 @@
 inline constexpr char kDifference[] = "Difference";
 inline constexpr char kExclusion[] = "Exclusion";
 
-// PDF 1.7 spec, table 7.3.
+// ISO 32000-1:2008 spec, table 137.
 // Standard nonseparable blend modes.
 inline constexpr char kHue[] = "Hue";
 inline constexpr char kSaturation[] = "Saturation";
 inline constexpr char kColor[] = "Color";
 inline constexpr char kLuminosity[] = "Luminosity";
 
-// PDF 1.7 spec, table 7.10.
+// ISO 32000-1:2008 spec, table 144.
 // Entries in a soft-mask dictionary.
 inline constexpr char kSoftMaskSubType[] = "S";
 inline constexpr char kAlpha[] = "Alpha";
@@ -38,7 +38,7 @@
 inline constexpr char kBC[] = "BC";
 inline constexpr char kTR[] = "TR";
 
-// PDF 1.7 spec, table 7.13.
+// ISO 32000-1:2008 spec, table 147.
 // Additional entries specific to a transparency group attributes dictionary.
 inline constexpr char kGroupSubType[] = "S";
 inline constexpr char kTransparency[] = "Transparency";
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp
index e49d7af..95dcc12 100644
--- a/core/fpdfapi/page/cpdf_colorspace.cpp
+++ b/core/fpdfapi/page/cpdf_colorspace.cpp
@@ -940,9 +940,9 @@
     return 0;
   }
 
-  // The PDF 1.7 spec says the number of components must be valid. While some
-  // PDF viewers tolerate invalid values, Acrobat does not, so be consistent
-  // with Acrobat and reject bad values.
+  // The ISO 32000-1:2008 spec says the number of components must be valid.
+  // While some PDF viewers tolerate invalid values, Acrobat does not, so be
+  // consistent with Acrobat and reject bad values.
   RetainPtr<const CPDF_Dictionary> dict = pStream->GetDict();
   const int32_t nDictComponents = dict->GetIntegerFor("N");
   if (!fxcodec::IccTransform::IsValidIccComponents(nDictComponents)) {
@@ -962,7 +962,7 @@
   if (!profile_->IsSupported() &&
       !FindAlternateProfile(doc, dict.Get(), pVisited, nComponents)) {
     // If there is no alternate profile, use a stock profile as mentioned in
-    // the PDF 1.7 spec in table 4.16 in the "Alternate" key description.
+    // the ISO 32000-1:2008 spec in table 66 in the "Alternate" key description.
     DCHECK(!base_cs_);
     base_cs_ = GetStockAlternateProfile(nComponents);
   }
diff --git a/core/fpdfapi/page/cpdf_occontext.cpp b/core/fpdfapi/page/cpdf_occontext.cpp
index 9830c66..5b04be7 100644
--- a/core/fpdfapi/page/cpdf_occontext.cpp
+++ b/core/fpdfapi/page/cpdf_occontext.cpp
@@ -273,7 +273,7 @@
 
   bool bState = (csP == "AllOn" || csP == "AllOff");
   // At least one entry of OCGs needs to be a valid dictionary for it to be
-  // considered present. See "OCGs" in table 4.49 in the PDF 1.7 spec.
+  // considered present. See "OCGs" in Table 99 in the ISO 32000-1:2008 spec.
   bool bValidEntrySeen = false;
   for (size_t i = 0; i < pArray->size(); i++) {
     bool bItem = true;
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.cpp b/core/fpdfapi/page/cpdf_shadingpattern.cpp
index e94f344..c0f16a4 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.cpp
+++ b/core/fpdfapi/page/cpdf_shadingpattern.cpp
@@ -83,7 +83,7 @@
   cs_ = pDocPageData->GetColorSpace(pCSObj.Get(), nullptr);
 
   // The color space is required and cannot be a Pattern space, according to the
-  // PDF 1.7 spec, page 305.
+  // ISO 32000-1:2008 spec, table 78.
   if (!cs_ || cs_->GetFamily() == CPDF_ColorSpace::Family::kPattern) {
     return false;
   }
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h
index 9a36d77..6fe2494 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.h
+++ b/core/fpdfapi/page/cpdf_shadingpattern.h
@@ -68,7 +68,7 @@
   CPDF_ShadingPattern(const CPDF_ShadingPattern&) = delete;
   CPDF_ShadingPattern& operator=(const CPDF_ShadingPattern&) = delete;
 
-  // Constraints in PDF 1.7 spec, 4.6.3 Shading Patterns, pages 308-331.
+  // Constraints in ISO 32000-1:2008 spec, section 8.7.4: Shading Patterns.
   bool Validate() const;
   bool ValidateFunctions(uint32_t nExpectedNumFunctions,
                          uint32_t nExpectedNumInputs,
diff --git a/core/fpdfapi/parser/cpdf_hint_tables.cpp b/core/fpdfapi/parser/cpdf_hint_tables.cpp
index 0d9a06f..68071f6 100644
--- a/core/fpdfapi/parser/cpdf_hint_tables.cpp
+++ b/core/fpdfapi/parser/cpdf_hint_tables.cpp
@@ -30,9 +30,9 @@
   return bits.IsValid() && hStream->BitsRemaining() >= bits.ValueOrDie();
 }
 
-// Sanity check values from the page table header. The note in the PDF 1.7
-// reference for Table F.3 says the valid range is only 0 through 32. Though 0
-// is not useful either.
+// Validates values from the page table header. The note in ISO 32000-1:2008
+// spec, table F.4 says the valid range is only 0 through 32. Though 0 is not
+// useful either.
 bool IsValidPageOffsetHintTableBitCount(uint32_t bits) {
   return bits > 0 && bits <= 32;
 }
diff --git a/core/fxcrt/fx_number.cpp b/core/fxcrt/fx_number.cpp
index fbd60a5..8cdb6b4 100644
--- a/core/fxcrt/fx_number.cpp
+++ b/core/fxcrt/fx_number.cpp
@@ -34,7 +34,7 @@
   // for things like the Permissions on the encryption hash the number is
   // actually an unsigned value. We use a uint32_t so we can deal with the
   // unsigned and then check for overflow if the user actually signed the value.
-  // The Permissions flag is listed in Table 3.20 PDF 1.7 spec.
+  // The Permissions flag is listed in ISO 32000-1:2008 spec, table 22.
   FX_SAFE_UINT32 unsigned_val = 0;
   bool bIsSigned = false;
   bool bNegative = false;
diff --git a/core/fxcrt/fx_number_unittest.cpp b/core/fxcrt/fx_number_unittest.cpp
index e79bc3a..dd8af1b 100644
--- a/core/fxcrt/fx_number_unittest.cpp
+++ b/core/fxcrt/fx_number_unittest.cpp
@@ -89,7 +89,7 @@
 
   // No explicit sign will allow the number to go negative if retrieved as a
   // signed value. This is needed for things like the encryption permissions
-  // flag (Table 3.20 PDF 1.7 spec)
+  // flag (ISO 32000-1:2008 spec, table 22.)
   static constexpr TestCase kNegativeCases[] = {
       {"4294965252", -2044}, {"4294967247", -49}, {"4294967248", -48},
       {"4294967292", -4},    {"4294967295", -1},
diff --git a/core/fxge/dib/fx_dib.h b/core/fxge/dib/fx_dib.h
index 2b6e005..44504d4 100644
--- a/core/fxge/dib/fx_dib.h
+++ b/core/fxge/dib/fx_dib.h
@@ -117,8 +117,8 @@
   bool bLossy = false;
 };
 
-// See PDF 1.7 spec, table 7.2 and 7.3. The enum values need to be in the same
-// order as listed in the spec.
+// See ISO 32000-1:2008 spec, table 136 and 137. The enum values need to be in
+// the same order as listed in the spec.
 enum class BlendMode {
   kNormal = 0,
   kMultiply,
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index 6f55f78..46a4896 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -19,7 +19,7 @@
 
 namespace {
 
-// PDF 1.7 spec, Table 8.25
+// ISO 32000-1:2008 spec, table 174.
 enum Alignment {
   kLeft = 0,
   kCenter = 1,