[Webkit-unassigned] [Bug 59021] New: [chromium] firstRectForCharacterRange returns wrong result in DRT

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 20 13:36:31 PDT 2011


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

           Summary: [chromium] firstRectForCharacterRange returns wrong
                    result in DRT
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: xji at chromium.org


Created an attachment (id=90400)
 --> (https://bugs.webkit.org/attachment.cgi?id=90400&action=review)
test case

For the following test case, 
<div id="div" dir=ltr class="test_move_by_word" title="0 4 11 15|18 15 11 4 0" contenteditable>abc def    hij opq</div>

When caret is at the right of "opq", the caretRect returned from firstRectForCharacterRange() is NULL.


Following is the gdb result. 


Breakpoint 1, WebKit::WebFrameImpl::firstRectForCharacterRange (
    this=0x7fffe8097df0, location=18, length=0, rect=...)
    at third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.cpp:1163
1163        if (!range)
(gdb) p range
$4 = {m_ptr = 0x0}
(gdb) p scope->nodeType()
$5 = WebCore::Node::ELEMENT_NODE
(gdb) where 3
#0  WebKit::WebFrameImpl::firstRectForCharacterRange (this=0x7fffe8097df0,
    location=18, length=0, rect=...)
    at third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.cpp:1163
#1  0x000000000045b658 in TextInputController::firstRectForCharacterRange (
    this=0x7fffe8097590, arguments=..., result=0x7fffffffb5c0)
    at third_party/WebKit/Tools/DumpRenderTree/chromium/TextInputController.cpp:192
#2  0x000000000045c42a in CppBoundClass::MemberCallback<TextInputController>::run (this=0x7fffe8089b00, arguments=..., result=0x7fffffffb5c0)
    at third_party/WebKit/Tools/DumpRenderTree/chromium/CppBoundClass.h:125
(More stack frames follow...)


scope is the <div> node. 

TextIterator::rangeFromLocationAndLength(<div> node, 18, 0) returns NULL range.

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