open test case select from 2-9, make bold (Ctrl-B) select from 2-8, make italic (Ctrl-I) select from 2-4, make not bold (Ctrl-B) crash in content iterator. it looks like cN is the content node corresponding to <HTML>. This node has no parent, but no check is being made to see that GetParent returned a non-null parent. I don't think adding the check fixes anything, because we shouldn't be getting to <HTML> anyway. We should never be able to iterate above <BODY>, right?
here's the simple test case: <html><body>1234567890abcdefgh</body></html>
Steve, I think you should redo RemovetextPropertiesForNodeWithDifferentParents() slightly. You pass in a range which you use to set up the iter, but before you use the range you call RemovetextPropertiesForNode() a couple of times and this can alter the range. Can you try manually creating a range to specify everything between the start and end nodes (which are now not where they used to be) and see how that fares?
looking into it.
the majority of problems with this code are fixed. I'm still looking into one case where GetTextProperty returns the wrong answer depending on whether the selection starts after the last child of the previous node, or before the first child of the next node. After that's fixed, I'll mark this bug fixed.
assigning to Steve
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
The originally reported problem is fixed, along with a bunch of related fixes. Sujay, to keep your job reasonable, just verify the original problem is fixed (doesn't crash and gives the correct result.) Any other bugs should be submitted separately.
verified in 4/20 build...no longer crashing...I used the test case provided. However, I found another bug..filing separate.
You need to log in before you can comment on or make changes to this bug.