我有一些代碼,我在一個可拖動的,可調整大小的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