[Webkit-unassigned] [Bug 62500] New: Editing SVGs will cause assertions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 11 01:08:55 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=62500
Summary: Editing SVGs will cause assertions
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
URL: http://simple-rte.rniwa.com/?editor=hello%3Cspan%20sty
le%3D%22width%3A%2010px%3B%20height%3A%2010px%3B%20%22
%3E%0A%20%20%20%20%3Csvg%20viewBox%3D%220%200%20100%20
100%22%20width%3D%2220%22%20height%3D%2220%22%20versio
n%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/sv
g%22%3E%0A%20%20%20%20%3Ctext%20x%3D%2210%22%20y%3D%22
70%22%20font-size%3D%2280%22%3EX%3C/text%3E%0A%20%20%2
0%20%3Cline%20x1%3D%220%22%20y1%3D%222.5%22%20x2%3D%22
100y2%3D%222.5%22%20stroke%3D%22red%22%20stroke-width%
3D%225%22%20color%3D%22yellow%22%3E%3C/line%3E%0A%20%2
0%20%20%3Cline%20x1%3D%220%22%20y1%3D%2297.5%22%20x2%3
D%22100%22%20y2%3D%2297.5%22%20stroke%3D%22red%22%20st
roke-width%3D%225%22%20color%3D%22yellow%22%3E%3C/line
%3E%0A%20%20%20%20%3C/svg%3E%0A%3C/span%3Eworld&script
=editor%28%29.focus%28%29%3B
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: zimmermann at kde.org
CC: eric at webkit.org, krit at webkit.org, rniwa at webkit.org
Editing SVGs will cause assertions. Try the linked URL, which is an example given from Ryosuke on IRC.
Play around with editing on, delete the "X", by placing the caret after the "X" and pressing <delete>.
/Users/nzimmermann/Coding/WebKit/Source/WebCore/rendering/svg/SVGRenderSupport.cpp(75) : static void WebCore::SVGRenderSupport::mapLocalToContainer(const WebCore::RenderObject*, WebCore::RenderBoxModelObject*, bool, bool, WebCore::TransformState&)
1 WebCore::SVGRenderSupport::mapLocalToContainer(WebCore::RenderObject const*, WebCore::RenderBoxModelObject*, bool, bool, WebCore::TransformState&)
2 WebCore::RenderSVGText::mapLocalToContainer(WebCore::RenderBoxModelObject*, bool, bool, WebCore::TransformState&) const
3 WebCore::RenderObject::mapLocalToContainer(WebCore::RenderBoxModelObject*, bool, bool, WebCore::TransformState&) const
4 WebCore::RenderObject::localToAbsolute(WebCore::FloatPoint const&, bool, bool) const
5 WebCore::VisiblePosition::xOffsetForVerticalNavigation() const
6 WebCore::FrameSelection::xPosForVerticalArrowNavigation(WebCore::FrameSelection::EPositionType)
7 WebCore::FrameSelection::modify(WebCore::FrameSelection::EAlteration, WebCore::SelectionDirection, WebCore::TextGranularity, bool)
8 WebCore::TypingCommand::deleteKeyPressed(WebCore::TextGranularity, bool)
9 WebCore::TypingCommand::doApply()
10 WebCore::EditCommand::apply()
11 WebCore::TypingCommand::deleteKeyPressed(WebCore::Document*, unsigned int, WebCore::TextGranularity)
12 WebCore::Editor::deleteWithDirection(WebCore::SelectionDirection, WebCore::TextGranularity, bool, bool)
13 WebCore::executeDeleteBackward(WebCore::Frame*, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&)
14 WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const
15 WebCore::Editor::Command::execute(WebCore::Event*) const
See the comment in VisiblePosition::xOffsetForVerticalNavigation:
// This ignores transforms on purpose, for now. Vertical navigation is done
// without consulting transforms, so that 'up' in transformed text is 'up'
// relative to the text, not absolute 'up'.
return renderer->localToAbsolute(localRect.location()).x();
Each call to localToAbsolute with useTransform=false, will cause an assertion for SVG.
VisiblePosition nextLinePosition(const VisiblePosition &visiblePosition, int x) in visible_units.cpp is affected as well:
// FIXME: Can be wrong for multi-column layout and with transforms.
FloatPoint absPos = containingBlock->localToAbsolute(FloatPoint());
...
An important step towards supporting editing in SVG, is making editing work under CSS transforms perfectly.
Everytime where localToAbsolute is called with useTrafos=false, there's a potential bug - it just needs a testcase that triggers the code with CSS transform used on the <div> that's edited, no SVG involved at all.
Maybe Ryosuke can come up with some? :-)
--
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