summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_widget.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-15 13:44:02 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-15 13:44:02 -0800
commit46a4bbf46723cd6375042d599d01fe08012eadd6 (patch)
treef0e0df5fce69c33557971c1bc52ff8b9c69dfaa0 /xfa/fwl/cfwl_widget.cpp
parentd92477068ad0918c97a5dab799d8cfdf07ce3580 (diff)
downloadpdfium-46a4bbf46723cd6375042d599d01fe08012eadd6.tar.xz
Cleanup widget edge related code
CFWL_Widget::HasEdge() always returns false. This CL removes it and the supporting code. Review-Url: https://codereview.chromium.org/2575093002
Diffstat (limited to 'xfa/fwl/cfwl_widget.cpp')
-rw-r--r--xfa/fwl/cfwl_widget.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 4c6eefafda..6c33c7674e 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -74,10 +74,6 @@ CFX_RectF CFWL_Widget::GetWidgetRect() {
}
void CFWL_Widget::InflateWidgetRect(CFX_RectF& rect) {
- if (HasEdge()) {
- FX_FLOAT fEdge = GetEdgeWidth();
- rect.Inflate(fEdge, fEdge);
- }
if (HasBorder()) {
FX_FLOAT fBorder = GetBorderSize(true);
rect.Inflate(fBorder, fBorder);
@@ -93,12 +89,7 @@ void CFWL_Widget::SetWidgetRect(const CFX_RectF& rect) {
}
CFX_RectF CFWL_Widget::GetClientRect() {
- CFX_RectF rect = GetEdgeRect();
- if (HasEdge()) {
- FX_FLOAT fEdge = GetEdgeWidth();
- rect.Deflate(fEdge, fEdge);
- }
- return rect;
+ return GetEdgeRect();
}
void CFWL_Widget::SetParent(CFWL_Widget* pParent) {
@@ -165,8 +156,6 @@ void CFWL_Widget::RemoveStates(uint32_t dwStates) {
FWL_WidgetHit CFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
if (GetClientRect().Contains(fx, fy))
return FWL_WidgetHit::Client;
- if (HasEdge() && GetEdgeRect().Contains(fx, fy))
- return FWL_WidgetHit::Edge;
if (HasBorder() && GetRelativeRect().Contains(fx, fy))
return FWL_WidgetHit::Border;
return FWL_WidgetHit::Unknown;
@@ -278,10 +267,6 @@ bool CFWL_Widget::HasBorder() const {
return !!(m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border);
}
-bool CFWL_Widget::HasEdge() const {
- return false;
-}
-
bool CFWL_Widget::IsVisible() const {
return (m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) == 0;
}
@@ -322,10 +307,6 @@ FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) {
return *pfBorder;
}
-FX_FLOAT CFWL_Widget::GetEdgeWidth() {
- return 0;
-}
-
CFX_RectF CFWL_Widget::GetRelativeRect() {
CFX_RectF rect = m_pProperties->m_rtWidget;
rect.left = 0;
@@ -612,20 +593,6 @@ void CFWL_Widget::DrawBorder(CFX_Graphics* pGraphics,
pTheme->DrawBackground(&param);
}
-void CFWL_Widget::DrawEdge(CFX_Graphics* pGraphics,
- CFWL_Part iPartEdge,
- IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix) {
- CFWL_ThemeBackground param;
- param.m_pWidget = this;
- param.m_iPart = iPartEdge;
- param.m_pGraphics = pGraphics;
- if (pMatrix)
- param.m_matrix.Concat(*pMatrix, true);
- param.m_rtPart = GetEdgeRect();
- pTheme->DrawBackground(&param);
-}
-
void CFWL_Widget::NotifyDriver() {
const CFWL_App* pApp = GetOwnerApp();
if (!pApp)