diff --git a/core/fxcrt/css/cfx_cssstyleselector.cpp b/core/fxcrt/css/cfx_cssstyleselector.cpp
|
index f6b48bd..5c021b2 100644
|
--- a/core/fxcrt/css/cfx_cssstyleselector.cpp
|
+++ b/core/fxcrt/css/cfx_cssstyleselector.cpp
|
@@ -144,7 +144,6 @@ void CFX_CSSStyleSelector::AppendInlineStyle(CFX_CSSDeclaration* pDecl,
|
|
auto pSyntax = pdfium::MakeUnique<CFX_CSSSyntaxParser>(
|
style.c_str(), style.GetLength(), 32, true);
|
- int32_t iLen2 = 0;
|
const CFX_CSSData::Property* property = nullptr;
|
WideString wsName;
|
while (1) {
|
@@ -155,12 +154,12 @@ void CFX_CSSStyleSelector::AppendInlineStyle(CFX_CSSDeclaration* pDecl,
|
if (!property)
|
wsName = WideString(strValue);
|
} else if (eStatus == CFX_CSSSyntaxStatus::PropertyValue) {
|
- if (property || iLen2 > 0) {
|
+ if (property || !wsName.IsEmpty()) {
|
WideStringView strValue = pSyntax->GetCurrentString();
|
if (!strValue.IsEmpty()) {
|
if (property)
|
pDecl->AddProperty(property, strValue);
|
- else if (iLen2 > 0)
|
+ else
|
pDecl->AddProperty(wsName, WideString(strValue));
|
}
|
}
|
diff --git a/core/fxcrt/css/cfx_cssstylesheet.cpp b/core/fxcrt/css/cfx_cssstylesheet.cpp
|
index c7300fb..bf592bc 100644
|
--- a/core/fxcrt/css/cfx_cssstylesheet.cpp
|
+++ b/core/fxcrt/css/cfx_cssstylesheet.cpp
|
@@ -61,7 +61,6 @@ CFX_CSSSyntaxStatus CFX_CSSStyleSheet::LoadStyleRule(
|
std::vector<std::unique_ptr<CFX_CSSSelector>> selectors;
|
|
CFX_CSSStyleRule* pStyleRule = nullptr;
|
- int32_t iValueLen = 0;
|
const CFX_CSSData::Property* property = nullptr;
|
WideString wsName;
|
while (1) {
|
@@ -81,10 +80,10 @@ CFX_CSSSyntaxStatus CFX_CSSStyleSheet::LoadStyleRule(
|
break;
|
}
|
case CFX_CSSSyntaxStatus::PropertyValue: {
|
- if (property || iValueLen > 0) {
|
+ if (property || !wsName.IsEmpty()) {
|
WideStringView strValue = pSyntax->GetCurrentString();
|
- auto* decl = pStyleRule->GetDeclaration();
|
if (!strValue.IsEmpty()) {
|
+ auto* decl = pStyleRule->GetDeclaration();
|
if (property) {
|
decl->AddProperty(property, strValue);
|
} else {
|