diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-10 17:50:31 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-10 17:50:31 +0000 |
commit | 65b8db9a76b4b303d97836037b24b19e797fcd86 (patch) | |
tree | c9084c53facf81a072f75919c5e7dcd5725cf15f /fxjs | |
parent | 7a8d3d6f8cf6989b43de24995171ab309a1c94fa (diff) | |
download | pdfium-65b8db9a76b4b303d97836037b24b19e797fcd86.tar.xz |
Remove non-const ref parameters in CPDF_IconFit.
Also make methods const.
Change-Id: I40a21d63fea30bbf37898cb57e1acc5ba8b3345f
Reviewed-on: https://pdfium-review.googlesource.com/c/43792
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r-- | fxjs/cjs_field.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp index 2777fd8cf9..9c47e7033d 100644 --- a/fxjs/cjs_field.cpp +++ b/fxjs/cjs_field.cpp @@ -758,11 +758,8 @@ CJS_Result CJS_Field::get_button_align_x(CJS_Runtime* pRuntime) { return CJS_Result::Failure(JSMessage::kBadObjectError); CPDF_IconFit IconFit = pFormControl->GetIconFit(); - - float fLeft; - float fBottom; - IconFit.GetIconPosition(fLeft, fBottom); - return CJS_Result::Success(pRuntime->NewNumber(static_cast<int32_t>(fLeft))); + CFX_PointF pos = IconFit.GetIconBottomLeftPosition(); + return CJS_Result::Success(pRuntime->NewNumber(static_cast<int32_t>(pos.x))); } CJS_Result CJS_Field::set_button_align_x(CJS_Runtime* pRuntime, @@ -788,13 +785,8 @@ CJS_Result CJS_Field::get_button_align_y(CJS_Runtime* pRuntime) { return CJS_Result::Failure(JSMessage::kBadObjectError); CPDF_IconFit IconFit = pFormControl->GetIconFit(); - - float fLeft; - float fBottom; - IconFit.GetIconPosition(fLeft, fBottom); - - return CJS_Result::Success( - pRuntime->NewNumber(static_cast<int32_t>(fBottom))); + CFX_PointF pos = IconFit.GetIconBottomLeftPosition(); + return CJS_Result::Success(pRuntime->NewNumber(static_cast<int32_t>(pos.y))); } CJS_Result CJS_Field::set_button_align_y(CJS_Runtime* pRuntime, |