Bug 60692 - [SVG] Assertion failure by dragging text between input fields inside <foreignObject>s
Summary: [SVG] Assertion failure by dragging text between input fields inside <foreign...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 22:36 PDT by Hajime Morrita
Modified: 2011-05-25 11:36 PDT (History)
5 users (show)

See Also:


Attachments
A repro. (535 bytes, image/svg+xml)
2011-05-11 22:36 PDT, Hajime Morrita
no flags Details
Patch (6.52 KB, patch)
2011-05-24 01:52 PDT, Leo Yang
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hajime Morrita 2011-05-11 22:36:38 PDT
Created attachment 93251 [details]
A repro.

1. Select text on one <input> textfield
 2. Drag it to another text field.
 3. An assertion will fail.

---
Error message:
0x000000010217d350 in WebCore::RenderSVGRoot::mapLocalToContainer (this=0x106af2a28, repaintContainer=0x0, fixed=false, useTransforms=false, transformState=@0x7fff5fbfe700) at RenderSVGRoot.cpp:300
300	    ASSERT(useTransforms); // mapping a point through SVG w/o respecting trasnforms is useless.
---

Stacktrace:
(gdb) bt 10
#0  0x000000010217d350 in WebCore::RenderSVGRoot::mapLocalToContainer (this=0x106af2a28, repaintContainer=0x0, fixed=false, useTransforms=false, transformState=@0x7fff5fbfe700) at RenderSVGRoot.cpp:300
#1  0x0000000102143ce9 in WebCore::RenderObject::localToAbsolute (this=0x106af2a28, localPoint=@0x7fff5fbfe7a0, fixed=false, useTransforms=false) at /Users/morrita/work/webkit/apricot/Source/WebCore/rendering/RenderObject.cpp:1803
#2  0x00000001019e7811 in WebCore::selectionExtentRespectingEditingBoundary (selection=@0x108005d28, localPoint=@0x7fff5fbfe8f0, targetNode=0x106ad2170) at /Users/morrita/work/webkit/apricot/Source/WebCore/page/EventHandler.cpp:643
#3  0x00000001019ea918 in WebCore::EventHandler::updateSelectionForMouseDrag (this=0x108005df0, hitTestResult=@0x7fff5fbfea40) at /Users/morrita/work/webkit/apricot/Source/WebCore/page/EventHandler.cpp:663
#4  0x00000001019eaeab in WebCore::EventHandler::handleMouseDraggedEvent (this=0x108005df0, event=@0x7fff5fbfea10) at /Users/morrita/work/webkit/apricot/Source/WebCore/page/EventHandler.cpp:574
#5  0x00000001019ed91f in WebCore::EventHandler::handleMouseMoveEvent (this=0x108005df0, mouseEvent=@0x7fff5fbfeb60, hoveredNode=0x0) at /Users/morrita/work/webkit/apricot/Source/WebCore/page/EventHandler.cpp:1660
#6  0x00000001019f2e04 in WebCore::EventHandler::mouseDragged (this=0x108005df0, event=0x11646f230) at /Users/morrita/work/webkit/apricot/Source/WebCore/page/mac/EventHandlerMac.mm:500
#7  0x00000001010c87e4 in -[WebHTMLView mouseDragged:] (self=0x10963c440, _cmd=0x7fff80d08d70, event=0x11646f230) at /Users/morrita/work/webkit/apricot/Source/WebKit/mac/WebView/WebHTMLView.mm:3533
#8  0x00007fff8070406f in -[NSWindow sendEvent:] ()
Comment 1 Leo Yang 2011-05-24 01:52:49 PDT
Created attachment 94584 [details]
Patch
Comment 2 Nikolas Zimmermann 2011-05-24 02:57:46 PDT
Looks good to me, but should get a final okay from an editing expert, Ryosuke?
Comment 3 Ryosuke Niwa 2011-05-24 09:41:40 PDT
Comment on attachment 94584 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=94584&action=review

> LayoutTests/editing/pasteboard/drag-drop-input-in-svg.svg:14
> +(function runTest()
> +{

Is it really necessary to have a function?  I would have done:
if (window.layoutTestController) {
   ...
}
Comment 4 Ryosuke Niwa 2011-05-24 09:42:36 PDT
+justin because he added removeInterchangeNodes.
Comment 5 Leo Yang 2011-05-24 18:27:23 PDT
Committed r87248: <http://trac.webkit.org/changeset/87248>
Comment 6 Ademar Reis 2011-05-25 11:36:47 PDT
Revision r87248 cherry-picked into qtwebkit-2.2 with commit 46706ea <http://gitorious.org/webkit/qtwebkit/commit/46706ea>