Closed
Bug 585100
Opened 14 years ago
Closed 1 year ago
Add a IsValueEmpty() const method in nsTextEditorState
Categories
(Core :: DOM: Editor, defect, P5)
Core
DOM: Editor
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mounir, Unassigned)
Details
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.
Reporter | ||
Comment 1•13 years ago
|
||
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
Closed: 13 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 2•13 years ago
|
||
nsTextEditorState::IsEmpty isn't really doing what could have been expected... :(
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Comment 3•13 years ago
|
||
(In reply to comment #2) > nsTextEditorState::IsEmpty isn't really doing what could have been expected... > :( That's true. :/
Comment 4•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•3 years ago
|
Component: DOM: Core & HTML → DOM: Editor
Updated•2 years ago
|
Severity: normal → S3
Does TextControlState::HasNonEmptyValue()
work for the original purpose?
But anyway, nobody working on the optimization (I mean new callers of it). So feel free to reopen this if it's not reasonable API.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 1 year ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•