Remove a couple of unused methods in CXFA_FFWidget

This CL removes two unused methods in CXFA_FFWidget and also the code
that becomes unused after removing those.

Change-Id: Ifa58a7cabc1750bb13942f86385414e8f5e0cce3
Reviewed-on: https://pdfium-review.googlesource.com/18310
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index c4919cc..7d98e1f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1788,8 +1788,6 @@
       "xfa/fxfa/parser/cxfa_arcdata.h",
       "xfa/fxfa/parser/cxfa_arraynodelist.cpp",
       "xfa/fxfa/parser/cxfa_arraynodelist.h",
-      "xfa/fxfa/parser/cxfa_assistdata.cpp",
-      "xfa/fxfa/parser/cxfa_assistdata.h",
       "xfa/fxfa/parser/cxfa_attachnodelist.cpp",
       "xfa/fxfa/parser/cxfa_attachnodelist.h",
       "xfa/fxfa/parser/cxfa_binddata.cpp",
@@ -1877,8 +1875,6 @@
       "xfa/fxfa/parser/cxfa_thisproxy.h",
       "xfa/fxfa/parser/cxfa_timezoneprovider.cpp",
       "xfa/fxfa/parser/cxfa_timezoneprovider.h",
-      "xfa/fxfa/parser/cxfa_tooltipdata.cpp",
-      "xfa/fxfa/parser/cxfa_tooltipdata.h",
       "xfa/fxfa/parser/cxfa_traversestrategy_contentareacontainerlayoutitem.h",
       "xfa/fxfa/parser/cxfa_traversestrategy_contentlayoutitem.h",
       "xfa/fxfa/parser/cxfa_traversestrategy_layoutitem.h",
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 708c666..4f5c66e 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -971,16 +971,6 @@
   return m_pDataAcc.Get();
 }
 
-bool CXFA_FFWidget::GetToolTip(WideString& wsToolTip) {
-  CXFA_AssistData assist = m_pDataAcc->GetAssistData();
-  if (assist) {
-    CXFA_ToolTipData toolTipData = assist.GetToolTipData();
-    if (toolTipData)
-      return toolTipData.GetTip(wsToolTip);
-  }
-  return GetCaptionText(wsToolTip);
-}
-
 void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS,
                                  const CFX_Matrix& matrix,
                                  uint32_t dwStatus) {
@@ -1038,15 +1028,6 @@
   m_pDocView->AddInvalidateRect(m_pPageView, rtWidget);
 }
 
-bool CXFA_FFWidget::GetCaptionText(WideString& wsCap) {
-  CXFA_TextLayout* pCapTextlayout = m_pDataAcc->GetCaptionTextLayout();
-  if (!pCapTextlayout) {
-    return false;
-  }
-  pCapTextlayout->GetText(wsCap);
-  return true;
-}
-
 bool CXFA_FFWidget::OnMouseEnter() {
   return false;
 }
diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h
index 900369b..b750a2d 100644
--- a/xfa/fxfa/cxfa_ffwidget.h
+++ b/xfa/fxfa/cxfa_ffwidget.h
@@ -146,7 +146,6 @@
   void ModifyStatus(uint32_t dwAdded, uint32_t dwRemoved);
 
   CXFA_WidgetAcc* GetDataAcc();
-  bool GetToolTip(WideString& wsToolTip);
 
   CXFA_FFDocView* GetDocView();
   void SetDocView(CXFA_FFDocView* pDocView);
@@ -154,7 +153,6 @@
   CXFA_FFApp* GetApp();
   IXFA_AppProvider* GetAppProvider();
   void AddInvalidateRect();
-  bool GetCaptionText(WideString& wsCap);
   bool IsFocused() const { return !!(m_dwStatus & XFA_WidgetStatus_Focused); }
   CFX_PointF Rotate2Normal(const CFX_PointF& point);
   CFX_Matrix GetRotateMatrix();
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp
index 331ea18..9be3c4f 100644
--- a/xfa/fxfa/cxfa_textlayout.cpp
+++ b/xfa/fxfa/cxfa_textlayout.cpp
@@ -240,14 +240,6 @@
   m_pBreak->SetCharSpace(pStyle->GetLetterSpacing().GetValue());
 }
 
