From 462d2a6e10a06653181f1a02136a6f8bab7b4ceb Mon Sep 17 00:00:00 2001 From: "anthonyd%netscape.com" Date: Sun, 8 Oct 2000 06:14:21 +0000 Subject: [PATCH] fix for bug#54222 The "noshade" attribute on Horizontal rule not set at all sr=kin r=mjudge a=mjudge git-svn-id: svn://10.0.0.236/trunk@80707 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditor.cpp | 7 +++++-- mozilla/editor/libeditor/base/nsEditor.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mozilla/editor/base/nsEditor.cpp b/mozilla/editor/base/nsEditor.cpp index b0157e8235c..6a7137f31b0 100644 --- a/mozilla/editor/base/nsEditor.cpp +++ b/mozilla/editor/base/nsEditor.cpp @@ -2795,8 +2795,11 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode) if (NS_SUCCEEDED(sourceAttribute->GetName(sourceAttrName))) { nsAutoString sourceAttrValue; - if (NS_SUCCEEDED(sourceAttribute->GetValue(sourceAttrValue)) && - !sourceAttrValue.IsEmpty()) + /* + Presence of an attribute in the named node map indicates that it was set on the + element even if it has no value. + */ + if (NS_SUCCEEDED(sourceAttribute->GetValue(sourceAttrValue))) { if (destInBody) SetAttribute(destElement, sourceAttrName, sourceAttrValue); diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index b0157e8235c..6a7137f31b0 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -2795,8 +2795,11 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode) if (NS_SUCCEEDED(sourceAttribute->GetName(sourceAttrName))) { nsAutoString sourceAttrValue; - if (NS_SUCCEEDED(sourceAttribute->GetValue(sourceAttrValue)) && - !sourceAttrValue.IsEmpty()) + /* + Presence of an attribute in the named node map indicates that it was set on the + element even if it has no value. + */ + if (NS_SUCCEEDED(sourceAttribute->GetValue(sourceAttrValue))) { if (destInBody) SetAttribute(destElement, sourceAttrName, sourceAttrValue);