Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: xfa/fwl/cfwl_widget.cpp

Issue 2575093002: Cleanup widget edge related code (Closed)
Patch Set: Rebase to master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/cfwl_widget.h ('k') | xfa/fwl/theme/cfwl_barcodetp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_widget.cpp
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 4c6eefafda17247904505f95223ae017fe0d1c98..6c33c7674ee30cba518254545e7da9138bd1f8bf 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)
« no previous file with comments | « xfa/fwl/cfwl_widget.h ('k') | xfa/fwl/theme/cfwl_barcodetp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698