Remove FX_WORD in favor of uint16_t.

It isn't buying us anthing, and it looks strange in
a struct when other uint types are already present.

R=dsinclair@chromium.org

Review URL: https://codereview.chromium.org/1821043003 .
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index 27416f1..d4ad241 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -530,7 +530,7 @@
   } else {
     for (int i = row_size - BytesPerPixel; i >= BytesPerPixel;
          i -= BytesPerPixel) {
-      FX_WORD pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
+      uint16_t pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
       pixel -=
           (dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
       dest_buf[i] = pixel >> 8;
@@ -587,7 +587,7 @@
   int BytesPerPixel = BitsPerComponent * Colors / 8;
   if (BitsPerComponent == 16) {
     for (FX_DWORD i = BytesPerPixel; i < row_size; i += 2) {
-      FX_WORD pixel =
+      uint16_t pixel =
           (dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
       pixel += (dest_buf[i] << 8) | dest_buf[i + 1];
       dest_buf[i] = pixel >> 8;
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
index 0312622..58f0870 100644
--- a/core/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/fxcodec/codec/fx_codec_tiff.cpp
@@ -285,11 +285,11 @@
   if (!TIFFSetDirectory(tif_ctx, (uint16)frame)) {
     return FALSE;
   }
-  FX_WORD tif_cs;
+  uint16_t tif_cs;
   FX_DWORD tif_icc_size = 0;
   uint8_t* tif_icc_buf = NULL;
-  FX_WORD tif_bpc = 0;
-  FX_WORD tif_cps;
+  uint16_t tif_bpc = 0;
+  uint16_t tif_cps;
   FX_DWORD tif_rps;
   width = height = comps = 0;
   TIFFGetField(tif_ctx, TIFFTAG_IMAGEWIDTH, &width);
@@ -306,7 +306,7 @@
                      &pAttribute->m_wDPIUnit)) {
       pAttribute->m_wDPIUnit -= 1;
     }
-    Tiff_Exif_GetInfo<FX_WORD>(tif_ctx, TIFFTAG_ORIENTATION, pAttribute);
+    Tiff_Exif_GetInfo<uint16_t>(tif_ctx, TIFFTAG_ORIENTATION, pAttribute);
     if (Tiff_Exif_GetInfo<FX_FLOAT>(tif_ctx, TIFFTAG_XRESOLUTION, pAttribute)) {
       void* val = pAttribute->m_Exif[TIFFTAG_XRESOLUTION];
       FX_FLOAT fDpi = val ? *reinterpret_cast<FX_FLOAT*>(val) : 0;
@@ -487,7 +487,7 @@
     return FALSE;
   }
   if (pDIBitmap->GetBPP() == 32) {
-    FX_WORD rotation = ORIENTATION_TOPLEFT;
+    uint16_t rotation = ORIENTATION_TOPLEFT;
     TIFFGetField(tif_ctx, TIFFTAG_ORIENTATION, &rotation);
     if (TIFFReadRGBAImageOriented(tif_ctx, img_wid, img_hei,
                                   (uint32*)pDIBitmap->GetBuffer(), rotation,
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.cpp b/core/fxcodec/jbig2/JBig2_BitStream.cpp
index a2a4c2c..4ca4be1 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.cpp
+++ b/core/fxcodec/jbig2/JBig2_BitStream.cpp
@@ -101,7 +101,7 @@
   return 0;
 }
 
-int32_t CJBig2_BitStream::readShortInteger(FX_WORD* dwResult) {
+int32_t CJBig2_BitStream::readShortInteger(uint16_t* dwResult) {
   if (m_dwByteIdx + 1 >= m_dwLength)
     return -1;
 
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h
index c24fedf..37b18b5 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/fxcodec/jbig2/JBig2_BitStream.h
@@ -23,7 +23,7 @@
   int32_t read1Bit(FX_BOOL* bResult);
   int32_t read1Byte(uint8_t* cResult);
   int32_t readInteger(FX_DWORD* dwResult);
-  int32_t readShortInteger(FX_WORD* wResult);
+  int32_t readShortInteger(uint16_t* wResult);
   void alignByte();
   uint8_t getCurByte() const;
   void incByteIdx();
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 7060f35..da020a6 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -302,7 +302,7 @@
           pSegment->m_pReferred_to_segment_numbers[i] = cTemp;
           break;
         case 2:
-          FX_WORD wTemp;
+          uint16_t wTemp;
           if (m_pStream->readShortInteger(&wTemp) != 0)
             return JBIG2_ERROR_TOO_SHORT;
 
@@ -379,7 +379,7 @@
         return JBIG2_ERROR_FATAL;
       return parseGenericRefinementRegion(pSegment);
     case 48: {
-      FX_WORD wTemp;
+      uint16_t wTemp;
       std::unique_ptr<JBig2PageInfo> pPageInfo(new JBig2PageInfo);
       if (m_pStream->readInteger(&pPageInfo->m_dwWidth) != 0 ||
           m_pStream->readInteger(&pPageInfo->m_dwHeight) != 0 ||
@@ -435,7 +435,7 @@
 
 int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
                                         IFX_Pause* pPause) {
-  FX_WORD wFlags;
+  uint16_t wFlags;
   if (m_pStream->readShortInteger(&wFlags) != 0)
     return JBIG2_ERROR_TOO_SHORT;
 
@@ -653,7 +653,7 @@
 }
 
 int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
-  FX_WORD wFlags;
+  uint16_t wFlags;
   JBig2RegionInfo ri;
   if (parseRegionInfo(&ri) != JBIG2_SUCCESS ||
       m_pStream->readShortInteger(&wFlags) != 0) {
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index 2a181b1..9d7f8b0 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -116,7 +116,7 @@
   CJBig2_Image** m_pImage;
   CJBig2_ArithDecoder* m_pArithDecoder;
   JBig2ArithCtx* m_gbContext;
-  FX_WORD m_DecodeType;
+  uint16_t m_DecodeType;
   FX_BOOL LTP;
   FX_RECT m_ReplaceRect;
 };
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h
index 583145b..7766ce6 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -37,8 +37,8 @@
   FX_DWORD HGH;
   int32_t HGX;
   int32_t HGY;
-  FX_WORD HRX;
-  FX_WORD HRY;
+  uint16_t HRX;
+  uint16_t HRY;
   uint8_t HPW;
   uint8_t HPH;
 };
diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h
index b3e09d8..81800ba 100644
--- a/core/fxcodec/jbig2/JBig2_Page.h
+++ b/core/fxcodec/jbig2/JBig2_Page.h
@@ -16,7 +16,7 @@
   FX_DWORD m_dwResolutionY;
   uint8_t m_cFlags;
   FX_BOOL m_bIsStriped;
-  FX_WORD m_wMaxStripeSize;
+  uint16_t m_wMaxStripeSize;
 };
 
 #endif  // CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_
diff --git a/core/fxcodec/lbmp/fx_bmp.cpp b/core/fxcodec/lbmp/fx_bmp.cpp
index 15384d5..90d8fe1 100644
--- a/core/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/fxcodec/lbmp/fx_bmp.cpp
@@ -26,10 +26,10 @@
 }
 }  // namespace
 
-FX_WORD GetWord_LSBFirst(uint8_t* p) {
+uint16_t GetWord_LSBFirst(uint8_t* p) {
   return p[0] | (p[1] << 8);
 }
-void SetWord_LSBFirst(uint8_t* p, FX_WORD v) {
+void SetWord_LSBFirst(uint8_t* p, uint16_t v) {
   p[0] = (uint8_t)v;
   p[1] = (uint8_t)(v >> 8);
 }
@@ -145,7 +145,7 @@
             bmp_ptr->skip_size = skip_size_org;
             return 2;
           }
-          FX_WORD biPlanes;
+          uint16_t biPlanes;
           bmp_ptr->width =
               GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biWidth);
           bmp_ptr->height =
@@ -340,7 +340,7 @@
         }
       } break;
       case 16: {
-        FX_WORD* buf = (FX_WORD*)des_buf;
+        uint16_t* buf = (uint16_t*)des_buf;
         uint8_t blue_bits = 0;
         uint8_t green_bits = 0;
         uint8_t red_bits = 0;
@@ -551,7 +551,7 @@
             }
           } break;
           default: {
-            uint8_t size = (uint8_t)(((FX_WORD)(*first_byte_ptr) + 1) >> 1);
+            uint8_t size = (uint8_t)(((uint16_t)(*first_byte_ptr) + 1) >> 1);
             if ((int32_t)*first_byte_ptr >=
                 bmp_ptr->out_row_bytes - bmp_ptr->col_num) {
               if (size + (bmp_ptr->col_num >> 1) > bmp_ptr->src_row_bytes) {
@@ -584,7 +584,7 @@
         }
         if ((int32_t)*first_byte_ptr >
             bmp_ptr->out_row_bytes - bmp_ptr->col_num) {
-          uint8_t size = (uint8_t)(((FX_WORD)(*first_byte_ptr) + 1) >> 1);
+          uint8_t size = (uint8_t)(((uint16_t)(*first_byte_ptr) + 1) >> 1);
           if (size + (bmp_ptr->col_num >> 1) > bmp_ptr->src_row_bytes) {
             bmp_error(bmp_ptr, "The Bmp File Is Corrupt");
             return 0;
diff --git a/core/fxcodec/lbmp/fx_bmp.h b/core/fxcodec/lbmp/fx_bmp.h
index 2ef0c0a..1c269c6 100644
--- a/core/fxcodec/lbmp/fx_bmp.h
+++ b/core/fxcodec/lbmp/fx_bmp.h
@@ -35,25 +35,25 @@
 #define BMP_MAX_ERROR_SIZE 256
 #pragma pack(1)
 typedef struct tagBmpFileHeader {
-  FX_WORD bfType;
+  uint16_t bfType;
   FX_DWORD bfSize;
-  FX_WORD bfReserved1;
-  FX_WORD bfReserved2;
+  uint16_t bfReserved1;
+  uint16_t bfReserved2;
   FX_DWORD bfOffBits;
 } BmpFileHeader, *BmpFileHeaderPtr;
 typedef struct tagBmpCoreHeader {
   FX_DWORD bcSize;
-  FX_WORD bcWidth;
-  FX_WORD bcHeight;
-  FX_WORD bcPlanes;
-  FX_WORD bcBitCount;
+  uint16_t bcWidth;
+  uint16_t bcHeight;
+  uint16_t bcPlanes;
+  uint16_t bcBitCount;
 } BmpCoreHeader, *BmpCoreHeaderPtr;
 typedef struct tagBmpInfoHeader {
   FX_DWORD biSize;
   int32_t biWidth;
   int32_t biHeight;
-  FX_WORD biPlanes;
-  FX_WORD biBitCount;
+  uint16_t biPlanes;
+  uint16_t biBitCount;
   FX_DWORD biCompression;
   FX_DWORD biSizeImage;
   int32_t biXPelsPerMeter;
@@ -82,7 +82,7 @@
   int32_t src_row_bytes;
   int32_t out_row_bytes;
   uint8_t* out_row_buffer;
-  FX_WORD bitCounts;
+  uint16_t bitCounts;
   FX_DWORD color_used;
   FX_BOOL imgTB_flag;
   int32_t pal_num;
@@ -139,7 +139,7 @@
   FX_DWORD src_width;
   FX_BOOL src_free;
   FX_DWORD* pal_ptr;
-  FX_WORD pal_num;
+  uint16_t pal_num;
   uint8_t bit_type;
 };
 
@@ -149,7 +149,7 @@
                          uint8_t*& dst_buf,
                          FX_DWORD& dst_size);
 
-FX_WORD GetWord_LSBFirst(uint8_t* p);
-void SetWord_LSBFirst(uint8_t* p, FX_WORD v);
+uint16_t GetWord_LSBFirst(uint8_t* p);
+void SetWord_LSBFirst(uint8_t* p, uint16_t v);
 
 #endif  // CORE_FXCODEC_LBMP_FX_BMP_H_
diff --git a/core/fxcodec/lgif/fx_gif.cpp b/core/fxcodec/lgif/fx_gif.cpp
index af447dc..b20b4df 100644
--- a/core/fxcodec/lgif/fx_gif.cpp
+++ b/core/fxcodec/lgif/fx_gif.cpp
@@ -30,14 +30,14 @@
 void CGifLZWDecoder::ClearTable() {
   code_size_cur = code_size + 1;
   code_next = code_end + 1;
-  code_old = (FX_WORD)-1;
+  code_old = (uint16_t)-1;
   FXSYS_memset(code_table, 0, sizeof(tag_Table) * GIF_MAX_LZW_CODE);
   FXSYS_memset(stack, 0, GIF_MAX_LZW_CODE);
-  for (FX_WORD i = 0; i < code_clear; i++) {
+  for (uint16_t i = 0; i < code_clear; i++) {
     code_table[i].suffix = (uint8_t)i;
   }
 }
-void CGifLZWDecoder::DecodeString(FX_WORD code) {
+void CGifLZWDecoder::DecodeString(uint16_t code) {
   stack_size = 0;
   while (TRUE) {
     ASSERT(code <= code_next);
@@ -50,7 +50,7 @@
   stack[GIF_MAX_LZW_CODE - 1 - stack_size++] = (uint8_t)code;
   code_first = (uint8_t)code;
 }
-void CGifLZWDecoder::AddCode(FX_WORD prefix_code, uint8_t append_char) {
+void CGifLZWDecoder::AddCode(uint16_t prefix_code, uint8_t append_char) {
   if (code_next == GIF_MAX_LZW_CODE) {
     return;
   }
@@ -70,7 +70,7 @@
   if (stack_size != 0) {
     if (des_size < stack_size) {
       FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
-      stack_size -= (FX_WORD)des_size;
+      stack_size -= (uint16_t)des_size;
       return 3;
     }
     FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
@@ -78,7 +78,7 @@
     i += stack_size;
     stack_size = 0;
   }
-  FX_WORD code = 0;
+  uint16_t code = 0;
   while (i <= des_size && (avail_in > 0 || bits_left >= code_size_cur)) {
     if (code_size_cur > 12) {
       if (err_msg_ptr) {
@@ -93,7 +93,7 @@
       bits_left += 8;
     }
     while (bits_left >= code_size_cur) {
-      code = (FX_WORD)code_store & ((1 << code_size_cur) - 1);
+      code = (uint16_t)code_store & ((1 << code_size_cur) - 1);
       code_store >>= code_size_cur;
       bits_left -= code_size_cur;
       if (code == code_clear) {
@@ -103,7 +103,7 @@
         des_size = i;
         return 1;
       } else {
-        if (code_old != (FX_WORD)-1) {
+        if (code_old != (uint16_t)-1) {
           if (code_next < GIF_MAX_LZW_CODE) {
             if (code == code_next) {
               AddCode(code_old, code_first);
@@ -127,7 +127,7 @@
         if (i + stack_size > des_size) {
           FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
                        des_size - i);
-          stack_size -= (FX_WORD)(des_size - i);
+          stack_size -= (uint16_t)(des_size - i);
           return 3;
         }
         FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
@@ -179,7 +179,7 @@
                                   uint8_t& bit_offset,
                                   FX_DWORD& bit_num) {
   if (bit_cut != 8) {
-    FX_WORD index = 0;
+    uint16_t index = 0;
     index |= ((1 << bit_cut) - 1) << (7 - bit_offset);
     uint8_t ret = ((index & buf[offset]) >> (7 - bit_offset));
     bit_offset += bit_cut;
@@ -204,7 +204,7 @@
   index_bit_cur = code_size + 1;
   index_num = code_end + 1;
   table_cur = code_end + 1;
-  for (FX_WORD i = 0; i < GIF_MAX_LZW_CODE; i++) {
+  for (uint16_t i = 0; i < GIF_MAX_LZW_CODE; i++) {
     code_table[i].prefix = 0;
     code_table[i].suffix = 0;
   }
@@ -335,7 +335,7 @@
 FX_BOOL CGifLZWEncoder::LookUpInTable(const uint8_t* buf,
                                       FX_DWORD& offset,
                                       uint8_t& bit_offset) {
-  for (FX_WORD i = table_cur; i < index_num; i++) {
+  for (uint16_t i = table_cur; i < index_num; i++) {
     if (code_table[i].prefix == code_table[index_num].prefix &&
         code_table[i].suffix == code_table[index_num].suffix) {
       code_table[index_num].prefix = i;
@@ -1041,7 +1041,7 @@
   dst_buf[gif_ptr->cur_offset++] = gif_ptr->lsd_ptr->bc_index;
   dst_buf[gif_ptr->cur_offset++] = gif_ptr->lsd_ptr->pixel_aspect;
   if (gif_ptr->global_pal) {
-    FX_WORD size = sizeof(GifPalette) * gif_ptr->gpal_num;
+    uint16_t size = sizeof(GifPalette) * gif_ptr->gpal_num;
     if (!gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + size)) {
       return FALSE;
     }
diff --git a/core/fxcodec/lgif/fx_gif.h b/core/fxcodec/lgif/fx_gif.h
index c44fb7a..ad65d19 100644
--- a/core/fxcodec/lgif/fx_gif.h
+++ b/core/fxcodec/lgif/fx_gif.h
@@ -52,17 +52,17 @@
   char version[3];
 } GifHeader;
 typedef struct tagGifLSD {
-  FX_WORD width;
-  FX_WORD height;
+  uint16_t width;
+  uint16_t height;
   uint8_t global_flag;
   uint8_t bc_index;
   uint8_t pixel_aspect;
 } GifLSD;
 typedef struct tagGifImageInfo {
-  FX_WORD left;
-  FX_WORD top;
-  FX_WORD width;
-  FX_WORD height;
+  uint16_t left;
+  uint16_t top;
+  uint16_t width;
+  uint16_t height;
 
   uint8_t local_flag;
 } GifImageInfo;
@@ -75,15 +75,15 @@
 typedef struct tagGifGCE {
   uint8_t block_size;
   uint8_t gce_flag;
-  FX_WORD delay_time;
+  uint16_t delay_time;
   uint8_t trans_index;
 } GifGCE;
 typedef struct tagGifPTE {
   uint8_t block_size;
-  FX_WORD grid_left;
-  FX_WORD grid_top;
-  FX_WORD grid_width;
-  FX_WORD grid_height;
+  uint16_t grid_left;
+  uint16_t grid_top;
+  uint16_t grid_width;
+  uint16_t grid_height;
 
   uint8_t char_width;
   uint8_t char_height;
@@ -115,7 +115,7 @@
 class CGifLZWDecoder {
  public:
   struct tag_Table {
-    FX_WORD prefix;
+    uint16_t prefix;
     uint8_t suffix;
   };
   CGifLZWDecoder(FX_CHAR* error_ptr = NULL) { err_msg_ptr = error_ptr; }
@@ -128,18 +128,18 @@
 
  private:
   void ClearTable();
-  void AddCode(FX_WORD prefix_code, uint8_t append_char);
-  void DecodeString(FX_WORD code);
+  void AddCode(uint16_t prefix_code, uint8_t append_char);
+  void DecodeString(uint16_t code);
   uint8_t code_size;
   uint8_t code_size_cur;
-  FX_WORD code_clear;
-  FX_WORD code_end;
-  FX_WORD code_next;
+  uint16_t code_clear;
+  uint16_t code_end;
+  uint16_t code_next;
   uint8_t code_first;
   uint8_t stack[GIF_MAX_LZW_CODE];
-  FX_WORD stack_size;
+  uint16_t stack_size;
   tag_Table code_table[GIF_MAX_LZW_CODE];
-  FX_WORD code_old;
+  uint16_t code_old;
 
   uint8_t* next_in;
   FX_DWORD avail_in;
@@ -152,7 +152,7 @@
 class CGifLZWEncoder {
  public:
   struct tag_Table {
-    FX_WORD prefix;
+    uint16_t prefix;
     uint8_t suffix;
   };
   CGifLZWEncoder();
@@ -184,15 +184,15 @@
   uint8_t src_bit_cut;
   FX_DWORD src_bit_num;
   uint8_t code_size;
-  FX_WORD code_clear;
-  FX_WORD code_end;
-  FX_WORD index_num;
+  uint16_t code_clear;
+  uint16_t code_end;
+  uint16_t index_num;
   uint8_t bit_offset;
   uint8_t index_bit_cur;
   uint8_t index_buf[GIF_DATA_BLOCK];
   uint8_t index_buf_len;
   tag_Table code_table[GIF_MAX_LZW_CODE];
-  FX_WORD table_cur;
+  uint16_t table_cur;
 };
 typedef struct tag_gif_decompress_struct gif_decompress_struct;
 typedef gif_decompress_struct* gif_decompress_struct_p;
@@ -251,9 +251,9 @@
   GifHeader* header_ptr;
   GifLSD* lsd_ptr;
   GifPalette* global_pal;
-  FX_WORD gpal_num;
+  uint16_t gpal_num;
   GifPalette* local_pal;
-  FX_WORD lpal_num;
+  uint16_t lpal_num;
   GifImageInfo* image_info_ptr;
   CGifLZWEncoder* img_encoder_ptr;