From a6d9f0edce07194f551db4c38bb427fbf7d550cf Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Sat, 13 Jun 2015 00:48:38 -0700 Subject: Remove trailing whitespaces in fpdfsdk, XFA edition. Review URL: https://codereview.chromium.org/1185843005. --- fpdfsdk/src/javascript/JS_Runtime.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'fpdfsdk/src/javascript/JS_Runtime.cpp') diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp index d8fea8d768..2ffc9ff988 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.cpp +++ b/fpdfsdk/src/javascript/JS_Runtime.cpp @@ -1,7 +1,7 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../include/javascript/JavaScript.h" @@ -48,7 +48,7 @@ void CJS_RuntimeFactory::AddRef() m_nRef++; } void CJS_RuntimeFactory::Release() -{ +{ if(m_bInit) { //to do.Should be implemented as atom manipulation. @@ -85,7 +85,7 @@ CJS_GlobalData* CJS_RuntimeFactory::NewGlobalData(CPDFDoc_Environment* pApp) void CJS_RuntimeFactory::ReleaseGlobalData() { m_nGlobalDataCount--; - + if (m_nGlobalDataCount <= 0) { delete m_pGlobalData; @@ -178,21 +178,21 @@ FX_BOOL CJS_Runtime::InitJSObjects() if (CJS_Position::Init(*this, JS_STATIC) < 0) return FALSE; if (CJS_ScaleHow::Init(*this, JS_STATIC) < 0) return FALSE; if (CJS_ScaleWhen::Init(*this, JS_STATIC) < 0) return FALSE; - if (CJS_Style::Init(*this, JS_STATIC) < 0) return FALSE; - if (CJS_Zoomtype::Init(*this, JS_STATIC) < 0) return FALSE; + if (CJS_Style::Init(*this, JS_STATIC) < 0) return FALSE; + if (CJS_Zoomtype::Init(*this, JS_STATIC) < 0) return FALSE; //9 - 11 if (CJS_App::Init(*this, JS_STATIC) < 0) return FALSE; - if (CJS_Color::Init(*this, JS_STATIC) < 0) return FALSE; + if (CJS_Color::Init(*this, JS_STATIC) < 0) return FALSE; if (CJS_Console::Init(*this, JS_STATIC) < 0) return FALSE; //12 - 14 - if (CJS_Document::Init(*this, JS_DYNAMIC) < 0) return FALSE; - if (CJS_Event::Init(*this, JS_STATIC) < 0) return FALSE; - if (CJS_Field::Init(*this, JS_DYNAMIC) < 0) return FALSE; + if (CJS_Document::Init(*this, JS_DYNAMIC) < 0) return FALSE; + if (CJS_Event::Init(*this, JS_STATIC) < 0) return FALSE; + if (CJS_Field::Init(*this, JS_DYNAMIC) < 0) return FALSE; //15 - 17 - if (CJS_Global::Init(*this, JS_STATIC) < 0) return FALSE; + if (CJS_Global::Init(*this, JS_STATIC) < 0) return FALSE; if (CJS_Icon::Init(*this, JS_DYNAMIC) < 0) return FALSE; if (CJS_Util::Init(*this, JS_STATIC) < 0) return FALSE; @@ -373,7 +373,7 @@ FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVAL //v8::Local tmpCotext = v8::Local::New(GetIsolate(), m_context); v8::Local propvalue = context->Global()->Get(v8::String::NewFromUtf8(GetIsolate(), name, v8::String::kNormalString, utf8Name.GetLength())); - + if (propvalue.IsEmpty()) { FXJSE_Value_SetUndefined(hValue); return FALSE; @@ -398,6 +398,6 @@ FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVAL //v8::Local tmpCotext = v8::Local::New(GetIsolate(), m_context); v8::Local propvalue = v8::Local::New(GetIsolate(),((CFXJSE_Value*)hValue)->DirectGetValue()); context->Global()->Set(v8::String::NewFromUtf8(pIsolate, name, v8::String::kNormalString, utf8Name.GetLength()), propvalue); - + return TRUE; } -- cgit v1.2.3