排版引擎比较 (HTML5画布)

下表比较了HTML5画布元素对绘图API的支持及网页浏览器的原生支持程度,无任何插件、附加组件或ECMAScript工作区。

表格说明 编辑

引擎命名 编辑

這裡使用後端的引擎名而不是瀏覽器的名稱。使用各瀏覽器引擎的瀏覽器如下表所示。

排版引擎 发行版本 預覽版本 使用
Amaya 11.4.7[1] 不適用 停止开发;Amaya
Blink 537.36 源代码[注 1] Chromium/Chrome(28+)、Opera(15+)、YandexMicrosoft Edge(新版)
EdgeHTML 13.10586 [2] 不適用 Microsoft Edge(舊版)、通用Windows平台 (UWP)JavaScript应用
Gecko
標準版77.0.1(2018年8月8日,​5年前​(2018-08-08[3]
延長支持版(ESR)68.9.0(2018年6月26日,​5年前​(2018-06-26[4]


Beta及开发者版126.0b2[5] (2024年4月17日)
Nightly127.0a1[6] (2024年4月15日)
所有Mozilla软件,包括FirefoxSeaMonkeyGaleonCaminoK-MeleonFlock(至2.x版本);Debian IceWeaselGNU IceCat(前身为GNU IceWeasel);CyberfoxIcedoveIceapeIceowlFirefox for mobile("Fennec")
KHTML 4.12.3[7] 不適用 Konqueror[注 2]
Presto 2.12.388 不適用 停止开发;OperaOpera Mobile现在使用Blink;任天堂DS & DSi浏览器Internet Channel
Tasman (Mac版IE 5.2.3) 不適用 2003年停止开发;Mac OS XInternet Explorer 5以上
Trident 7.0(IE 11) 不適用 Internet Explorer与其他Internet Explorer shellMaxthon(仅限Microsoft Windows操作系统)、Windows Phone 8
WebKit 534.20 每日构建[注 3] Tizen(OS与浏览器)、Safari(桌面与移动版)、Google Chrome(28版本之前)、Maxthon 3Shiira, iCab 4OmniWeb 5.5+、WebAdobe AIRMidori, Adobe Dreamweaver CS4CS5Android浏览器、Palm webOS浏览器、Symbian S60浏览器、OWB英语Origyn Web BrowserSteamRekonqAroraFlock (版本3以上)、RockMelt海豚浏览器SleipnirKonqueror[注 2]
  1. ^ chromium / chromium/blink. chromium.googlesource.com. Google. [2014-05-27]. 
  2. ^ 2.0 2.1 在Konqueror中,用户可以切换排版引擎。
  3. ^ WebKit Nightly Builds. webkit.org. [2014-05-27]. 


取值 编辑

以下各格的顏色表示該排版引擎的最新版本或指定版本(如果给出版本号的话)對該功能的支援程度。没有取值的版本號表示该排版引擎首次完全支援該功能。

取值 含义
表示該排版引擎完全地支援該功能或元素。
表示該功能或元素尚未有支援。
部份 表示該功能或元素有實作進展,但並不支援所有取值,對於已支援的取值,該實作是正確的。
不正確 表示該功能或元素有實作進展,但是實作並非在所有情況都是正確無誤的。
實驗性質 表示該功能或元素有實作進展,但是使用另外的屬性或元素名(瀏覽器前輟)。多半是不完全實作或是有過多的漏洞
抛弃 表示该属性/元素不再受到支持。
每日构建 表示該功能或元素在未釋出的版本有某種程度的支援。預期將有完整支援。
依情況 表示该属性/元素仅在某些平台支持或设定在某些配置后支持。

画布功能 编辑

Trident Gecko WebKit Presto
getContext 5.0 1.8 2.0
toDataURL 1.8[g 1] [w 1] 2.1[注 1]

支持的上下文 编辑

Trident Gecko WebKit Presto
2d 5.0 1.9.1 部份 2.6
WebGL 7.0[t 1] 依情況[g 2] 依情況[w 2] 2.9.220[p 1]

画布2D渲染上下文 编辑

Trident[t 2] Gecko[g 3] WebKit[w 3] Presto[p 2][p 3]
画布状态
save 5.0 1.8 2.0
restore
转换
scale 5.0 1.8 2.0
rotate
translate
transform 2.6[注 2][p 4][p 5][p 6]
setTransform 2.6[注 2]
合成
globalAlpha 5.0 1.8 2.0
globalCompositeOperation
颜色与样式
strokeStyle 5.0 1.8 2.0
fillStyle
createLinearGradient
createRadialGradient
createPattern
线条样式
lineWidth 5.0 1.8 2.0
lineCap
lineJoin
miterLimit
阴影
shadowOffsetX 5.0 1.9.1[g 4] 2.4[注 3]
shadowOffsetY
shadowBlur
shadowColor
简单形状
clearRect 5.0 1.8 2.0
fillRect
strokeRect
复杂形状
beginPath 5.0 1.8 2.0
closePath
moveTo
lineTo
quadraticCurveTo 1.8.1[注 4]
bezierCurveTo 1.8
arcTo 1.8.1[g 5]
rect 1.8
arc
fill
stroke
clip
isPointInPath
集中管理
drawFocusRing 28.0[g 6]
文本
font 5.0 1.9.1[注 5]
textAlign 2.6
textBaseline
fillText
strokeText
measureText
图像
drawImage 5.0 1.8 2.0
createImageData 1.9.1[g 8][g 9] 2.7[p 7]
getImageData 1.9[g 9] 2.6[注 2]
putImageData 2.0[g 10][g 9]

注释 编辑

  1. ^ Presto 2.0部分支持此属性。
  2. ^ 2.0 2.1 2.2 Opera 9.5(Presto 2.1)支持此功能,但Presto 2.1.1至2.5的支持表格表明该属性不被支持。
  3. ^ Presto 2.4之前仅部分支持此属性。
  4. ^ 在Gecko 1.8中显示不正确。
  5. ^ Gecko在1.9中以不同的名字加入了实验性支持。[g 7]

参考文献 编辑

Trident参考 编辑

  1. ^ Introducing IE11: The Best Way to Experience the Web on Modern Touch Devices. Microsoft. [8 November 2013]. (原始内容存档于2013-07-26). 
  2. ^ Internet Explorer Platform Preview Release Notes, (原始内容存档于2010年4月19日) 

Gecko参考 编辑

  1. ^ 存档副本. [2016-02-06]. (原始内容存档于2012-05-02). 
  2. ^ WebGL - MDC, Mozilla, [2016-02-06], (原始内容存档于2010-06-26) 
  3. ^ Canvas tutorial - MDC, [2016-02-06], (原始内容存档于2012-08-03) 
  4. ^ Bug 310682 - Implement shadows for <html:canvas>, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  5. ^ Bug 333613 – update canvas on branch, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  6. ^ Bug 540456 - Support HTML5 canvas drawFocusRing(), Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  7. ^ Bug 436904 - implementing Canvas text spec, Mozilla, [2016-02-06], (原始内容存档于2021-03-08) 
  8. ^ Bug 433004 - Support canvas.getContext("2d").createImageData(), Mozilla, [2016-02-06], (原始内容存档于2021-03-09) 
  9. ^ 9.0 9.1 9.2 Pixel manipulation with canvas - MDC, [2016-02-06], (原始内容存档于2012-05-01) 
  10. ^ Bug 498826 - canvas putImageData doesn't implement optional arguments, Mozilla, [2016-02-06], (原始内容存档于2021-03-09) 

Webkit参考 编辑

  1. ^ WebKit DOM Programming Topics: Using the Canvas, [2016-02-06], (原始内容存档于2010-08-18) 
  2. ^ Marrin, Chris, WebGL Now Available in WebKit Nightlies, Surfin' Safari, 2009-10-19 [2016-02-06], (原始内容存档于2017-02-22) 
  3. ^ WebKit DOM reference - CanvasRenderingContext2D, [2016-02-06], (原始内容存档于2009-10-11) 

Presto参考 编辑

  1. ^ Opera Desktop Team Blog, [2016-02-06], (原始内容存档于2011-10-15) 
  2. ^ Opera 9 canvas support, [2016-02-06], (原始内容存档于2016-01-31) 
  3. ^ Opera 9.5 canvas support, [2016-02-06], (原始内容存档于2016-03-03) 
  4. ^ Presto 2.1.1 canvas support table, [2016-02-06], (原始内容存档于2016-03-03) 
  5. ^ Presto 2.5 canvas support table, [2016-02-06], (原始内容存档于2016-03-04) 
  6. ^ Presto 2.6 canvas support table, [2016-02-06], (原始内容存档于2016-03-04) 
  7. ^ Web specifications support in Opera Presto 2.7 - Core Milestone additions since Opera Presto 2.6, [2016-02-06], (原始内容存档于2011-02-13) 

其他参考 编辑

  1. ^ Amaya Binary Releases, Most recent download link in stable
  2. ^ Change log between EdgeHTML 12.10240 and 13.10586
  3. ^ Firefox 77.0.1, See All New Features, Updates and Fixes. mozilla.org. Mozilla基金會. 2020-06-03. 
  4. ^ Firefox ESR 68.9.0, See All New Features, Updates and Fixes. mozilla.org. Mozilla基金會. 2020-06-02. 
  5. ^ Index of /pub/firefox/releases/126.0b2/. 2024年4月17日 [2024年4月18日] (英語). 
  6. ^ Firefox Nightly 127.0a1, See All New Features, Updates and Fixes. 2024年4月15日 [2024年4月16日] (英語). 
  7. ^ Download for kdelibs, Most recent download link in stable

外部链接 编辑