Closed
Bug 210515
Opened 22 years ago
Closed 21 years ago
Assertion in nsAccessible::GetFlatStringFromContentNode()
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
Details
Attachments
(1 file, 1 obsolete file)
1.13 KB,
patch
|
aaronlev
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
The assertion occurs if you try to do:
textContent->CopyText(text);
when the text is of length 0
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #126379 -
Flags: review?(kyle.yuan)
Comment on attachment 126379 [details] [diff] [review]
Don't copy text if the textcontent is length 0
r=kyle
+ if (text.Length()>0)
I prefer a space before & after operators.
Attachment #126379 -
Flags: review?(kyle.yuan) → review+
Assignee | ||
Comment 3•22 years ago
|
||
Comment on attachment 126379 [details] [diff] [review]
Don't copy text if the textcontent is length 0
Thanks Kyle, I'll fix the spacing around the >
Attachment #126379 -
Flags: superreview?(alecf)
Comment 4•22 years ago
|
||
Comment on attachment 126379 [details] [diff] [review]
Don't copy text if the textcontent is length 0
> nsAutoString text;
This should have been moved inside the if block
>+ if (origLength > 0) {
>+ textContent->CopyText(text);
>+ text.CompressWhitespace();
>+ if (text.Length()>0)
This should have been fixed to !IsEmpty()
>+ aFlatString->Append(text);
>+ if (isHTMLBlock && !aFlatString->IsEmpty())
>+ aFlatString->Append(NS_LITERAL_STRING(" "));
Assignee | ||
Comment 5•22 years ago
|
||
Thanks Neil, good eyes.
Attachment #126379 -
Attachment is obsolete: true
Assignee | ||
Comment 6•22 years ago
|
||
Comment on attachment 126465 [details] [diff] [review]
New patch with Neil's suggestions
Carrying r=kyle
Attachment #126465 -
Flags: superreview?(alecf)
Attachment #126465 -
Flags: review+
Assignee | ||
Comment 7•22 years ago
|
||
Comment on attachment 126379 [details] [diff] [review]
Don't copy text if the textcontent is length 0
sr= request is on newer patch now
Attachment #126379 -
Flags: superreview?(alecf)
Comment 8•22 years ago
|
||
Comment on attachment 126465 [details] [diff] [review]
New patch with Neil's suggestions
sr=alecf
you could also sa aFlatString->Append(PRUnichar(' '); and get the same effect,
but take up 16 less bytes.
Attachment #126465 -
Flags: superreview?(alecf) → superreview+
mozilla/accessible/src/base/nsAccessible.cpp 1.78
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•