summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffpushbutton.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-24 16:26:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-24 20:50:12 +0000
commited991c7d9d5bede7e3bb93ff6571512d875716dd (patch)
treef59ba63435f5c83db25c12c49ce798c274ee2608 /xfa/fxfa/app/xfa_ffpushbutton.cpp
parent302cd78d00c280cb212a5934a7a8293851e9650c (diff)
downloadpdfium-ed991c7d9d5bede7e3bb93ff6571512d875716dd.tar.xz
Nit cleanup in XFA widget code
This Cl cleans up nits in the remaining XFA widget code. Change-Id: I10f33ee2ab0ebdb06aeee582a04188fbd7a8bf9e Reviewed-on: https://pdfium-review.googlesource.com/4472 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_ffpushbutton.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index 5e9c33db14..d4b056119f 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -160,13 +160,12 @@ void CXFA_FFPushButton::LoadHighlightCaption() {
void CXFA_FFPushButton::LayoutHighlightCaption() {
CFX_SizeF sz(m_rtCaption.width, m_rtCaption.height);
LayoutCaption();
- if (m_pRolloverTextLayout) {
+ if (m_pRolloverTextLayout)
m_pRolloverTextLayout->Layout(sz);
- }
- if (m_pDownTextLayout) {
+ if (m_pDownTextLayout)
m_pDownTextLayout->Layout(sz);
- }
}
+
void CXFA_FFPushButton::RenderHighlightCaption(CFX_Graphics* pGS,
CFX_Matrix* pMatrix) {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
@@ -221,8 +220,10 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
path.AddRectangle(rtFill.left, rtFill.top, rtFill.width, rtFill.height);
pGraphics->FillPath(&path, FXFILL_WINDING, (CFX_Matrix*)pMatrix);
}
- } else if (m_pNormalWidget->GetStylesEx() &
- XFA_FWL_PSBSTYLEEXT_HiliteOutLine) {
+ return;
+ }
+
+ if (m_pNormalWidget->GetStylesEx() & XFA_FWL_PSBSTYLEEXT_HiliteOutLine) {
if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
(m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
float fLineWidth = GetLineWidth();