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

Side by Side Diff: xfa/fde/css/fde_cssdatatable.cpp

Issue 1944093002: Cleanup XFA-Specific memory allocators. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Dan's comments, remove more unused methods. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « xfa/fde/css/fde_cssdatatable.h ('k') | xfa/fde/css/fde_cssdeclaration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fde/css/fde_cssdatatable.h" 7 #include "xfa/fde/css/fde_cssdatatable.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fgas/crt/fgas_algorithm.h" 10 #include "xfa/fgas/crt/fgas_algorithm.h"
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 FDE_LPCCSSCOLORTABLE pColor = 772 FDE_LPCCSSCOLORTABLE pColor =
773 FDE_GetCSSColorByName(CFX_WideStringC(pszValue, iValueLen)); 773 FDE_GetCSSColorByName(CFX_WideStringC(pszValue, iValueLen));
774 if (pColor != NULL) { 774 if (pColor != NULL) {
775 dwColor = pColor->dwValue; 775 dwColor = pColor->dwValue;
776 return TRUE; 776 return TRUE;
777 } 777 }
778 } 778 }
779 return FALSE; 779 return FALSE;
780 } 780 }
781 781
782 CFDE_CSSValueList::CFDE_CSSValueList(IFX_MEMAllocator* pStaticStore, 782 CFDE_CSSValueList::CFDE_CSSValueList(IFX_MemoryAllocator* pStaticStore,
783 const CFDE_CSSValueArray& list) { 783 const CFDE_CSSValueArray& list) {
784 m_iCount = list.GetSize(); 784 m_iCount = list.GetSize();
785 int32_t iByteCount = m_iCount * sizeof(IFDE_CSSValue*); 785 int32_t iByteCount = m_iCount * sizeof(IFDE_CSSValue*);
786 m_ppList = (IFDE_CSSValue**)pStaticStore->Alloc(iByteCount); 786 m_ppList = (IFDE_CSSValue**)pStaticStore->Alloc(iByteCount);
787 FXSYS_memcpy(m_ppList, list.GetData(), iByteCount); 787 FXSYS_memcpy(m_ppList, list.GetData(), iByteCount);
788 } 788 }
789 FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE& eType, 789 FX_BOOL CFDE_CSSValueListParser::NextValue(FDE_CSSPRIMITIVETYPE& eType,
790 const FX_WCHAR*& pStart, 790 const FX_WCHAR*& pStart,
791 int32_t& iLength) { 791 int32_t& iLength) {
792 while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator)) { 792 while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator)) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 } 880 }
881 while (iBracketCount > 0 && m_pCur < m_pEnd) { 881 while (iBracketCount > 0 && m_pCur < m_pEnd) {
882 if (*m_pCur == ')') { 882 if (*m_pCur == ')') {
883 iBracketCount--; 883 iBracketCount--;
884 } 884 }
885 m_pCur++; 885 m_pCur++;
886 } 886 }
887 } 887 }
888 return m_pCur - pStart; 888 return m_pCur - pStart;
889 } 889 }
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssdatatable.h ('k') | xfa/fde/css/fde_cssdeclaration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698