Remove _XFA_EMB
The _XFA_EMB flag is never defined, remove conditionals.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1751033002 .
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
index d61b6df..e3ac41a 100644
--- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
@@ -199,30 +199,21 @@
const CFX_Matrix* pMatrix) {
return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
}
+
CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
: CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(NULL) {}
+
CXFA_FFComboBox::~CXFA_FFComboBox() {}
+
FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
+ if (bDrawFocus)
return FALSE;
- }
-#ifndef _XFA_EMB
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
-#endif
- GetRectWithoutRotate(rtBox);
- if (m_pNormalWidget) {
- CFX_RectF rtWidget;
- ((CFWL_ComboBox*)m_pNormalWidget)->GetBBox(rtWidget);
- rtBox.Union(rtWidget);
- }
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
}
+
FX_BOOL CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_fffield.cpp b/xfa/src/fxfa/src/app/xfa_fffield.cpp
index 106256d..53039e3 100644
--- a/xfa/src/fxfa/src/app/xfa_fffield.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fffield.cpp
@@ -26,36 +26,26 @@
CXFA_FFField::~CXFA_FFField() {
CXFA_FFField::UnloadWidget();
}
+
FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
- XFA_ELEMENT type = (XFA_ELEMENT)m_pDataAcc->GetUIType();
- if (type == XFA_ELEMENT_Button || type == XFA_ELEMENT_CheckButton ||
- type == XFA_ELEMENT_ImageEdit || type == XFA_ELEMENT_Signature ||
- type == XFA_ELEMENT_ChoiceList) {
- rtBox = m_rtUI;
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
- }
- return FALSE;
+ if (!bDrawFocus)
+ return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
+
+ XFA_ELEMENT type = (XFA_ELEMENT)m_pDataAcc->GetUIType();
+ if (type == XFA_ELEMENT_Button || type == XFA_ELEMENT_CheckButton ||
+ type == XFA_ELEMENT_ImageEdit || type == XFA_ELEMENT_Signature ||
+ type == XFA_ELEMENT_ChoiceList) {
+ rtBox = m_rtUI;
+ CFX_Matrix mt;
+ GetRotateMatrix(mt);
+ mt.TransformRect(rtBox);
+ return TRUE;
}
-#ifndef _XFA_EMB
- return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
-#endif
- GetRectWithoutRotate(rtBox);
- if (m_pNormalWidget) {
- CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget);
- rtBox.Union(rtWidget);
- }
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
+ return FALSE;
}
+
void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
FX_DWORD dwStatus,
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
index c1982ce..bdee996 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
@@ -555,27 +555,17 @@
CXFA_FFDateTimeEdit::CXFA_FFDateTimeEdit(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
: CXFA_FFTextEdit(pPageView, pDataAcc) {}
+
CXFA_FFDateTimeEdit::~CXFA_FFDateTimeEdit() {}
+
FX_BOOL CXFA_FFDateTimeEdit::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
+ if (bDrawFocus)
return FALSE;
- }
-#ifndef _XFA_EMB
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
-#endif
- GetRectWithoutRotate(rtBox);
- if (m_pNormalWidget) {
- CFX_RectF rtWidget;
- ((CFWL_DateTimePicker*)m_pNormalWidget)->GetBBox(rtWidget);
- rtBox.Union(rtWidget);
- }
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
}
+
FX_BOOL CXFA_FFDateTimeEdit::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index 30569ef..e813839 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -68,24 +68,21 @@
FX_DWORD CXFA_FFWidget::GetStatus() {
return m_dwStatus;
}
+
void CXFA_FFWidget::ModifyStatus(FX_DWORD dwAdded, FX_DWORD dwRemoved) {
m_dwStatus = (m_dwStatus & ~dwRemoved) | dwAdded;
}
+
FX_BOOL CXFA_FFWidget::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
+ if (bDrawFocus)
return FALSE;
- }
-#ifndef _XFA_EMB
- if (m_pPageView) {
+ if (m_pPageView)
m_pPageView->GetPageViewRect(rtBox);
- }
- return TRUE;
-#endif
- GetWidgetRect(rtBox);
return TRUE;
}
+
CXFA_WidgetAcc* CXFA_FFWidget::GetDataAcc() {
return m_pDataAcc;
}
diff --git a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
index 174e31d..1ac480b 100644
--- a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
@@ -33,6 +33,7 @@
pDocProvider->DisplayCaret(pXFAWidget, bVisible, pRtAnchor);
return TRUE;
}
+
FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
const CFX_RectF* pRect) {
if (!pWidget)
@@ -40,24 +41,10 @@
CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget);
if (!pField)
return FWL_ERR_Indefinite;
-#ifdef _XFA_EMB
- CFX_RectF rtInvalidate;
- pWidget->GetWidgetRect(rtInvalidate);
- if (pRect) {
- rtInvalidate.left += pRect->left;
- rtInvalidate.top += pRect->top;
- rtInvalidate.width = pRect->width;
- rtInvalidate.height = pRect->height;
- }
- CFX_Matrix mt;
- pField->GetRotateMatrix(mt);
- mt.TransformRect(rtInvalidate);
- pField->AddInvalidateRect(&rtInvalidate);
-#else
- pField->AddInvalidateRect(NULL);
-#endif
+ pField->AddInvalidateRect(nullptr);
return FWL_ERR_Succeeded;
}
+
FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
FX_FLOAT fMinHeight,
FX_FLOAT fMaxHeight,