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

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

Issue 1990363003: Use std::unordered_map for CFDE_CSSStyleSheet::m_StringCache (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 | « no previous file | xfa/fde/css/fde_cssdatatable.cpp » ('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 #ifndef XFA_FDE_CSS_FDE_CSSDATATABLE_H_ 7 #ifndef XFA_FDE_CSS_FDE_CSSDATATABLE_H_
8 #define XFA_FDE_CSS_FDE_CSSDATATABLE_H_ 8 #define XFA_FDE_CSS_FDE_CSSDATATABLE_H_
9 9
10 #include "core/fxcrt/include/fx_system.h" 10 #include "core/fxcrt/include/fx_system.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 }; 122 };
123 123
124 #define FDE_CSSVALUETYPE_MaybeNumber 0x0100 124 #define FDE_CSSVALUETYPE_MaybeNumber 0x0100
125 #define FDE_CSSVALUETYPE_MaybeEnum 0x0200 125 #define FDE_CSSVALUETYPE_MaybeEnum 0x0200
126 #define FDE_CSSVALUETYPE_MaybeURI 0x0400 126 #define FDE_CSSVALUETYPE_MaybeURI 0x0400
127 #define FDE_CSSVALUETYPE_MaybeString 0x0800 127 #define FDE_CSSVALUETYPE_MaybeString 0x0800
128 #define FDE_CSSVALUETYPE_MaybeColor 0x1000 128 #define FDE_CSSVALUETYPE_MaybeColor 0x1000
129 #define FDE_CSSVALUETYPE_MaybeFunction 0x2000 129 #define FDE_CSSVALUETYPE_MaybeFunction 0x2000
130 #define FDE_IsOnlyValue(type, enum) \ 130 #define FDE_IsOnlyValue(type, enum) \
131 (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive) 131 (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive)
132
132 struct FDE_CSSPROPERTYTABLE { 133 struct FDE_CSSPROPERTYTABLE {
133 FDE_CSSPROPERTY eName; 134 FDE_CSSPROPERTY eName;
134 const FX_WCHAR* pszName; 135 const FX_WCHAR* pszName;
135 uint32_t dwHash; 136 uint32_t dwHash;
136 uint32_t dwType; 137 uint32_t dwType;
137 }; 138 };
138 typedef FDE_CSSPROPERTYTABLE const* FDE_LPCCSSPROPERTYTABLE;
139 139
140 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const CFX_WideStringC& wsName); 140 const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByName(
141 FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName); 141 const CFX_WideStringC& wsName);
142 const FDE_CSSPROPERTYTABLE* FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName);
143
142 struct FDE_CSSPROPERTYVALUETABLE { 144 struct FDE_CSSPROPERTYVALUETABLE {
143 FDE_CSSPROPERTYVALUE eName; 145 FDE_CSSPROPERTYVALUE eName;
144 const FX_WCHAR* pszName; 146 const FX_WCHAR* pszName;
145 uint32_t dwHash; 147 uint32_t dwHash;
146 }; 148 };
147 typedef FDE_CSSPROPERTYVALUETABLE const* FDE_LPCCSSPROPERTYVALUETABLE;
148 149
149 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName( 150 const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByName(
150 const CFX_WideStringC& wsName); 151 const CFX_WideStringC& wsName);
151 FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum( 152 const FDE_CSSPROPERTYVALUETABLE* FDE_GetCSSPropertyValueByEnum(
152 FDE_CSSPROPERTYVALUE eName); 153 FDE_CSSPROPERTYVALUE eName);
154
153 struct FDE_CSSMEDIATYPETABLE { 155 struct FDE_CSSMEDIATYPETABLE {
154 uint16_t wHash; 156 uint16_t wHash;
155 uint16_t wValue; 157 uint16_t wValue;
156 }; 158 };
157 typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE; 159 typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE;
158 FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName( 160 FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(
159 const CFX_WideStringC& wsName); 161 const CFX_WideStringC& wsName);
160 struct FDE_CSSLENGTHUNITTABLE { 162 struct FDE_CSSLENGTHUNITTABLE {
161 uint16_t wHash; 163 uint16_t wHash;
162 uint16_t wValue; 164 uint16_t wValue;
(...skipping 26 matching lines...) Expand all
189 int32_t& iLength); 191 int32_t& iLength);
190 FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue, 192 FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue,
191 int32_t iValueLen, 193 int32_t iValueLen,
192 FX_ARGB& dwColor); 194 FX_ARGB& dwColor);
193 FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue, 195 FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue,
194 int32_t iValueLen, 196 int32_t iValueLen,
195 int32_t& iOffset, 197 int32_t& iOffset,
196 int32_t& iLength); 198 int32_t& iLength);
197 199
198 #endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_ 200 #endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/fde/css/fde_cssdatatable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698