[Webkit-unassigned] [Bug 34880] REGRESSION: SVG text disappears after double click

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 15 22:12:36 PST 2010


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





--- Comment #7 from MORITA Hajime <morrita at gmail.com>  2010-02-15 22:12:36 PST ---
Hi, 
Thank you for reviewing!

(In reply to comment #6)
> Think of a compound document where you're selecting XHTML test, but not
> anything in the SVG fragment.
> 
> Can you explain a bit more detailed what's the problem with selectionStartEnd
> here?

Return value of selectionStartEnd() is a offset from the beginning of
the "line", not of the "document".  So there are cases where
selectionStartPos == selectionEndPos (or selectionStartPos >
selectonEndPos) even if we have a selection.

For example, when selecting whole single line by triple-clicking a
text, selectiondStartPos is located at the beginning of certain line, 
and selectionEndPos is located at the beginning of the next line. Both
selectioniStartPos and selectionEndPos are zero in this case.
Because old mayHaveSelection() return false in that case, 
selection painting got skipped, and finally text of the line disappeared.

BTW, skipping subphases with mayHaveSelection() is only for speed, so
it is safe even if mayHaveSelection() always returns true.  And
current implementation is very conservative: it gets false only if
there is no selection in the document.

And yes, there may be better way to impelemnt mayHaveSelection()
using SVGInlineTextBox::selectionStartEnd(). I'll investigate it
and re-submit a patch.

-- 
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