Summary: | SVG drawing freeze | ||
---|---|---|---|
Product: | WebKit | Reporter: | Armin Mueller <A.Mueller> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED --- | ||
Severity: | Normal | CC: | A.Mueller, zimmermann |
Priority: | P2 | ||
Version: | 525.x (Safari 3.2) | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
URL: | http://www.mappetizer.de/en/examples/schlatterbach/index.html | ||
Bug Depends on: | 45389 | ||
Bug Blocks: |
Description
Armin Mueller
2010-09-06 05:18:15 PDT
I investigated a bit using WebInspector. It seems to me that there's a variable in mappetizer, that points to the SVGDocument contained in the <embed> object. When switching tabs the renderer is destroyed, and recreated as soon as you switch back to the "legend" tab again. But the variable in JS still references the "old" document from the first load. When constructing the renderer, it will requiest the embedded SVG, parse the DOM, and attach to our render tree - that means a new document is created - and your JS still points to the old one. If Dojo would use visibility instead of display, I guess you wouldn't see any bugs. function mv_testEmbedLegend() { try { //Problem, wenn Legende in Tab und erster Tab ist nicht Legende(also nicht sichtbar), //dann kommt Opera, Safari.... nicht an das SVGDocument var svgDoc = dojo.byId("MVlegendDoc").getSVGDocument(); if (svgDoc == null) { // Endlosschleife if (dojo.byId("MVtabContainer")) { dijit.byId("MVtabContainer").selectChild("MVlegend"); } mv_checkLegendLoaded(); } else { mv_Map.Legend = svgDoc; ... This is the culprit. The mv_Map.Legend is only cached once. Which is perfectly fine, but as WebKit recreates the embedded document, upon switching tabs, you're doomed. |