summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_path.h3
-rw-r--r--xfa/fde/cfde_txtedtbuf.cpp1
-rw-r--r--xfa/fde/css/cfde_cssrulecollection.cpp9
-rw-r--r--xfa/fde/css/fde_csscache.h13
-rw-r--r--xfa/fde/css/fde_cssdatatable.cpp5
-rw-r--r--xfa/fde/css/fde_cssdatatable.h13
-rw-r--r--xfa/fde/css/fde_cssdeclaration.cpp478
-rw-r--r--xfa/fde/css/fde_cssdeclaration.h25
-rw-r--r--xfa/fde/css/fde_cssstyleselector.cpp28
-rw-r--r--xfa/fde/css/fde_cssstyleselector.h22
-rw-r--r--xfa/fde/css/fde_cssstylesheet.cpp39
-rw-r--r--xfa/fde/css/fde_cssstylesheet.h18
-rw-r--r--xfa/fde/css/fde_csssyntax.h9
-rw-r--r--xfa/fde/fde_gedevice.h5
-rw-r--r--xfa/fde/fde_iterator.h5
-rw-r--r--xfa/fde/fde_object.h7
-rw-r--r--xfa/fde/fde_render.cpp1
-rw-r--r--xfa/fde/fde_render.h4
-rw-r--r--xfa/fde/fde_visualset.h1
-rw-r--r--xfa/fde/tto/fde_textout.cpp1
-rw-r--r--xfa/fde/tto/fde_textout.h8
-rw-r--r--xfa/fde/xml/fde_xml_imp.h17
22 files changed, 287 insertions, 425 deletions
diff --git a/xfa/fde/cfde_path.h b/xfa/fde/cfde_path.h
index b0359cd198..936a5c8a78 100644
--- a/xfa/fde/cfde_path.h
+++ b/xfa/fde/cfde_path.h
@@ -9,9 +9,8 @@
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_renderdevice.h"
-#include "xfa/fgas/crt/fgas_memory.h"
-class CFDE_Path : public CFX_Target {
+class CFDE_Path {
public:
bool StartFigure();
bool CloseFigure();
diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp
index 9bb16f6076..1c2e0d1f3f 100644
--- a/xfa/fde/cfde_txtedtbuf.cpp
+++ b/xfa/fde/cfde_txtedtbuf.cpp
@@ -11,7 +11,6 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
-#include "xfa/fgas/crt/fgas_memory.h"
namespace {
diff --git a/xfa/fde/css/cfde_cssrulecollection.cpp b/xfa/fde/css/cfde_cssrulecollection.cpp
index 8c22c9a99e..f96396e319 100644
--- a/xfa/fde/css/cfde_cssrulecollection.cpp
+++ b/xfa/fde/css/cfde_cssrulecollection.cpp
@@ -22,15 +22,11 @@ void CFDE_CSSRuleCollection::Clear() {
m_TagRules.clear();
m_ClassRules.clear();
m_pUniversalRules = nullptr;
- m_pStaticStore = nullptr;
m_iSelectors = 0;
}
CFDE_CSSRuleCollection::CFDE_CSSRuleCollection()
- : m_pStaticStore(nullptr),
- m_pUniversalRules(nullptr),
- m_pPseudoRules(nullptr),
- m_iSelectors(0) {}
+ : m_pUniversalRules(nullptr), m_pPseudoRules(nullptr), m_iSelectors(0) {}
CFDE_CSSRuleCollection::~CFDE_CSSRuleCollection() {
Clear();
@@ -140,6 +136,5 @@ bool CFDE_CSSRuleCollection::AddRuleTo(FDE_CSSRuleData** pList,
FDE_CSSRuleData* CFDE_CSSRuleCollection::NewRuleData(
CFDE_CSSSelector* pSel,
CFDE_CSSDeclaration* pDecl) {
- return FXTARGET_NewWith(m_pStaticStore)
- FDE_CSSRuleData(pSel, pDecl, ++m_iSelectors);
+ return new FDE_CSSRuleData(pSel, pDecl, ++m_iSelectors);
}
diff --git a/xfa/fde/css/fde_csscache.h b/xfa/fde/css/fde_csscache.h
index 10f4d9e0fa..40494fade5 100644
--- a/xfa/fde/css/fde_csscache.h
+++ b/xfa/fde/css/fde_csscache.h
@@ -10,22 +10,21 @@
#include <map>
#include "xfa/fde/css/fde_css.h"
-#include "xfa/fgas/crt/fgas_memory.h"
-class FDE_CSSCacheItem : public CFX_Target {
+class FDE_CSSCacheItem {
public:
explicit FDE_CSSCacheItem(IFDE_CSSStyleSheet* p);
- ~FDE_CSSCacheItem() override;
+ ~FDE_CSSCacheItem();
IFDE_CSSStyleSheet* pStylesheet;
uint32_t dwActivity;
};
-class FDE_CSSTagCache : public CFX_Target {
+class FDE_CSSTagCache {
public:
FDE_CSSTagCache(FDE_CSSTagCache* parent, CXFA_CSSTagProvider* tag);
FDE_CSSTagCache(const FDE_CSSTagCache& it);
- ~FDE_CSSTagCache() override;
+ ~FDE_CSSTagCache();
FDE_CSSTagCache* GetParent() const { return pParent; }
CXFA_CSSTagProvider* GetTag() const { return pTag; }
@@ -50,10 +49,10 @@ class FDE_CSSTagCache : public CFX_Target {
CFX_BaseArrayTemplate<uint32_t> dwClassHashs;
};
-class CFDE_CSSAccelerator : public CFX_Target {
+class CFDE_CSSAccelerator {
public:
CFDE_CSSAccelerator();
- ~CFDE_CSSAccelerator() override;
+ ~CFDE_CSSAccelerator();
void OnEnterTag(CXFA_CSSTagProvider* pTag);
void OnLeaveTag(CXFA_CSSTagProvider* pTag);
diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp
index 992fe80fd3..b0e86c8a7e 100644
--- a/xfa/fde/css/fde_cssdatatable.cpp
+++ b/xfa/fde/css/fde_cssdatatable.cpp
@@ -788,11 +788,10 @@ bool FDE_ParseCSSColor(const FX_WCHAR* pszValue,
return true;
}
-CFDE_CSSValueList::CFDE_CSSValueList(IFX_MemoryAllocator* pStaticStore,
- const CFDE_CSSValueArray& list) {
+CFDE_CSSValueList::CFDE_CSSValueList(const CFDE_CSSValueArray& list) {
m_iCount = list.GetSize();
int32_t iByteCount = m_iCount * sizeof(IFDE_CSSValue*);
- m_ppList = (IFDE_CSSValue**)pStaticStore->Alloc(iByteCount);
+ m_ppList = (IFDE_CSSValue**)FX_Alloc(uint8_t, iByteCount);
FXSYS_memcpy(m_ppList, list.GetData(), iByteCount);
}
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index 305b58df51..2790188318 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -9,9 +9,8 @@
#include "core/fxcrt/fx_system.h"
#include "xfa/fde/css/fde_css.h"
-#include "xfa/fgas/crt/fgas_memory.h"
-class CFDE_CSSFunction : public CFX_Target {
+class CFDE_CSSFunction {
public:
CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList* pArgList)
: m_pArgList(pArgList), m_pszFuncName(pszFuncName) {
@@ -28,8 +27,7 @@ class CFDE_CSSFunction : public CFX_Target {
const FX_WCHAR* m_pszFuncName;
};
-class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
- public CFX_Target {
+class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue {
public:
explicit CFDE_CSSPrimitiveValue(FX_ARGB color);
explicit CFDE_CSSPrimitiveValue(FDE_CSSPROPERTYVALUE eValue);
@@ -61,10 +59,9 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
typedef CFX_ArrayTemplate<IFDE_CSSPrimitiveValue*> CFDE_CSSPrimitiveArray;
typedef CFX_ArrayTemplate<IFDE_CSSValue*> CFDE_CSSValueArray;
-class CFDE_CSSValueList : public IFDE_CSSValueList, public CFX_Target {
+class CFDE_CSSValueList : public IFDE_CSSValueList {
public:
- CFDE_CSSValueList(IFX_MemoryAllocator* pStaticStore,
- const CFDE_CSSValueArray& list);
+ explicit CFDE_CSSValueList(const CFDE_CSSValueArray& list);
// IFDE_CSSValueList
int32_t CountValues() const override;
@@ -75,7 +72,7 @@ class CFDE_CSSValueList : public IFDE_CSSValueList, public CFX_Target {
int32_t m_iCount;
};
-class CFDE_CSSValueListParser : public CFX_Target {
+class CFDE_CSSValueListParser {
public:
CFDE_CSSValueListParser(const FX_WCHAR* psz, int32_t iLen, FX_WCHAR separator)
: m_Separator(separator), m_pCur(psz), m_pEnd(psz + iLen) {
diff --git a/xfa/fde/css/fde_cssdeclaration.cpp b/xfa/fde/css/fde_cssdeclaration.cpp
index f6af900042..a5385af0db 100644
--- a/xfa/fde/css/fde_cssdeclaration.cpp
+++ b/xfa/fde/css/fde_cssdeclaration.cpp
@@ -59,8 +59,7 @@ const FX_WCHAR* CFDE_CSSDeclaration::CopyToLocal(
if (it != pCache->end())
return it->second;
}
- FX_WCHAR* psz =
- (FX_WCHAR*)pArgs->pStaticStore->Alloc((iValueLen + 1) * sizeof(FX_WCHAR));
+ FX_WCHAR* psz = FX_Alloc(FX_WCHAR, iValueLen + 1);
FXSYS_wcsncpy(psz, pszValue, iValueLen);
psz[iValueLen] = '\0';
if (pCache)
@@ -69,26 +68,22 @@ const FX_WCHAR* CFDE_CSSDeclaration::CopyToLocal(
return psz;
}
IFDE_CSSPrimitiveValue* CFDE_CSSDeclaration::NewNumberValue(
- IFX_MemoryAllocator* pStaticStore,
FDE_CSSPRIMITIVETYPE eUnit,
FX_FLOAT fValue) const {
static CFDE_CSSPrimitiveValue s_ZeroValue(FDE_CSSPRIMITIVETYPE_Number, 0.0f);
if (eUnit == FDE_CSSPRIMITIVETYPE_Number && FXSYS_fabs(fValue) < 0.001f) {
return &s_ZeroValue;
}
- return FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(eUnit, fValue);
+ return new CFDE_CSSPrimitiveValue(eUnit, fValue);
}
inline IFDE_CSSPrimitiveValue* CFDE_CSSDeclaration::NewEnumValue(
- IFX_MemoryAllocator* pStaticStore,
FDE_CSSPROPERTYVALUE eValue) const {
- return FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(eValue);
+ return new CFDE_CSSPrimitiveValue(eValue);
}
-void CFDE_CSSDeclaration::AddPropertyHolder(IFX_MemoryAllocator* pStaticStore,
- FDE_CSSPROPERTY eProperty,
+void CFDE_CSSDeclaration::AddPropertyHolder(FDE_CSSPROPERTY eProperty,
IFDE_CSSValue* pValue,
bool bImportant) {
- FDE_CSSPropertyHolder* pHolder =
- FXTARGET_NewWith(pStaticStore) FDE_CSSPropertyHolder;
+ FDE_CSSPropertyHolder* pHolder = new FDE_CSSPropertyHolder;
pHolder->bImportant = bImportant;
pHolder->eProperty = eProperty;
pHolder->pValue = pValue;
@@ -150,8 +145,7 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
break;
}
if (pCSSValue) {
- AddPropertyHolder(pArgs->pStaticStore, pArgs->pProperty->eName,
- pCSSValue, bImportant);
+ AddPropertyHolder(pArgs->pProperty->eName, pCSSValue, bImportant);
return true;
}
if (FDE_IsOnlyValue(dwType, g_ValueGuessOrder[i])) {
@@ -160,7 +154,6 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
} break;
case FDE_CSSVALUETYPE_Shorthand: {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
IFDE_CSSValue *pColor, *pStyle, *pWidth;
switch (pArgs->pProperty->eName) {
case FDE_CSSPROPERTY_Font:
@@ -171,21 +164,21 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
case FDE_CSSPROPERTY_ListStyle:
return ParseListStyleProperty(pArgs, pszValue, iValueLen, bImportant);
case FDE_CSSPROPERTY_Border:
- if (ParseBorderPropoerty(pStaticStore, pszValue, iValueLen, pColor,
- pStyle, pWidth)) {
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ if (ParseBorderPropoerty(pszValue, iValueLen, pColor, pStyle,
+ pWidth)) {
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderLeftColor,
FDE_CSSPROPERTY_BorderLeftStyle,
FDE_CSSPROPERTY_BorderLeftWidth);
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderTopColor,
FDE_CSSPROPERTY_BorderTopStyle,
FDE_CSSPROPERTY_BorderTopWidth);
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderRightColor,
FDE_CSSPROPERTY_BorderRightStyle,
FDE_CSSPROPERTY_BorderRightWidth);
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderBottomColor,
FDE_CSSPROPERTY_BorderBottomStyle,
FDE_CSSPROPERTY_BorderBottomWidth);
@@ -193,9 +186,9 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
break;
case FDE_CSSPROPERTY_BorderLeft:
- if (ParseBorderPropoerty(pStaticStore, pszValue, iValueLen, pColor,
- pStyle, pWidth)) {
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ if (ParseBorderPropoerty(pszValue, iValueLen, pColor, pStyle,
+ pWidth)) {
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderLeftColor,
FDE_CSSPROPERTY_BorderLeftStyle,
FDE_CSSPROPERTY_BorderLeftWidth);
@@ -203,9 +196,9 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
break;
case FDE_CSSPROPERTY_BorderTop:
- if (ParseBorderPropoerty(pStaticStore, pszValue, iValueLen, pColor,
- pStyle, pWidth)) {
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ if (ParseBorderPropoerty(pszValue, iValueLen, pColor, pStyle,
+ pWidth)) {
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderTopColor,
FDE_CSSPROPERTY_BorderTopStyle,
FDE_CSSPROPERTY_BorderTopWidth);
@@ -213,9 +206,9 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
break;
case FDE_CSSPROPERTY_BorderRight:
- if (ParseBorderPropoerty(pStaticStore, pszValue, iValueLen, pColor,
- pStyle, pWidth)) {
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ if (ParseBorderPropoerty(pszValue, iValueLen, pColor, pStyle,
+ pWidth)) {
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderRightColor,
FDE_CSSPROPERTY_BorderRightStyle,
FDE_CSSPROPERTY_BorderRightWidth);
@@ -223,9 +216,9 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
break;
case FDE_CSSPROPERTY_BorderBottom:
- if (ParseBorderPropoerty(pStaticStore, pszValue, iValueLen, pColor,
- pStyle, pWidth)) {
- AddBorderProperty(pStaticStore, pColor, pStyle, pWidth, bImportant,
+ if (ParseBorderPropoerty(pszValue, iValueLen, pColor, pStyle,
+ pWidth)) {
+ AddBorderProperty(pColor, pStyle, pWidth, bImportant,
FDE_CSSPROPERTY_BorderBottomColor,
FDE_CSSPROPERTY_BorderBottomStyle,
FDE_CSSPROPERTY_BorderBottomWidth);
@@ -262,8 +255,7 @@ bool CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
int32_t iNameLen,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
- FDE_CSSCustomProperty* pProperty =
- FXTARGET_NewWith(pArgs->pStaticStore) FDE_CSSCustomProperty;
+ FDE_CSSCustomProperty* pProperty = new FDE_CSSCustomProperty;
pProperty->pwsName = CopyToLocal(pArgs, pszName, iNameLen);
pProperty->pwsValue = CopyToLocal(pArgs, pszValue, iValueLen);
pProperty->pNext = nullptr;
@@ -283,14 +275,14 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseNumber(
if (!FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eUnit)) {
return nullptr;
}
- return NewNumberValue(pArgs->pStaticStore, eUnit, fValue);
+ return NewNumberValue(eUnit, fValue);
}
IFDE_CSSValue* CFDE_CSSDeclaration::ParseEnum(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
const FDE_CSSPROPERTYVALUETABLE* pValue =
FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen));
- return pValue ? NewEnumValue(pArgs->pStaticStore, pValue->eName) : nullptr;
+ return pValue ? NewEnumValue(pValue->eName) : nullptr;
}
IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
@@ -299,7 +291,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(const FDE_CSSPROPERTYARGS* pArgs,
if (!FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
return nullptr;
}
- return FXTARGET_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ return new CFDE_CSSPrimitiveValue(dwColor);
}
IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
@@ -314,8 +306,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue
- ? FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_URI, pszValue)
+ ? new CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_URI, pszValue)
: nullptr;
}
@@ -332,8 +323,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue
- ? FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue)
+ ? new CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue)
: nullptr;
}
IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(
@@ -366,8 +356,7 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(
const FDE_CSSPROPERTYVALUETABLE* pPropertyValue =
FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen));
if (pPropertyValue) {
- argumentArr.Add(
- NewEnumValue(pArgs->pStaticStore, pPropertyValue->eName));
+ argumentArr.Add(NewEnumValue(pPropertyValue->eName));
continue;
}
IFDE_CSSValue* pFunctionValue =
@@ -376,45 +365,39 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseFunction(
argumentArr.Add(pFunctionValue);
continue;
}
- argumentArr.Add(FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String,
- CopyToLocal(pArgs, pszValue, iValueLen)));
+ argumentArr.Add(new CFDE_CSSPrimitiveValue(
+ FDE_CSSPRIMITIVETYPE_String,
+ CopyToLocal(pArgs, pszValue, iValueLen)));
} break;
case FDE_CSSPRIMITIVETYPE_Number: {
FX_FLOAT fValue;
if (FDE_ParseCSSNumber(pszValue, iValueLen, fValue, ePrimitiveType)) {
- argumentArr.Add(
- NewNumberValue(pArgs->pStaticStore, ePrimitiveType, fValue));
+ argumentArr.Add(NewNumberValue(ePrimitiveType, fValue));
}
} break;
default:
- argumentArr.Add(FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String,
- CopyToLocal(pArgs, pszValue, iValueLen)));
+ argumentArr.Add(new CFDE_CSSPrimitiveValue(
+ FDE_CSSPRIMITIVETYPE_String,
+ CopyToLocal(pArgs, pszValue, iValueLen)));
break;
}
}
- IFDE_CSSValueList* pArgumentList = FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSValueList(pArgs->pStaticStore, argumentArr);
- CFDE_CSSFunction* pFunction = FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSFunction(pszFuncName, pArgumentList);
- return FXTARGET_NewWith(pArgs->pStaticStore)
- CFDE_CSSPrimitiveValue(pFunction);
+ IFDE_CSSValueList* pArgumentList = new CFDE_CSSValueList(argumentArr);
+ CFDE_CSSFunction* pFunction =
+ new CFDE_CSSFunction(pszFuncName, pArgumentList);
+ return new CFDE_CSSPrimitiveValue(pFunction);
}
bool CFDE_CSSDeclaration::ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
FDE_CSSPRIMITIVETYPE eType;
CFDE_CSSValueArray list;
while (parser.NextValue(eType, pszValue, iValueLen)) {
switch (eType) {
case FDE_CSSPRIMITIVETYPE_URI:
- list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(new CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen)));
break;
case FDE_CSSPRIMITIVETYPE_Number:
@@ -427,7 +410,7 @@ bool CFDE_CSSDeclaration::ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
case FDE_CSSPROPERTYVALUE_Normal:
case FDE_CSSPROPERTYVALUE_None: {
if (list.GetSize() == 0) {
- list.Add(NewEnumValue(pStaticStore, pValue->eName));
+ list.Add(NewEnumValue(pValue->eName));
} else {
return false;
}
@@ -436,7 +419,7 @@ bool CFDE_CSSDeclaration::ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
case FDE_CSSPROPERTYVALUE_CloseQuote:
case FDE_CSSPROPERTYVALUE_NoOpenQuote:
case FDE_CSSPROPERTYVALUE_NoCloseQuote:
- list.Add(NewEnumValue(pStaticStore, pValue->eName));
+ list.Add(NewEnumValue(pValue->eName));
break;
default:
return false;
@@ -448,7 +431,7 @@ bool CFDE_CSSDeclaration::ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
list.Add(pFunction);
continue;
}
- list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ list.Add(new CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen)));
} break;
case FDE_CSSPRIMITIVETYPE_RGB:
@@ -460,9 +443,7 @@ bool CFDE_CSSDeclaration::ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
if (list.GetSize() == 0) {
return false;
}
- AddPropertyHolder(pStaticStore, pArgs->pProperty->eName,
- FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, list),
+ AddPropertyHolder(pArgs->pProperty->eName, new CFDE_CSSValueList(list),
bImportant);
return true;
}
@@ -470,7 +451,6 @@ bool CFDE_CSSDeclaration::ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
CFDE_CSSValueArray list;
CFDE_CSSValueArray listFull;
@@ -481,9 +461,8 @@ bool CFDE_CSSDeclaration::ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs,
FX_FLOAT fValue;
if (FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eType)) {
if (list.GetSize() == 1) {
- list.Add(NewNumberValue(pStaticStore, eType, fValue));
- listFull.Add(FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, list));
+ list.Add(NewNumberValue(eType, fValue));
+ listFull.Add(new CFDE_CSSValueList(list));
list.RemoveAll();
} else {
return false;
@@ -493,15 +472,14 @@ bool CFDE_CSSDeclaration::ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs,
case FDE_CSSPRIMITIVETYPE_String: {
if (list.GetSize() == 0) {
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String, pszValue));
+ list.Add(new CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String,
+ pszValue));
} else {
- listFull.Add(FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, list));
+ listFull.Add(new CFDE_CSSValueList(list));
list.RemoveAll();
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String, pszValue));
+ list.Add(new CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String,
+ pszValue));
}
} break;
default:
@@ -509,15 +487,12 @@ bool CFDE_CSSDeclaration::ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs,
}
}
if (list.GetSize() == 1) {
- listFull.Add(FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, list));
+ listFull.Add(new CFDE_CSSValueList(list));
}
if (listFull.GetSize() == 0) {
return false;
}
- AddPropertyHolder(pStaticStore, pArgs->pProperty->eName,
- FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, listFull),
+ AddPropertyHolder(pArgs->pProperty->eName, new CFDE_CSSValueList(listFull),
bImportant);
return true;
}
@@ -526,7 +501,6 @@ bool CFDE_CSSDeclaration::ParseValueListProperty(
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
FX_WCHAR separator =
(pArgs->pProperty->eName == FDE_CSSPROPERTY_FontFamily) ? ',' : ' ';
CFDE_CSSValueListParser parser(pszValue, iValueLen, separator);
@@ -539,7 +513,7 @@ bool CFDE_CSSDeclaration::ParseValueListProperty(
if (dwType & FDE_CSSVALUETYPE_MaybeNumber) {
FX_FLOAT fValue;
if (FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eType)) {
- list.Add(NewNumberValue(pStaticStore, eType, fValue));
+ list.Add(NewNumberValue(eType, fValue));
}
}
break;
@@ -547,8 +521,7 @@ bool CFDE_CSSDeclaration::ParseValueListProperty(
if (dwType & FDE_CSSVALUETYPE_MaybeColor) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- list.Add(FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue(dwColor));
+ list.Add(new CFDE_CSSPrimitiveValue(dwColor));
continue;
}
}
@@ -557,22 +530,21 @@ bool CFDE_CSSDeclaration::ParseValueListProperty(
FDE_GetCSSPropertyValueByName(
CFX_WideStringC(pszValue, iValueLen));
if (pValue) {
- list.Add(NewEnumValue(pStaticStore, pValue->eName));
+ list.Add(NewEnumValue(pValue->eName));
continue;
}
}
if (dwType & FDE_CSSVALUETYPE_MaybeString) {
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
- list.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
- FDE_CSSPRIMITIVETYPE_String, pszValue));
+ list.Add(new CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String,
+ pszValue));
}
break;
case FDE_CSSPRIMITIVETYPE_RGB:
if (dwType & FDE_CSSVALUETYPE_MaybeColor) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- list.Add(FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue(dwColor));
+ list.Add(new CFDE_CSSPrimitiveValue(dwColor));
}
}
break;
@@ -586,41 +558,38 @@ bool CFDE_CSSDeclaration::ParseValueListProperty(
switch (pArgs->pProperty->eName) {
case FDE_CSSPROPERTY_BorderColor:
return Add4ValuesProperty(
- pStaticStore, list, bImportant, FDE_CSSPROPERTY_BorderLeftColor,
+ list, bImportant, FDE_CSSPROPERTY_BorderLeftColor,
FDE_CSSPROPERTY_BorderTopColor, FDE_CSSPROPERTY_BorderRightColor,
FDE_CSSPROPERTY_BorderBottomColor);
case FDE_CSSPROPERTY_BorderStyle:
return Add4ValuesProperty(
- pStaticStore, list, bImportant, FDE_CSSPROPERTY_BorderLeftStyle,
+ list, bImportant, FDE_CSSPROPERTY_BorderLeftStyle,
FDE_CSSPROPERTY_BorderTopStyle, FDE_CSSPROPERTY_BorderRightStyle,
FDE_CSSPROPERTY_BorderBottomStyle);
case FDE_CSSPROPERTY_BorderWidth:
return Add4ValuesProperty(
- pStaticStore, list, bImportant, FDE_CSSPROPERTY_BorderLeftWidth,
+ list, bImportant, FDE_CSSPROPERTY_BorderLeftWidth,
FDE_CSSPROPERTY_BorderTopWidth, FDE_CSSPROPERTY_BorderRightWidth,
FDE_CSSPROPERTY_BorderBottomWidth);
case FDE_CSSPROPERTY_Margin:
- return Add4ValuesProperty(
- pStaticStore, list, bImportant, FDE_CSSPROPERTY_MarginLeft,
- FDE_CSSPROPERTY_MarginTop, FDE_CSSPROPERTY_MarginRight,
- FDE_CSSPROPERTY_MarginBottom);
+ return Add4ValuesProperty(list, bImportant, FDE_CSSPROPERTY_MarginLeft,
+ FDE_CSSPROPERTY_MarginTop,
+ FDE_CSSPROPERTY_MarginRight,
+ FDE_CSSPROPERTY_MarginBottom);
case FDE_CSSPROPERTY_Padding:
- return Add4ValuesProperty(
- pStaticStore, list, bImportant, FDE_CSSPROPERTY_PaddingLeft,
- FDE_CSSPROPERTY_PaddingTop, FDE_CSSPROPERTY_PaddingRight,
- FDE_CSSPROPERTY_PaddingBottom);
+ return Add4ValuesProperty(list, bImportant, FDE_CSSPROPERTY_PaddingLeft,
+ FDE_CSSPROPERTY_PaddingTop,
+ FDE_CSSPROPERTY_PaddingRight,
+ FDE_CSSPROPERTY_PaddingBottom);
default: {
- CFDE_CSSValueList* pList =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, list);
- AddPropertyHolder(pStaticStore, pArgs->pProperty->eName, pList,
- bImportant);
+ CFDE_CSSValueList* pList = new CFDE_CSSValueList(list);
+ AddPropertyHolder(pArgs->pProperty->eName, pList, bImportant);
return true;
} break;
}
return false;
}
-bool CFDE_CSSDeclaration::Add4ValuesProperty(IFX_MemoryAllocator* pStaticStore,
- const CFDE_CSSValueArray& list,
+bool CFDE_CSSDeclaration::Add4ValuesProperty(const CFDE_CSSValueArray& list,
bool bImportant,
FDE_CSSPROPERTY eLeft,
FDE_CSSPROPERTY eTop,
@@ -628,28 +597,28 @@ bool CFDE_CSSDeclaration::Add4ValuesProperty(IFX_MemoryAllocator* pStaticStore,
FDE_CSSPROPERTY eBottom) {
switch (list.GetSize()) {
case 1:
- AddPropertyHolder(pStaticStore, eLeft, list[0], bImportant);
- AddPropertyHolder(pStaticStore, eTop, list[0], bImportant);
- AddPropertyHolder(pStaticStore, eRight, list[0], bImportant);
- AddPropertyHolder(pStaticStore, eBottom, list[0], bImportant);
+ AddPropertyHolder(eLeft, list[0], bImportant);
+ AddPropertyHolder(eTop, list[0], bImportant);
+ AddPropertyHolder(eRight, list[0], bImportant);
+ AddPropertyHolder(eBottom, list[0], bImportant);
return true;
case 2:
- AddPropertyHolder(pStaticStore, eLeft, list[1], bImportant);
- AddPropertyHolder(pStaticStore, eTop, list[0], bImportant);
- AddPropertyHolder(pStaticStore, eRight, list[1], bImportant);
- AddPropertyHolder(pStaticStore, eBottom, list[0], bImportant);
+ AddPropertyHolder(eLeft, list[1], bImportant);
+ AddPropertyHolder(eTop, list[0], bImportant);
+ AddPropertyHolder(eRight, list[1], bImportant);
+ AddPropertyHolder(eBottom, list[0], bImportant);
return true;
case 3:
- AddPropertyHolder(pStaticStore, eLeft, list[1], bImportant);
- AddPropertyHolder(pStaticStore, eTop, list[0], bImportant);
- AddPropertyHolder(pStaticStore, eRight, list[1], bImportant);
- AddPropertyHolder(pStaticStore, eBottom, list[2], bImportant);
+ AddPropertyHolder(eLeft, list[1], bImportant);
+ AddPropertyHolder(eTop, list[0], bImportant);
+ AddPropertyHolder(eRight, list[1], bImportant);
+ AddPropertyHolder(eBottom, list[2], bImportant);
return true;
case 4:
- AddPropertyHolder(pStaticStore, eLeft, list[3], bImportant);
- AddPropertyHolder(pStaticStore, eTop, list[0], bImportant);
- AddPropertyHolder(pStaticStore, eRight, list[1], bImportant);
- AddPropertyHolder(pStaticStore, eBottom, list[2], bImportant);
+ AddPropertyHolder(eLeft, list[3], bImportant);
+ AddPropertyHolder(eTop, list[0], bImportant);
+ AddPropertyHolder(eRight, list[1], bImportant);
+ AddPropertyHolder(eBottom, list[2], bImportant);
return true;
default:
break;
@@ -657,7 +626,6 @@ bool CFDE_CSSDeclaration::Add4ValuesProperty(IFX_MemoryAllocator* pStaticStore,
return false;
}
bool CFDE_CSSDeclaration::ParseBorderPropoerty(
- IFX_MemoryAllocator* pStaticStore,
const FX_WCHAR* pszValue,
int32_t iValueLen,
IFDE_CSSValue*& pColor,
@@ -672,7 +640,7 @@ bool CFDE_CSSDeclaration::ParseBorderPropoerty(
if (!pWidth) {
FX_FLOAT fValue;
if (FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eType)) {
- pWidth = NewNumberValue(pStaticStore, eType, fValue);
+ pWidth = NewNumberValue(eType, fValue);
}
}
break;
@@ -680,8 +648,7 @@ bool CFDE_CSSDeclaration::ParseBorderPropoerty(
if (!pColor) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pColor =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ pColor = new CFDE_CSSPrimitiveValue(dwColor);
}
}
break;
@@ -690,8 +657,7 @@ bool CFDE_CSSDeclaration::ParseBorderPropoerty(
FDE_GetCSSColorByName(CFX_WideStringC(pszValue, iValueLen));
if (pColorItem) {
if (!pColor) {
- pColor = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue(pColorItem->dwValue);
+ pColor = new CFDE_CSSPrimitiveValue(pColorItem->dwValue);
}
continue;
}
@@ -703,15 +669,14 @@ bool CFDE_CSSDeclaration::ParseBorderPropoerty(
switch (pValue->eName) {
case FDE_CSSPROPERTYVALUE_Transparent:
if (!pColor) {
- pColor = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = new CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
break;
case FDE_CSSPROPERTYVALUE_Thin:
case FDE_CSSPROPERTYVALUE_Thick:
case FDE_CSSPROPERTYVALUE_Medium:
if (!pWidth)
- pWidth = NewEnumValue(pStaticStore, pValue->eName);
+ pWidth = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_None:
case FDE_CSSPROPERTYVALUE_Hidden:
@@ -724,7 +689,7 @@ bool CFDE_CSSDeclaration::ParseBorderPropoerty(
case FDE_CSSPROPERTYVALUE_Inset:
case FDE_CSSPROPERTYVALUE_Outset:
if (!pStyle)
- pStyle = NewEnumValue(pStaticStore, pValue->eName);
+ pStyle = NewEnumValue(pValue->eName);
break;
default:
break;
@@ -735,31 +700,29 @@ bool CFDE_CSSDeclaration::ParseBorderPropoerty(
}
}
if (!pColor)
- pColor = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = new CFDE_CSSPrimitiveValue((FX_ARGB)0);
if (!pStyle)
- pStyle = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
+ pStyle = NewEnumValue(FDE_CSSPROPERTYVALUE_None);
if (!pWidth)
- pWidth = NewNumberValue(pStaticStore, FDE_CSSPRIMITIVETYPE_Number, 0.0f);
+ pWidth = NewNumberValue(FDE_CSSPRIMITIVETYPE_Number, 0.0f);
return true;
}
-void CFDE_CSSDeclaration::AddBorderProperty(IFX_MemoryAllocator* pStaticStore,
- IFDE_CSSValue* pColor,
+void CFDE_CSSDeclaration::AddBorderProperty(IFDE_CSSValue* pColor,
IFDE_CSSValue* pStyle,
IFDE_CSSValue* pWidth,
bool bImportant,
FDE_CSSPROPERTY eColor,
FDE_CSSPROPERTY eStyle,
FDE_CSSPROPERTY eWidth) {
- AddPropertyHolder(pStaticStore, eStyle, pStyle, bImportant);
- AddPropertyHolder(pStaticStore, eWidth, pWidth, bImportant);
- AddPropertyHolder(pStaticStore, eColor, pColor, bImportant);
+ AddPropertyHolder(eStyle, pStyle, bImportant);
+ AddPropertyHolder(eWidth, pWidth, bImportant);
+ AddPropertyHolder(eColor, pColor, bImportant);
}
bool CFDE_CSSDeclaration::ParseListStyleProperty(
const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
IFDE_CSSPrimitiveValue* pType = nullptr;
IFDE_CSSPrimitiveValue* pImage = nullptr;
@@ -769,7 +732,7 @@ bool CFDE_CSSDeclaration::ParseListStyleProperty(
switch (eType) {
case FDE_CSSPRIMITIVETYPE_URI:
if (!pImage) {
- pImage = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ pImage = new CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen));
}
break;
@@ -782,14 +745,14 @@ bool CFDE_CSSDeclaration::ParseListStyleProperty(
switch (pValue->eName) {
case FDE_CSSPROPERTYVALUE_None:
if (!pImage)
- pImage = NewEnumValue(pStaticStore, pValue->eName);
+ pImage = NewEnumValue(pValue->eName);
else if (!pType)
- pImage = NewEnumValue(pStaticStore, pValue->eName);
+ pImage = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Inside:
case FDE_CSSPROPERTYVALUE_Outside:
if (!pPosition)
- pPosition = NewEnumValue(pStaticStore, pValue->eName);
+ pPosition = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Disc:
case FDE_CSSPROPERTYVALUE_Circle:
@@ -806,7 +769,7 @@ bool CFDE_CSSDeclaration::ParseListStyleProperty(
case FDE_CSSPROPERTYVALUE_LowerAlpha:
case FDE_CSSPROPERTYVALUE_UpperAlpha:
if (!pType)
- pType = NewEnumValue(pStaticStore, pValue->eName);
+ pType = NewEnumValue(pValue->eName);
break;
default:
break;
@@ -817,17 +780,14 @@ bool CFDE_CSSDeclaration::ParseListStyleProperty(
}
}
if (!pPosition)
- pPosition = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Outside);
+ pPosition = NewEnumValue(FDE_CSSPROPERTYVALUE_Outside);
if (!pImage)
- pImage = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
+ pImage = NewEnumValue(FDE_CSSPROPERTYVALUE_None);
if (!pType)
- pType = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ListStylePosition, pPosition,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ListStyleImage, pImage,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ListStyleType, pType,
- bImportant);
+ pType = NewEnumValue(FDE_CSSPROPERTYVALUE_None);
+ AddPropertyHolder(FDE_CSSPROPERTY_ListStylePosition, pPosition, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ListStyleImage, pImage, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ListStyleType, pType, bImportant);
return true;
}
bool CFDE_CSSDeclaration::ParseBackgroundProperty(
@@ -835,7 +795,6 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
IFDE_CSSPrimitiveValue* pColor = nullptr;
IFDE_CSSPrimitiveValue* pImage = nullptr;
@@ -848,7 +807,7 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
switch (eType) {
case FDE_CSSPRIMITIVETYPE_URI:
if (!pImage) {
- pImage = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ pImage = new CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen));
}
break;
@@ -858,9 +817,9 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
break;
}
if (!pPosX)
- pPosX = NewNumberValue(pStaticStore, eType, fValue);
+ pPosX = NewNumberValue(eType, fValue);
else if (!pPosY)
- pPosY = NewNumberValue(pStaticStore, eType, fValue);
+ pPosY = NewNumberValue(eType, fValue);
} break;
case FDE_CSSPRIMITIVETYPE_String: {
const FDE_CSSPROPERTYVALUETABLE* pValue =
@@ -869,41 +828,40 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
switch (pValue->eName) {
case FDE_CSSPROPERTYVALUE_None:
if (!pImage)
- pImage = NewEnumValue(pStaticStore, pValue->eName);
+ pImage = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Transparent:
if (!pColor) {
- pColor = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = new CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
break;
case FDE_CSSPROPERTYVALUE_Fixed:
case FDE_CSSPROPERTYVALUE_Scroll:
if (!pAttachment)
- pAttachment = NewEnumValue(pStaticStore, pValue->eName);
+ pAttachment = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Repeat:
case FDE_CSSPROPERTYVALUE_RepeatX:
case FDE_CSSPROPERTYVALUE_RepeatY:
case FDE_CSSPROPERTYVALUE_NoRepeat:
if (!pRepeat)
- pRepeat = NewEnumValue(pStaticStore, pValue->eName);
+ pRepeat = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Left:
case FDE_CSSPROPERTYVALUE_Right:
if (!pPosX)
- pPosX = NewEnumValue(pStaticStore, pValue->eName);
+ pPosX = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Top:
case FDE_CSSPROPERTYVALUE_Bottom:
if (!pPosY)
- pPosX = NewEnumValue(pStaticStore, pValue->eName);
+ pPosX = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Center:
if (!pPosX)
- pPosX = NewEnumValue(pStaticStore, pValue->eName);
+ pPosX = NewEnumValue(pValue->eName);
else if (!pPosY)
- pPosX = NewEnumValue(pStaticStore, pValue->eName);
+ pPosX = NewEnumValue(pValue->eName);
break;
default:
break;
@@ -914,8 +872,7 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
FDE_GetCSSColorByName(CFX_WideStringC(pszValue, iValueLen));
if (pColorItem) {
if (!pColor) {
- pColor = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue(pColorItem->dwValue);
+ pColor = new CFDE_CSSPrimitiveValue(pColorItem->dwValue);
}
}
} break;
@@ -923,8 +880,7 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
if (!pColor) {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pColor =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ pColor = new CFDE_CSSPrimitiveValue(dwColor);
}
}
break;
@@ -933,45 +889,39 @@ bool CFDE_CSSDeclaration::ParseBackgroundProperty(
}
}
if (!pColor) {
- pColor = FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColor = new CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
if (!pImage)
- pImage = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
+ pImage = NewEnumValue(FDE_CSSPROPERTYVALUE_None);
if (!pRepeat)
- pRepeat = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Repeat);
+ pRepeat = NewEnumValue(FDE_CSSPROPERTYVALUE_Repeat);
if (!pAttachment)
- pAttachment = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Scroll);
+ pAttachment = NewEnumValue(FDE_CSSPROPERTYVALUE_Scroll);
if (!pPosX) {
- pPosX = NewNumberValue(pStaticStore, FDE_CSSPRIMITIVETYPE_Number, 0.0f);
- pPosY = NewNumberValue(pStaticStore, FDE_CSSPRIMITIVETYPE_Number, 0.0f);
+ pPosX = NewNumberValue(FDE_CSSPRIMITIVETYPE_Number, 0.0f);
+ pPosY = NewNumberValue(FDE_CSSPRIMITIVETYPE_Number, 0.0f);
} else if (!pPosY) {
- pPosY = NewNumberValue(pStaticStore, FDE_CSSPRIMITIVETYPE_Number, 0.0f);
+ pPosY = NewNumberValue(FDE_CSSPRIMITIVETYPE_Number, 0.0f);
}
CFDE_CSSValueArray position;
position.Add(pPosX);
position.Add(pPosY);
- CFDE_CSSValueList* pPosList =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSValueList(pStaticStore, position);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundColor, pColor,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundImage, pImage,
+ CFDE_CSSValueList* pPosList = new CFDE_CSSValueList(position);
+ AddPropertyHolder(FDE_CSSPROPERTY_BackgroundColor, pColor, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_BackgroundImage, pImage, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_BackgroundRepeat, pRepeat, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_BackgroundPosition, pPosList, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_BackgroundAttachment, pAttachment,
bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundRepeat, pRepeat,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundPosition, pPosList,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_BackgroundAttachment,
- pAttachment, bImportant);
return true;
}
bool CFDE_CSSDeclaration::ParseFontProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, '/');
IFDE_CSSPrimitiveValue* pStyle = nullptr;
IFDE_CSSPrimitiveValue* pVariant = nullptr;
@@ -997,41 +947,41 @@ bool CFDE_CSSDeclaration::ParseFontProperty(const FDE_CSSPROPERTYARGS* pArgs,
case FDE_CSSPROPERTYVALUE_Smaller:
case FDE_CSSPROPERTYVALUE_Larger:
if (!pFontSize)
- pFontSize = NewEnumValue(pStaticStore, pValue->eName);
+ pFontSize = NewEnumValue(pValue->eName);
continue;
case FDE_CSSPROPERTYVALUE_Bold:
case FDE_CSSPROPERTYVALUE_Bolder:
case FDE_CSSPROPERTYVALUE_Lighter:
if (!pWeight)
- pWeight = NewEnumValue(pStaticStore, pValue->eName);
+ pWeight = NewEnumValue(pValue->eName);
continue;
case FDE_CSSPROPERTYVALUE_Italic:
case FDE_CSSPROPERTYVALUE_Oblique:
if (!pStyle)
- pStyle = NewEnumValue(pStaticStore, pValue->eName);
+ pStyle = NewEnumValue(pValue->eName);
continue;
case FDE_CSSPROPERTYVALUE_SmallCaps:
if (!pVariant)
- pVariant = NewEnumValue(pStaticStore, pValue->eName);
+ pVariant = NewEnumValue(pValue->eName);
continue;
case FDE_CSSPROPERTYVALUE_Normal:
if (!pStyle)
- pStyle = NewEnumValue(pStaticStore, pValue->eName);
+ pStyle = NewEnumValue(pValue->eName);
else if (!pVariant)
- pVariant = NewEnumValue(pStaticStore, pValue->eName);
+ pVariant = NewEnumValue(pValue->eName);
else if (!pWeight)
- pWeight = NewEnumValue(pStaticStore, pValue->eName);
+ pWeight = NewEnumValue(pValue->eName);
else if (!pFontSize)
- pFontSize = NewEnumValue(pStaticStore, pValue->eName);
+ pFontSize = NewEnumValue(pValue->eName);
else if (!pLineHeight)
- pLineHeight = NewEnumValue(pStaticStore, pValue->eName);
+ pLineHeight = NewEnumValue(pValue->eName);
continue;
default:
break;
}
}
if (pFontSize) {
- familyList.Add(FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(
+ familyList.Add(new CFDE_CSSPrimitiveValue(
eType, CopyToLocal(pArgs, pszValue, iValueLen)));
}
parser.m_Separator = ',';
@@ -1053,47 +1003,39 @@ bool CFDE_CSSDeclaration::ParseFontProperty(const FDE_CSSPROPERTYARGS* pArgs,
case 800:
case 900:
if (!pWeight) {
- pWeight = NewNumberValue(pStaticStore,
- FDE_CSSPRIMITIVETYPE_Number, fValue);
+ pWeight = NewNumberValue(FDE_CSSPRIMITIVETYPE_Number, fValue);
}
continue;
}
}
if (!pFontSize)
- pFontSize = NewNumberValue(pStaticStore, eType, fValue);
+ pFontSize = NewNumberValue(eType, fValue);
else if (!pLineHeight)
- pLineHeight = NewNumberValue(pStaticStore, eType, fValue);
+ pLineHeight = NewNumberValue(eType, fValue);
} break;
default:
break;
}
}
if (!pStyle)
- pStyle = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Normal);
+ pStyle = NewEnumValue(FDE_CSSPROPERTYVALUE_Normal);
if (!pVariant)
- pVariant = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Normal);
+ pVariant = NewEnumValue(FDE_CSSPROPERTYVALUE_Normal);
if (!pWeight)
- pWeight = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Normal);
+ pWeight = NewEnumValue(FDE_CSSPROPERTYVALUE_Normal);
if (!pFontSize)
- pFontSize = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Medium);
+ pFontSize = NewEnumValue(FDE_CSSPROPERTYVALUE_Medium);
if (!pLineHeight)
- pLineHeight = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Normal);
+ pLineHeight = NewEnumValue(FDE_CSSPROPERTYVALUE_Normal);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_FontStyle, pStyle,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_FontVariant, pVariant,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_FontWeight, pWeight,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_FontSize, pFontSize,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_LineHeight, pLineHeight,
- bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_FontStyle, pStyle, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_FontVariant, pVariant, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_FontWeight, pWeight, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_FontSize, pFontSize, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_LineHeight, pLineHeight, bImportant);
if (familyList.GetSize() > 0) {
- CFDE_CSSValueList* pList = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, familyList);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_FontFamily, pList,
- bImportant);
+ CFDE_CSSValueList* pList = new CFDE_CSSValueList(familyList);
+ AddPropertyHolder(FDE_CSSPROPERTY_FontFamily, pList, bImportant);
}
return true;
}
@@ -1102,7 +1044,6 @@ bool CFDE_CSSDeclaration::ParseColumnRuleProperty(
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
IFDE_CSSPrimitiveValue* pColumnRuleWidth = nullptr;
IFDE_CSSPrimitiveValue* pColumnRuleStyle = nullptr;
@@ -1126,17 +1067,17 @@ bool CFDE_CSSDeclaration::ParseColumnRuleProperty(
case FDE_CSSPROPERTYVALUE_Inset:
case FDE_CSSPROPERTYVALUE_Outset:
if (!pColumnRuleStyle)
- pColumnRuleStyle = NewEnumValue(pStaticStore, pValue->eName);
+ pColumnRuleStyle = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Transparent:
if (!pColumnRuleColor)
- pColumnRuleColor = NewEnumValue(pStaticStore, pValue->eName);
+ pColumnRuleColor = NewEnumValue(pValue->eName);
break;
case FDE_CSSPROPERTYVALUE_Thin:
case FDE_CSSPROPERTYVALUE_Medium:
case FDE_CSSPROPERTYVALUE_Thick:
if (!pColumnRuleWidth)
- pColumnRuleWidth = NewEnumValue(pStaticStore, pValue->eName);
+ pColumnRuleWidth = NewEnumValue(pValue->eName);
break;
default:
break;
@@ -1146,8 +1087,7 @@ bool CFDE_CSSDeclaration::ParseColumnRuleProperty(
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor) &&
!pColumnRuleColor) {
- pColumnRuleColor = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue((FX_ARGB)dwColor);
+ pColumnRuleColor = new CFDE_CSSPrimitiveValue((FX_ARGB)dwColor);
continue;
}
} break;
@@ -1155,15 +1095,14 @@ bool CFDE_CSSDeclaration::ParseColumnRuleProperty(
FX_FLOAT fValue;
if (FDE_ParseCSSNumber(pszValue, iValueLen, fValue, eType) &&
!pColumnRuleWidth) {
- pColumnRuleWidth = NewNumberValue(pStaticStore, eType, fValue);
+ pColumnRuleWidth = NewNumberValue(eType, fValue);
}
} break;
case FDE_CSSPRIMITIVETYPE_RGB: {
FX_ARGB dwColor;
if (!pColumnRuleColor &&
FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pColumnRuleColor = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue((FX_ARGB)dwColor);
+ pColumnRuleColor = new CFDE_CSSPrimitiveValue((FX_ARGB)dwColor);
}
} break;
default:
@@ -1174,26 +1113,24 @@ bool CFDE_CSSDeclaration::ParseColumnRuleProperty(
return false;
if (!pColumnRuleStyle)
- pColumnRuleStyle = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_None);
+ pColumnRuleStyle = NewEnumValue(FDE_CSSPROPERTYVALUE_None);
if (!pColumnRuleWidth)
- pColumnRuleWidth = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Medium);
+ pColumnRuleWidth = NewEnumValue(FDE_CSSPROPERTYVALUE_Medium);
if (!pColumnRuleColor) {
- pColumnRuleColor =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue((FX_ARGB)0);
+ pColumnRuleColor = new CFDE_CSSPrimitiveValue((FX_ARGB)0);
}
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnRuleStyle,
- pColumnRuleStyle, bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnRuleWidth,
- pColumnRuleWidth, bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnRuleColor,
- pColumnRuleColor, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ColumnRuleStyle, pColumnRuleStyle,
+ bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ColumnRuleWidth, pColumnRuleWidth,
+ bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ColumnRuleColor, pColumnRuleColor,
+ bImportant);
return true;
}
bool CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
CFDE_CSSValueArray arrEmphasisStyle;
FDE_CSSPRIMITIVETYPE eType;
@@ -1204,25 +1141,22 @@ bool CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_CSSPROPERTYARGS* pArgs,
const FDE_CSSPROPERTYVALUETABLE* pValue =
FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen));
if (pValue) {
- arrEmphasisStyle.Add(NewEnumValue(pStaticStore, pValue->eName));
+ arrEmphasisStyle.Add(NewEnumValue(pValue->eName));
continue;
}
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pEmphasisColor =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ pEmphasisColor = new CFDE_CSSPrimitiveValue(dwColor);
continue;
}
pszValue = CopyToLocal(pArgs, pszValue, iValueLen);
arrEmphasisStyle.Add(
- FXTARGET_NewWith(pStaticStore)
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue));
+ new CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_String, pszValue));
} break;
case FDE_CSSPRIMITIVETYPE_RGB: {
FX_ARGB dwColor;
if (FDE_ParseCSSColor(pszValue, iValueLen, dwColor)) {
- pEmphasisColor =
- FXTARGET_NewWith(pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
+ pEmphasisColor = new CFDE_CSSPrimitiveValue(dwColor);
}
} break;
default:
@@ -1230,14 +1164,12 @@ bool CFDE_CSSDeclaration::ParseTextEmphasisProperty(FDE_CSSPROPERTYARGS* pArgs,
}
}
if (arrEmphasisStyle.GetSize() != 0) {
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_TextEmphasisStyle,
- FXTARGET_NewWith(pStaticStore)
- CFDE_CSSValueList(pStaticStore, arrEmphasisStyle),
- bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_TextEmphasisStyle,
+ new CFDE_CSSValueList(arrEmphasisStyle), bImportant);
}
if (pEmphasisColor) {
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_TextEmphasisColor,
- pEmphasisColor, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_TextEmphasisColor, pEmphasisColor,
+ bImportant);
}
return true;
}
@@ -1245,7 +1177,6 @@ bool CFDE_CSSDeclaration::ParseColumnsProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
IFDE_CSSPrimitiveValue* pColumnWidth = nullptr;
IFDE_CSSPrimitiveValue* pColumnCount = nullptr;
@@ -1256,7 +1187,7 @@ bool CFDE_CSSDeclaration::ParseColumnsProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FDE_CSSPROPERTYVALUETABLE* pValue =
FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen));
if (!pValue && pValue->eName == FDE_CSSPROPERTYVALUE_Auto) {
- pColumnWidth = NewEnumValue(pStaticStore, pValue->eName);
+ pColumnWidth = NewEnumValue(pValue->eName);
}
} break;
case FDE_CSSPRIMITIVETYPE_Number: {
@@ -1265,11 +1196,11 @@ bool CFDE_CSSDeclaration::ParseColumnsProperty(const FDE_CSSPROPERTYARGS* pArgs,
switch (eType) {
case FDE_CSSPRIMITIVETYPE_Number:
if (!pColumnCount)
- pColumnCount = NewNumberValue(pStaticStore, eType, fValue);
+ pColumnCount = NewNumberValue(eType, fValue);
break;
default:
if (!pColumnWidth)
- pColumnWidth = NewNumberValue(pStaticStore, eType, fValue);
+ pColumnWidth = NewNumberValue(eType, fValue);
break;
}
}
@@ -1282,14 +1213,12 @@ bool CFDE_CSSDeclaration::ParseColumnsProperty(const FDE_CSSPROPERTYARGS* pArgs,
return false;
if (!pColumnWidth)
- pColumnWidth = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Auto);
+ pColumnWidth = NewEnumValue(FDE_CSSPROPERTYVALUE_Auto);
else if (!pColumnCount)
- pColumnCount = NewEnumValue(pStaticStore, FDE_CSSPROPERTYVALUE_Auto);
+ pColumnCount = NewEnumValue(FDE_CSSPROPERTYVALUE_Auto);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnWidth, pColumnWidth,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_ColumnCount, pColumnCount,
- bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ColumnWidth, pColumnWidth, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_ColumnCount, pColumnCount, bImportant);
return true;
}
bool CFDE_CSSDeclaration::ParseOverflowProperty(
@@ -1297,7 +1226,6 @@ bool CFDE_CSSDeclaration::ParseOverflowProperty(
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant) {
- IFX_MemoryAllocator* pStaticStore = pArgs->pStaticStore;
CFDE_CSSValueListParser parser(pszValue, iValueLen, ' ');
IFDE_CSSPrimitiveValue* pOverflowX = nullptr;
IFDE_CSSPrimitiveValue* pOverflowY = nullptr;
@@ -1317,9 +1245,9 @@ bool CFDE_CSSDeclaration::ParseOverflowProperty(
if (pOverflowX && pOverflowY)
return false;
if (!pOverflowX) {
- pOverflowX = NewEnumValue(pStaticStore, pValue->eName);
+ pOverflowX = NewEnumValue(pValue->eName);
} else if (!pOverflowY) {
- pOverflowY = NewEnumValue(pStaticStore, pValue->eName);
+ pOverflowY = NewEnumValue(pValue->eName);
}
break;
default:
@@ -1332,11 +1260,9 @@ bool CFDE_CSSDeclaration::ParseOverflowProperty(
return false;
if (!pOverflowY)
- pOverflowY = NewEnumValue(pStaticStore, pOverflowX->GetEnum());
+ pOverflowY = NewEnumValue(pOverflowX->GetEnum());
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_OverflowX, pOverflowX,
- bImportant);
- AddPropertyHolder(pStaticStore, FDE_CSSPROPERTY_OverflowY, pOverflowY,
- bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_OverflowX, pOverflowX, bImportant);
+ AddPropertyHolder(FDE_CSSPROPERTY_OverflowY, pOverflowY, bImportant);
return true;
}
diff --git a/xfa/fde/css/fde_cssdeclaration.h b/xfa/fde/css/fde_cssdeclaration.h
index f03b0c616a..38b1626566 100644
--- a/xfa/fde/css/fde_cssdeclaration.h
+++ b/xfa/fde/css/fde_cssdeclaration.h
@@ -11,7 +11,7 @@
#include "xfa/fde/css/fde_cssdatatable.h"
-class FDE_CSSPropertyHolder : public CFX_Target {
+class FDE_CSSPropertyHolder {
public:
int16_t eProperty;
bool bImportant;
@@ -19,7 +19,7 @@ class FDE_CSSPropertyHolder : public CFX_Target {
FDE_CSSPropertyHolder* pNext;
};
-class FDE_CSSCustomProperty : public CFX_Target {
+class FDE_CSSCustomProperty {
public:
const FX_WCHAR* pwsName;
const FX_WCHAR* pwsValue;
@@ -27,12 +27,11 @@ class FDE_CSSCustomProperty : public CFX_Target {
};
struct FDE_CSSPROPERTYARGS {
- IFX_MemoryAllocator* pStaticStore;
std::unordered_map<uint32_t, FX_WCHAR*>* pStringCache;
const FDE_CSSPROPERTYTABLE* pProperty;
};
-class CFDE_CSSDeclaration : public CFX_Target {
+class CFDE_CSSDeclaration {
public:
CFDE_CSSDeclaration()
: m_pFirstProperty(nullptr),
@@ -88,14 +87,12 @@ class CFDE_CSSDeclaration : public CFX_Target {
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseBorderPropoerty(IFX_MemoryAllocator* pStaticStore,
- const FX_WCHAR* pszValue,
+ bool ParseBorderPropoerty(const FX_WCHAR* pszValue,
int32_t iValueLen,
IFDE_CSSValue*& pColor,
IFDE_CSSValue*& pStyle,
IFDE_CSSValue*& pWidth) const;
- void AddBorderProperty(IFX_MemoryAllocator* pStaticStore,
- IFDE_CSSValue* pColor,
+ void AddBorderProperty(IFDE_CSSValue* pColor,
IFDE_CSSValue* pStyle,
IFDE_CSSValue* pWidth,
bool bImportant,
@@ -114,8 +111,7 @@ class CFDE_CSSDeclaration : public CFX_Target {
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool Add4ValuesProperty(IFX_MemoryAllocator* pStaticStore,
- const CFDE_CSSValueArray& list,
+ bool Add4ValuesProperty(const CFDE_CSSValueArray& list,
bool bImportant,
FDE_CSSPROPERTY eLeft,
FDE_CSSPROPERTY eTop,
@@ -142,15 +138,12 @@ class CFDE_CSSDeclaration : public CFX_Target {
const FX_WCHAR* CopyToLocal(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- void AddPropertyHolder(IFX_MemoryAllocator* pStaticStore,
- FDE_CSSPROPERTY eProperty,
+ void AddPropertyHolder(FDE_CSSPROPERTY eProperty,
IFDE_CSSValue* pValue,
bool bImportant);
- IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MemoryAllocator* pStaticStore,
- FDE_CSSPRIMITIVETYPE eUnit,
+ IFDE_CSSPrimitiveValue* NewNumberValue(FDE_CSSPRIMITIVETYPE eUnit,
FX_FLOAT fValue) const;
- IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MemoryAllocator* pStaticStore,
- FDE_CSSPROPERTYVALUE eValue) const;
+ IFDE_CSSPrimitiveValue* NewEnumValue(FDE_CSSPROPERTYVALUE eValue) const;
FDE_CSSPropertyHolder* m_pFirstProperty;
FDE_CSSPropertyHolder* m_pLastProperty;
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp
index ae928dbd12..d10cbf1d49 100644
--- a/xfa/fde/css/fde_cssstyleselector.cpp
+++ b/xfa/fde/css/fde_cssstyleselector.cpp
@@ -134,12 +134,7 @@ CFDE_CSSAccelerator* CFDE_CSSStyleSelector::InitAccelerator() {
IFDE_CSSComputedStyle* CFDE_CSSStyleSelector::CreateComputedStyle(
IFDE_CSSComputedStyle* pParentStyle) {
- if (!m_pFixedStyleStore) {
- m_pFixedStyleStore = IFX_MemoryAllocator::Create(
- FX_ALLOCTYPE_Fixed, 16, sizeof(CFDE_CSSComputedStyle));
- }
- CFDE_CSSComputedStyle* pStyle = FXTARGET_NewWith(m_pFixedStyleStore.get())
- CFDE_CSSComputedStyle(m_pFixedStyleStore.get());
+ CFDE_CSSComputedStyle* pStyle = new CFDE_CSSComputedStyle();
if (pParentStyle) {
pStyle->m_InheritedData =
static_cast<CFDE_CSSComputedStyle*>(pParentStyle)->m_InheritedData;
@@ -180,10 +175,9 @@ void CFDE_CSSStyleSelector::SetStylePriority(
void CFDE_CSSStyleSelector::UpdateStyleIndex(uint32_t dwMediaList) {
Reset();
- m_pRuleDataStore = IFX_MemoryAllocator::Create(FX_ALLOCTYPE_Static, 1024, 0);
+
for (int32_t iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
CFDE_CSSRuleCollection& rules = m_RuleCollection[iGroup];
- rules.m_pStaticStore = m_pRuleDataStore.get();
rules.AddRulesFrom(m_SheetGroups[iGroup], dwMediaList, m_pFontMgr);
}
}
@@ -192,7 +186,6 @@ void CFDE_CSSStyleSelector::Reset() {
for (int32_t iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
m_RuleCollection[iGroup].Clear();
}
- m_pRuleDataStore.reset();
}
int32_t CFDE_CSSStyleSelector::MatchDeclarations(
@@ -310,10 +303,6 @@ void CFDE_CSSStyleSelector::ComputeStyle(
static const uint32_t s_dwAlignHash = FX_HashCode_GetW(L"align", true);
if (!pTag->empty()) {
- if (!m_pInlineStyleStore) {
- m_pInlineStyleStore =
- IFX_MemoryAllocator::Create(FX_ALLOCTYPE_Static, 2048, 0);
- }
CFDE_CSSDeclaration* pDecl = nullptr;
for (auto it : *pTag) {
CFX_WideString wsAttri = it.first;
@@ -321,18 +310,15 @@ void CFDE_CSSStyleSelector::ComputeStyle(
uint32_t dwAttriHash = FX_HashCode_GetW(wsAttri.AsStringC(), true);
if (dwAttriHash == s_dwStyleHash) {
if (!pDecl)
- pDecl =
- FXTARGET_NewWith(m_pInlineStyleStore.get()) CFDE_CSSDeclaration;
+ pDecl = new CFDE_CSSDeclaration;
AppendInlineStyle(pDecl, wsValue.c_str(), wsValue.GetLength());
} else if (dwAttriHash == s_dwAlignHash) {
if (!pDecl)
- pDecl =
- FXTARGET_NewWith(m_pInlineStyleStore.get()) CFDE_CSSDeclaration;
+ pDecl = new CFDE_CSSDeclaration;
FDE_CSSPROPERTYARGS args;
args.pStringCache = nullptr;
- args.pStaticStore = m_pInlineStyleStore.get();
args.pProperty = FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY_TextAlign);
pDecl->AddProperty(&args, wsValue.c_str(), wsValue.GetLength());
}
@@ -442,7 +428,6 @@ void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl,
const FX_WCHAR* psz2;
FDE_CSSPROPERTYARGS args;
args.pStringCache = nullptr;
- args.pStaticStore = m_pInlineStyleStore.get();
args.pProperty = nullptr;
CFX_WideString wsName;
while (1) {
@@ -1709,8 +1694,7 @@ FDE_CSSFONTVARIANT CFDE_CSSStyleSelector::ToFontVariant(
: FDE_CSSFONTVARIANT_Normal;
}
-CFDE_CSSComputedStyle::CFDE_CSSComputedStyle(IFX_MemoryAllocator* pAlloc)
- : m_dwRefCount(1), m_pAllocator(pAlloc) {}
+CFDE_CSSComputedStyle::CFDE_CSSComputedStyle() : m_dwRefCount(1) {}
CFDE_CSSComputedStyle::~CFDE_CSSComputedStyle() {}
@@ -1722,7 +1706,7 @@ uint32_t CFDE_CSSComputedStyle::Release() {
uint32_t dwRefCount = --m_dwRefCount;
if (dwRefCount == 0) {
delete m_NonInheritedData.m_pCounterStyle;
- FXTARGET_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this);
+ delete this;
}
return dwRefCount;
}
diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h
index f4ad422c96..13ed58910b 100644
--- a/xfa/fde/css/fde_cssstyleselector.h
+++ b/xfa/fde/css/fde_cssstyleselector.h
@@ -15,13 +15,12 @@
#include "xfa/fde/css/fde_css.h"
#include "xfa/fde/css/fde_csscache.h"
#include "xfa/fde/css/fde_cssdeclaration.h"
-#include "xfa/fgas/crt/fgas_memory.h"
class CFDE_CSSAccelerator;
class CFDE_CSSComputedStyle;
class CXFA_CSSTagProvider;
-class FDE_CSSRuleData : public CFX_Target {
+class FDE_CSSRuleData {
public:
FDE_CSSRuleData(CFDE_CSSSelector* pSel,
CFDE_CSSDeclaration* pDecl,
@@ -33,10 +32,10 @@ class FDE_CSSRuleData : public CFX_Target {
FDE_CSSRuleData* pNext;
};
-class CFDE_CSSRuleCollection : public CFX_Target {
+class CFDE_CSSRuleCollection {
public:
CFDE_CSSRuleCollection();
- ~CFDE_CSSRuleCollection() override;
+ ~CFDE_CSSRuleCollection();
void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets,
uint32_t dwMediaList,
@@ -62,8 +61,6 @@ class CFDE_CSSRuleCollection : public CFX_Target {
FDE_CSSRuleData* GetUniversalRuleData() { return m_pUniversalRules; }
FDE_CSSRuleData* GetPseudoRuleData() { return m_pPseudoRules; }
- IFX_MemoryAllocator* m_pStaticStore;
-
protected:
void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet,
IFDE_CSSRule* pRule,
@@ -85,10 +82,10 @@ class CFDE_CSSRuleCollection : public CFX_Target {
int32_t m_iSelectors;
};
-class CFDE_CSSStyleSelector : public CFX_Target {
+class CFDE_CSSStyleSelector {
public:
explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr);
- ~CFDE_CSSStyleSelector() override;
+ ~CFDE_CSSStyleSelector();
void SetDefFontSize(FX_FLOAT fFontSize);
@@ -173,12 +170,9 @@ class CFDE_CSSStyleSelector : public CFX_Target {
CFGAS_FontMgr* const m_pFontMgr;
FX_FLOAT m_fDefFontSize;
- std::unique_ptr<IFX_MemoryAllocator> m_pRuleDataStore;
CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX];
CFDE_CSSRuleCollection m_RuleCollection[FDE_CSSSTYLESHEETGROUP_MAX];
FDE_CSSSTYLESHEETGROUP m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_MAX];
- std::unique_ptr<IFX_MemoryAllocator> m_pInlineStyleStore;
- std::unique_ptr<IFX_MemoryAllocator> m_pFixedStyleStore;
std::unique_ptr<CFDE_CSSAccelerator> m_pAccelerator;
std::vector<FDE_CSSRuleData*> m_MatchedRules;
};
@@ -349,10 +343,9 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle,
public IFDE_CSSBoundaryStyle,
public IFDE_CSSFontStyle,
public IFDE_CSSPositionStyle,
- public IFDE_CSSParagraphStyle,
- public CFX_Target {
+ public IFDE_CSSParagraphStyle {
public:
- explicit CFDE_CSSComputedStyle(IFX_MemoryAllocator* pAlloc);
+ CFDE_CSSComputedStyle();
~CFDE_CSSComputedStyle() override;
// IFX_Retainable
@@ -410,7 +403,6 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle,
const CFX_WideString& wsValue);
uint32_t m_dwRefCount;
- IFX_MemoryAllocator* const m_pAllocator;
CFDE_CSSInheritedData m_InheritedData;
CFDE_CSSNonInheritedData m_NonInheritedData;
std::vector<CFX_WideString> m_CustomProperties;
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index a373994798..1779ad95f8 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -108,7 +108,6 @@ void CFDE_CSSStyleSheet::Reset() {
m_RuleArray.RemoveAll(false);
m_Selectors.RemoveAll();
m_StringCache.clear();
- m_pAllocator.reset();
}
uint32_t CFDE_CSSStyleSheet::Retain() {
@@ -172,7 +171,6 @@ bool CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString& szUrl,
bool CFDE_CSSStyleSheet::LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax) {
Reset();
- m_pAllocator = IFX_MemoryAllocator::Create(FX_ALLOCTYPE_Static, 1024, 0);
FDE_CSSSYNTAXSTATUS eStatus;
do {
switch (eStatus = pSyntax->DoSyntaxParse()) {
@@ -227,8 +225,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadMediaRule(
break;
case FDE_CSSSYNTAXSTATUS_DeclOpen:
if ((dwMediaList & m_dwMediaList) > 0 && !pMediaRule) {
- pMediaRule = FXTARGET_NewWith(m_pAllocator.get())
- CFDE_CSSMediaRule(dwMediaList);
+ pMediaRule = new CFDE_CSSMediaRule(dwMediaList);
m_RuleArray.Add(pMediaRule);
}
break;
@@ -247,7 +244,6 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(
const FX_WCHAR* pszValue = nullptr;
int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
- propertyArgs.pStaticStore = m_pAllocator.get();
propertyArgs.pStringCache = &m_StringCache;
propertyArgs.pProperty = nullptr;
CFX_WideString wsName;
@@ -255,8 +251,8 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(
switch (pSyntax->DoSyntaxParse()) {
case FDE_CSSSYNTAXSTATUS_Selector: {
pszValue = pSyntax->GetCurrentString(iValueLen);
- CFDE_CSSSelector* pSelector = CFDE_CSSSelector::FromString(
- m_pAllocator.get(), pszValue, iValueLen);
+ CFDE_CSSSelector* pSelector =
+ CFDE_CSSSelector::FromString(pszValue, iValueLen);
if (pSelector)
m_Selectors.Add(pSelector);
} break;
@@ -285,8 +281,8 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadStyleRule(
break;
case FDE_CSSSYNTAXSTATUS_DeclOpen:
if (!pStyleRule && m_Selectors.GetSize() > 0) {
- pStyleRule = FXTARGET_NewWith(m_pAllocator.get()) CFDE_CSSStyleRule;
- pStyleRule->SetSelector(m_pAllocator.get(), m_Selectors);
+ pStyleRule = new CFDE_CSSStyleRule;
+ pStyleRule->SetSelector(m_Selectors);
ruleArray.Add(pStyleRule);
} else {
SkipRuleSet(pSyntax);
@@ -311,7 +307,6 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule(
const FX_WCHAR* pszValue = nullptr;
int32_t iValueLen = 0;
FDE_CSSPROPERTYARGS propertyArgs;
- propertyArgs.pStaticStore = m_pAllocator.get();
propertyArgs.pStringCache = &m_StringCache;
propertyArgs.pProperty = nullptr;
for (;;) {
@@ -332,8 +327,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::LoadFontFaceRule(
break;
case FDE_CSSSYNTAXSTATUS_DeclOpen:
if (!pFontFaceRule) {
- pFontFaceRule =
- FXTARGET_NewWith(m_pAllocator.get()) CFDE_CSSFontFaceRule;
+ pFontFaceRule = new CFDE_CSSFontFaceRule;
ruleArray.Add(pFontFaceRule);
}
break;
@@ -394,12 +388,11 @@ CFDE_CSSDeclaration* CFDE_CSSStyleRule::GetDeclaration() {
}
void CFDE_CSSStyleRule::SetSelector(
- IFX_MemoryAllocator* pStaticStore,
const CFX_ArrayTemplate<CFDE_CSSSelector*>& list) {
ASSERT(!m_ppSelector);
m_iSelectors = list.GetSize();
m_ppSelector = static_cast<CFDE_CSSSelector**>(
- pStaticStore->Alloc(m_iSelectors * sizeof(CFDE_CSSSelector*)));
+ FX_Alloc(CFDE_CSSSelector*, m_iSelectors));
for (int32_t i = 0; i < m_iSelectors; ++i) {
m_ppSelector[i] = list.GetAt(i);
}
@@ -487,10 +480,9 @@ CFDE_CSSSelector* CFDE_CSSSelector::GetNextSelector() const {
}
CFDE_CSSSelector* CFDE_CSSSelector::FromString(
- IFX_MemoryAllocator* pStaticStore,
const FX_WCHAR* psz,
int32_t iLen) {
- ASSERT(pStaticStore && psz && iLen > 0);
+ ASSERT(psz && iLen > 0);
const FX_WCHAR* pStart = psz;
const FX_WCHAR* pEnd = psz + iLen;
@@ -510,8 +502,8 @@ CFDE_CSSSelector* CFDE_CSSSelector::FromString(
FX_WCHAR wch = *psz;
if (wch == '.' || wch == '#') {
if (psz == pStart || psz[-1] == ' ') {
- CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Element, L"*", 1, true);
+ CFDE_CSSSelector* p =
+ new CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Element, L"*", 1, true);
if (!p)
return nullptr;
@@ -528,8 +520,7 @@ CFDE_CSSSelector* CFDE_CSSSelector::FromString(
}
FDE_CSSSELECTORTYPE eType =
wch == '.' ? FDE_CSSSELECTORTYPE_Class : FDE_CSSSELECTORTYPE_ID;
- CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSSelector(eType, psz, iNameLen, false);
+ CFDE_CSSSelector* p = new CFDE_CSSSelector(eType, psz, iNameLen, false);
if (!p)
return nullptr;
@@ -542,8 +533,8 @@ CFDE_CSSSelector* CFDE_CSSSelector::FromString(
if (iNameLen == 0) {
return nullptr;
}
- CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Element, psz, iNameLen, true);
+ CFDE_CSSSelector* p = new CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Element,
+ psz, iNameLen, true);
if (!p)
return nullptr;
@@ -559,8 +550,8 @@ CFDE_CSSSelector* CFDE_CSSSelector::FromString(
if (iNameLen == 0) {
return nullptr;
}
- CFDE_CSSSelector* p = FXTARGET_NewWith(pStaticStore)
- CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Pseudo, psz, iNameLen, true);
+ CFDE_CSSSelector* p =
+ new CFDE_CSSSelector(FDE_CSSSELECTORTYPE_Pseudo, psz, iNameLen, true);
if (!p)
return nullptr;
diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h
index ad1f8dfbe3..a67c2d816f 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -15,7 +15,7 @@
class CFDE_CSSSyntaxParser;
-class CFDE_CSSSelector : public CFX_Target {
+class CFDE_CSSSelector {
public:
CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType,
const FX_WCHAR* psz,
@@ -26,9 +26,7 @@ class CFDE_CSSSelector : public CFX_Target {
virtual uint32_t GetNameHash() const;
virtual CFDE_CSSSelector* GetNextSelector() const;
- static CFDE_CSSSelector* FromString(IFX_MemoryAllocator* pStaticStore,
- const FX_WCHAR* psz,
- int32_t iLen);
+ static CFDE_CSSSelector* FromString(const FX_WCHAR* psz, int32_t iLen);
void SetNext(CFDE_CSSSelector* pNext) { m_pNext = pNext; }
@@ -40,7 +38,7 @@ class CFDE_CSSSelector : public CFX_Target {
CFDE_CSSSelector* m_pNext;
};
-class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target {
+class CFDE_CSSStyleRule : public IFDE_CSSStyleRule {
public:
CFDE_CSSStyleRule();
@@ -50,8 +48,7 @@ class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target {
CFDE_CSSDeclaration* GetDeclaration() override;
CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
- void SetSelector(IFX_MemoryAllocator* pStaticStore,
- const CFX_ArrayTemplate<CFDE_CSSSelector*>& list);
+ void SetSelector(const CFX_ArrayTemplate<CFDE_CSSSelector*>& list);
protected:
CFDE_CSSDeclaration m_Declaration;
@@ -59,7 +56,7 @@ class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target {
int32_t m_iSelectors;
};
-class CFDE_CSSMediaRule : public IFDE_CSSMediaRule, public CFX_Target {
+class CFDE_CSSMediaRule : public IFDE_CSSMediaRule {
public:
explicit CFDE_CSSMediaRule(uint32_t dwMediaList);
~CFDE_CSSMediaRule() override;
@@ -76,7 +73,7 @@ class CFDE_CSSMediaRule : public IFDE_CSSMediaRule, public CFX_Target {
CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray;
};
-class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule, public CFX_Target {
+class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule {
public:
// IFDE_CSSFontFaceRule
CFDE_CSSDeclaration* GetDeclaration() override;
@@ -94,7 +91,7 @@ class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule, public CFX_Target {
default: \
return FDE_CSSSYNTAXSTATUS_Error;
-class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet, public CFX_Target {
+class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet {
public:
explicit CFDE_CSSStyleSheet(uint32_t dwMediaList);
~CFDE_CSSStyleSheet() override;
@@ -134,7 +131,6 @@ class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet, public CFX_Target {
uint16_t m_wCodePage;
uint16_t m_wRefCount;
uint32_t m_dwMediaList;
- std::unique_ptr<IFX_MemoryAllocator> m_pAllocator;
CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray;
CFX_WideString m_szUrl;
CFX_ArrayTemplate<CFDE_CSSSelector*> m_Selectors;
diff --git a/xfa/fde/css/fde_csssyntax.h b/xfa/fde/css/fde_csssyntax.h
index 6417df07d4..993eb4c7dc 100644
--- a/xfa/fde/css/fde_csssyntax.h
+++ b/xfa/fde/css/fde_csssyntax.h
@@ -9,13 +9,12 @@
#include "core/fxcrt/cfx_retain_ptr.h"
#include "xfa/fde/css/fde_css.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#include "xfa/fgas/crt/fgas_stream.h"
-class CFDE_CSSTextBuf : public CFX_Target {
+class CFDE_CSSTextBuf {
public:
CFDE_CSSTextBuf();
- ~CFDE_CSSTextBuf() override;
+ ~CFDE_CSSTextBuf();
bool AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen);
bool EstimateSize(int32_t iAllocSize);
@@ -76,10 +75,10 @@ enum FDE_CSSSYNTAXMODE {
FDE_CSSSYNTAXMODE_PropertyValue,
};
-class CFDE_CSSSyntaxParser : public CFX_Target {
+class CFDE_CSSSyntaxParser {
public:
CFDE_CSSSyntaxParser();
- ~CFDE_CSSSyntaxParser() override;
+ ~CFDE_CSSSyntaxParser();
bool Init(const CFX_RetainPtr<IFGAS_Stream>& pStream,
int32_t iCSSPlaneSize,
diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h
index 35efab2b2d..170bef595f 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -8,7 +8,6 @@
#define XFA_FDE_FDE_GEDEVICE_H_
#include "core/fxge/cfx_renderdevice.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#include "xfa/fgas/font/cfgas_gefont.h"
class CFDE_Brush;
@@ -16,10 +15,10 @@ class CFDE_Path;
class CFDE_Pen;
class CFX_GraphStateData;
-class CFDE_RenderDevice : public CFX_Target {
+class CFDE_RenderDevice {
public:
CFDE_RenderDevice(CFX_RenderDevice* pDevice, bool bOwnerDevice);
- ~CFDE_RenderDevice() override;
+ ~CFDE_RenderDevice();
int32_t GetWidth() const;
int32_t GetHeight() const;
diff --git a/xfa/fde/fde_iterator.h b/xfa/fde/fde_iterator.h
index 444c92a191..45659ce87c 100644
--- a/xfa/fde/fde_iterator.h
+++ b/xfa/fde/fde_iterator.h
@@ -8,7 +8,6 @@
#define XFA_FDE_FDE_ITERATOR_H_
#include "xfa/fde/fde_visualset.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#include "xfa/fgas/crt/fgas_utils.h"
struct FDE_CANVASITEM {
@@ -17,10 +16,10 @@ struct FDE_CANVASITEM {
FX_POSITION hPos;
};
-class CFDE_VisualSetIterator : public CFX_Target {
+class CFDE_VisualSetIterator {
public:
CFDE_VisualSetIterator();
- ~CFDE_VisualSetIterator() override;
+ ~CFDE_VisualSetIterator();
bool AttachCanvas(IFDE_CanvasSet* pCanvas);
bool FilterObjects(uint32_t dwObjects = 0xFFFFFFFF);
diff --git a/xfa/fde/fde_object.h b/xfa/fde/fde_object.h
index bf1ec41dac..5c66b202b6 100644
--- a/xfa/fde/fde_object.h
+++ b/xfa/fde/fde_object.h
@@ -10,9 +10,8 @@
#include <cstdint>
#include "core/fxge/fx_dib.h"
-#include "xfa/fgas/crt/fgas_memory.h"
-class CFDE_Brush : public CFX_Target {
+class CFDE_Brush {
public:
CFDE_Brush() : m_Color(0xFF000000) {}
@@ -23,10 +22,10 @@ class CFDE_Brush : public CFX_Target {
FX_ARGB m_Color;
};
-class CFDE_Pen : public CFX_Target {
+class CFDE_Pen {
public:
CFDE_Pen() : m_Color(0) {}
- ~CFDE_Pen() override {}
+ ~CFDE_Pen() {}
FX_ARGB GetColor() const { return m_Color; }
void SetColor(FX_ARGB color) { m_Color = color; }
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 1cdea421e1..c0fb926c36 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -9,7 +9,6 @@
#include "third_party/base/ptr_util.h"
#include "xfa/fde/fde_gedevice.h"
#include "xfa/fde/fde_object.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#define FDE_PATHRENDER_Stroke 1
#define FDE_PATHRENDER_Fill 2
diff --git a/xfa/fde/fde_render.h b/xfa/fde/fde_render.h
index 8bd09510a5..a24d6b5496 100644
--- a/xfa/fde/fde_render.h
+++ b/xfa/fde/fde_render.h
@@ -24,10 +24,10 @@ enum FDE_RENDERSTATUS {
FDE_RENDERSTATUS_Failed,
};
-class CFDE_RenderContext : public CFX_Target {
+class CFDE_RenderContext {
public:
CFDE_RenderContext();
- ~CFDE_RenderContext() override;
+ ~CFDE_RenderContext();
bool StartRender(CFDE_RenderDevice* pRenderDevice,
IFDE_CanvasSet* pCanvasSet,
diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h
index 77aa6c7253..8aef237ba1 100644
--- a/xfa/fde/fde_visualset.h
+++ b/xfa/fde/fde_visualset.h
@@ -13,7 +13,6 @@
#include "core/fxge/fx_dib.h"
#include "xfa/fde/cfde_path.h"
#include "xfa/fde/fde_object.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#include "xfa/fgas/font/cfgas_fontmgr.h"
struct FXTEXT_CHARPOS;
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 1081526148..4d207fb734 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -14,7 +14,6 @@
#include "xfa/fde/cfde_path.h"
#include "xfa/fde/fde_gedevice.h"
#include "xfa/fde/fde_object.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#include "xfa/fgas/crt/fgas_utils.h"
#include "xfa/fgas/layout/fgas_textbreak.h"
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index f9eeb82ddc..94b72f806d 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -54,11 +54,11 @@ struct FDE_TTOPIECE {
};
typedef CFX_MassArrayTemplate<FDE_TTOPIECE> CFDE_TTOPieceArray;
-class CFDE_TTOLine : public CFX_Target {
+class CFDE_TTOLine {
public:
CFDE_TTOLine();
CFDE_TTOLine(const CFDE_TTOLine& ttoLine);
- ~CFDE_TTOLine() override;
+ ~CFDE_TTOLine();
int32_t AddPiece(int32_t index, const FDE_TTOPIECE& ttoPiece);
int32_t GetSize() const;
@@ -74,10 +74,10 @@ class CFDE_TTOLine : public CFX_Target {
};
typedef CFX_ObjectMassArrayTemplate<CFDE_TTOLine> CFDE_TTOLineArray;
-class CFDE_TextOut : public CFX_Target {
+class CFDE_TextOut {
public:
CFDE_TextOut();
- ~CFDE_TextOut() override;
+ ~CFDE_TextOut();
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
void SetFontSize(FX_FLOAT fFontSize);
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h
index 126b0355a3..49c5c51f77 100644
--- a/xfa/fde/xml/fde_xml_imp.h
+++ b/xfa/fde/xml/fde_xml_imp.h
@@ -12,7 +12,6 @@
#include "core/fxcrt/fx_system.h"
#include "xfa/fde/xml/fde_xml.h"
-#include "xfa/fgas/crt/fgas_memory.h"
#include "xfa/fgas/crt/fgas_stream.h"
#include "xfa/fgas/crt/fgas_utils.h"
@@ -25,7 +24,7 @@ class CFDE_XMLDOMParser;
class CFDE_XMLSyntaxParser;
class IFDE_XMLParser;
-class CFDE_XMLNode : public CFX_Target {
+class CFDE_XMLNode {
public:
enum NodeItem {
Root = 0,
@@ -43,7 +42,7 @@ class CFDE_XMLNode : public CFX_Target {
};
CFDE_XMLNode();
- ~CFDE_XMLNode() override;
+ virtual ~CFDE_XMLNode();
virtual void Release();
virtual FDE_XMLNODETYPE GetType() const;
@@ -191,10 +190,10 @@ class CFDE_XMLCharData : public CFDE_XMLDeclaration {
CFX_WideString m_wsCharData;
};
-class CFDE_XMLDoc : public CFX_Target {
+class CFDE_XMLDoc {
public:
CFDE_XMLDoc();
- ~CFDE_XMLDoc() override;
+ ~CFDE_XMLDoc();
bool LoadXML(std::unique_ptr<IFDE_XMLParser> pXMLParser);
int32_t DoLoad(IFX_Pause* pPause = nullptr);
@@ -221,10 +220,10 @@ class IFDE_XMLParser {
virtual int32_t DoParser(IFX_Pause* pPause) = 0;
};
-class CFDE_BlockBuffer : public CFX_Target {
+class CFDE_BlockBuffer {
public:
explicit CFDE_BlockBuffer(int32_t iAllocStep = 1024 * 1024);
- ~CFDE_BlockBuffer() override;
+ ~CFDE_BlockBuffer();
bool InitBuffer(int32_t iBufferSize = 1024 * 1024);
bool IsInitialized() { return m_iBufferSize / m_iAllocStep >= 1; }
@@ -257,10 +256,10 @@ class CFDE_BlockBuffer : public CFX_Target {
int32_t m_iStartPosition;
};
-class CFDE_XMLSyntaxParser : public CFX_Target {
+class CFDE_XMLSyntaxParser {
public:
CFDE_XMLSyntaxParser();
- ~CFDE_XMLSyntaxParser() override;
+ ~CFDE_XMLSyntaxParser();
void Release() { delete this; }
void Init(const CFX_RetainPtr<IFGAS_Stream>& pStream,