summaryrefslogtreecommitdiff
path: root/xfa/fde/css
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-27 12:26:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-27 12:26:01 -0700
commit43854a5073602a4613131aa6dbac5f7b9a095bcd (patch)
tree653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fde/css
parentb2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff)
downloadpdfium-43854a5073602a4613131aa6dbac5f7b9a095bcd.tar.xz
Standardize on ASSERT.
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003
Diffstat (limited to 'xfa/fde/css')
-rw-r--r--xfa/fde/css/fde_csscache.cpp6
-rw-r--r--xfa/fde/css/fde_cssdatatable.cpp22
-rw-r--r--xfa/fde/css/fde_cssdatatable.h24
-rw-r--r--xfa/fde/css/fde_cssdeclaration.cpp8
-rw-r--r--xfa/fde/css/fde_cssstyleselector.cpp30
-rw-r--r--xfa/fde/css/fde_cssstylesheet.cpp18
-rw-r--r--xfa/fde/css/fde_csssyntax.cpp12
7 files changed, 60 insertions, 60 deletions
diff --git a/xfa/fde/css/fde_csscache.cpp b/xfa/fde/css/fde_csscache.cpp
index 9a259e1844..0b21dcdea3 100644
--- a/xfa/fde/css/fde_csscache.cpp
+++ b/xfa/fde/css/fde_csscache.cpp
@@ -13,7 +13,7 @@
FDE_CSSCacheItem::FDE_CSSCacheItem(IFDE_CSSStyleSheet* p)
: pStylesheet(p), dwActivity(0) {
- FXSYS_assert(pStylesheet);
+ ASSERT(pStylesheet);
pStylesheet->AddRef();
}
@@ -64,7 +64,7 @@ void CFDE_CSSAccelerator::OnEnterTag(CXFA_CSSTagProvider* pTag) {
}
void CFDE_CSSAccelerator::OnLeaveTag(CXFA_CSSTagProvider* pTag) {
- FXSYS_assert(m_Stack.GetTopElement());
- FXSYS_assert(m_Stack.GetTopElement()->GetTag() == pTag);
+ ASSERT(m_Stack.GetTopElement());
+ ASSERT(m_Stack.GetTopElement()->GetTag() == pTag);
m_Stack.Pop();
}
diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp
index f37f77b86c..853666f4ed 100644
--- a/xfa/fde/css/fde_cssdatatable.cpp
+++ b/xfa/fde/css/fde_cssdatatable.cpp
@@ -30,7 +30,7 @@ CFX_FloatRect FDE_CSSBoundaryToRect(IFDE_CSSBoundaryStyle* pBoundStyle,
FX_BOOL bPadding,
FX_BOOL bBorder,
FX_BOOL bMargin) {
- FXSYS_assert(pBoundStyle != NULL);
+ ASSERT(pBoundStyle != NULL);
FX_FLOAT fResult;
const FDE_CSSRECT* pRect;
CFX_FloatRect rect(0, 0, 0, 0);
@@ -88,7 +88,7 @@ CFX_FloatRect FDE_CSSBoundaryToRect(IFDE_CSSBoundaryStyle* pBoundStyle,
return rect;
}
uint32_t FDE_CSSFontStyleToFDE(IFDE_CSSFontStyle* pFontStyle) {
- FXSYS_assert(pFontStyle != NULL);
+ ASSERT(pFontStyle != NULL);
uint32_t dwFontStyle = FX_FONTSTYLE_Normal;
if (pFontStyle->GetFontStyle() == FDE_CSSFONTSTYLE_Italic) {
dwFontStyle |= FX_FONTSTYLE_Italic;
@@ -559,7 +559,7 @@ FDE_LPCCSSPERSUDOTABLE FDE_GetCSSPersudoByEnum(FDE_CSSPERSUDO ePersudo) {
}
FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(
const CFX_WideStringC& wsName) {
- FXSYS_assert(!wsName.IsEmpty());
+ ASSERT(!wsName.IsEmpty());
uint32_t dwHash = FX_HashCode_GetW(wsName, true);
int32_t iEnd = FDE_CSSPROPERTY_MAX - 1;
int32_t iMid, iStart = 0;
@@ -582,7 +582,7 @@ FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName) {
}
FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(
const CFX_WideStringC& wsName) {
- FXSYS_assert(!wsName.IsEmpty());
+ ASSERT(!wsName.IsEmpty());
uint32_t dwHash = FX_HashCode_GetW(wsName, true);
int32_t iEnd = FDE_CSSPROPERTYVALUE_MAX - 1;
int32_t iMid, iStart = 0;
@@ -607,7 +607,7 @@ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum(
}
FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(
const CFX_WideStringC& wsName) {
- FXSYS_assert(!wsName.IsEmpty());
+ ASSERT(!wsName.IsEmpty());
uint16_t wHash = FX_HashCode_GetW(wsName, true);
int32_t iEnd =
sizeof(g_FDE_CSSMediaTypes) / sizeof(FDE_CSSMEDIATYPETABLE) - 1;
@@ -628,7 +628,7 @@ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(
}
FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(
const CFX_WideStringC& wsName) {
- FXSYS_assert(!wsName.IsEmpty());
+ ASSERT(!wsName.IsEmpty());
uint16_t wHash = FX_HashCode_GetW(wsName, true);
int32_t iEnd =
sizeof(g_FDE_CSSLengthUnits) / sizeof(FDE_CSSLENGTHUNITTABLE) - 1;
@@ -648,7 +648,7 @@ FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(
return NULL;
}
FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const CFX_WideStringC& wsName) {
- FXSYS_assert(!wsName.IsEmpty());
+ ASSERT(!wsName.IsEmpty());
uint32_t dwHash = FX_HashCode_GetW(wsName, true);
int32_t iEnd = sizeof(g_FDE_CSSColors) / sizeof(FDE_CSSCOLORTABLE) - 1;
int32_t iMid, iStart = 0;
@@ -670,7 +670,7 @@ FX_BOOL FDE_ParseCSSNumber(const FX_WCHAR* pszValue,
int32_t iValueLen,
FX_FLOAT& fValue,
FDE_CSSPRIMITIVETYPE& eUnit) {
- FXSYS_assert(pszValue != NULL && iValueLen > 0);
+ ASSERT(pszValue != NULL && iValueLen > 0);
int32_t iUsedLen = 0;
fValue = FX_wcstof(pszValue, iValueLen, &iUsedLen);
if (iUsedLen <= 0) {
@@ -695,7 +695,7 @@ FX_BOOL FDE_ParseCSSString(const FX_WCHAR* pszValue,
int32_t iValueLen,
int32_t& iOffset,
int32_t& iLength) {
- FXSYS_assert(pszValue != NULL && iValueLen > 0);
+ ASSERT(pszValue != NULL && iValueLen > 0);
iOffset = 0;
iLength = iValueLen;
if (iValueLen >= 2) {
@@ -711,7 +711,7 @@ FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue,
int32_t iValueLen,
int32_t& iOffset,
int32_t& iLength) {
- FXSYS_assert(pszValue != NULL && iValueLen > 0);
+ ASSERT(pszValue != NULL && iValueLen > 0);
if (iValueLen < 6 || pszValue[iValueLen - 1] != ')' ||
FX_wcsnicmp(L"url(", pszValue, 4)) {
return FALSE;
@@ -726,7 +726,7 @@ FX_BOOL FDE_ParseCSSURI(const FX_WCHAR* pszValue,
FX_BOOL FDE_ParseCSSColor(const FX_WCHAR* pszValue,
int32_t iValueLen,
FX_ARGB& dwColor) {
- FXSYS_assert(pszValue != NULL && iValueLen > 0);
+ ASSERT(pszValue != NULL && iValueLen > 0);
if (*pszValue == '#') {
switch (iValueLen) {
case 4: {
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index a066c29f94..dda04c4691 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -15,7 +15,7 @@ class CFDE_CSSFunction : public CFX_Target {
public:
CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList* pArgList)
: m_pArgList(pArgList), m_pszFuncName(pszFuncName) {
- FXSYS_assert(pArgList != NULL);
+ ASSERT(pArgList != NULL);
}
int32_t CountArgs() const { return m_pArgList->CountValues(); }
IFDE_CSSValue* GetArgs(int32_t index) const {
@@ -39,7 +39,7 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
: m_eType(eType), m_fNumber(fValue) {}
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, const FX_WCHAR* pValue)
: m_eType(eType), m_pString(pValue) {
- FXSYS_assert(m_pString != NULL);
+ ASSERT(m_pString != NULL);
}
CFDE_CSSPrimitiveValue(CFDE_CSSFunction* pFunction)
: m_eType(FDE_CSSPRIMITIVETYPE_Function), m_pFunction(pFunction) {}
@@ -47,34 +47,34 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const { return m_eType; }
virtual FX_ARGB GetRGBColor() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_RGB);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_RGB);
return m_dwColor;
}
virtual FX_FLOAT GetFloat() const {
- FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_Number &&
- m_eType <= FDE_CSSPRIMITIVETYPE_PC);
+ ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_Number &&
+ m_eType <= FDE_CSSPRIMITIVETYPE_PC);
return m_fNumber;
}
virtual const FX_WCHAR* GetString(int32_t& iLength) const {
- FXSYS_assert(m_eType >= FDE_CSSPRIMITIVETYPE_String &&
- m_eType <= FDE_CSSPRIMITIVETYPE_URI);
+ ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_String &&
+ m_eType <= FDE_CSSPRIMITIVETYPE_URI);
iLength = FXSYS_wcslen(m_pString);
return m_pString;
}
virtual FDE_CSSPROPERTYVALUE GetEnum() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
return m_eEnum;
}
virtual const FX_WCHAR* GetFuncName() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetFuncName();
}
virtual int32_t CountArgs() const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->CountArgs();
}
virtual IFDE_CSSValue* GetArgs(int32_t index) const {
- FXSYS_assert(m_eType == FDE_CSSPRIMITIVETYPE_Function);
+ ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
return m_pFunction->GetArgs(index);
}
@@ -106,7 +106,7 @@ class CFDE_CSSValueListParser : public CFX_Target {
public:
CFDE_CSSValueListParser(const FX_WCHAR* psz, int32_t iLen, FX_WCHAR separator)
: m_Separator(separator), m_pCur(psz), m_pEnd(psz + iLen) {
- FXSYS_assert(psz != NULL && iLen > 0);
+ ASSERT(psz != NULL && iLen > 0);
}
FX_BOOL NextValue(FDE_CSSPRIMITIVETYPE& eType,
const FX_WCHAR*& pStart,
diff --git a/xfa/fde/css/fde_cssdeclaration.cpp b/xfa/fde/css/fde_cssdeclaration.cpp
index e48372c2ed..80945245cf 100644
--- a/xfa/fde/css/fde_cssdeclaration.cpp
+++ b/xfa/fde/css/fde_cssdeclaration.cpp
@@ -28,7 +28,7 @@ void CFDE_CSSDeclaration::GetNextProperty(FX_POSITION& pos,
IFDE_CSSValue*& pValue,
FX_BOOL& bImportant) const {
const FDE_CSSPropertyHolder* pHolder = (const FDE_CSSPropertyHolder*)pos;
- FXSYS_assert(pHolder != NULL);
+ ASSERT(pHolder != NULL);
bImportant = pHolder->bImportant;
eProperty = (FDE_CSSPROPERTY)pHolder->eProperty;
pValue = pHolder->pValue;
@@ -52,7 +52,7 @@ const FX_WCHAR* CFDE_CSSDeclaration::CopyToLocal(
const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
- FXSYS_assert(iValueLen > 0);
+ ASSERT(iValueLen > 0);
CFX_MapPtrToPtr* pCache = pArgs->pStringCache;
void* pKey = NULL;
if (pCache) {
@@ -110,7 +110,7 @@ void CFDE_CSSDeclaration::AddPropertyHolder(IFX_MEMAllocator* pStaticStore,
FX_BOOL CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
- FXSYS_assert(iValueLen > 0);
+ ASSERT(iValueLen > 0);
FX_BOOL bImportant = FALSE;
if (iValueLen >= 10 && pszValue[iValueLen - 10] == '!' &&
FX_wcsnicmp(L"important", pszValue + iValueLen - 9, 9) == 0) {
@@ -260,7 +260,7 @@ FX_BOOL CFDE_CSSDeclaration::AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
return ParseValueListProperty(pArgs, pszValue, iValueLen, bImportant);
}
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
return FALSE;
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp
index 4f88c0d5d7..b172d71ebf 100644
--- a/xfa/fde/css/fde_cssstyleselector.cpp
+++ b/xfa/fde/css/fde_cssstyleselector.cpp
@@ -154,7 +154,7 @@ void CFDE_CSSRuleCollection::AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet,
AddRuleTo(m_pUniversalRules, NewRuleData(pSelector, pDeclaration));
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
}
@@ -237,13 +237,13 @@ void CFDE_CSSStyleSelector::SetFontMgr(IFX_FontMgr* pFontMgr) {
m_pFontMgr = pFontMgr;
}
void CFDE_CSSStyleSelector::SetDefFontSize(FX_FLOAT fFontSize) {
- FXSYS_assert(fFontSize > 0);
+ ASSERT(fFontSize > 0);
m_fDefFontSize = fFontSize;
}
CFDE_CSSAccelerator* CFDE_CSSStyleSelector::InitAccelerator() {
if (m_pAccelerator == NULL) {
m_pAccelerator = new CFDE_CSSAccelerator;
- FXSYS_assert(m_pAccelerator != NULL);
+ ASSERT(m_pAccelerator != NULL);
}
m_pAccelerator->Clear();
return m_pAccelerator;
@@ -253,7 +253,7 @@ IFDE_CSSComputedStyle* CFDE_CSSStyleSelector::CreateComputedStyle(
if (m_pFixedStyleStore == NULL) {
m_pFixedStyleStore = FX_CreateAllocator(FX_ALLOCTYPE_Fixed, 16,
sizeof(CFDE_CSSComputedStyle));
- FXSYS_assert(m_pFixedStyleStore != NULL);
+ ASSERT(m_pFixedStyleStore != NULL);
}
CFDE_CSSComputedStyle* pStyle = FXTARGET_NewWith(m_pFixedStyleStore)
CFDE_CSSComputedStyle(m_pFixedStyleStore);
@@ -268,7 +268,7 @@ IFDE_CSSComputedStyle* CFDE_CSSStyleSelector::CreateComputedStyle(
}
FX_BOOL CFDE_CSSStyleSelector::SetStyleSheet(FDE_CSSSTYLESHEETGROUP eType,
IFDE_CSSStyleSheet* pSheet) {
- FXSYS_assert(eType < FDE_CSSSTYLESHEETGROUP_MAX);
+ ASSERT(eType < FDE_CSSSTYLESHEETGROUP_MAX);
CFDE_CSSStyleSheetArray& dest = m_SheetGroups[eType];
dest.RemoveAt(0, dest.GetSize());
if (pSheet != NULL) {
@@ -279,7 +279,7 @@ FX_BOOL CFDE_CSSStyleSelector::SetStyleSheet(FDE_CSSSTYLESHEETGROUP eType,
FX_BOOL CFDE_CSSStyleSelector::SetStyleSheets(
FDE_CSSSTYLESHEETGROUP eType,
const CFDE_CSSStyleSheetArray* pArray) {
- FXSYS_assert(eType < FDE_CSSSTYLESHEETGROUP_MAX);
+ ASSERT(eType < FDE_CSSSTYLESHEETGROUP_MAX);
CFDE_CSSStyleSheetArray& dest = m_SheetGroups[eType];
if (pArray == NULL) {
dest.RemoveAt(0, dest.GetSize());
@@ -296,7 +296,7 @@ void CFDE_CSSStyleSelector::SetStylePriority(
void CFDE_CSSStyleSelector::UpdateStyleIndex(uint32_t dwMediaList) {
Reset();
m_pRuleDataStore = FX_CreateAllocator(FX_ALLOCTYPE_Static, 1024, 0);
- FXSYS_assert(m_pRuleDataStore != NULL);
+ ASSERT(m_pRuleDataStore != NULL);
for (int32_t iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
CFDE_CSSRuleCollection& rules = m_RuleCollection[iGroup];
rules.m_pStaticStore = m_pRuleDataStore;
@@ -316,10 +316,10 @@ int32_t CFDE_CSSStyleSelector::MatchDeclarations(
CXFA_CSSTagProvider* pTag,
CFDE_CSSDeclarationArray& matchedDecls,
FDE_CSSPERSUDO ePersudoType) {
- FXSYS_assert(m_pAccelerator && pTag);
+ ASSERT(m_pAccelerator && pTag);
FDE_CSSTagCache* pCache = m_pAccelerator->GetTopElement();
- FXSYS_assert(pCache && pCache->GetTag() == pTag);
+ ASSERT(pCache && pCache->GetTag() == pTag);
matchedDecls.RemoveAt(0, matchedDecls.GetSize());
for (int32_t ePriority = FDE_CSSSTYLESHEETPRIORITY_MAX - 1; ePriority >= 0;
@@ -408,7 +408,7 @@ FX_BOOL CFDE_CSSStyleSelector::MatchSelector(FDE_CSSTagCache* pCache,
}
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
pSel = pSel->GetNextSelector();
@@ -421,8 +421,8 @@ void CFDE_CSSStyleSelector::ComputeStyle(
const IFDE_CSSDeclaration** ppDeclArray,
int32_t iDeclCount,
IFDE_CSSComputedStyle* pDestStyle) {
- FXSYS_assert(iDeclCount >= 0);
- FXSYS_assert(pDestStyle);
+ ASSERT(iDeclCount >= 0);
+ ASSERT(pDestStyle);
static const uint32_t s_dwStyleHash = FX_HashCode_GetW(L"style", true);
static const uint32_t s_dwAlignHash = FX_HashCode_GetW(L"align", true);
@@ -469,7 +469,7 @@ void CFDE_CSSStyleSelector::ComputeStyle(
}
if (iDeclCount > 0) {
- FXSYS_assert(ppDeclArray);
+ ASSERT(ppDeclArray);
ApplyDeclarations(TRUE, ppDeclArray, iDeclCount, pDestStyle);
ApplyDeclarations(FALSE, ppDeclArray, iDeclCount, pDestStyle);
@@ -544,7 +544,7 @@ void CFDE_CSSStyleSelector::ApplyDeclarations(
void CFDE_CSSStyleSelector::AppendInlineStyle(CFDE_CSSDeclaration* pDecl,
const FX_WCHAR* psz,
int32_t iLen) {
- FXSYS_assert(pDecl != NULL && psz != NULL && iLen > 0);
+ ASSERT(pDecl != NULL && psz != NULL && iLen > 0);
IFDE_CSSSyntaxParser* pSyntax = IFDE_CSSSyntaxParser::Create();
if (pSyntax == NULL) {
return;
@@ -1128,7 +1128,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(
}
}
} else {
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
}
}
FX_FLOAT CFDE_CSSStyleSelector::ApplyNumber(FDE_CSSPRIMITIVETYPE eUnit,
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index 15358c2942..4f2930dd0e 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -75,7 +75,7 @@ CFDE_CSSStyleSheet::CFDE_CSSStyleSheet(uint32_t dwMediaList)
m_wRefCount(1),
m_dwMediaList(dwMediaList),
m_pAllocator(NULL) {
- FXSYS_assert(m_dwMediaList > 0);
+ ASSERT(m_dwMediaList > 0);
}
CFDE_CSSStyleSheet::~CFDE_CSSStyleSheet() {
Reset();
@@ -94,7 +94,7 @@ void CFDE_CSSStyleSheet::Reset() {
((CFDE_CSSFontFaceRule*)pRule)->~CFDE_CSSFontFaceRule();
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
}
@@ -125,7 +125,7 @@ IFDE_CSSRule* CFDE_CSSStyleSheet::GetRule(int32_t index) {
FX_BOOL CFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString& szUrl,
IFX_Stream* pStream,
uint16_t wCodePage) {
- FXSYS_assert(pStream != NULL);
+ ASSERT(pStream != NULL);
IFDE_CSSSyntaxParser* pSyntax = IFDE_CSSSyntaxParser::Create();
if (pSyntax == NULL) {
return FALSE;
@@ -143,7 +143,7 @@ FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
int32_t iBufSize,
uint16_t wCodePage) {
- FXSYS_assert(pBuffer != NULL && iBufSize > 0);
+ ASSERT(pBuffer != NULL && iBufSize > 0);
IFDE_CSSSyntaxParser* pSyntax = IFDE_CSSSyntaxParser::Create();
if (pSyntax == NULL) {
return FALSE;
@@ -365,7 +365,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSStyleSheet::SkipRuleSet(
}
void CFDE_CSSStyleRule::SetSelector(IFX_MEMAllocator* pStaticStore,
const CFDE_CSSSelectorArray& list) {
- FXSYS_assert(m_ppSelector == NULL);
+ ASSERT(m_ppSelector == NULL);
m_iSelectors = list.GetSize();
m_ppSelector = (IFDE_CSSSelector**)pStaticStore->Alloc(
m_iSelectors * sizeof(IFDE_CSSSelector*));
@@ -381,7 +381,7 @@ CFDE_CSSMediaRule::~CFDE_CSSMediaRule() {
((CFDE_CSSStyleRule*)pRule)->~CFDE_CSSStyleRule();
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
}
@@ -390,7 +390,7 @@ inline FX_BOOL FDE_IsCSSChar(FX_WCHAR wch) {
return (wch >= 'a' && wch <= 'z') || (wch >= 'A' && wch <= 'Z');
}
int32_t FDE_GetCSSPersudoLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd) {
- FXSYS_assert(*psz == ':');
+ ASSERT(*psz == ':');
const FX_WCHAR* pStart = psz;
while (psz < pEnd) {
FX_WCHAR wch = *psz;
@@ -418,7 +418,7 @@ int32_t FDE_GetCSSNameLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd) {
IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator* pStaticStore,
const FX_WCHAR* psz,
int32_t iLen) {
- FXSYS_assert(pStaticStore != NULL && psz != NULL && iLen > 0);
+ ASSERT(pStaticStore != NULL && psz != NULL && iLen > 0);
const FX_WCHAR* pStart = psz;
const FX_WCHAR* pEnd = psz + iLen;
for (; psz < pEnd; ++psz) {
@@ -446,7 +446,7 @@ IFDE_CSSSelector* CFDE_CSSSelector::FromString(IFX_MEMAllocator* pStaticStore,
}
pFirst = pLast = p;
}
- FXSYS_assert(pLast != NULL);
+ ASSERT(pLast != NULL);
int32_t iNameLen = FDE_GetCSSNameLen(++psz, pEnd);
if (iNameLen == 0) {
return NULL;
diff --git a/xfa/fde/css/fde_csssyntax.cpp b/xfa/fde/css/fde_csssyntax.cpp
index 8a905f69b4..4cc890c96b 100644
--- a/xfa/fde/css/fde_csssyntax.cpp
+++ b/xfa/fde/css/fde_csssyntax.cpp
@@ -41,7 +41,7 @@ FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream* pStream,
int32_t iCSSPlaneSize,
int32_t iTextDataSize,
FX_BOOL bOnlyDeclaration) {
- FXSYS_assert(pStream != NULL && iCSSPlaneSize > 0 && iTextDataSize > 0);
+ ASSERT(pStream != NULL && iCSSPlaneSize > 0 && iTextDataSize > 0);
Reset(bOnlyDeclaration);
if (!m_TextData.EstimateSize(iTextDataSize)) {
return FALSE;
@@ -56,7 +56,7 @@ FX_BOOL CFDE_CSSSyntaxParser::Init(const FX_WCHAR* pBuffer,
int32_t iBufferSize,
int32_t iTextDatSize,
FX_BOOL bOnlyDeclaration) {
- FXSYS_assert(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
+ ASSERT(pBuffer != NULL && iBufferSize > 0 && iTextDatSize > 0);
Reset(bOnlyDeclaration);
if (!m_TextData.EstimateSize(iTextDatSize)) {
return FALSE;
@@ -358,7 +358,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse() {
m_TextPlane.MoveNext();
break;
default:
- FXSYS_assert(FALSE);
+ ASSERT(FALSE);
break;
}
}
@@ -434,7 +434,7 @@ FX_BOOL CFDE_CSSTextBuf::AttachBuffer(const FX_WCHAR* pBuffer,
return m_bExtBuf = TRUE;
}
FX_BOOL CFDE_CSSTextBuf::EstimateSize(int32_t iAllocSize) {
- FXSYS_assert(iAllocSize > 0);
+ ASSERT(iAllocSize > 0);
Clear();
m_bExtBuf = FALSE;
return ExpandBuf(iAllocSize);
@@ -443,7 +443,7 @@ int32_t CFDE_CSSTextBuf::LoadFromStream(IFX_Stream* pTxtStream,
int32_t iStreamOffset,
int32_t iMaxChars,
FX_BOOL& bEOS) {
- FXSYS_assert(iStreamOffset >= 0 && iMaxChars > 0);
+ ASSERT(iStreamOffset >= 0 && iMaxChars > 0);
Clear();
m_bExtBuf = FALSE;
if (!ExpandBuf(iMaxChars)) {
@@ -474,7 +474,7 @@ FX_BOOL CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize) {
return TRUE;
}
void CFDE_CSSTextBuf::Subtract(int32_t iStart, int32_t iLength) {
- FXSYS_assert(iStart >= 0 && iLength > 0);
+ ASSERT(iStart >= 0 && iLength > 0);
if (iLength > m_iDatLen - iStart) {
iLength = m_iDatLen - iStart;
}