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

Unified Diff: xfa/fwl/core/cfwl_widget.cpp

Issue 2557103002: Cleanup FWL default values part II. (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/core/cfwl_widget.h ('k') | xfa/fwl/core/cfwl_widgetmgr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_widget.cpp
diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp
index 8989563112f0379b0b6bf3bb12b831e2229b79d0..2dff10adc7714d7f661fe01b6dc64e7ab1662a09 100644
--- a/xfa/fwl/core/cfwl_widget.cpp
+++ b/xfa/fwl/core/cfwl_widget.cpp
@@ -76,7 +76,7 @@ void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
rect.Inflate(fEdge, fEdge);
}
if (HasBorder()) {
- FX_FLOAT fBorder = GetBorderSize();
+ FX_FLOAT fBorder = GetBorderSize(true);
rect.Inflate(fBorder, fBorder);
}
}
@@ -317,7 +317,7 @@ void CFWL_Widget::GetEdgeRect(CFX_RectF& rtEdge) {
rtEdge = m_pProperties->m_rtWidget;
rtEdge.left = rtEdge.top = 0;
if (HasBorder()) {
- FX_FLOAT fCX = GetBorderSize();
+ FX_FLOAT fCX = GetBorderSize(true);
FX_FLOAT fCY = GetBorderSize(false);
rtEdge.Deflate(fCX, fCY);
}
@@ -399,8 +399,7 @@ CFWL_Widget* CFWL_Widget::GetRootOuter() {
CFX_SizeF CFWL_Widget::CalcTextSize(const CFX_WideString& wsText,
IFWL_ThemeProvider* pTheme,
- bool bMultiLine,
- int32_t iLineWidth) {
+ bool bMultiLine) {
if (!pTheme)
return CFX_SizeF();
@@ -411,10 +410,8 @@ CFX_SizeF CFWL_Widget::CalcTextSize(const CFX_WideString& wsText,
bMultiLine ? FDE_TTOSTYLE_LineWrap : FDE_TTOSTYLE_SingleLine;
calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
CFX_RectF rect;
- FX_FLOAT fWidth = bMultiLine
- ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth
- : FWL_WGT_CalcMultiLineDefWidth)
- : FWL_WGT_CalcWidth;
+ FX_FLOAT fWidth =
+ bMultiLine ? FWL_WGT_CalcMultiLineDefWidth : FWL_WGT_CalcWidth;
rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight);
pTheme->CalcTextRect(&calPart, rect);
return CFX_SizeF(rect.width, rect.height);
« no previous file with comments | « xfa/fwl/core/cfwl_widget.h ('k') | xfa/fwl/core/cfwl_widgetmgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698