Do IWYU in core/fxcrt/css and fix lint errors.

Change-Id: I6d2b35849e9f1935277986b6c72e6f507d976974
Reviewed-on: https://pdfium-review.googlesource.com/c/43948
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/core/fxcrt/css/cfx_css.h b/core/fxcrt/css/cfx_css.h
index 5b70d0b..30d9ff8 100644
--- a/core/fxcrt/css/cfx_css.h
+++ b/core/fxcrt/css/cfx_css.h
@@ -7,7 +7,7 @@
 #ifndef CORE_FXCRT_CSS_CFX_CSS_H_
 #define CORE_FXCRT_CSS_CFX_CSS_H_
 
-#include "core/fxge/fx_dib.h"
+#include <stdint.h>
 
 enum CFX_CSSVALUETYPE {
   CFX_CSSVALUETYPE_Primitive = 1 << 0,
diff --git a/core/fxcrt/css/cfx_csscolorvalue.h b/core/fxcrt/css/cfx_csscolorvalue.h
index 0156caa..fdc3fcb 100644
--- a/core/fxcrt/css/cfx_csscolorvalue.h
+++ b/core/fxcrt/css/cfx_csscolorvalue.h
@@ -8,6 +8,7 @@
 #define CORE_FXCRT_CSS_CFX_CSSCOLORVALUE_H_
 
 #include "core/fxcrt/css/cfx_cssvalue.h"
+#include "core/fxge/fx_dib.h"
 
 class CFX_CSSColorValue final : public CFX_CSSValue {
  public:
diff --git a/core/fxcrt/css/cfx_csscomputedstyle.cpp b/core/fxcrt/css/cfx_csscomputedstyle.cpp
index eff7081..11ae901 100644
--- a/core/fxcrt/css/cfx_csscomputedstyle.cpp
+++ b/core/fxcrt/css/cfx_csscomputedstyle.cpp
@@ -9,16 +9,16 @@
 #include "core/fxcrt/css/cfx_cssstringvalue.h"
 #include "core/fxcrt/css/cfx_cssvaluelist.h"
 
-CFX_CSSComputedStyle::CFX_CSSComputedStyle() {}
+CFX_CSSComputedStyle::CFX_CSSComputedStyle() = default;
 
-CFX_CSSComputedStyle::~CFX_CSSComputedStyle() {}
+CFX_CSSComputedStyle::~CFX_CSSComputedStyle() = default;
 
 bool CFX_CSSComputedStyle::GetCustomStyle(const WideString& wsName,
-                                          WideString& wsValue) const {
+                                          WideString* pValue) const {
   for (auto iter = m_CustomProperties.rbegin();
-       iter != m_CustomProperties.rend(); iter++) {
+       iter != m_CustomProperties.rend(); ++iter) {
     if (wsName == iter->name()) {
-      wsValue = iter->value();
+      *pValue = iter->value();
       return true;
     }
   }
diff --git a/core/fxcrt/css/cfx_csscomputedstyle.h b/core/fxcrt/css/cfx_csscomputedstyle.h
index f97f3f1..d4959ee 100644
--- a/core/fxcrt/css/cfx_csscomputedstyle.h
+++ b/core/fxcrt/css/cfx_csscomputedstyle.h
@@ -12,6 +12,7 @@
 #include "core/fxcrt/css/cfx_css.h"
 #include "core/fxcrt/css/cfx_csscustomproperty.h"
 #include "core/fxcrt/fx_string.h"
+#include "core/fxge/fx_dib.h"
 
 class CFX_CSSValueList;
 
@@ -94,7 +95,7 @@
   void SetLetterSpacing(const CFX_CSSLength& letterSpacing);
   void AddCustomStyle(const CFX_CSSCustomProperty& prop);
 
-  bool GetCustomStyle(const WideString& wsName, WideString& wsValue) const;
+  bool GetCustomStyle(const WideString& wsName, WideString* pValue) const;
 
   InheritedData m_InheritedData;
   NonInheritedData m_NonInheritedData;
diff --git a/core/fxcrt/css/cfx_cssdata.h b/core/fxcrt/css/cfx_cssdata.h
index a2f774b..8e1d265 100644
--- a/core/fxcrt/css/cfx_cssdata.h
+++ b/core/fxcrt/css/cfx_cssdata.h
@@ -11,6 +11,7 @@
 #include "core/fxcrt/css/cfx_cssnumbervalue.h"
 #include "core/fxcrt/css/cfx_cssvalue.h"
 #include "core/fxcrt/string_view_template.h"
+#include "core/fxge/fx_dib.h"
 
 class CFX_CSSData {
  public:
diff --git a/core/fxcrt/css/cfx_cssstringvalue.h b/core/fxcrt/css/cfx_cssstringvalue.h
index d49393c..b59cef0 100644
--- a/core/fxcrt/css/cfx_cssstringvalue.h
+++ b/core/fxcrt/css/cfx_cssstringvalue.h
@@ -8,6 +8,7 @@
 #define CORE_FXCRT_CSS_CFX_CSSSTRINGVALUE_H_
 
 #include "core/fxcrt/css/cfx_cssvalue.h"
+#include "core/fxcrt/widestring.h"
 
 class CFX_CSSStringValue final : public CFX_CSSValue {
  public:
diff --git a/core/fxcrt/css/cfx_cssvalue.h b/core/fxcrt/css/cfx_cssvalue.h
index f143e96..30aace2 100644
--- a/core/fxcrt/css/cfx_cssvalue.h
+++ b/core/fxcrt/css/cfx_cssvalue.h
@@ -8,6 +8,7 @@
 #define CORE_FXCRT_CSS_CFX_CSSVALUE_H_
 
 #include "core/fxcrt/css/cfx_css.h"
+#include "core/fxcrt/retain_ptr.h"
 
 class CFX_CSSValue : public Retainable {
  public:
diff --git a/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp b/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp
index e232a2d..9d19d27 100644
--- a/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp
+++ b/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp
@@ -6,6 +6,7 @@
 
 #include "core/fxcrt/css/cfx_cssvaluelistparser.h"
 
+#include "core/fxcrt/widestring.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/test_support.h"
 #include "third_party/base/ptr_util.h"
diff --git a/xfa/fxfa/cxfa_textparser.cpp b/xfa/fxfa/cxfa_textparser.cpp
index d8150a6..24276e1 100644
--- a/xfa/fxfa/cxfa_textparser.cpp
+++ b/xfa/fxfa/cxfa_textparser.cpp
@@ -316,21 +316,21 @@
 
 float CXFA_TextParser::GetTabInterval(CFX_CSSComputedStyle* pStyle) const {
   WideString wsValue;
-  if (pStyle && pStyle->GetCustomStyle(L"tab-interval", wsValue))
+  if (pStyle && pStyle->GetCustomStyle(L"tab-interval", &wsValue))
     return CXFA_Measurement(wsValue.AsStringView()).ToUnit(XFA_Unit::Pt);
   return 36;
 }
 
 int32_t CXFA_TextParser::CountTabs(CFX_CSSComputedStyle* pStyle) const {
   WideString wsValue;
-  if (pStyle && pStyle->GetCustomStyle(L"xfa-tab-count", wsValue))
+  if (pStyle && pStyle->GetCustomStyle(L"xfa-tab-count", &wsValue))
     return wsValue.GetInteger();
   return 0;
 }
 
 bool CXFA_TextParser::IsSpaceRun(CFX_CSSComputedStyle* pStyle) const {
   WideString wsValue;
-  if (pStyle && pStyle->GetCustomStyle(L"xfa-spacerun", wsValue)) {
+  if (pStyle && pStyle->GetCustomStyle(L"xfa-spacerun", &wsValue)) {
     wsValue.MakeLower();
     return wsValue == L"yes";
   }
@@ -382,7 +382,7 @@
                                      const CFX_XMLNode* pXMLNode) const {
   if (pStyle) {
     WideString wsValue;
-    if (pStyle->GetCustomStyle(L"xfa-font-horizontal-scale", wsValue))
+    if (pStyle->GetCustomStyle(L"xfa-font-horizontal-scale", &wsValue))
       return wsValue.GetInteger();
 
     while (pXMLNode) {
@@ -391,7 +391,7 @@
         CXFA_TextParseContext* pContext = it->second.get();
         if (pContext && pContext->m_pParentStyle &&
             pContext->m_pParentStyle->GetCustomStyle(
-                L"xfa-font-horizontal-scale", wsValue)) {
+                L"xfa-font-horizontal-scale", &wsValue)) {
           return wsValue.GetInteger();
         }
       }
@@ -407,7 +407,7 @@
                                      CFX_CSSComputedStyle* pStyle) const {
   if (pStyle) {
     WideString wsValue;
-    if (pStyle->GetCustomStyle(L"xfa-font-vertical-scale", wsValue))
+    if (pStyle->GetCustomStyle(L"xfa-font-vertical-scale", &wsValue))
       return wsValue.GetInteger();
   }
 
@@ -437,7 +437,7 @@
     iUnderline = 1;
 
   WideString wsValue;
-  if (pStyle->GetCustomStyle(L"underlinePeriod", wsValue)) {
+  if (pStyle->GetCustomStyle(L"underlinePeriod", &wsValue)) {
     if (wsValue == L"word")
       iPeriod = XFA_AttributeEnum::Word;
   } else if (font) {
@@ -551,8 +551,8 @@
     return false;
 
   WideString wsValue;
-  if (!pStyle->GetCustomStyle(L"xfa-tab-stops", wsValue) &&
-      !pStyle->GetCustomStyle(L"tab-stops", wsValue)) {
+  if (!pStyle->GetCustomStyle(L"xfa-tab-stops", &wsValue) &&
+      !pStyle->GetCustomStyle(L"tab-stops", &wsValue)) {
     return false;
   }