Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: fpdfsdk/javascript/JS_EventHandler.cpp

Issue 2394313002: Convert IJS_Runtime to CPDFSDK_FormFillEnvironment (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/javascript/JS_EventHandler.cpp
diff --git a/fpdfsdk/javascript/JS_EventHandler.cpp b/fpdfsdk/javascript/JS_EventHandler.cpp
index 731d803d2c47b90ae3d9de2a0e1b51095b1d8a66..27223cfccb99d24ab4f4a05dca048d7a58e8bed6 100644
--- a/fpdfsdk/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/javascript/JS_EventHandler.cpp
@@ -602,9 +602,9 @@ Field* CJS_EventHandler::Source() {
CJS_Document* pJSDocument =
static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
Document* pDocument = (Document*)pJSDocument->GetEmbedObject();
- pDocument->AttachDoc(m_pTargetFormFillEnv
- ? m_pTargetFormFillEnv->GetSDKDocument()
- : m_pJSContext->GetFormFillEnv()->GetSDKDocument());
+ pDocument->SetFormFillEnv(m_pTargetFormFillEnv
+ ? m_pTargetFormFillEnv
+ : m_pJSContext->GetFormFillEnv());
CJS_Field* pJSField =
static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
@@ -626,9 +626,9 @@ Field* CJS_EventHandler::Target_Field() {
CJS_Document* pJSDocument =
static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
Document* pDocument = (Document*)pJSDocument->GetEmbedObject();
- pDocument->AttachDoc(m_pTargetFormFillEnv
- ? m_pTargetFormFillEnv->GetSDKDocument()
- : m_pJSContext->GetFormFillEnv()->GetSDKDocument());
+ pDocument->SetFormFillEnv(m_pTargetFormFillEnv
+ ? m_pTargetFormFillEnv
+ : m_pJSContext->GetFormFillEnv());
CJS_Field* pJSField =
static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));

Powered by Google App Engine
This is Rietveld 408576698