summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-05 19:24:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-05 19:24:42 +0000
commit778e59ed40ed31f6176a68253b694acd31f640c9 (patch)
tree8fbaac034139d4a64a561f481c56eaf28d2b8118 /fxjs
parent354ed202ccd4d6b9d408789a30517ebb1633570b (diff)
downloadpdfium-778e59ed40ed31f6176a68253b694acd31f640c9.tar.xz
Tidy parser lifecycle state machine in CPDF_PageObjectHolder.
Only update state in CPDF_PageObjectHolder itself. Make more data private. Remove CPDF_Page::GetPageBBox() as exact duplicate of CPDF_PageObjectHolder::GetBBox(). Change-Id: I083ec33f61a1490e7a5e673c9787751af15a6cd1 Reviewed-on: https://pdfium-review.googlesource.com/33810 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cjs_field.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp
index b9bc8cbdc9..0a322477ec 100644
--- a/fxjs/cjs_field.cpp
+++ b/fxjs/cjs_field.cpp
@@ -1647,7 +1647,7 @@ void CJS_Field::SetRect(CPDFSDK_FormFillEnvironment* pFormFillEnv,
CFX_FloatRect crRect = rect;
CPDF_Page* pPDFPage = pWidget->GetPDFPage();
- crRect.Intersect(pPDFPage->GetPageBBox());
+ crRect.Intersect(pPDFPage->GetBBox());
if (!crRect.IsEmpty()) {
CFX_FloatRect rcOld = pWidget->GetRect();
@@ -1672,10 +1672,8 @@ void CJS_Field::SetRect(CPDFSDK_FormFillEnvironment* pFormFillEnv,
pFormField->GetControl(nControlIndex)) {
if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) {
CFX_FloatRect crRect = rect;
-
CPDF_Page* pPDFPage = pWidget->GetPDFPage();
- crRect.Intersect(pPDFPage->GetPageBBox());
-
+ crRect.Intersect(pPDFPage->GetBBox());
if (!crRect.IsEmpty()) {
CFX_FloatRect rcOld = pWidget->GetRect();
if (crRect.left != rcOld.left || crRect.right != rcOld.right ||