Closed
Bug 641352
Opened 13 years ago
Closed 13 years ago
Add nsHTMLTextAreaElement::IsValueEmpty const
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: mounir, Assigned: mounir)
Details
Attachments
(1 file, 1 obsolete file)
2.93 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•13 years ago
|
Summary: Ad → Add nsHTMLTextAreaElement::IsValueEmpty const
Assignee | ||
Comment 1•13 years ago
|
||
Like for nsHTMLInputElement, it makes thing easier to read. But unlike nsHTMLInputElement, it comes with perf improvement given that we don't check if the string is the empty string but if mValue is NULL (by calling nsTextEditorState::IsEmpty).
Attachment #519041 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [needs review]
Comment 2•13 years ago
|
||
Comment on attachment 519041 [details] [diff] [review] Add IsValueEmpty r=me
Attachment #519041 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [needs review] → [can land][post-2.0]
Assignee | ||
Comment 3•13 years ago
|
||
Ehsan, nsTextEditorState::IsEmpty doesn't sound to do what I expected it to do (returning if nsTextEditorState value is empty). Did I misinterpreted this method? is it mis-named? or is it not working as expected?
Assignee | ||
Updated•13 years ago
|
Whiteboard: [can land][post-2.0] → [can land][post-2.0][not ready]
Assignee | ||
Updated•13 years ago
|
Whiteboard: [can land][post-2.0][not ready] → [post-2.0][not ready]
Comment 4•13 years ago
|
||
(In reply to comment #3) > Ehsan, nsTextEditorState::IsEmpty doesn't sound to do what I expected it to do > (returning if nsTextEditorState value is empty). Did I misinterpreted this > method? is it mis-named? or is it not working as expected? It is not the best named method in our tree for sure. ;-) But the only call site I can find for it expects it to work this way.
Assignee | ||
Comment 5•13 years ago
|
||
The only chunk that has been changed is: +bool +nsHTMLTextAreaElement::IsValueEmpty() const +{ + nsAutoString value; + GetValueInternal(value, PR_TRUE); + + return value.IsEmpty(); +} In the previous patch, it was returning mState.IsEmpty().
Attachment #519041 -
Attachment is obsolete: true
Attachment #525438 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [post-2.0][not ready] → [needs review]
Comment 6•13 years ago
|
||
Comment on attachment 525438 [details] [diff] [review] Add IsValueEmpty r=me
Attachment #525438 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Pushed: http://hg.mozilla.org/mozilla-central/rev/ebe25dc723b5
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla6
You need to log in
before you can comment on or make changes to this bug.
Description
•