[Webkit-unassigned] [Bug 27046] Implement CSSOM DocumentView.caretRangeFromPoint

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 17 10:59:48 PDT 2009


Xiaomei Ji <xji at chromium.org> changed:

           What    |Removed                     |Added
                 CC|                            |xji at chromium.org

--- Comment #6 from Xiaomei Ji <xji at chromium.org>  2009-07-17 10:59:47 PDT ---
(In reply to comment #4)
> Created an attachment (id=32694)
 --> (https://bugs.webkit.org/attachment.cgi?id=32694) [details]
> Little more work.

Hi Sam,

Thanks for implementing this!

I have several questions regarding your patch:
1. The CSSOM spec says that: "If ..... no insertion point indicator would have
been inserted, or editing is not supported, the method must return null". I do
not quite understand why it returns NULL if "editing is not supported". So, I
changed the implementation to "return NULL if the node type is not text related
node type". For other node types, range::create(Document*, Position, Position)
might raise error code and hit assertion failure (for example, "input"
element). Or rangeCompliantEquivalent takes care of that? 

2. When calculating the coordinate relative to document, you are taking zoom
factor into consideration. Should it also take document scrolling into
consideration as well? Since the spec says (x, y) is coordinates in viewport.
Or maybe we can use coordinate relative to document and let JS do  the

3. Could you please add some comments in caretRangeFromPoint() declaration in
For a new comer like me, comments help him/her to learn the code, especially
what/relative to which a point is.


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