diff options
Diffstat (limited to 'dom/base/nsAttrValueOrString.h')
-rw-r--r-- | dom/base/nsAttrValueOrString.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/base/nsAttrValueOrString.h b/dom/base/nsAttrValueOrString.h index 8e6c069532..1a62a84287 100644 --- a/dom/base/nsAttrValueOrString.h +++ b/dom/base/nsAttrValueOrString.h @@ -78,6 +78,20 @@ public: return aOther.EqualsAsStrings(*mAttrValue); } + /* + * Returns true if the value stored is empty + */ + bool IsEmpty() const + { + if (mStringPtr) { + return mStringPtr->IsEmpty(); + } + if (mAttrValue) { + return mAttrValue->IsEmptyString(); + } + return true; + } + protected: const nsAttrValue* mAttrValue; mutable const nsAString* mStringPtr; |