[Webkit-unassigned] [Bug 75171] NULL ptr in WebCore::TextIterator::rangeFromLocationAndLength

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 30 12:01:07 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=75171


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #121168|review?                     |review-
               Flag|                            |




--- Comment #9 from Ryosuke Niwa <rniwa at webkit.org>  2012-01-30 12:01:07 PST ---
(From update of attachment 121168)
View in context: https://bugs.webkit.org/attachment.cgi?id=121168&action=review

>>>>> Source/WebCore/editing/ApplyBlockElementCommand.cpp:84
>>>>> +    if (startOfSelection.isNull() || endOfSelection.isNull())
>>>> 
>>>> You should just call isNonOrphanedCaretOrRange on selection.
>>> 
>>> That's called at the start of the function and it returns true. If i understand things correctly, it's not orphaned, it's just that there's a single element but it's not selectable due to the -webkit-user-select css declaration.
>>> 
>>> A similar bug is https://bugs.webkit.org/show_bug.cgi?id=26214
>> 
>> selectionForParagraphIteration is probably returning a null selection. isNonOrphanedCaretOrRange checks nullness as well as orphanedness.
> 
> selectionForParagraphIteration seems to deal with tables, and there are none here, i checked the value of selection.isNonOrphanedCaretOrRange() in the debugger anyway and it's true at that point also.
> 
> The selection is not null itself, selection.visible{Start,End} are the ones returning null positions due to no available selectable elements (from my guess given above).

That seems to indicate we have a bug. visibleStart/visibleEnd should null iff selection is null. r- because this isn't the right fix.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list