Merge pull request !2359 from Yao.inhome/cherry-pick-1651116246
This commit is contained in:
openharmony_ci
2022-04-28 06:18:44 +00:00
committed by Gitee
3 changed files with 3 additions and 3 deletions
@@ -500,7 +500,7 @@ void SetDomStyle(
}
bool isIine = false;
for (int32_t i = 0; i < styles.size(); i++) {
for (int32_t i = 0; i < static_cast<int32_t>(styles.size()); i++) {
std::string key = styles[i].first;
std::string value = styles[i].second;
if (key == "display" && value == "inline") {
@@ -470,7 +470,7 @@ void SetDomStyle(JSContext* ctx, JSValueConst fromMap, JsCommandDomElementOperat
JS_FreeValue(ctx, val);
}
bool isIine = false;
for (int32_t i = 0; i < styles.size(); i++) {
for (int32_t i = 0; i < static_cast<int32_t>(styles.size()); i++) {
std::string key = styles[i].first;
std::string value = styles[i].second;
if (key == "display" && value == "inline") {
+1 -1
View File
@@ -610,7 +610,7 @@ void JsCommandUpdateDomElementStyles::Execute(const RefPtr<JsAcePage>& page) con
DisplayType displayType = node->GetDisplay();
if (displayType == DisplayType::INLINE) {
std::vector < std::pair < std::string, std::string >> stylesTemp;
for (int32_t i = 0; i < styles_.size(); i++) {
for (int32_t i = 0; i < static_cast<int32_t>(styles_.size()); i++) {
std::string key = styles_[i].first;
std::string value = styles_[i].second;
if (key == "width" || key == "height" || key.find("margin") != std::string::npos ||