summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_edit.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-02-07 20:46:32 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-08 02:13:33 +0000
commit071d78690a4e2becffaeeb32fe210ee58ab3e532 (patch)
tree60484551e89fa689e9af6ee7008bcd8e737ea10c /xfa/fwl/cfwl_edit.cpp
parentbba2a7cf30da9e84bcc14ef32dbb0bb944229219 (diff)
downloadpdfium-071d78690a4e2becffaeeb32fe210ee58ab3e532.tar.xz
Rename x,y to width,height for Size types
This Cl fixes the naming of the size types to match their purpose. This makes the code clearer. Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790 Reviewed-on: https://pdfium-review.googlesource.com/2551 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_edit.cpp')
-rw-r--r--xfa/fwl/cfwl_edit.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 5c024785f0..667104df74 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -778,8 +778,8 @@ void CFWL_Edit::UpdateVAlignment() {
part.m_pWidget = this;
CFX_SizeF pSpace = theme->GetSpaceAboveBelow(&part);
- fSpaceAbove = pSpace.x;
- fSpaceBelow = pSpace.y;
+ fSpaceAbove = pSpace.width;
+ fSpaceBelow = pSpace.height;
}
if (fSpaceAbove < 0.1f)
fSpaceAbove = 0;
@@ -1500,43 +1500,43 @@ bool CFWL_Edit::OnScroll(CFWL_ScrollBar* pScrollBar,
CFWL_EventScroll::Code dwCode,
FX_FLOAT fPos) {
CFX_SizeF fs;
- pScrollBar->GetRange(&fs.x, &fs.y);
+ pScrollBar->GetRange(&fs.width, &fs.height);
FX_FLOAT iCurPos = pScrollBar->GetPos();
FX_FLOAT fStep = pScrollBar->GetStepSize();
switch (dwCode) {
case CFWL_EventScroll::Code::Min: {
- fPos = fs.x;
+ fPos = fs.width;
break;
}
case CFWL_EventScroll::Code::Max: {
- fPos = fs.y;
+ fPos = fs.height;
break;
}
case CFWL_EventScroll::Code::StepBackward: {
fPos -= fStep;
- if (fPos < fs.x + fStep / 2) {
- fPos = fs.x;
+ if (fPos < fs.width + fStep / 2) {
+ fPos = fs.width;
}
break;
}
case CFWL_EventScroll::Code::StepForward: {
fPos += fStep;
- if (fPos > fs.y - fStep / 2) {
- fPos = fs.y;
+ if (fPos > fs.height - fStep / 2) {
+ fPos = fs.height;
}
break;
}
case CFWL_EventScroll::Code::PageBackward: {
fPos -= pScrollBar->GetPageSize();
- if (fPos < fs.x) {
- fPos = fs.x;
+ if (fPos < fs.width) {
+ fPos = fs.width;
}
break;
}
case CFWL_EventScroll::Code::PageForward: {
fPos += pScrollBar->GetPageSize();
- if (fPos > fs.y) {
- fPos = fs.y;
+ if (fPos > fs.height) {
+ fPos = fs.height;
}
break;
}