1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
---
title: Site Compatibility for Firefox 19
slug: Site_Compatibility_for_Firefox_19
translation_of: Mozilla/Firefox/Releases/19/Site_compatibility
---
<div>{{FirefoxSidebar}}</div><p>{{ draft() }}</p>
<p>Firefox 19 <a href="http://www.mozilla.org/zh-CN/firefox/beta/">Beta</a> was released on <time datetime="2013-01-10">January 10</time>. While it has been developed to maintain compatibility as much as possible, the new version includes some changes affecting backward compatibility aimed at improving interoperability with the other browsers or following the latest Web standards. Here's the list of such changes — Hope this helps whenever you test your sites or applications.</p>
<p><strong>This article only explains the changes that may affect backward compatibility for Websites</strong>. For the other new features and changes, please read the following documents:</p>
<ul>
<li><a href="http://www.mozilla.org/zh-CN/firefox/19.0beta/releasenotes/">Firefox 19 Beta Release Notes</a></li>
<li><a href="/zh-CN/docs/Firefox_19_for_developers">Firefox 19 for developers</a> (some changes are not listed yet)</li>
<li>Add-on Compatibility for Firefox 19 (Add-ons Blog)</li>
</ul>
<p>This list may be updated until the release of the final version, so please check back later.</p>
<section id="sect1">
<h2 id="CSS">CSS</h2>
<section id="sect2">
<h3 id="flexbox脱前缀">flexbox脱前缀</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=801098">Bug 801098 – Unprefix CSS3 flexbox</a></li>
</ul>
<p>The <a href="/zh-CN/docs/CSS/Using_CSS_flexible_boxes">CSS3 flexible boxes (flexbox)</a> implementation has been prefixed. From now on, use the related properties and keywords without <code>moz</code> prefix. Note that the flexbox is still disabled by default in Firefox 19. If you'd like to test the feature, open <code>about:config</code> and change the value of <code>layout.css.flexbox.enabled</code> to <code>true</code>.</p>
</section>
<section id="sect3">
<h3 id="-moz-initial属性脱前缀"><code>-moz-initial</code>属性脱前缀</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=806068">Bug 806068 – Unprefix -moz-initial</a></li>
</ul>
<p>The <code>-moz-initial</code> keyword has been unprefixed. While <code>-moz-initial</code> will remain in the meantime as an alias of <a href="/zh-CN/docs/CSS/initial"><code>initial</code></a>, it will be <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=807184">removed at some time</a>, so use the unprefixed keyword instead.</p>
</section>
<section id="sect4">
<h3 id="-moz-placeholder伪类已修改成伪元素-moz-placeholder"><code>:-moz-placeholder</code>伪类已修改成伪元素<code>::-moz-placeholder</code></h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=737786">Bug 737786 – Switch from :-moz-placeholder to ::-moz-placeholder (pseudo-class to pseudo-element)</a></li>
</ul>
<p>The <a href="/zh-CN/docs/CSS/:-moz-placeholder"><code>:-moz-placeholder</code></a> pseudo-class that matches form elements with the <a href="/zh-CN/docs/HTML/Forms_in_HTML#The_placeholder_attribute"><code>placeholder</code></a> attribute has been removed, and the <a href="/zh-CN/docs/CSS/::-moz-placeholder"><code>::-moz-placeholder</code></a> pseudo-element has been added instead. The implementation of WebKit has been a pseudo-element, and this change is a part of the standardization effort.</p>
</section>
<section id="sect5">
<h3 id="CSS动画中带有!important的关键帧规则声明将被忽略"><code>CSS动画中带有!important</code>的关键帧规则声明将被忽略</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=784466">Bug 784466 – [css3-animations] we should drop declarations in keyframe rules that have !important</a></li>
</ul>
<p>Following the latest <a href="/zh-CN/docs/CSS/Using_CSS_animations">CSS3 animations</a> spec, key frame rule declarations with the <code>!important</code> keyword are now be ignored and parse errors will be returned.</p>
</section>
<section id="sect6">
<h3 id="在aboutconfig中添加了一些控制带前缀的CSS属性的有效性的选项">在about:config中添加了一些控制带前缀的CSS属性的有效性的选项</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=804944">Bug 804944 – add preferences for sets of CSS prefixed properties</a></li>
</ul>
<p>While this is not a change affecting site compatibility, it's worth mentioning because this has been developed as part of efforts to keep compatibility. Preferences to disable some major prefixed properties have been added: <code>layout.css.prefixes.border-image</code>, <code>layout.css.prefixes.transforms</code>, <code>layout.css.prefixes.transitions</code> and <code>layout.css.prefixes.animations</code>. Web developers can disable those preferences (change the values to <code>false</code>) to test whether style rules are applied as intended even after those prefixed implementations are removed.</p>
</section>
</section>
<section id="sect7">
<h2 id="DOM">DOM</h2>
<section id="sect8">
<h3 id="Element.getElementsBy*_现在将返回HTMLCollection对象"><code>Element.getElementsBy*</code> 现在将返回<code>HTMLCollection对象</code></h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=799464">Bug 799464 – Make Element.getElementsBy* return HTMLCollection</a></li>
</ul>
<p><a href="/zh-CN/docs/DOM/element.getElementsByTagName"><code>getElementsByTagName</code></a>, <a href="/zh-CN/docs/DOM/element.getElementsByTagNameNS"><code>getElementsByTagNameNS</code></a>以及<a href="/zh-CN/docs/DOM/document.getElementsByClassName"><code>getElementsByClassName</code></a>方法返回的元素列表对象的类型从<a href="/zh-CN/docs/DOM/NodeList"><code>NodeList</code></a>(遵循DOM3核心规范)变为<a href="/zh-CN/docs/DOM/HTMLCollection"><code>HTMLCollection</code></a>(遵循DOM4规范草案).</p>
</section>
<section id="sect9">
<h3 id="hasFeatureisSupported方法现在总会返回true"><code>hasFeature</code>/<code>isSupported</code>方法现在总会返回<code>true</code></h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=801425">Bug 801425 – Make hasFeature() and isSupported() always return true</a></li>
</ul>
<p>The <code><a href="/zh-CN/docs/DOM/document.implementation">document.implementation</a>.hasFeature</code> and <a href="/zh-CN/docs/DOM/Node.isSupported"><code>Element.isSupported</code></a> methods have been changed to always return <code>true</code>. The spec has been changed because those APIs were considered useless. However the SVG features are exception; those methods continue to return the support statuses.</p>
</section>
<section id="sect10">
<h3 id="createElement(null)不再抛出异常"><code>createElement(null)</code>不再抛出异常</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=802562">Bug 802562 – createElement(null) should work like createElement("null")</a></li>
</ul>
<p>Previously the <a href="/zh-CN/docs/DOM/document.createElement"><code>document.createElement</code></a> method has thrown exception <code>INVALID_CHARACTER_ERR</code> if the argument was <code>null</code>. The method now returns the <code>HTMLUnknownElement</code> object because the argument should be treated as a string and considered to be the same code as <code>document.createElement("null")</code>.</p>
</section>
<section id="sect11">
<h3 id="document.referrer遵循了最新规范"><code>document.referrer</code>遵循了最新规范</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=809290">Bug 809290 – document.referrer should be based on the script entry point</a></li>
</ul>
<p>When the URL of a nested inline frame (<code>iframe</code>) or a grandchild window is programmatically changed from the parent window, the value of the <a href="/zh-CN/docs/DOM/document.referrer"><code>document.referrer</code></a> property now points the URL of the parent window where the script is written instead of the child window that refers directly. This is due to a change of the spec and leads to the same behavior as Internet Explorer and Opera. WebKit to follow.</p>
</section>
<section id="sect12">
<h3 id="如果修改日期未知则File.lastModifiedDate属性将返回当前日期"><code>如果修改日期未知,则File.lastModifiedDate</code>属性将返回当前日期</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=793459">Bug 793459 – Update File.lastModifiedDate to latest spec</a></li>
</ul>
<p>Following the latest <a href="http://www.w3.org/TR/FileAPI/">File API</a> spec, the <code>lastModifiedDate</code> property of a <a href="/zh-CN/docs/DOM/File"><code>File</code></a> object now returns the current date if the file's last modified date is unknown. Previously it returns <code>null</code> in such case.</p>
</section>
<section id="sect13">
<h3 id="Encoding_API_遵循了最新规范">Encoding API 遵循了最新规范</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=801487">Bug 801487 – Update StringEncoding API per the latest spec and fix some bugs</a></li>
</ul>
<p>Following a change of the <a href="http://encoding.spec.whatwg.org/#api">Encoding API</a> spec, the implementation of <code>TextEncoder</code> and <code>TextDecoder</code> has been updated.</p>
</section>
<section id="sect14">
<h3 id="移除XForms支持">移除XForms支持</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=656311">Bug 656311 – Remove XML Events, or improve the implementation</a></li>
</ul>
<p>The XML Events implementation has been removed. The development of the <a href="https://addons.mozilla.org/zh-CN/firefox/addon/mozilla-xforms/">Mozilla XForms</a> extension that has used the API has been <a href="http://www.philipp-wagner.com/blog/2011/07/the-future-of-mozilla-xforms/">practically discontinued</a>. The <a href="/zh-CN/docs/XForms">XForms</a> accessibility support has also been <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811729">removed</a> from Firefox 19.</p>
</section>
</section>
<section id="sect15">
<h2 id="JavaScript">JavaScript</h2>
<section id="sect16">
<h3 id="Map.size和Set.size从方法变成属性"><code>Map.size</code>和<code>Set.size</code>从方法变成属性</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=807001">Bug 807001 – Map.prototype.size and Set.prototype.size should be accessor properties</a></li>
</ul>
<p>The <code>size</code> method, that returns the number of key/value pairs saved in a <a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/Map"><code>Map</code></a> object and the number of values saved in a <a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/Set"><code>Set</code></a> object, are changed to be read-only properties.</p>
</section>
</section>
<section id="sect17">
<h2 id="事件处理">事件处理</h2>
<section id="sect18">
<h3 id="一些事件句柄属性只存在于body和frameset元素上">一些事件句柄属性只存在于<code>body</code>和<code>frameset</code>元素上</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=809765">Bug 809765 – Stop compiling the beforeunload attribute into an event handler on elements other than <body> and <frameset></a></li>
</ul>
<p>Previously, the <a href="/zh-CN/docs/DOM/window.onbeforeunload"><code>onbeforeunload</code></a> attribute has been recognized even if it has been set on any elements, and the named handler is called when the event is fired. To comply with the spec, it's now ignored when it has been set on elements other than <a href="/zh-CN/docs/HTML/Element/body"><code>body</code></a> and <a href="/zh-CN/docs/HTML/Element/frameset"><code>frameset</code></a>. The other attributes treated the same include <a href="/zh-CN/docs/DOM/window.onafterprint"><code>onafterprint</code></a>, <a href="/zh-CN/docs/DOM/window.onbeforeprint"><code>onbeforeprint</code></a>, <a href="/zh-CN/docs/DOM/window.onhashchange"><code>onhashchange</code></a>, <code>onoffline</code>, <code>ononline</code>, <code>onpagehide</code>, <code>onpageshow</code>, <a href="/zh-CN/docs/DOM/window.onpopstate"><code>onpopstate</code></a>, <a href="/zh-CN/docs/DOM/window.onresize"><code>onresize</code></a> and <a href="/zh-CN/docs/DOM/window.onunload"><code>onunload</code></a>.</p>
</section>
</section>
<section id="sect19">
<h2 id="文件处理">文件处理</h2>
<section id="sect20">
<h3 id="不再支持Content-Disposition响应头中的name参数"><code>不再支持Content-Disposition</code>响应头中的<code>name</code>参数</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=776339">Bug 776339 – remove support of Content-Disposition "name" parameter</a></li>
</ul>
<p>The <code>name</code> parameter included in the HTTP <code>Content-Disposition</code> header used for file downloading is now ignored. This parameter is non-standard and supported only by Firefox and Google Chrome. From now, use the standard <code>filename</code> parameter instead.</p>
</section>
</section>
<section id="sect43">
<h2 id="插件">插件</h2>
<section id="sect44">
<h3 id="移除了对Carbon_NPAPI的支持">移除了对Carbon NPAPI的支持</h3>
<ul>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=598397">Bug 598397 - remove support for Carbon NPAPI</a></li>
</ul>
<p>The Carbon event model and the Quickdraw drawing model, deprecated since Firefox 4, are no longer available. Webmasters should make sure your content works well if it requires any special plug-in. If it doesn't work on Firefox 19, please contact the plug-in vendor.</p>
</section>
</section>
|