Bug 22304 - [Transforms] Dictionary panel does not work correctly in transformed text
Summary: [Transforms] Dictionary panel does not work correctly in transformed text
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on: 15671
  Show dependency treegraph
Reported: 2008-11-16 22:47 PST by Simon Fraser (smfr)
Modified: 2009-01-09 13:36 PST (History)
1 user (show)

See Also:

Testcase (627 bytes, text/html)
2008-12-01 21:16 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2008-11-16 22:47:43 PST
The Dictionary panel (Command-Control-D) doesn't work correctly on text in a transformed element. It seems to refuse to open up. I'm guessing it's related to the relative positions of the cursor and the reported selection rects.
Comment 1 Simon Fraser (smfr) 2008-12-01 21:16:06 PST
Created attachment 25660 [details]
Comment 2 Simon Fraser (smfr) 2008-12-01 21:19:02 PST
The relevant call stack is 
#3  0x038bc680 in WebCore::RenderText::caretRect (this=0x1c90d00c, inlineBox=0x1c90a20c, caretOffset=25, extraWidthToEndOfLine=0xbfffdc1c) at /Volumes/Cassoulet/WebKit/WebKit.git/WebCore/rendering/RenderText.cpp:388
#4  0x035a4eef in WebCore::Frame::firstRectForRange (this=0x99fac0, range=0x1aff2480) at /Volumes/Cassoulet/WebKit/WebKit.git/WebCore/page/Frame.cpp:271
#5  0x001aff54 in -[WebFrame(WebInternal) _firstRectForDOMRange:] (self=0x99fb10, _cmd=0x26e514, range=0x1af9ecd0) at /Volumes/Cassoulet/WebKit/WebKit.git/WebKit/mac/WebView/WebFrame.mm:681
#6  0x001b1382 in -[WebFrame(WebInternal) _characterRangeAtPoint:] (self=0x99fb10, _cmd=0x25fe92, point={x = 179, y = 25}) at /Volumes/Cassoulet/WebKit/WebKit.git/WebKit/mac/WebView/WebFrame.mm:973
#7  0x001cbd87 in -[WebHTMLView(WebNSTextInputSupport) characterIndexForPoint:] (self=0x1aff5170, _cmd=0x94418798, thePoint={x = 179, y = 25}) at /Volumes/Cassoulet/WebKit/WebKit.git/WebKit/mac/WebView/WebHTMLView.mm:4963
#8  0x95772c6b in _NSTSMEventHandler ()

So this depends on the caretRect stuff.
Comment 3 Simon Fraser (smfr) 2008-12-06 18:50:06 PST
Note: the "start and end are on the same line" test in Frame::firstRectForRange() is wrong for transformed elements. But fixing this still doesn't make it work in all cases.