[Webkit-unassigned] [Bug 25584] No way to get the x/y location of a selection
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 7 19:14:28 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=25584
------- Comment #10 from roc at ocallahan.org 2009-05-07 19:14 PDT -------
(In reply to comment #4)
> One answer to this would be to convince Anne to change CSSOM to make collapsed
> ranges return a non-empty rect.
I think this is the right direction.
> One question with either of those is what is the width of a cursor rect?
I'd return a rect of width 0. I think we want the invariant that for text on a
single line, if you decompose a range R into a set of ranges (including empty
ranges) that partition R, adding up their widths gives you the width of R.
> Or the height? (line height?)
The spec says for non-empty text selections, "the vertical dimension of each
box is determined by the font ascent and descent"; maybe that's not precise
enough, but the behaviour should be the same for empty and non-empty ranges.
> And what about a split cursor on the mac? And are
> there non-text cursors we need to care about?
Determining the actual caret position and dimensions is a different problem.
I'd actually prefer that we not expose that to Web apps unless you have a
really good use-case for it --- I can't think of one myself, right now.
(In reply to comment #7)
> in addition to being a bit heavyweight,
> it has side-effects like changing wrapping behavior (putting a span in the
> middle of the word would make the word breakable at that point).
A side issue, but IMHO that would be a bug in Webkit. Linebreaking is
underspecified, but IMHO empty spans should not affect linebreaking and in
Gecko they don't by design.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list