我有一些代码,我在一个可拖动的,可调整大小的div元素上添加一个画布。它太多了粘贴在这里 - >here is the jsFiddle...为什么HTML5 canvas仅在webkit浏览器中留下工件?
它在IE-10和FF-19中正常工作,但在webkit(Chrome-25)中,当您拖动div后出现严重的工件时,调整。这里是测试运行:
How to see the artifacts in WEBKIT BROWSERS ONLY
1. Drag the gray header, shake mouse, notice NO artifacts as you shake the div
2. Drop the header, resize div using the lower right handle so that you see about an equal amount of green and purple
3. Repeat step 1, only this time artifacts are everywhere in webkit browsers (not IE 10 or FF 19)
4. Now delete the javascript code from line 11 on down (the function and call) and run fiddle again
5. Repeat the test in steps 1-3. Without the canvas, there are NO artifacts.
6. Try in non-webkit browsers. NO artifacts.
我构建的测试用例似乎指向画布是罪魁祸首。我不认为这是一个编码错误,因为非webkit可以正常工作。此外,我认为可能硬件是问题,但我重新启动/在多台机器上运行它,它是可重复的。
我是否发现浏览器错误,或者有人在我的代码中看到错误?
不可重复,铬26.0.1410.33的β-m和坏的硬件配置 – Sebas 2013-03-16 00:20:11
它的工作原理这里也很好(Chromium 25,Intel Sandybridge)。这可能是由于显卡问题或其他原因。 – 2013-03-16 00:46:40
这是可重复的@Sebas。我使用chrome 27 dev,并且有同样的问题。如果可能的话,我会降低你的评论 – Markasoftware 2013-03-16 01:20:41