Closed
Bug 838518
Opened 10 years ago
Closed 10 years ago
C++ createTreeWalker callers broken by API change
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
35.02 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
19.57 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
The API change in bug 698384 didn't update any callers to the new API. That doesn't matter too much for JS callers, since the extra argument is ignored. But for C++ callers what used to be the "entityReferenceExpansion" boolean is now treated as the optional_argc. There are two C++ callers. One was passing true, which becomes 1, and it was passing a null filter so it's ok. The other one, though, was passing false, so now its whatToShow argument is being ignored.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
Attachment #710591 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 2•10 years ago
|
||
Attachment #710592 -
Flags: review?(bugs)
Can we add a test that would have caught this?
![]() |
Assignee | |
Comment 4•10 years ago
|
||
I don't know. The only real difference in behavior was for the accessibility treewalker... Trevor, any idea how to test that?
Comment 5•10 years ago
|
||
Comment on attachment 710591 [details] [diff] [review] part 1. Fix treewalker callers per the API change that was made. Ugh.
Attachment #710591 -
Flags: review?(bugs) → review+
Updated•10 years ago
|
Attachment #710592 -
Flags: review?(bugs) → review+
Comment 6•10 years ago
|
||
> Trevor, any idea how to test that?
Well, testing this will suck, and I should probably rip the nsIDOM crud there out so any test you write will hopefully stop testing anything soon. However if you really want to test it I think something like <div>foo bar</div> selecting "bar" then getting the accessible for that div and asking its nsIAccessibleText impl for the selection bounds should work.
![]() |
Assignee | |
Comment 7•10 years ago
|
||
I doubt that will work. The bug here was that the treewalker was using SHOW_ALL instead of SHOW_ELEMENT|SHOW_TEXT. So to trigger it we'd need a tree that has other things in there (comments, processing instructions, something)...
Comment 8•10 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #7) > I doubt that will work. The bug here was that the treewalker was using > SHOW_ALL instead of SHOW_ELEMENT|SHOW_TEXT. So to trigger it we'd need a yeah, oops, thanks xpidl > tree that has other things in there (comments, processing instructions, > something)... In that case I'm not sure it has an observable effect since that loop ignores things that don't have accessibles, and all we use it for is text offset stuff.
![]() |
Assignee | |
Comment 9•10 years ago
|
||
Great, thanks!
![]() |
Assignee | |
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1e47cdd7b68 https://hg.mozilla.org/integration/mozilla-inbound/rev/adcbf76cd586
Flags: in-testsuite-
Target Milestone: --- → mozilla21
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e1e47cdd7b68 https://hg.mozilla.org/mozilla-central/rev/adcbf76cd586
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•