diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 16:07:59 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 16:07:59 -0700 |
commit | aafeff816e22c1333c17d8a0eb4fe8927c28142d (patch) | |
tree | e694c6f82ec72fa46e6172b4475996b30d3f6a3a /fpdfsdk | |
parent | 90144588255a87dea9e261bd909f2eece31a97b9 (diff) | |
download | pdfium-aafeff816e22c1333c17d8a0eb4fe8927c28142d.tar.xz |
document.delay and document.external are boolean properties.
This is the javascript test failure at 320b2313d198.
The spec says they are booleans, not ints, so correct the behaviour now.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1242263010 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/include/javascript/Document.h | 2 | ||||
-rw-r--r-- | fpdfsdk/src/javascript/Document.cpp | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/include/javascript/Document.h b/fpdfsdk/include/javascript/Document.h index 6b40069706..b6447fda2a 100644 --- a/fpdfsdk/include/javascript/Document.h +++ b/fpdfsdk/include/javascript/Document.h @@ -182,7 +182,7 @@ private: IconTree* m_pIconTree; CPDFSDK_Document* m_pDocument; CFX_WideString m_cwBaseURL; - FX_BOOL m_bDelay; + bool m_bDelay; CFX_ArrayTemplate<CJS_DelayData*> m_DelayData; CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData; }; diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index fc453b0fc8..59816f091f 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -940,9 +940,7 @@ FX_BOOL Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) return FALSE; - bool b; - vp >> b; - m_bDelay = b; + vp >> m_bDelay; if (m_bDelay) { for (int i=0,sz=m_DelayData.GetSize(); i<sz; i++) @@ -1107,7 +1105,7 @@ FX_BOOL Document::external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& { //In Chrome case,should always return true. if (vp.IsGetting()) { - vp << TRUE; + vp << true; } return TRUE; } |