summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-15 13:43:29 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-15 13:43:29 -0800
commitd92477068ad0918c97a5dab799d8cfdf07ce3580 (patch)
tree207ab58fc62713e99c5810d31c3eb1afa34ecd21 /xfa
parent791a0ccd25474d9306ad0df425575869caec3048 (diff)
downloadpdfium-d92477068ad0918c97a5dab799d8cfdf07ce3580.tar.xz
Remove more unused widget styles
Remove more FWL Widget Styles which are never set. Review-Url: https://codereview.chromium.org/2578473003
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fde/tto/fde_textout.cpp3
-rw-r--r--xfa/fde/tto/fde_textout.h1
-rw-r--r--xfa/fwl/cfwl_checkbox.cpp2
-rw-r--r--xfa/fwl/cfwl_edit.cpp6
-rw-r--r--xfa/fwl/cfwl_form.cpp7
-rw-r--r--xfa/fwl/cfwl_listbox.cpp6
-rw-r--r--xfa/fwl/cfwl_pushbutton.cpp2
-rw-r--r--xfa/fwl/cfwl_widget.cpp21
-rw-r--r--xfa/fwl/cfwl_widgetmgr.cpp4
-rw-r--r--xfa/fwl/fwl_widgetdef.h19
10 files changed, 3 insertions, 68 deletions
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index d7155b7107..cf541a289c 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -74,9 +74,6 @@ void CFDE_TextOut::SetStyles(uint32_t dwStyles) {
if (dwStyles & FDE_TTOSTYLE_ArabicShapes) {
m_dwTxtBkStyles |= FX_TXTLAYOUTSTYLE_ArabicShapes;
}
- if (dwStyles & FDE_TTOSTYLE_RTL) {
- m_dwTxtBkStyles |= FX_TXTLAYOUTSTYLE_RTLReadingOrder;
- }
if (dwStyles & FDE_TTOSTYLE_ArabicContext) {
m_dwTxtBkStyles |= FX_TXTLAYOUTSTYLE_ArabicContext;
}
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 7e40f39dc7..684a6411fa 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -26,7 +26,6 @@
#define FDE_TTOSTYLE_Ellipsis 0x0080
#define FDE_TTOSTYLE_LineWrap 0x0100
#define FDE_TTOSTYLE_ArabicShapes 0x0200
-#define FDE_TTOSTYLE_RTL 0x0400
#define FDE_TTOSTYLE_ArabicContext 0x0800
#define FDE_TTOSTYLE_LastLineHeight 0x1000
#define FDE_TTOALIGNMENT_TopLeft 0
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index e72695fa6b..26ac053ce7 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -179,8 +179,6 @@ uint32_t CFWL_CheckBox::GetPartStates() const {
void CFWL_CheckBox::UpdateTextOutStyles() {
m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
m_dwTTOStyles = 0;
- if (m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_RTLReading)
- m_dwTTOStyles |= FDE_TTOSTYLE_RTL;
m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine;
}
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index f51249eaca..ecf012e0a0 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -662,8 +662,7 @@ void CFWL_Edit::UpdateEditParams() {
}
if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_MultiLine) {
params.dwMode |= FDE_TEXTEDITMODE_MultiLines;
- if ((m_pProperties->m_dwStyles & FWL_WGTSTYLE_HScroll) == 0 &&
- (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_AutoHScroll) == 0) {
+ if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_AutoHScroll) == 0) {
params.dwMode |=
FDE_TEXTEDITMODE_AutoLineWrap | FDE_TEXTEDITMODE_LimitArea_Horz;
}
@@ -925,8 +924,7 @@ bool CFWL_Edit::IsShowScrollBar(bool bVert) {
(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_MultiLine) &&
IsContentHeightOverflow();
}
- return bShow && (m_pProperties->m_dwStyles & FWL_WGTSTYLE_HScroll) &&
- (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_MultiLine);
+ return false;
}
bool CFWL_Edit::IsContentHeightOverflow() {
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index dcb2555651..a40f74e00c 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -99,13 +99,6 @@ void CFWL_Form::DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) {
param.m_iPart = CFWL_Part::Border;
pTheme->DrawBackground(&param);
}
- if ((m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_EdgeMask) !=
- FWL_WGTSTYLE_EdgeNone) {
- param.m_iPart = CFWL_Part::Edge;
- param.m_rtPart = GetEdgeRect();
- param.m_dwStates = CFWL_PartState_Normal;
- pTheme->DrawBackground(&param);
- }
}
CFWL_Widget* CFWL_Form::DoModal() {
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index ca000f33d0..ceea0c7f8e 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -70,9 +70,6 @@ void CFWL_ListBox::Update() {
break;
}
}
- if (m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_RTLReading)
- m_dwTTOStyles |= FDE_TTOSTYLE_RTL;
-
m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine;
m_fScorllBarWidth = GetScrollWidth();
CalcSize(false);
@@ -512,14 +509,11 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
if (bAutoSize)
return fs;
- FX_FLOAT iWidth = m_rtClient.width - rtUIMargin.left - rtUIMargin.width;
FX_FLOAT iHeight = m_rtClient.height;
bool bShowVertScr = false;
bool bShowHorzScr = false;
if (!bShowVertScr && (m_pProperties->m_dwStyles & FWL_WGTSTYLE_VScroll))
bShowVertScr = (fs.y > iHeight);
- if (!bShowHorzScr && (m_pProperties->m_dwStyles & FWL_WGTSTYLE_HScroll))
- bShowHorzScr = (fs.x > iWidth);
CFX_SizeF szRange;
if (bShowVertScr) {
diff --git a/xfa/fwl/cfwl_pushbutton.cpp b/xfa/fwl/cfwl_pushbutton.cpp
index 670e5236d9..6f107c3f9e 100644
--- a/xfa/fwl/cfwl_pushbutton.cpp
+++ b/xfa/fwl/cfwl_pushbutton.cpp
@@ -107,8 +107,6 @@ uint32_t CFWL_PushButton::GetPartStates() {
void CFWL_PushButton::UpdateTextOutStyles() {
m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
m_dwTTOStyles = FDE_TTOSTYLE_SingleLine;
- if (m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_RTLReading)
- m_dwTTOStyles |= FDE_TTOSTYLE_RTL;
}
void CFWL_PushButton::OnProcessMessage(CFWL_Message* pMessage) {
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index a1ed56fb08..4c6eefafda 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -279,7 +279,7 @@ bool CFWL_Widget::HasBorder() const {
}
bool CFWL_Widget::HasEdge() const {
- return !!(m_pProperties->m_dwStyles & FWL_WGTSTYLE_EdgeMask);
+ return false;
}
bool CFWL_Widget::IsVisible() const {
@@ -323,25 +323,6 @@ FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) {
}
FX_FLOAT CFWL_Widget::GetEdgeWidth() {
- CFWL_WidgetCapacity dwCapacity = CFWL_WidgetCapacity::None;
- switch (m_pProperties->m_dwStyles & FWL_WGTSTYLE_EdgeMask) {
- case FWL_WGTSTYLE_EdgeFlat: {
- dwCapacity = CFWL_WidgetCapacity::EdgeFlat;
- break;
- }
- case FWL_WGTSTYLE_EdgeRaised: {
- dwCapacity = CFWL_WidgetCapacity::EdgeRaised;
- break;
- }
- case FWL_WGTSTYLE_EdgeSunken: {
- dwCapacity = CFWL_WidgetCapacity::EdgeSunken;
- break;
- }
- }
- if (dwCapacity != CFWL_WidgetCapacity::None) {
- FX_FLOAT* fRet = static_cast<FX_FLOAT*>(GetThemeCapacity(dwCapacity));
- return fRet ? *fRet : 0;
- }
return 0;
}
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 7df7fb234d..48a4270068 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -330,10 +330,6 @@ CFWL_Widget* CFWL_WidgetMgr::NextTab(CFWL_Widget* parent,
if (focus == child)
bFind = true;
- if ((child->GetStyles() & FWL_WGTSTYLE_TabStop) &&
- (!focus || (focus != child && bFind))) {
- return child;
- }
CFWL_Widget* bRet = NextTab(child, focus, bFind);
if (bRet)
return bRet;
diff --git a/xfa/fwl/fwl_widgetdef.h b/xfa/fwl/fwl_widgetdef.h
index 09ddef5e8d..7c11ea1463 100644
--- a/xfa/fwl/fwl_widgetdef.h
+++ b/xfa/fwl/fwl_widgetdef.h
@@ -11,28 +11,9 @@
#define FWL_WGTSTYLE_Popup (1L << 0)
#define FWL_WGTSTYLE_Child (2L << 0)
#define FWL_WGTSTYLE_Border (1L << 2)
-#define FWL_WGTSTYLE_HScroll (1L << 9)
#define FWL_WGTSTYLE_VScroll (1L << 11)
-#define FWL_WGTSTYLE_LeftScrollbar (1L << 12)
-#define FWL_WGTSTYLE_LeftAlignment (0L << 13)
-#define FWL_WGTSTYLE_CenterAlignment (1L << 13)
-#define FWL_WGTSTYLE_RightAlignment (2L << 13)
-#define FWL_WGTSTYLE_TopAlignment (0L << 15)
-#define FWL_WGTSTYLE_VCenterAlignment (1L << 15)
-#define FWL_WGTSTYLE_BottomAlignment (2L << 15)
-#define FWL_WGTSTYLE_RTLReading (1L << 17)
-#define FWL_WGTSTYLE_EdgeNone (0L << 19)
-#define FWL_WGTSTYLE_EdgeFlat (1L << 19)
-#define FWL_WGTSTYLE_EdgeRaised (2L << 19)
-#define FWL_WGTSTYLE_EdgeSunken (3L << 19)
-#define FWL_WGTSTYLE_EdgeMask (3L << 19)
-#define FWL_WGTSTYLE_Shadow (3L << 21)
#define FWL_WGTSTYLE_Group (1L << 22)
-#define FWL_WGTSTYLE_TabStop (1L << 23)
#define FWL_WGTSTYLE_Offscreen (1L << 24)
-#define FWL_WGTSTYLE_DragAcceptFiles (1L << 25)
-#define FWL_WGTSTYLE_TopMost (1L << 26)
-#define FWL_WGTSTYLE_TransParent (1L << 27)
#define FWL_WGTSTYLE_NoBackground (1L << 28)
#define FWL_WGTSTYLE_WindowTypeMask (3L << 0)