[webkit-dev] how to write layout test to test mouse wheeling on document

2010-12-03 Thread Xiaomei Ji
Webkit now supports horizontal scrolling for pages with left overflow. But it has a bug in cross-platform that the backward mouse wheel does not work (you can not scroll backward below (0,0)). https://bugs.webkit.org/show_bug.cgi?id=50370 I tested the fix posted in the above bug, and I can manuall

[webkit-dev] assertion failure in WTF::StringHasher::createBlobHash at StringHasher.h:146

2011-03-21 Thread Xiaomei Ji
I've seen the following assertion failure when I start Safari (in debug mode on my local build). I do not think it is related to my local change. And I've just deleted the "WebKitBuild" directory and rebuild. Anyone has any idea on what might be wrong here? Thanks, Xiaomei ASSERTION FAILED: !(si

Re: [webkit-dev] assertion failure in WTF::StringHasher::createBlobHash at StringHasher.h:146

2011-03-21 Thread Xiaomei Ji
Yes, you are right. Thanks for pointing out. Xiaomei On Mon, Mar 21, 2011 at 6:30 PM, Simon Fraser wrote: > Do you have http://trac.webkit.org/changeset/80952 ? > > Simon > > On Mar 21, 2011, at 6:27 PM, Xiaomei Ji wrote: > > > I've seen the following assertion fa

[webkit-dev] [JavaScript] How to find a word user moused over

2009-07-02 Thread Xiaomei Ji
Hello, I am trying to write a JavaScript to find the word user moused over. FireFox supports event.rangeOffset, which is the *character* offset the cursor is at within the element. Given English word, using this offset, I can find the previous and next spaces and know the word under the cursor. B

[webkit-dev] proposal to expose word breaker through JavaScript: range.expand()

2009-08-13 Thread Xiaomei Ji
421(VS.85).aspx> . Thanks, Xiaomei On Thu, Jul 30, 2009 at 4:55 AM, Anne van Kesteren wrote: > Thanks for the reply! > > On Wed, 29 Jul 2009 20:17:13 +0200, Xiaomei Ji wrote: > > "word" is a keyword. Like Microsoft's > > spec<http://msdn.microso

[webkit-dev] JavaScript question: how to find out the position of a tooltip relative to the document body in a zoomed and scrolled page

2009-10-05 Thread Xiaomei Ji
I am trying to display a tooltip under the mouse when mouse stays at a position long enough. I am using "absolute" positioning, set the tooltip as the child of the document.body, and set the style.left and style.top as event.clientX + document.body.scrollLeft and event.clientY + documentbody.scroll

[webkit-dev] propose an API to return Range in etc. form control nodes (similar functionality as document.caretRangeFromPoint)

2009-10-08 Thread Xiaomei Ji
One use case is to show a tooltip of the word's definition in your accept-language when you mouse over the word in a page. It needs to 1. convert the mouse position to character offset within a node (by Document.caretRangeFromPoint()),

Re: [webkit-dev] propose an API to return Range in etc. form control nodes (similar functionality as document.caretRangeFromPoint)

2009-10-09 Thread Xiaomei Ji
, Xiaomei On Thu, Oct 8, 2009 at 12:25 PM, Olli Pettay wrote: > On 10/8/09 10:07 PM, Xiaomei Ji wrote: > >> One use case is to show a tooltip of the word's definition in your >> accept-language when you mouse over the word in a page. >> It needs to >> 1. convert the

Re: [webkit-dev] propose an API to return Range in etc. form control nodes (similar functionality as document.caretRangeFromPoint)

2009-10-12 Thread Xiaomei Ji
On Fri, 09 Oct 2009 19:04:52 +0200, Xiaomei Ji wrote: > >> Maybe I should propose Document.wordFromPoint() which directly returns >> the word under the mouse (and handles both the DOM node and non-DOM form >> control nodes). >> It hides the information about the n

[webkit-dev] how to achieve similar behavior as event.rangeParent and event.rangeOffset in FireFox.

2009-10-14 Thread Xiaomei Ji
I am using caretRangeFromPoint to convert mouse position to the character position within an element. I am trying to use it to achieve the same behavior as event.rangeParent and event.rangeOffset in FireFox. So I think it should return different results if hit test on a text node or the text node's

Re: [webkit-dev] propose an API to return Range in etc. form control nodes (similar functionality as document.caretRangeFromPoint)

2009-10-16 Thread Xiaomei Ji
offset within the under mouse, 'offsetKind' is "control", what is the value of 'containingNode"? Is it itself or its shadowAncestorNode? Thanks, Xiaomei On Mon, Oct 12, 2009 at 1:50 PM, Maciej Stachowiak wrote: > > On Oct 12, 2009, at 1:08 AM, Anne van Kesteren

Re: [webkit-dev] propose an API to return Range in etc. form control nodes (similar functionality as document.caretRangeFromPoint)

2009-10-16 Thread Xiaomei Ji
t of view, I think we probably need to have a convenience method for converting a Range, and it probably should not give null for a control position. We would need both the node and the offset for further processing. Thanks, Xiaomei On Fri, Oct 16, 2009 at 10:39 AM, Maciej Stachowiak wrote: >

[webkit-dev] Fwd: how to achieve similar behavior as event.rangeParent and event.rangeOffset in FireFox.

2009-10-20 Thread Xiaomei Ji
I am trying to annotate the word when hover over, which needs to differentiate those 2 hits. Would appreciate your suggestions on how to solve the issue. Thanks, Xiaomei On Wed, Oct 14, 2009 at 6:10 PM, Xiaomei Ji wrote: > I am using caretRangeFromPoint to convert mouse position to

[webkit-dev] How to convert character offset into VisiblePosition?

2010-06-01 Thread Xiaomei Ji
Given a DOM Node and an InlineBox, is there a way to convert the character offset within this InlineBox to a VisiblePosition? considering bidi/RTL. Using node in the following example as an example: abc ששש def שנב abc סטז uvw זזז xyz Assume the node is node A, using "(node, offset)a" to repres

Re: [webkit-dev] How to convert character offset into VisiblePosition?

2010-06-02 Thread Xiaomei Ji
Hi Dan, Thanks for your quick feedback. Please see my comments inline. On Wed, Jun 2, 2010 at 9:30 AM, Dan Bernstein wrote: > > On Jun 1, 2010, at 10:48 PM, Xiaomei Ji wrote: > > > Given a DOM Node and an InlineBox, is there a way to convert the character > offset within t