At the moment, classes using nsTextEditorState, to know if their value string is the empty string, have to get the value with GetValue(nsAString) or get the value length with GetTextLength(). It would be great to have a way to know quickly (understand optimized) if the value is currently the empty string or not. I'm sure we can easily to better than the current way (GetValue() value.IsEmpty()) at least in some situations. For example, if the VALUE_CHANGED bit is set to false and HasAttr(kNamespace_None, nsGkAtoms::value) returns false, IsValueEmpty should return true.
I'm not really sure what I meant when I've open this bug. It seems to confuse nsHTMLInputElement and nsTextEditorState. Anyway, both now have a method to know if the value is empty.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
nsTextEditorState::IsEmpty isn't really doing what could have been expected... :(
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
(In reply to comment #2) > nsTextEditorState::IsEmpty isn't really doing what could have been expected... > :( That's true. :/
You need to log in before you can comment on or make changes to this bug.