-int32_t CXFA_TextLayout::GetText(WideString& wsText) {
-  GetTextDataNode();
-  wsText.clear();
-  if (!m_bRichText)
-    wsText = m_pTextDataNode->JSNode()->GetContent(false);
-  return wsText.GetLength();
-}
-
 float CXFA_TextLayout::GetLayoutHeight() {
   if (!m_pLoader)
     return 0;
diff --git a/xfa/fxfa/cxfa_textlayout.h b/xfa/fxfa/cxfa_textlayout.h
index 5856826..1811d96 100644
--- a/xfa/fxfa/cxfa_textlayout.h
+++ b/xfa/fxfa/cxfa_textlayout.h
@@ -33,7 +33,6 @@
   explicit CXFA_TextLayout(CXFA_TextProvider* pTextProvider);
   ~CXFA_TextLayout();
 
-  int32_t GetText(WideString& wsText);
   float GetLayoutHeight();
   float StartLayout(float fWidth = -1);
   bool DoLayout(int32_t iBlockIndex,
diff --git a/xfa/fxfa/parser/cxfa_assistdata.cpp b/xfa/fxfa/parser/cxfa_assistdata.cpp
deleted file mode 100644
index 051661f..0000000
--- a/xfa/fxfa/parser/cxfa_assistdata.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 "xfa/fxfa/parser/cxfa_assistdata.h"
-
-#include "xfa/fxfa/parser/cxfa_node.h"
-
-CXFA_AssistData::CXFA_AssistData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-
-CXFA_ToolTipData CXFA_AssistData::GetToolTipData() {
-  return CXFA_ToolTipData(m_pNode->GetChild(0, XFA_Element::ToolTip, false));
-}
diff --git a/xfa/fxfa/parser/cxfa_assistdata.h b/xfa/fxfa/parser/cxfa_assistdata.h
deleted file mode 100644
index 8b37473..0000000
--- a/xfa/fxfa/parser/cxfa_assistdata.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_
-#define XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_
-
-#include "xfa/fxfa/parser/cxfa_data.h"
-#include "xfa/fxfa/parser/cxfa_tooltipdata.h"
-
-class CXFA_Node;
-
-class CXFA_AssistData : public CXFA_Data {
- public:
-  explicit CXFA_AssistData(CXFA_Node* pNode);
-
-  CXFA_ToolTipData GetToolTipData();
-};
-
-#endif  // XFA_FXFA_PARSER_CXFA_ASSISTDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_tooltipdata.cpp b/xfa/fxfa/parser/cxfa_tooltipdata.cpp
deleted file mode 100644
index 6e2ceb5..0000000
--- a/xfa/fxfa/parser/cxfa_tooltipdata.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 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 "xfa/fxfa/parser/cxfa_tooltipdata.h"
-
-#include "xfa/fxfa/parser/cxfa_node.h"
-
-CXFA_ToolTipData::CXFA_ToolTipData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-
-bool CXFA_ToolTipData::GetTip(WideString& wsTip) {
-  return m_pNode->JSNode()->TryContent(wsTip, false, true);
-}
diff --git a/xfa/fxfa/parser/cxfa_tooltipdata.h b/xfa/fxfa/parser/cxfa_tooltipdata.h
deleted file mode 100644
index 447bf81..0000000
--- a/xfa/fxfa/parser/cxfa_tooltipdata.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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 XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_
-#define XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_
-
-#include "core/fxcrt/fx_string.h"
-#include "xfa/fxfa/parser/cxfa_data.h"
-
-class CXFA_Node;
-
-class CXFA_ToolTipData : public CXFA_Data {
- public:
-  explicit CXFA_ToolTipData(CXFA_Node* pNode);
-
-  bool GetTip(WideString& wsTip);
-};
-
-#endif  // XFA_FXFA_PARSER_CXFA_TOOLTIPDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index d131b31..679ef05 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -359,11 +359,6 @@
       m_pNode->JSNode()->GetProperty(0, XFA_Element::Bind, false));
 }
 
-CXFA_AssistData CXFA_WidgetData::GetAssistData() {
-  return CXFA_AssistData(
-      m_pNode->JSNode()->GetProperty(0, XFA_Element::Assist, false));
-}
-
 bool CXFA_WidgetData::GetWidth(float& fWidth) {
   return TryMeasure(XFA_Attribute::W, fWidth);
 }
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index 6de00ed..dd9e1d9 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -12,7 +12,6 @@
 #include "core/fxcrt/fx_coordinates.h"
 #include "core/fxcrt/fx_string.h"
 #include "core/fxcrt/fx_system.h"
-#include "xfa/fxfa/parser/cxfa_assistdata.h"
 #include "xfa/fxfa/parser/cxfa_binddata.h"
 #include "xfa/fxfa/parser/cxfa_borderdata.h"
 #include "xfa/fxfa/parser/cxfa_calculatedata.h"
@@ -49,7 +48,6 @@
   int32_t GetAccess();
   int32_t GetRotate();
 
-  CXFA_AssistData GetAssistData();
   CXFA_BorderData GetBorderData(bool bModified);
   CXFA_CaptionData GetCaptionData();
   CXFA_FontData GetFontData(bool bModified);