diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/changelog thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/changelog
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/changelog 2017-06-16 16:19:16.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/changelog 2017-06-17 06:25:43.000000000 +0000
@@ -1,9 +1,9 @@
-thunderbird-trunk (56.0~a1~hg20170616r21680.364324-0ubuntu0.16.04.1~umd1) xenial; urgency=medium
+thunderbird-trunk (56.0~a1~hg20170616r21680.364430-0ubuntu0.16.04.1~umd1) xenial; urgency=medium
*
* New upstream snapshot
- -- Rico Tzschichholz Fri, 16 Jun 2017 18:19:16 +0200
+ -- Rico Tzschichholz Sat, 17 Jun 2017 08:25:43 +0200
thunderbird-trunk (55.0~a1~hg20170429r21494.355743-0ubuntu1) zesty; urgency=medium
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/config/mozconfig.in thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/config/mozconfig.in
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/config/mozconfig.in 2017-04-21 11:33:10.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/config/mozconfig.in 2017-06-17 05:40:02.000000000 +0000
@@ -60,4 +60,3 @@
ac_add_options --enable-calendar
export DISABLE_LIGHTNING_INSTALL=1
#ac_add_options --enable-alsa
-ac_add_options --disable-webrender
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/patches/series thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/patches/series
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/patches/series 2017-04-29 07:48:17.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/patches/series 2017-06-17 05:40:42.000000000 +0000
@@ -2,7 +2,7 @@
#theme-refresh-addressbook-toolbar-icons.patch
#theme-refresh-compose-toolbar-icons.patch
dont-override-general-useragent-locale.patch
-unity-menubar.patch
+#unity-menubar.patch
#test-integration/automation-output-junit-xml.patch
#test-integration/xpcshell-output-valid-junit-xml.patch
#test-fixes/mozmill-workaround-shebang-char-limit.patch
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/ast/toolkit/chrome/global/datetimebox.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/ast/toolkit/chrome/global/datetimebox.dtd
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/ast/toolkit/chrome/global/datetimebox.dtd 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/ast/toolkit/chrome/global/datetimebox.dtd 2017-06-17 06:12:23.000000000 +0000
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/changesets thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/changesets
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/changesets 2017-06-16 16:12:23.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/changesets 2017-06-17 06:19:52.000000000 +0000
@@ -1,6 +1,6 @@
af 1093:310e873293f9
ar 2529:b8dc92d8fbe9
-ast 1960:54d893528585
+ast 1961:4a0dd2ff8933
be 2734:ab0a0061496d
bg 2291:b99b3cbe5c58
bn-BD 1695:05bcb3c18003
@@ -23,7 +23,7 @@
ga-IE 2548:c460bf8dccd4
gd 2352:d7a72739f6b5
gl 3619:b010da5934a5
-he 2281:20c83ce7d7a4
+he 2283:abdd472dbeb0
hr 2383:db49953e0578
hsb 1236:5e2296ef1b58
hu 3356:7f1a47887fff
@@ -35,27 +35,27 @@
ja-JP-mac 2593:74991716bbd8
ka 335:0a97b85d9ab5
kab 669:dd0378dfea8a
-kk 1436:6f09747f7e25
+kk 1438:d6e2e4796b19
ko 2726:65600b403093
lt 3843:fd1163c6dbaa
-nb-NO 3517:3cc392dee719
+nb-NO 3520:112052b01f49
nl 6422:410de09cf445
-nn-NO 2324:b92bffa04e5d
+nn-NO 2325:f51eef1c041d
pa-IN 2408:51472df7ba3f
pl 10170:4ee216defb78
-pt-BR 3474:a6ebbdcb9628
-pt-PT 6164:5789193f6ffa
+pt-BR 3475:a7169085a7a8
+pt-PT 6166:49ebc1c08d0c
rm 1981:008096f2d677
ro 2782:6c5cdc98f45f
ru 5019:0bd1a335ee69
si 1662:e807981f0305
-sk 4885:0999a9d3a388
+sk 4886:ace4ca1c7852
sl 3330:2d92e69762ca
sq 2604:f5ac8e9891db
sr 1931:987d40634bf4
sv-SE 5591:628182f85f06
ta-LK 891:eecac09572de
-tr 3087:43efb48c07ff
+tr 3088:fe1943c45477
uk 4034:331af82ef6f5
vi 1337:dcefea2a1fdf
zh-CN 3441:11f66a36eaa6
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/he/toolkit/chrome/global/aboutRights.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/he/toolkit/chrome/global/aboutRights.dtd
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/he/toolkit/chrome/global/aboutRights.dtd 2017-06-16 16:05:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/he/toolkit/chrome/global/aboutRights.dtd 2017-06-17 06:15:09.000000000 +0000
@@ -3,8 +3,7 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
+
-
-
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/inspector.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/inspector.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/inspector.properties 2017-06-16 16:08:44.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/inspector.properties 2017-06-17 06:16:59.000000000 +0000
@@ -173,6 +173,12 @@
inspectorCopyCSSPath.label=CSS Path
inspectorCopyCSSPath.accesskey=P
+# LOCALIZATION NOTE (inspectorCopyXPath.label): This is the label
+# shown in the inspector contextual-menu for the item that lets users copy
+# the XPath of the current node
+inspectorCopyXPath.label=XPath
+inspectorCopyXPath.accesskey=X
+
# LOCALIZATION NOTE (inspectorPasteOuterHTML.label): This is the label shown
# in the inspector contextual-menu for the item that lets users paste outer
# HTML in the current node
@@ -345,6 +351,11 @@
# that corresponds to the tool displaying layout information defined in the page.
inspector.sidebar.layoutViewTitle2=Layout
+# LOCALIZATION NOTE (inspector.sidebar.newBadge):
+# This is the text of a promotion badge showed in the inspector sidebar, next to a panel
+# name. Used to promote new/recent panels such as the layout panel.
+inspector.sidebar.newBadge=new!
+
# LOCALIZATION NOTE (inspector.sidebar.animationInspectorTitle):
# This is the title shown in a tab in the side panel of the Inspector panel
# that corresponds to the tool displaying animations defined in the page.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/layout.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/layout.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/layout.properties 2017-06-16 16:08:44.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/layout.properties 2017-06-17 06:16:59.000000000 +0000
@@ -46,3 +46,11 @@
# LOCALIZATION NOTE (layout.rowColumnPositions): The row and column position of a grid
# cell shown in the grid cell infobar when hovering over the CSS grid outline.
layout.rowColumnPositions=Row %S / Column %S
+
+# LOCALIZATION NOTE (layout.promoteMessage): Text displayed in the promote bar for the
+# layout panel.
+layout.promoteMessage=Explore CSS Grids with the latest CSS Grid Inspector.
+
+# LOCALIZATION NOTE (layout.learnMore): Text for the link displayed in the promote bar
+# for the layout panel.
+layout.learnMore=Learn more…
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd 2017-06-16 16:08:44.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd 2017-06-17 06:16:59.000000000 +0000
@@ -3,9 +3,9 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
+
+
-
@@ -22,51 +21,51 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
-
-
+
-
+
@@ -74,14 +73,14 @@
-
+
-
+
-
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties 2017-06-16 16:08:44.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties 2017-06-17 06:16:59.000000000 +0000
@@ -62,6 +62,8 @@
ice_stats_heading = ICE-statistikk
ice_restart_count_label = ICE-omstarter
ice_rollback_count_label = ICE-tilbakestillinger
+ice_pair_bytes_sent = Byte sendt
+ice_pair_bytes_received = Byte mottatt
# LOCALIZATION NOTE (av_sync_label): "A/V" stands for Audio/Video.
# "sync" is an abbreviation for sychronization. This is used as
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/inspector.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/inspector.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/inspector.properties 2017-06-16 16:09:04.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/inspector.properties 2017-06-17 06:17:15.000000000 +0000
@@ -173,6 +173,12 @@
inspectorCopyCSSPath.label=CSS Path
inspectorCopyCSSPath.accesskey=P
+# LOCALIZATION NOTE (inspectorCopyXPath.label): This is the label
+# shown in the inspector contextual-menu for the item that lets users copy
+# the XPath of the current node
+inspectorCopyXPath.label=XPath
+inspectorCopyXPath.accesskey=X
+
# LOCALIZATION NOTE (inspectorPasteOuterHTML.label): This is the label shown
# in the inspector contextual-menu for the item that lets users paste outer
# HTML in the current node
@@ -345,6 +351,11 @@
# that corresponds to the tool displaying layout information defined in the page.
inspector.sidebar.layoutViewTitle2=Layout
+# LOCALIZATION NOTE (inspector.sidebar.newBadge):
+# This is the text of a promotion badge showed in the inspector sidebar, next to a panel
+# name. Used to promote new/recent panels such as the layout panel.
+inspector.sidebar.newBadge=new!
+
# LOCALIZATION NOTE (inspector.sidebar.animationInspectorTitle):
# This is the title shown in a tab in the side panel of the Inspector panel
# that corresponds to the tool displaying animations defined in the page.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/layout.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/layout.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/layout.properties 2017-06-16 16:09:04.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/layout.properties 2017-06-17 06:17:15.000000000 +0000
@@ -46,3 +46,11 @@
# LOCALIZATION NOTE (layout.rowColumnPositions): The row and column position of a grid
# cell shown in the grid cell infobar when hovering over the CSS grid outline.
layout.rowColumnPositions=Row %S / Column %S
+
+# LOCALIZATION NOTE (layout.promoteMessage): Text displayed in the promote bar for the
+# layout panel.
+layout.promoteMessage=Explore CSS Grids with the latest CSS Grid Inspector.
+
+# LOCALIZATION NOTE (layout.learnMore): Text for the link displayed in the promote bar
+# for the layout panel.
+layout.learnMore=Learn more…
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties 2017-06-16 16:09:47.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties 2017-06-17 06:17:49.000000000 +0000
@@ -5,7 +5,7 @@
Alert=Alerta
Confirm=Confirmar
ConfirmCheck=Confirmar
-Prompt=Perguntar
+Prompt=Solicitação
PromptUsernameAndPassword2=Autenticação necessária
PromptPassword2=Palavra-passe necessária
Select=Selecionar
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/sk/devtools/client/layout.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/sk/devtools/client/layout.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/sk/devtools/client/layout.properties 2017-06-16 16:10:41.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/sk/devtools/client/layout.properties 2017-06-17 06:18:31.000000000 +0000
@@ -49,6 +49,7 @@
# LOCALIZATION NOTE (layout.promoteMessage): Text displayed in the promote bar for the
# layout panel.
+layout.promoteMessage=Skúmajte CSS mriežky pomocou nového prieskumníka.
# LOCALIZATION NOTE (layout.learnMore): Text for the link displayed in the promote bar
# for the layout panel.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/netError.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/netError.dtd
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/netError.dtd 2017-06-16 16:11:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/netError.dtd 2017-06-17 06:19:16.000000000 +0000
@@ -68,10 +68,10 @@
Site bağlantı isteğine hiç beklenmeyen bir biçimde karşılık verdi ve tarayıcı bu girişimi daha fazla sürdürmeyecek.
">
-
+
Görüntülemeye çalıştığınız sayfa gösterilemiyor çünkü alınan verilerin gerçekliği doğrulanamadı.Bu sorunu bildirmek için lütfen site sahipleriyle iletişime geçin. ">
-
+
Sunucunun yapılandırmasıyla ilgili bir sorun olabilir veya birisi sunucuyu taklit etmeye çalışıyor olabilir.
Daha önce bu sunucuya sorunsuz bağlandıysanız sorun geçici olabilir ve daha sonra yeniden bağlanmayı deneyebilirsiniz.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/security/csp.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/security/csp.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/security/csp.properties 2017-06-16 16:11:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/security/csp.properties 2017-06-17 06:19:16.000000000 +0000
@@ -91,6 +91,10 @@
# LOCALIZATION NOTE (deprecatedReferrerDirective):
# %1$S is the value of the deprecated Referrer Directive.
deprecatedReferrerDirective = Referrer direktifi ‘%1$S’ eskimiştir. Onun yerine lütfen Referrer-Policy header’ını kullanın.
+# LOCALIZATION NOTE (IgnoringSrcBecauseOfDirective):
+# %1$S is the name of the src that is ignored.
+# %2$S is the name of the directive that causes the src to be ignored.
+IgnoringSrcBecauseOfDirective=‘%2$S’ direktifi nedeniyle ‘%1$S’ görmezden geliniyor.
# CSP Errors:
# LOCALIZATION NOTE (couldntParseInvalidSource):
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutRights.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutRights.dtd
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutRights.dtd 2017-06-16 16:11:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutRights.dtd 2017-06-17 06:19:16.000000000 +0000
@@ -3,9 +3,9 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
+
+
-
@@ -22,51 +21,51 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
-
-
+
-
+
@@ -74,14 +73,14 @@
-
+
-
+
-
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties 2017-06-16 16:11:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties 2017-06-17 06:19:16.000000000 +0000
@@ -62,6 +62,8 @@
ice_stats_heading = ICE istatistikleri
ice_restart_count_label = ICE yeniden başlatma
ice_rollback_count_label = ICE geri döndürme
+ice_pair_bytes_sent = Gönderilen bayt
+ice_pair_bytes_received = Alınan bayt
# LOCALIZATION NOTE (av_sync_label): "A/V" stands for Audio/Video.
# "sync" is an abbreviation for sychronization. This is used as
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd 2017-06-16 16:11:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd 2017-06-17 06:19:16.000000000 +0000
@@ -3,6 +3,7 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/browser-tabsintitlebar.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/browser-tabsintitlebar.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/browser-tabsintitlebar.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/browser-tabsintitlebar.js 2017-06-17 06:11:12.000000000 +0000
@@ -231,9 +231,9 @@
}
// Then add a negative margin to the titlebar, so that the following elements
- // will overlap it by the lesser of the titlebar height or the tabstrip+menu.
- let minTitlebarOrTabsHeight = Math.min(titlebarContentHeight, tabAndMenuHeight);
- titlebar.style.marginBottom = "-" + minTitlebarOrTabsHeight + "px";
+ // will overlap it by the greater of the titlebar height or the tabstrip+menu.
+ let maxTitlebarOrTabsHeight = Math.max(titlebarContentHeight, tabAndMenuHeight);
+ titlebar.style.marginBottom = "-" + maxTitlebarOrTabsHeight + "px";
// Finally, size the placeholders:
if (AppConstants.platform == "macosx") {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/test/performance/browser_startup.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/test/performance/browser_startup.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/test/performance/browser_startup.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/test/performance/browser_startup.js 2017-06-17 06:11:13.000000000 +0000
@@ -47,20 +47,42 @@
// For the following phases of startup we have only a black list for now
// We are at this phase after creating the first browser window (ie. after final-ui-startup).
- "before opening first browser window": {},
+ "before opening first browser window": {blacklist: {
+ components: new Set([
+ "nsAsyncShutdown.js",
+ ]),
+ modules: new Set([
+ "resource://gre/modules/PlacesBackups.jsm",
+ "resource://gre/modules/PlacesUtils.jsm",
+ ])
+ }},
// We reach this phase right after showing the first browser window.
// This means that anything already loaded at this point has been loaded
// before first paint and delayed it.
"before first paint": {blacklist: {
components: new Set([
- "nsSearchService.js",
+ "PageIconProtocolHandler.js",
+ "PlacesCategoriesStarter.js",
"UnifiedComplete.js",
+ "nsPlacesExpiration.js",
+ "nsSearchService.js",
]),
modules: new Set([
- "resource://gre/modules/ContextualIdentityService.jsm"
+ "resource:///modules/AboutNewTab.jsm",
+ "resource:///modules/DirectoryLinksProvider.jsm",
+ "resource://gre/modules/BookmarkHTMLUtils.jsm",
+ "resource://gre/modules/Bookmarks.jsm",
+ "resource://gre/modules/ContextualIdentityService.jsm",
+ "resource://gre/modules/NewTabUtils.jsm",
+ "resource://gre/modules/PageThumbs.jsm",
+ "resource://gre/modules/PlacesSyncUtils.jsm",
+ "resource://gre/modules/Sqlite.jsm",
]),
services: new Set([
+ "@mozilla.org/browser/annotation-service;1",
+ "@mozilla.org/browser/favicon-service;1",
+ "@mozilla.org/browser/nav-bookmarks-service;1",
"@mozilla.org/browser/search-service;1",
])
}},
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/content/panelUI.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/content/panelUI.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/content/panelUI.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/content/panelUI.js 2017-06-17 06:11:13.000000000 +0000
@@ -515,12 +515,14 @@
multiView.setAttribute("nosubviews", "true");
multiView.setAttribute("viewCacheId", "appMenu-viewCache");
if (gPhotonStructure) {
+ tempPanel.setAttribute("photon", true);
multiView.setAttribute("mainViewId", viewNode.id);
multiView.appendChild(viewNode);
}
tempPanel.appendChild(multiView);
- multiView.setAttribute("mainViewIsSubView", "true");
- multiView.setMainView(viewNode);
+ if (!gPhotonStructure) {
+ multiView.setMainView(viewNode);
+ }
viewNode.classList.add("cui-widget-panelview");
let viewShown = false;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/PanelMultiView.jsm thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/PanelMultiView.jsm
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/PanelMultiView.jsm 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/PanelMultiView.jsm 2017-06-17 06:11:13.000000000 +0000
@@ -167,9 +167,6 @@
get _mainView() {
return this._mainViewId ? this.document.getElementById(this._mainViewId) : null;
}
- get showingSubViewAsMainView() {
- return this.node.getAttribute("mainViewIsSubView") == "true";
- }
get _transitioning() {
return this.__transitioning;
@@ -460,6 +457,7 @@
};
// Make sure that new panels always have a title set.
+ let cancel = false;
if (this.panelViews && aAnchor) {
if (aAnchor && !viewNode.hasAttribute("title"))
viewNode.setAttribute("title", aAnchor.getAttribute("label"));
@@ -468,17 +466,17 @@
if (custWidget) {
if (custWidget.onInit)
custWidget.onInit(aAnchor);
- custWidget.onViewShowing({ target: aAnchor, detail });
+ custWidget.onViewShowing({ target: viewNode, preventDefault: () => cancel = true, detail });
}
}
- viewNode.setAttribute("current", true);
if (this.panelViews && this._mainViewWidth)
viewNode.style.maxWidth = viewNode.style.minWidth = this._mainViewWidth + "px";
let evt = new window.CustomEvent("ViewShowing", { bubbles: true, cancelable: true, detail });
viewNode.dispatchEvent(evt);
- let cancel = evt.defaultPrevented;
+ if (!cancel)
+ cancel = evt.defaultPrevented;
if (detail.blockers.size) {
try {
let results = await Promise.all(detail.blockers);
@@ -494,6 +492,7 @@
}
this._currentSubView = viewNode;
+ viewNode.setAttribute("current", true);
if (this.panelViews) {
this.node.setAttribute("viewtype", "subview");
if (!playTransition)
@@ -625,8 +624,8 @@
this._viewContainer.removeAttribute("transition-reverse");
- evt = new window.CustomEvent("ViewShown", { bubbles: true, cancelable: false });
- viewNode.dispatchEvent(evt);
+ viewNode.dispatchEvent(new window.CustomEvent("ViewShown",
+ { bubbles: true, cancelable: false }));
}, { once: true });
});
}, { once: true });
@@ -638,6 +637,8 @@
// Now that the subview is visible, we can check the height of the
// description elements it contains.
this.descriptionHeightWorkaround(viewNode);
+ viewNode.dispatchEvent(new window.CustomEvent("ViewShown",
+ { bubbles: true, cancelable: false }));
});
this._shiftMainView(aAnchor);
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/test/browser_947914_button_history.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/test/browser_947914_button_history.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/test/browser_947914_button_history.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/test/browser_947914_button_history.js 2017-06-17 06:11:13.000000000 +0000
@@ -14,8 +14,10 @@
let historyButton = document.getElementById("history-panelmenu");
ok(historyButton, "History button appears in Panel Menu");
- historyButton.click();
let historyPanel = document.getElementById("PanelUI-history");
+ let promise = BrowserTestUtils.waitForEvent(historyPanel, "ViewShown");
+ historyButton.click();
+ await promise;
ok(historyPanel.getAttribute("current"), "History Panel is in view");
let panelHiddenPromise = promisePanelHidden(window);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/ext-browserAction.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/ext-browserAction.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/ext-browserAction.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/ext-browserAction.js 2017-06-17 06:11:13.000000000 +0000
@@ -130,6 +130,7 @@
let view = document.createElementNS(XUL_NS, "panelview");
view.id = this.viewId;
view.setAttribute("flex", "1");
+ view.setAttribute("extension", true);
document.getElementById("PanelUI-multiView").appendChild(view);
document.addEventListener("popupshowing", this);
@@ -171,6 +172,10 @@
// Google Chrome onClicked extension API.
if (popupURL) {
try {
+ // FIXME: The line below needs to change eventually, but for now:
+ // ensure the view is _always_ visible _before_ `popup.attach()` is
+ // called. PanelMultiView.jsm dictates different behavior.
+ event.target.setAttribute("current", true);
let popup = this.getPopup(document.defaultView, popupURL);
event.detail.addBlocker(popup.attach(event.target));
} catch (e) {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js 2017-06-17 06:11:13.000000000 +0000
@@ -3,6 +3,8 @@
"use strict";
add_task(async function testPopupBorderRadius() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
+
let extension = ExtensionTestUtils.loadExtension({
background() {
browser.tabs.query({active: true, currentWindow: true}, tabs => {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/colors.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/colors.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/colors.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/colors.xul 2017-06-17 06:11:13.000000000 +0000
@@ -26,7 +26,7 @@
-
+
@@ -36,18 +36,18 @@
-
+
-
+ &color;
-
+ &textColor.label;
-
+ &backgroundColor.label;
@@ -58,17 +58,17 @@
preference="browser.display.use_system_colors"/>
-
+
-
+ &links;
-
+ &linkColor.label;
-
+ &visitedLinkColor.label;
@@ -87,16 +87,18 @@
#endif
&overrideDefaultPageColors.label;
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/connection.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/connection.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/connection.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/connection.xul 2017-06-17 06:11:13.000000000 +0000
@@ -65,7 +65,7 @@
-
+ &proxyTitle.label;
@@ -81,12 +81,12 @@
-
+ &http.label;
-
+ &port.label;
@@ -101,36 +101,36 @@
-
+ &ssl.label;
-
+ &port.label;
-
+ &ftp.label;
-
+ &port.label;
-
+ &socks.label;
-
+ &port.label;
@@ -145,9 +145,9 @@
-
+ &noproxy.label;
-
+ &noproxyExplain.label;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/containers.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/containers.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/containers.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/containers.xul 2017-06-17 06:11:13.000000000 +0000
@@ -31,14 +31,14 @@
-
+ &name.label;
-
+ &icon.label;
-
+ &color.label;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/cookies.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/cookies.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/cookies.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/cookies.xul 2017-06-17 06:11:13.000000000 +0000
@@ -39,7 +39,7 @@
accesskey="&searchFilter.accesskey;"/>
-
+ &cookiesonsystem.label;
-
+ &props.name.label;
-
+ &props.value.label;
-
+ &props.domain.label;
-
+ &props.path.label;
-
+ &props.secure.label;
-
+ &props.expires.label;
-
+ &props.container.label;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/donottrack.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/donottrack.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/donottrack.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/donottrack.xul 2017-06-17 06:11:13.000000000 +0000
@@ -36,8 +36,7 @@
&doNotTrackTPInfo.description;
+ href="https://www.mozilla.org/dnt">&doNotTrackLearnMore.label;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/fonts.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/fonts.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/fonts.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/fonts.xul 2017-06-17 06:11:13.000000000 +0000
@@ -104,9 +104,8 @@
-
+ &size.label;
@@ -142,58 +141,65 @@
&serif.label;
-
+
+
+
&sans-serif.label;
-
+
+
+
&monospace.label;
-
+
+
+
-
+ &size.label;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -247,12 +253,11 @@
-
+ &languages.customize.Fallback2.grouplabel;
&languages.customize.Fallback2.desc;
-
+ &languages.customize.Fallback2.label;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/in-content-new/findInPage.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/in-content-new/findInPage.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/in-content-new/findInPage.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/in-content-new/findInPage.js 2017-06-17 06:11:13.000000000 +0000
@@ -5,16 +5,12 @@
/* import-globals-from preferences.js */
var gSearchResultsPane = {
- findSelection: null,
listSearchTooltips: new Set(),
listSearchMenuitemIndicators: new Set(),
searchResultsCategory: null,
searchInput: null,
init() {
- let controller = this.getSelectionController();
- this.findSelection = controller.getSelection(Ci.nsISelectionController.SELECTION_FIND);
- this.findSelection.setColors("currentColor", "#ffe900", "currentColor", "#003eaa");
this.searchResultsCategory = document.getElementById("category-search-results");
this.searchInput = document.getElementById("searchInput");
@@ -123,6 +119,10 @@
* Returns true when atleast one instance of search phrase is found, otherwise false
*/
highlightMatches(textNodes, nodeSizes, textSearch, searchPhrase) {
+ if (!searchPhrase) {
+ return false;
+ }
+
let indices = [];
let i = -1;
while ((i = textSearch.indexOf(searchPhrase, i + 1)) >= 0) {
@@ -160,23 +160,32 @@
let range = document.createRange();
range.setStart(startNode, startValue);
range.setEnd(endNode, endValue);
- this.findSelection.addRange(range);
+ this.getFindSelection(startNode.ownerGlobal).addRange(range);
}
return indices.length > 0;
},
- getSelectionController() {
+ /**
+ * Get the selection instance from given window
+ *
+ * @param Object win
+ * The window object points to frame's window
+ */
+ getFindSelection(win) {
// Yuck. See bug 138068.
- let docShell = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell);
+ let docShell = win.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIDocShell);
let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
+ .getInterface(Ci.nsISelectionDisplay)
+ .QueryInterface(Ci.nsISelectionController);
+
+ let selection = controller.getSelection(Ci.nsISelectionController.SELECTION_FIND);
+ selection.setColors("currentColor", "#ffe900", "currentColor", "#003eaa");
- return controller;
+ return selection;
},
get strings() {
@@ -191,14 +200,14 @@
* to search for filted query in
*/
searchFunction(event) {
- let query = event.target.value.trim().toLowerCase();
- this.findSelection.removeAllRanges();
+ this.query = event.target.value.trim().toLowerCase();
+ this.getFindSelection(window).removeAllRanges();
this.removeAllSearchTooltips();
this.removeAllSearchMenuitemIndicators();
let srHeader = document.getElementById("header-searchResults");
- if (query) {
+ if (this.query) {
// Showing the Search Results Tag
gotoPref("paneSearchResults");
@@ -219,7 +228,7 @@
for (let i = 0; i < rootPreferencesChildren.length; i++) {
if (rootPreferencesChildren[i].className != "header" &&
rootPreferencesChildren[i].className != "no-results-message" &&
- this.searchWithinNode(rootPreferencesChildren[i], query)) {
+ this.searchWithinNode(rootPreferencesChildren[i], this.query)) {
rootPreferencesChildren[i].hidden = false;
resultsFound = true;
} else {
@@ -236,15 +245,15 @@
let strings = this.strings;
document.getElementById("sorry-message").textContent = AppConstants.platform == "win" ?
- strings.getFormattedString("searchResults.sorryMessageWin", [query]) :
- strings.getFormattedString("searchResults.sorryMessageUnix", [query]);
+ strings.getFormattedString("searchResults.sorryMessageWin", [this.query]) :
+ strings.getFormattedString("searchResults.sorryMessageUnix", [this.query]);
let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "preferences";
let brandName = document.getElementById("bundleBrand").getString("brandShortName");
document.getElementById("need-help").innerHTML =
strings.getFormattedString("searchResults.needHelp2", [helpUrl, brandName]);
} else {
// Creating tooltips for all the instances found
- this.listSearchTooltips.forEach((node) => this.createSearchTooltip(node, query));
+ this.listSearchTooltips.forEach((anchorNode) => this.createSearchTooltip(anchorNode, this.query));
}
} else {
this.searchResultsCategory.hidden = true;
@@ -368,25 +377,26 @@
* Inserting a div structure infront of the DOM element matched textContent.
* Then calculation the offsets to position the tooltip in the correct place.
*
- * @param Node currentNode
+ * @param Node anchorNode
* DOM Element
* @param String query
* Word or words that are being searched for
*/
- createSearchTooltip(currentNode, query) {
- let searchTooltip = document.createElement("span");
+ createSearchTooltip(anchorNode, query) {
+ let searchTooltip = anchorNode.ownerDocument.createElement("span");
searchTooltip.setAttribute("class", "search-tooltip");
searchTooltip.textContent = query;
- currentNode.parentElement.classList.add("search-tooltip-parent");
- currentNode.parentElement.appendChild(searchTooltip);
+ anchorNode.setAttribute("data-has-tooltip", "true");
+ anchorNode.parentElement.classList.add("search-tooltip-parent");
+ anchorNode.parentElement.appendChild(searchTooltip);
// In order to get the up-to-date position of each of the nodes that we're
// putting tooltips on, we have to flush layout intentionally, and that
// this is the result of a XUL limitation (bug 1363730).
- let anchorRect = currentNode.getBoundingClientRect();
+ let anchorRect = anchorNode.getBoundingClientRect();
let tooltipRect = searchTooltip.getBoundingClientRect();
- let parentRect = currentNode.parentElement.getBoundingClientRect();
+ let parentRect = anchorNode.parentElement.getBoundingClientRect();
let offSet = (anchorRect.width / 2) - (tooltipRect.width / 2);
let relativeOffset = anchorRect.left - parentRect.left;
@@ -404,6 +414,7 @@
searchTooltip.parentElement.classList.remove("search-tooltip-parent");
searchTooltip.remove();
}
+ this.listSearchTooltips.forEach((anchorNode) => anchorNode.removeAttribute("data-has-tooltip"));
this.listSearchTooltips.clear();
},
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/in-content-new/main.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/in-content-new/main.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/in-content-new/main.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/in-content-new/main.xul 2017-06-17 06:11:13.000000000 +0000
@@ -321,7 +321,7 @@
-
+ &defaultSearchEngine.label;
&chooseYourDefaultSearchEngine.label;
@@ -344,7 +344,7 @@
-
+ &oneClickSearchEngines.label;
&chooseWhichOneToDisplay.label;
*:not([data-hidden-from-search])");
+
+ for (let i = 0; i < subDialogsChildren.length; i++) {
+ gSearchResultsPane.searchWithinNode(subDialogsChildren[i], gSearchResultsPane.query);
+ }
+
+ // Creating tooltips for all the instances found
+ for (let node of gSearchResultsPane.listSearchTooltips) {
+ if (!node.getAttribute("data-has-tooltip")) {
+ gSearchResultsPane.createSearchTooltip(node, gSearchResultsPane.query);
+ }
+ }
},
_onResize(mutations) {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/permissions.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/permissions.xul
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/permissions.xul 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/permissions.xul 2017-06-17 06:11:13.000000000 +0000
@@ -32,7 +32,7 @@
-
+ &address.label;
-
+
@@ -45,7 +45,7 @@
&clearDataSettings2.label;
-
+ &historySection.label;
-
+ &dataSection.label;
{
+ let worker = new content.Worker("file_workerPerformance.js");
+ worker.onmessage = function(e) {
+ if (e.data.type == "status") {
+ ok(e.data.status, e.data.msg);
+ } else if (e.data.type == "finish") {
+ resolve();
+ } else {
+ ok(false, "Unknown message type");
+ resolve();
+ }
+ }
+ worker.postMessage({type: "runTests"});
+ });
+ });
+
+ await BrowserTestUtils.removeTab(tab);
+});
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/resistfingerprinting/test/browser/file_workerPerformance.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/resistfingerprinting/test/browser/file_workerPerformance.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/resistfingerprinting/test/browser/file_workerPerformance.js 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/resistfingerprinting/test/browser/file_workerPerformance.js 2017-06-17 06:11:13.000000000 +0000
@@ -0,0 +1,33 @@
+function ok(a, msg) {
+ postMessage({type: "status", status: !!a, msg});
+}
+
+function is(a, b, msg) {
+ ok(a === b, msg);
+}
+
+function finish() {
+ postMessage({type: "finish"});
+}
+
+function runTests() {
+ // Try to add some entries.
+ performance.mark("Test");
+ performance.mark("Test-End");
+ performance.measure("Test-Measure", "Test", "Test-End");
+
+ // Check that no entries for performance.getEntries/getEntriesByType/getEntriesByName.
+ is(performance.getEntries().length, 0, "No entries for performance.getEntries() for workers");
+ is(performance.getEntriesByType("resource").length, 0, "No entries for performance.getEntriesByType() for workers");
+ is(performance.getEntriesByName("Test", "mark").length, 0, "No entries for performance.getEntriesByName() for workers");
+
+ finish();
+}
+
+self.onmessage = function(e) {
+ if (e.data.type === "runTests") {
+ runTests();
+ } else {
+ ok(false, "Unknown message type");
+ }
+}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/uitour/test/browser_UITour_sync.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/uitour/test/browser_UITour_sync.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/uitour/test/browser_UITour_sync.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/uitour/test/browser_UITour_sync.js 2017-06-17 06:11:13.000000000 +0000
@@ -51,17 +51,27 @@
// The showFirefoxAccounts API is sync related, so we test that here too...
add_UITour_task(async function test_firefoxAccountsNoParams() {
+ info("Load about:accounts containing an iframe to https://accounts.firefox.com");
await gContentAPI.showFirefoxAccounts();
await BrowserTestUtils.browserLoaded(gTestTab.linkedBrowser, false,
"about:accounts?action=signup&entrypoint=uitour");
});
+
add_UITour_task(async function test_firefoxAccountsValidParams() {
+ info("Load about:accounts containing an iframe to https://accounts.firefox.com");
await gContentAPI.showFirefoxAccounts({ utm_foo: "foo", utm_bar: "bar" });
await BrowserTestUtils.browserLoaded(gTestTab.linkedBrowser, false,
"about:accounts?action=signup&entrypoint=uitour&utm_foo=foo&utm_bar=bar");
});
+add_UITour_task(async function test_firefoxAccountsWithEmail() {
+ info("Load about:accounts containing an iframe to https://accounts.firefox.com");
+ await gContentAPI.showFirefoxAccounts(null, "foo@bar.com");
+ await BrowserTestUtils.browserLoaded(gTestTab.linkedBrowser, false,
+ "about:accounts?action=signup&entrypoint=uitour&email=foo%40bar.com");
+});
+
add_UITour_task(async function test_firefoxAccountsNonAlphaValue() {
// All characters in the value are allowed, but they must be automatically escaped.
// (we throw a unicode character in there too - it's not auto-utf8 encoded,
@@ -69,6 +79,7 @@
let value = "foo& /=?:\\\xa9";
// encodeURIComponent encodes spaces to %20 but we want "+"
let expected = encodeURIComponent(value).replace(/%20/g, "+");
+ info("Load about:accounts containing an iframe to https://accounts.firefox.com");
await gContentAPI.showFirefoxAccounts({ utm_foo: value });
await BrowserTestUtils.browserLoaded(gTestTab.linkedBrowser, false,
"about:accounts?action=signup&entrypoint=uitour&utm_foo=" + expected);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/uitour/UITour.jsm thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/uitour/UITour.jsm
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/uitour/UITour.jsm 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/uitour/UITour.jsm 2017-06-17 06:11:13.000000000 +0000
@@ -576,6 +576,9 @@
return false;
}
+ if (data.email) {
+ p.append("email", data.email);
+ }
// We want to replace the current tab.
browser.loadURI("about:accounts?" + p.toString());
break;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/uitour/UITour-lib.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/uitour/UITour-lib.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/uitour/UITour-lib.js 2017-06-16 16:00:28.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/uitour/UITour-lib.js 2017-06-17 06:11:13.000000000 +0000
@@ -556,6 +556,8 @@
* is a string, begins with "utm_" and contains only only alphanumeric
* characters, dashes or underscores. The values may be any string and will
* automatically be encoded.
+ * @param {String} email - A string containing the default email account
+ * for the URL opened by the browser.
* @since 31, 47 for `extraURLCampaignParams`
* @example
* // Will open about:accounts?action=signup&entrypoint=uitour
@@ -567,10 +569,15 @@
* 'utm_foo': 'bar',
* 'utm_bar': 'baz'
* });
+ * @example
+ * // Will open:
+ * // about:accounts?action=signup&entrypoint=uitour&email=foo%40bar.com
+ * Mozilla.UITour.showFirefoxAccounts(null, "foo@bar.com");
*/
- Mozilla.UITour.showFirefoxAccounts = function(extraURLCampaignParams) {
+ Mozilla.UITour.showFirefoxAccounts = function(extraURLCampaignParams, email) {
_sendEvent("showFirefoxAccounts", {
extraURLCampaignParams: JSON.stringify(extraURLCampaignParams),
+ email
});
};
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/extensions/onboarding/content/onboarding.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/extensions/onboarding/content/onboarding.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/extensions/onboarding/content/onboarding.js 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/extensions/onboarding/content/onboarding.js 2017-06-17 06:11:13.000000000 +0000
@@ -121,6 +121,8 @@
tourNameId: "onboarding.tour-default-browser",
getPage(win) {
let div = win.document.createElement("div");
+ let defaultBrowserButtonId = win.matchMedia("(-moz-os-version: windows-win7)").matches ?
+ "onboarding.tour-default-browser.win7.button" : "onboarding.tour-default-browser.button";
div.innerHTML = `
@@ -129,6 +131,9 @@
+
`;
return div;
},
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/extensions/onboarding/content/onboarding-tour-agent.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/extensions/onboarding/content/onboarding-tour-agent.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/extensions/onboarding/content/onboarding-tour-agent.js 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/extensions/onboarding/content/onboarding-tour-agent.js 2017-06-17 06:11:13.000000000 +0000
@@ -15,6 +15,9 @@
case "onboarding-tour-customize-button":
Mozilla.UITour.showHighlight("customize");
break;
+ case "onboarding-tour-default-browser-button":
+ Mozilla.UITour.setConfiguration("defaultBrowser");
+ break;
case "onboarding-tour-private-browsing-button":
Mozilla.UITour.showHighlight("privateWindow");
break;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/browser.inc.css thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/browser.inc.css
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/browser.inc.css 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/browser.inc.css 2017-06-17 06:11:13.000000000 +0000
@@ -5,16 +5,17 @@
%ifdef MOZ_PHOTON_THEME
%ifdef CAN_DRAW_IN_TITLEBAR
/* Add space for dragging the window */
-%ifdef MENUBAR_CAN_AUTOHIDE
-:root[tabsintitlebar][sizemode=normal] #toolbar-menubar[autohide=true] ~ #TabsToolbar {
- padding-inline-start: 40px;
-}
+%ifdef MOZ_WIDGET_COCOA
+:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar
+%elifdef MENUBAR_CAN_AUTOHIDE
+:root[tabsintitlebar][sizemode=normal] #toolbar-menubar[autohide=true] ~ #TabsToolbar
%else
-:root[tabsintitlebar][sizemode=normal] #TabsToolbar {
+:root[tabsintitlebar][sizemode=normal] #TabsToolbar
+%endif
+{
padding-inline-start: 40px;
}
%endif
-%endif
/* Go button */
.urlbar-go-button {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/customizableui/panelUI.inc.css thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/customizableui/panelUI.inc.css
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/customizableui/panelUI.inc.css 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/customizableui/panelUI.inc.css 2017-06-17 06:11:13.000000000 +0000
@@ -261,7 +261,8 @@
}
#appMenu-popup > .panel-arrowcontainer > .panel-arrowcontent,
-#PanelUI-popup > .panel-arrowcontainer > .panel-arrowcontent {
+#PanelUI-popup > .panel-arrowcontainer > .panel-arrowcontent,
+panel[photon] > .panel-arrowcontainer > .panel-arrowcontent {
overflow: hidden;
}
@@ -338,7 +339,8 @@
/* START photonpanelview adjustments */
-#appMenu-popup > .panel-arrowcontainer > .panel-arrowcontent {
+#appMenu-popup > .panel-arrowcontainer > .panel-arrowcontent,
+panel[photon] > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
border-radius: 0;
}
@@ -348,7 +350,8 @@
padding: 6px 0;
}
-#appMenu-popup panelview {
+#appMenu-popup panelview,
+#customizationui-widget-multiview panelview:not([extension]) {
min-width: @menuPanelWidth@;
}
@@ -2076,4 +2079,14 @@
margin-inline-end: 0;
}
+photonpanelmultiview#customizationui-widget-multiview > .panel-viewcontainer {
+ overflow: hidden;
+}
+
+/* This is explicitly overriding the overflow properties set above. */
+photonpanelmultiview .cui-widget-panelview {
+ overflow-x: visible;
+ overflow-y: visible;
+}
+
/* END photon adjustments */
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/incontentprefs/preferences.inc.css thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/incontentprefs/preferences.inc.css
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/incontentprefs/preferences.inc.css 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/incontentprefs/preferences.inc.css 2017-06-17 06:11:13.000000000 +0000
@@ -272,6 +272,11 @@
margin-inline-start: 0;
}
+groupbox {
+ /* Give more available space for displaying tooltip on scrollable groupbox */
+ margin-top: 15px !important;
+}
+
#tabsElement {
margin-inline-end: 4px; /* add the 4px end-margin of other elements */
}
@@ -614,6 +619,7 @@
}
.search-tooltip {
+ font-size: 1.25rem;
position: absolute;
padding: 0 10px;
bottom: 100%;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/themes/shared/urlbarSearchSuggestionsNotification.inc.css 2017-06-17 06:11:13.000000000 +0000
@@ -119,7 +119,7 @@
#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"][animate] hbox[anonid="search-suggestions-hint-typing"] {
overflow: hidden;
- max-width: 8ch;
+ max-width: 12ch;
width: 0;
animation-name: search-suggestions-hint-typing;
animation-duration: 500ms;
@@ -137,7 +137,7 @@
@keyframes search-suggestions-hint-typing {
from { width: 0; }
- to { width: 8ch; }
+ to { width: 12ch; }
}
#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"][animate] hbox[anonid="search-suggestions-hint-box"] {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/browser.ini thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/browser.ini
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/browser.ini 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/browser.ini 2017-06-17 06:11:13.000000000 +0000
@@ -2,11 +2,5 @@
subsuite = screenshots
support-files =
head.js
- mozscreenshots/extension/lib/permissionPrompts.html
- mozscreenshots/extension/lib/controlCenter/password.html
- mozscreenshots/extension/lib/controlCenter/mixed.html
- mozscreenshots/extension/lib/controlCenter/mixed_active.html
- mozscreenshots/extension/lib/controlCenter/mixed_passive.html
- mozscreenshots/extension/lib/borderify.xpi
[browser_screenshots.js]
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/head.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/head.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/head.js 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/head.js 2017-06-17 06:11:13.000000000 +0000
@@ -8,7 +8,7 @@
const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
-const EXTENSION_DIR = "chrome://mochitests/content/extensions/mozscreenshots/browser/";
+const EXTENSION_DIR = "chrome://mochitests/content/browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/";
let TestRunner;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm 2017-06-17 06:11:13.000000000 +0000
@@ -16,7 +16,7 @@
let {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
-const RESOURCE_PATH = "extensions/mozscreenshots/browser/chrome/mozscreenshots/lib/controlCenter";
+const RESOURCE_PATH = "browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/chrome/mozscreenshots/lib/controlCenter";
const HTTP_PAGE = "http://example.com/";
const HTTPS_PAGE = "https://example.com/";
const PERMISSIONS_PAGE = "https://test1.example.com/";
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm 2017-06-17 06:11:13.000000000 +0000
@@ -13,7 +13,7 @@
Cu.import("resource://testing-common/ContentTask.jsm");
Cu.import("resource://testing-common/BrowserTestUtils.jsm");
-const URL = "https://test1.example.com/extensions/mozscreenshots/browser/chrome/mozscreenshots/lib/permissionPrompts.html";
+const URL = "https://test1.example.com/browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/chrome/mozscreenshots/lib/permissionPrompts.html";
let lastTab = null;
this.PermissionPrompts = {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/Makefile.in thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/Makefile.in
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/Makefile.in 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/tools/mozscreenshots/mozscreenshots/extension/Makefile.in 2017-06-17 06:11:13.000000000 +0000
@@ -2,11 +2,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions
-GENERATED_DIRS = $(TEST_EXTENSIONS_DIR)
+OUTPUT_DIR = $(DEPTH)/_tests/testing/mochitest/browser/browser/tools/mozscreenshots/mozscreenshots/extension
+GENERATED_DIRS = $(OUTPUT_DIR)
XPI_PKGNAME = mozscreenshots@mozilla.org
include $(topsrcdir)/config/rules.mk
libs::
- (cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - $(XPI_NAME)) | (cd $(TEST_EXTENSIONS_DIR) && tar -xf -)
+ (cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - $(XPI_NAME)) | (cd $(OUTPUT_DIR) && tar -xf -)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/build/moz.configure/toolchain.configure thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/build/moz.configure/toolchain.configure
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/build/moz.configure/toolchain.configure 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/build/moz.configure/toolchain.configure 2017-06-17 06:11:13.000000000 +0000
@@ -127,7 +127,7 @@
@depends_if(ccache, ccache_is_sccache)
def using_sccache(ccache, ccache_is_sccache):
- return True
+ return ccache and ccache_is_sccache
set_config('MOZ_USING_CCACHE', using_ccache)
set_config('MOZ_USING_SCCACHE', using_sccache)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js 2017-06-17 06:11:13.000000000 +0000
@@ -184,9 +184,11 @@
},
dispatchMessageUpdate: function (message, res) {
- // network-message-updated will emit when eventTimings message arrives
- // which is the last one of 8 updates happening on network message update.
- if (res.packet.updateType === "eventTimings") {
+ // network-message-updated will emit when all the update message arrives.
+ // Since we can't ensure the order of the network update, we check
+ // that networkInfo.updates has all we need.
+ const NUMBER_OF_NETWORK_UPDATE = 8;
+ if (res.networkInfo.updates.length === NUMBER_OF_NETWORK_UPDATE) {
batchedMessageAdd(actions.networkMessageUpdate(message));
this.jsterm.hud.emit("network-message-updated", res);
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js 2017-06-17 06:11:14.000000000 +0000
@@ -24,7 +24,7 @@
describe("GET request", () => {
it("renders as expected", () => {
const message = stubPreparedMessages.get("GET request");
- const update = stubPreparedMessages.get("GET request eventTimings");
+ const update = stubPreparedMessages.get("GET request update");
const wrapper = render(NetworkEventMessage({
message,
serviceContainer,
@@ -43,7 +43,7 @@
});
it("does not have a timestamp when timestampsVisible prop is falsy", () => {
- const message = stubPreparedMessages.get("GET request eventTimings");
+ const message = stubPreparedMessages.get("GET request update");
const wrapper = render(NetworkEventMessage({
message,
serviceContainer,
@@ -69,7 +69,7 @@
describe("XHR GET request", () => {
it("renders as expected", () => {
const message = stubPreparedMessages.get("XHR GET request");
- const update = stubPreparedMessages.get("XHR GET request eventTimings");
+ const update = stubPreparedMessages.get("XHR GET request update");
const wrapper = render(NetworkEventMessage({
message,
serviceContainer,
@@ -87,7 +87,7 @@
describe("XHR POST request", () => {
it("renders as expected", () => {
const message = stubPreparedMessages.get("XHR POST request");
- const update = stubPreparedMessages.get("XHR POST request eventTimings");
+ const update = stubPreparedMessages.get("XHR POST request update");
const wrapper = render(NetworkEventMessage({
message,
serviceContainer,
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/browser_webconsole_check_stubs_network_event.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/browser_webconsole_check_stubs_network_event.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/browser_webconsole_check_stubs_network_event.js 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/browser_webconsole_check_stubs_network_event.js 2017-06-17 06:11:14.000000000 +0000
@@ -13,6 +13,7 @@
let repoStubFilePath = getTestFilePath("../stubs/networkEvent.js");
let repoStubFileContent = yield OS.File.read(repoStubFilePath, { encoding: "utf-8" });
+ is(generatedStubs, repoStubFileContent, "Generated stub has the expected content");
if (generatedStubs != repoStubFileContent) {
ok(false, "The networkEvent stubs file needs to be updated by running " +
"`mach test devtools/client/webconsole/new-console-output/test/fixtures/" +
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js 2017-06-17 06:11:13.000000000 +0000
@@ -161,12 +161,14 @@
}
if (res.packet) {
- if (res.packet.totalTime) {
- // res.packet.totalTime is read-only so we use assign to override it.
- res.packet = Object.assign({}, existingPacket.packet, {
- totalTime: existingPacket.packet.totalTime
- });
- }
+ let override = {};
+ let keys = ["totalTime", "from", "contentSize", "transferredSize"];
+ keys.forEach(x => {
+ if (res.packet[x] !== undefined) {
+ override[x] = existingPacket.packet[key];
+ }
+ });
+ res.packet = Object.assign({}, res.packet, override);
}
if (res.networkInfo) {
@@ -191,10 +193,24 @@
existingPacket.networkInfo.request.headersSize;
}
- if (res.networkInfo.response && res.networkInfo.response.headersSize) {
+ if (
+ res.networkInfo.response
+ && res.networkInfo.response.headersSize !== undefined
+ ) {
res.networkInfo.response.headersSize =
existingPacket.networkInfo.response.headersSize;
}
+ if (res.networkInfo.response && res.networkInfo.response.bodySize !== undefined) {
+ res.networkInfo.response.bodySize =
+ existingPacket.networkInfo.response.bodySize;
+ }
+ if (
+ res.networkInfo.response
+ && res.networkInfo.response.transferredSize !== undefined
+ ) {
+ res.networkInfo.response.transferredSize =
+ existingPacket.networkInfo.response.transferredSize;
+ }
}
} else {
res = packet;
@@ -394,8 +410,21 @@
let onNetworkUpdate = new Promise(resolve => {
let i = 0;
ui.jsterm.hud.on("network-message-updated", function onNetworkUpdated(event, res) {
- let updateKey = `${keys[i++]} ${res.packet.updateType}`;
- stubs.packets.push(formatPacket(updateKey, res));
+ let updateKey = `${keys[i++]} update`;
+ // We cannot ensure the form of the network update packet, some properties
+ // might be in another order than in the original packet.
+ // Hand-picking only what we need should prevent this.
+ const packet = {
+ networkInfo: {
+ _type: res.networkInfo._type,
+ actor: res.networkInfo.actor,
+ request: res.networkInfo.request,
+ response: res.networkInfo.response,
+ totalTime: res.networkInfo.totalTime,
+ }
+ };
+
+ stubs.packets.push(formatPacket(updateKey, packet));
stubs.preparedMessages.push(formatNetworkEventStub(updateKey, res));
if (i === keys.length) {
ui.jsterm.hud.off("network-message-updated", onNetworkUpdated);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html 2017-06-17 06:11:14.000000000 +0000
@@ -2,6 +2,9 @@
+
+
+
Stub generator for network event
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stubs/networkEvent.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stubs/networkEvent.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stubs/networkEvent.js 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/fixtures/stubs/networkEvent.js 2017-06-17 06:11:14.000000000 +0000
@@ -30,11 +30,10 @@
"indent": 0
}));
-stubPreparedMessages.set("GET request eventTimings", new NetworkEventMessage({
+stubPreparedMessages.set("GET request update", new NetworkEventMessage({
"id": "1",
"actor": "server1.conn0.child1/netEvent30",
"level": "log",
- "isXHR": false,
"request": {
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "GET",
@@ -46,13 +45,17 @@
"statusText": "Not Found",
"headersSize": 160,
"remoteAddress": "127.0.0.1",
- "remotePort": 8888
+ "remotePort": 8888,
+ "content": {
+ "mimeType": "text/html; charset=utf-8"
+ },
+ "bodySize": 904,
+ "transferredSize": 904
},
"source": "network",
"type": "log",
"groupId": null,
- "timeStamp": 1486927175277,
- "totalTime": 23,
+ "totalTime": 16,
"indent": 0
}));
@@ -73,11 +76,10 @@
"indent": 0
}));
-stubPreparedMessages.set("XHR GET request eventTimings", new NetworkEventMessage({
+stubPreparedMessages.set("XHR GET request update", new NetworkEventMessage({
"id": "1",
- "actor": "server1.conn1.child1/netEvent30",
+ "actor": "server1.conn0.child1/netEvent31",
"level": "log",
- "isXHR": true,
"request": {
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "GET",
@@ -89,13 +91,17 @@
"statusText": "Not Found",
"headersSize": 160,
"remoteAddress": "127.0.0.1",
- "remotePort": 8888
+ "remotePort": 8888,
+ "content": {
+ "mimeType": "text/html; charset=utf-8"
+ },
+ "bodySize": 904,
+ "transferredSize": 904
},
"source": "network",
"type": "log",
"groupId": null,
- "timeStamp": 1486927179824,
- "totalTime": 51,
+ "totalTime": 16,
"indent": 0
}));
@@ -116,11 +122,10 @@
"indent": 0
}));
-stubPreparedMessages.set("XHR POST request eventTimings", new NetworkEventMessage({
+stubPreparedMessages.set("XHR POST request update", new NetworkEventMessage({
"id": "1",
- "actor": "server1.conn2.child1/netEvent30",
+ "actor": "server1.conn0.child1/netEvent32",
"level": "log",
- "isXHR": true,
"request": {
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "POST",
@@ -132,13 +137,17 @@
"statusText": "Not Found",
"headersSize": 160,
"remoteAddress": "127.0.0.1",
- "remotePort": 8888
+ "remotePort": 8888,
+ "content": {
+ "mimeType": "text/html; charset=utf-8"
+ },
+ "bodySize": 904,
+ "transferredSize": 904
},
"source": "network",
"type": "log",
"groupId": null,
- "timeStamp": 1486927183220,
- "totalTime": 12,
+ "totalTime": 10,
"indent": 0
}));
@@ -189,75 +198,29 @@
"from": "server1.conn0.child1/consoleActor2"
});
-stubPackets.set("GET request eventTimings", {
- "packet": {
- "from": "server1.conn0.child1/netEvent30",
- "type": "networkEventUpdate",
- "updateType": "eventTimings",
- "totalTime": 23
- },
+stubPackets.set("GET request update", {
"networkInfo": {
"_type": "NetworkEvent",
- "timeStamp": 1486927175277,
- "node": null,
"actor": "server1.conn0.child1/netEvent30",
- "discardRequestBody": true,
- "discardResponseBody": false,
- "startedDateTime": "2017-02-12T19:19:35.277Z",
"request": {
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "GET",
"headersSize": 489
},
- "isXHR": false,
- "cause": {
- "type": "img",
- "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
- "stacktrace": [
- {
- "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
- "lineNumber": 3,
- "columnNumber": 1,
- "functionName": "triggerPacket",
- "asyncCause": null
- },
- {
- "filename": "resource://testing-common/content-task.js line 52 > eval",
- "lineNumber": 7,
- "columnNumber": 9,
- "functionName": null,
- "asyncCause": null
- },
- {
- "filename": "resource://testing-common/content-task.js",
- "lineNumber": 53,
- "columnNumber": 20,
- "functionName": null,
- "asyncCause": null
- }
- ]
- },
"response": {
"httpVersion": "HTTP/1.1",
"status": "404",
"statusText": "Not Found",
"headersSize": 160,
"remoteAddress": "127.0.0.1",
- "remotePort": 8888
+ "remotePort": 8888,
+ "content": {
+ "mimeType": "text/html; charset=utf-8"
+ },
+ "bodySize": 904,
+ "transferredSize": 904
},
- "timings": {},
- "updates": [
- "requestHeaders",
- "requestCookies",
- "responseStart",
- "securityInfo",
- "responseHeaders",
- "responseCookies",
- "eventTimings"
- ],
- "private": false,
- "securityInfo": "insecure",
- "totalTime": 23
+ "totalTime": 16
}
});
@@ -308,75 +271,29 @@
"from": "server1.conn1.child1/consoleActor2"
});
-stubPackets.set("XHR GET request eventTimings", {
- "packet": {
- "from": "server1.conn1.child1/netEvent30",
- "type": "networkEventUpdate",
- "updateType": "eventTimings",
- "totalTime": 51
- },
+stubPackets.set("XHR GET request update", {
"networkInfo": {
"_type": "NetworkEvent",
- "timeStamp": 1486927179824,
- "node": null,
- "actor": "server1.conn1.child1/netEvent30",
- "discardRequestBody": true,
- "discardResponseBody": false,
- "startedDateTime": "2017-02-12T19:19:39.824Z",
+ "actor": "server1.conn0.child1/netEvent31",
"request": {
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "GET",
"headersSize": 489
},
- "isXHR": true,
- "cause": {
- "type": "xhr",
- "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
- "stacktrace": [
- {
- "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
- "lineNumber": 4,
- "columnNumber": 1,
- "functionName": "triggerPacket",
- "asyncCause": null
- },
- {
- "filename": "resource://testing-common/content-task.js line 52 > eval",
- "lineNumber": 7,
- "columnNumber": 9,
- "functionName": null,
- "asyncCause": null
- },
- {
- "filename": "resource://testing-common/content-task.js",
- "lineNumber": 53,
- "columnNumber": 20,
- "functionName": null,
- "asyncCause": null
- }
- ]
- },
"response": {
"httpVersion": "HTTP/1.1",
"status": "404",
"statusText": "Not Found",
"headersSize": 160,
"remoteAddress": "127.0.0.1",
- "remotePort": 8888
+ "remotePort": 8888,
+ "content": {
+ "mimeType": "text/html; charset=utf-8"
+ },
+ "bodySize": 904,
+ "transferredSize": 904
},
- "timings": {},
- "updates": [
- "requestHeaders",
- "requestCookies",
- "responseStart",
- "securityInfo",
- "responseHeaders",
- "responseCookies",
- "eventTimings"
- ],
- "private": false,
- "securityInfo": "insecure",
- "totalTime": 51
+ "totalTime": 16
}
});
@@ -427,75 +344,29 @@
"from": "server1.conn2.child1/consoleActor2"
});
-stubPackets.set("XHR POST request eventTimings", {
- "packet": {
- "from": "server1.conn2.child1/netEvent30",
- "type": "networkEventUpdate",
- "updateType": "eventTimings",
- "totalTime": 12
- },
+stubPackets.set("XHR POST request update", {
"networkInfo": {
"_type": "NetworkEvent",
- "timeStamp": 1486927183220,
- "node": null,
- "actor": "server1.conn2.child1/netEvent30",
- "discardRequestBody": true,
- "discardResponseBody": false,
- "startedDateTime": "2017-02-12T19:19:43.220Z",
+ "actor": "server1.conn0.child1/netEvent32",
"request": {
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "POST",
"headersSize": 509
},
- "isXHR": true,
- "cause": {
- "type": "xhr",
- "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
- "stacktrace": [
- {
- "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
- "lineNumber": 4,
- "columnNumber": 1,
- "functionName": "triggerPacket",
- "asyncCause": null
- },
- {
- "filename": "resource://testing-common/content-task.js line 52 > eval",
- "lineNumber": 7,
- "columnNumber": 9,
- "functionName": null,
- "asyncCause": null
- },
- {
- "filename": "resource://testing-common/content-task.js",
- "lineNumber": 53,
- "columnNumber": 20,
- "functionName": null,
- "asyncCause": null
- }
- ]
- },
"response": {
"httpVersion": "HTTP/1.1",
"status": "404",
"statusText": "Not Found",
"headersSize": 160,
"remoteAddress": "127.0.0.1",
- "remotePort": 8888
+ "remotePort": 8888,
+ "content": {
+ "mimeType": "text/html; charset=utf-8"
+ },
+ "bodySize": 904,
+ "transferredSize": 904
},
- "timings": {},
- "updates": [
- "requestHeaders",
- "requestCookies",
- "responseStart",
- "securityInfo",
- "responseHeaders",
- "responseCookies",
- "eventTimings"
- ],
- "private": false,
- "securityInfo": "insecure",
- "totalTime": 12
+ "totalTime": 10
}
});
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/store/messages.test.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/store/messages.test.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/devtools/client/webconsole/new-console-output/test/store/messages.test.js 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/devtools/client/webconsole/new-console-output/test/store/messages.test.js 2017-06-17 06:11:14.000000000 +0000
@@ -489,13 +489,13 @@
let networkUpdates = getAllNetworkMessagesUpdateById(getState());
expect(Object.keys(networkUpdates).length).toBe(0);
- let updatePacket = stubPackets.get("GET request eventTimings");
+ let updatePacket = stubPackets.get("GET request update");
dispatch(actions.networkMessageUpdate(updatePacket));
networkUpdates = getAllNetworkMessagesUpdateById(getState());
expect(Object.keys(networkUpdates).length).toBe(1);
- let xhrUpdatePacket = stubPackets.get("XHR GET request eventTimings");
+ let xhrUpdatePacket = stubPackets.get("XHR GET request update");
dispatch(actions.networkMessageUpdate(xhrUpdatePacket));
networkUpdates = getAllNetworkMessagesUpdateById(getState());
@@ -507,7 +507,7 @@
"XHR GET request"
]);
- const updatePacket = stubPackets.get("XHR GET request eventTimings");
+ const updatePacket = stubPackets.get("XHR GET request update");
dispatch(actions.networkMessageUpdate(updatePacket));
let networkUpdates = getAllNetworkMessagesUpdateById(getState());
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/ChildIterator.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/ChildIterator.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/ChildIterator.cpp 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/ChildIterator.cpp 2017-06-17 06:11:14.000000000 +0000
@@ -370,7 +370,18 @@
void
AllChildrenIterator::AppendNativeAnonymousChildren()
{
- AppendNativeAnonymousChildrenFromFrame(mOriginalContent->GetPrimaryFrame());
+ if (nsIFrame* primaryFrame = mOriginalContent->GetPrimaryFrame()) {
+ // NAC created by the element's primary frame.
+ AppendNativeAnonymousChildrenFromFrame(primaryFrame);
+
+ // NAC created by any other non-primary frames for the element.
+ AutoTArray ownedAnonBoxes;
+ primaryFrame->AppendOwnedAnonBoxes(ownedAnonBoxes);
+ for (nsIFrame::OwnedAnonBox& box : ownedAnonBoxes) {
+ MOZ_ASSERT(box.mAnonBoxFrame->GetContent() == mOriginalContent);
+ AppendNativeAnonymousChildrenFromFrame(box.mAnonBoxFrame);
+ }
+ }
// The root scroll frame is not the primary frame of the root element.
// Detect and handle this case.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/FragmentOrElement.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/FragmentOrElement.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/FragmentOrElement.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/FragmentOrElement.cpp 2017-06-17 06:11:14.000000000 +0000
@@ -677,6 +677,9 @@
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mChildrenList");
cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMNodeList*, mChildrenList));
+ NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mLabelsList");
+ cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMNodeList*, mLabelsList));
+
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mClassList");
cb.NoteXPCOMChild(mClassList.get());
@@ -711,6 +714,7 @@
mShadowRoot = nullptr;
mContainingShadow = nullptr;
mChildrenList = nullptr;
+ mLabelsList = nullptr;
mCustomElementData = nullptr;
mClassList = nullptr;
mRegisteredIntersectionObservers.Clear();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/FragmentOrElement.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/FragmentOrElement.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/FragmentOrElement.h 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/FragmentOrElement.h 2017-06-17 06:11:14.000000000 +0000
@@ -25,6 +25,7 @@
class ContentUnbinder;
class nsContentList;
+class nsLabelsNodeList;
class nsDOMAttributeMap;
class nsDOMTokenList;
class nsIControllers;
@@ -313,6 +314,11 @@
*/
RefPtr mClassList;
+ /*
+ * An object implementing the .labels property for this element.
+ */
+ RefPtr mLabelsList;
+
/**
* ShadowRoot bound to the element.
*/
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentList.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentList.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentList.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentList.cpp 2017-06-17 06:11:14.000000000 +0000
@@ -253,19 +253,6 @@
nsCacheableFuncStringHTMLCollection::sType = nsCacheableFuncStringContentList::eHTMLCollection;
#endif
-JSObject*
-nsCacheableFuncStringNodeList::WrapObject(JSContext *cx, JS::Handle aGivenProto)
-{
- return NodeListBinding::Wrap(cx, this, aGivenProto);
-}
-
-
-JSObject*
-nsCacheableFuncStringHTMLCollection::WrapObject(JSContext *cx, JS::Handle aGivenProto)
-{
- return HTMLCollectionBinding::Wrap(cx, this, aGivenProto);
-}
-
// Hashtable for storing nsCacheableFuncStringContentList
static PLDHashTable* gFuncStringContentListHashTable;
@@ -378,6 +365,7 @@
aString);
}
+//-----------------------------------------------------
// nsContentList implementation
nsContentList::nsContentList(nsINode* aRootNode,
@@ -659,7 +647,7 @@
const nsAttrValue* aOldValue)
{
NS_PRECONDITION(aElement, "Must have a content node to work with");
-
+
if (!mFunc || !mFuncMayDependOnAttr || mState == LIST_DIRTY ||
!MayContainRelevantNodes(aElement->GetParentNode()) ||
!nsContentUtils::IsInSameAnonymousTree(mRootNode, aElement)) {
@@ -805,7 +793,7 @@
ASSERT_IN_SYNC;
}
-
+
void
nsContentList::ContentRemoved(nsIDocument *aDocument,
nsIContent* aContainer,
@@ -1074,3 +1062,126 @@
NS_ASSERTION(cnt == mElements.Length(), "Too few elements");
}
#endif
+
+//-----------------------------------------------------
+// nsCacheableFuncStringNodeList
+
+JSObject*
+nsCacheableFuncStringNodeList::WrapObject(JSContext *cx, JS::Handle aGivenProto)
+{
+ return NodeListBinding::Wrap(cx, this, aGivenProto);
+}
+
+//-----------------------------------------------------
+// nsCacheableFuncStringHTMLCollection
+
+JSObject*
+nsCacheableFuncStringHTMLCollection::WrapObject(JSContext *cx, JS::Handle aGivenProto)
+{
+ return HTMLCollectionBinding::Wrap(cx, this, aGivenProto);
+}
+
+//-----------------------------------------------------
+// nsLabelsNodeList
+
+JSObject*
+nsLabelsNodeList::WrapObject(JSContext *cx, JS::Handle aGivenProto)
+{
+ return NodeListBinding::Wrap(cx, this, aGivenProto);
+}
+
+void
+nsLabelsNodeList::AttributeChanged(nsIDocument* aDocument, Element* aElement,
+ int32_t aNameSpaceID, nsIAtom* aAttribute,
+ int32_t aModType,
+ const nsAttrValue* aOldValue)
+{
+ MOZ_ASSERT(aElement, "Must have a content node to work with");
+ if (mState == LIST_DIRTY ||
+ !nsContentUtils::IsInSameAnonymousTree(mRootNode, aElement)) {
+ return;
+ }
+
+ // We need to handle input type changes to or from "hidden".
+ if (aElement->IsHTMLElement(nsGkAtoms::input) &&
+ aAttribute == nsGkAtoms::type && aNameSpaceID == kNameSpaceID_None) {
+ SetDirty();
+ return;
+ }
+}
+
+void
+nsLabelsNodeList::ContentAppended(nsIDocument* aDocument,
+ nsIContent* aContainer,
+ nsIContent* aFirstNewContent,
+ int32_t aNewIndexInContainer)
+{
+ // If a labelable element is moved to outside or inside of
+ // nested associated labels, we're gonna have to modify
+ // the content list.
+ if (mState != LIST_DIRTY ||
+ nsContentUtils::IsInSameAnonymousTree(mRootNode, aContainer)) {
+ SetDirty();
+ return;
+ }
+}
+
+void
+nsLabelsNodeList::ContentInserted(nsIDocument* aDocument,
+ nsIContent* aContainer,
+ nsIContent* aChild,
+ int32_t aIndexInContainer)
+{
+ // If a labelable element is moved to outside or inside of
+ // nested associated labels, we're gonna have to modify
+ // the content list.
+ if (mState != LIST_DIRTY ||
+ nsContentUtils::IsInSameAnonymousTree(mRootNode, aChild)) {
+ SetDirty();
+ return;
+ }
+}
+
+void
+nsLabelsNodeList::ContentRemoved(nsIDocument* aDocument,
+ nsIContent* aContainer,
+ nsIContent* aChild,
+ int32_t aIndexInContainer,
+ nsIContent* aPreviousSibling)
+{
+ // If a labelable element is removed, we're gonna have to clean
+ // the content list.
+ if (mState != LIST_DIRTY ||
+ nsContentUtils::IsInSameAnonymousTree(mRootNode, aChild)) {
+ SetDirty();
+ return;
+ }
+}
+
+void
+nsLabelsNodeList::MaybeResetRoot(nsINode* aRootNode)
+{
+ MOZ_ASSERT(aRootNode, "Must have root");
+ if (mRootNode == aRootNode) {
+ return;
+ }
+
+ mRootNode->RemoveMutationObserver(this);
+ mRootNode = aRootNode;
+ mRootNode->AddMutationObserver(this);
+ SetDirty();
+}
+
+void
+nsLabelsNodeList::PopulateSelf(uint32_t aNeededLength)
+{
+ MOZ_ASSERT(mRootNode, "Must have root");
+
+ // Start searching at the root.
+ nsINode* cur = mRootNode;
+ if (mElements.IsEmpty() && cur->IsElement() && Match(cur->AsElement())) {
+ mElements.AppendElement(cur->AsElement());
+ }
+
+ nsContentList::PopulateSelf(aNeededLength);
+}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentList.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentList.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentList.h 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentList.h 2017-06-17 06:11:14.000000000 +0000
@@ -376,9 +376,9 @@
* traversed the whole document (or both).
*
* @param aNeededLength the length the list should have when we are
- * done (unless it exhausts the document)
+ * done (unless it exhausts the document)
*/
- void PopulateSelf(uint32_t aNeededLength);
+ virtual void PopulateSelf(uint32_t aNeededLength);
/**
* @param aContainer a content node which must be a descendant of
@@ -589,4 +589,40 @@
#endif
};
+class nsLabelsNodeList final : public nsContentList
+{
+public:
+ nsLabelsNodeList(nsINode* aRootNode,
+ nsContentListMatchFunc aFunc,
+ nsContentListDestroyFunc aDestroyFunc,
+ void* aData)
+ : nsContentList(aRootNode, aFunc, aDestroyFunc, aData)
+ {
+ }
+
+ NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
+ NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
+ NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
+ NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
+
+ virtual JSObject* WrapObject(JSContext *cx, JS::Handle aGivenProto) override;
+
+ /**
+ * Reset root, mutation observer, and clear content list
+ * if the root has been changed.
+ *
+ * @param aRootNode The node under which to limit our search.
+ */
+ void MaybeResetRoot(nsINode* aRootNode);
+
+private:
+ /**
+ * Start searching at the last one if we already have nodes, otherwise
+ * start searching at the root.
+ *
+ * @param aNeededLength The list of length should have when we are
+ * done (unless it exhausts the document).
+ */
+ void PopulateSelf(uint32_t aNeededLength) override;
+};
#endif // nsContentList_h___
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentSink.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentSink.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentSink.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentSink.cpp 2017-06-17 06:11:14.000000000 +0000
@@ -339,17 +339,6 @@
return rv;
}
}
- else if (aHeader == nsGkAtoms::msthemecompatible) {
- // Disable theming for the presshell if the value is no.
- // XXXbz don't we want to support this as an HTTP header too?
- nsAutoString value(aValue);
- if (value.LowerCaseEqualsLiteral("no")) {
- nsIPresShell* shell = mDocument->GetShell();
- if (shell) {
- shell->DisableThemeSupport();
- }
- }
- }
return rv;
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentUtils.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentUtils.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentUtils.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentUtils.cpp 2017-06-17 06:11:14.000000000 +0000
@@ -220,7 +220,6 @@
#include "nsIWebNavigationInfo.h"
#include "nsPluginHost.h"
#include "mozilla/HangAnnotations.h"
-#include "mozilla/ServoRestyleManager.h"
#include "mozilla/Encoding.h"
#include "nsIBidiKeyboard.h"
@@ -2317,7 +2316,17 @@
bool
nsContentUtils::ShouldResistFingerprinting()
{
- return nsRFPService::IsResistFingerprintingEnabled();
+ if (NS_IsMainThread()) {
+ return nsRFPService::IsResistFingerprintingEnabled();
+ }
+
+ workers::WorkerPrivate* workerPrivate = workers::GetCurrentThreadWorkerPrivate();
+ if (NS_WARN_IF(!workerPrivate)) {
+ return false;
+ }
+ workerPrivate->AssertIsOnWorkerThread();
+
+ return workerPrivate->ResistFingerprintingEnabled();
}
bool
@@ -2327,7 +2336,7 @@
return false;
}
bool isChrome = nsContentUtils::IsChromeDoc(aDocShell->GetDocument());
- return !isChrome && nsRFPService::IsResistFingerprintingEnabled();
+ return !isChrome && ShouldResistFingerprinting();
}
/* static */
@@ -5324,12 +5333,6 @@
nsContentUtils::DestroyAnonymousContent(nsCOMPtr* aContent)
{
if (*aContent) {
- // Don't wait until UnbindFromTree to clear ServoElementData, since
- // leak checking at shutdown can run before the AnonymousContentDestroyer
- // runs.
- if ((*aContent)->IsStyledByServo() && (*aContent)->IsElement()) {
- ServoRestyleManager::ClearServoDataFromSubtree((*aContent)->AsElement());
- }
AddScriptRunner(new AnonymousContentDestroyer(aContent));
}
}
@@ -5339,12 +5342,6 @@
nsContentUtils::DestroyAnonymousContent(nsCOMPtr* aElement)
{
if (*aElement) {
- // Don't wait until UnbindFromTree to clear ServoElementData, since
- // leak checking at shutdown can run before the AnonymousContentDestroyer
- // runs.
- if ((*aElement)->IsStyledByServo()) {
- ServoRestyleManager::ClearServoDataFromSubtree(*aElement);
- }
AddScriptRunner(new AnonymousContentDestroyer(aElement));
}
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentUtils.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentUtils.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsContentUtils.h 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsContentUtils.h 2017-06-17 06:11:14.000000000 +0000
@@ -270,6 +270,7 @@
JS::MutableHandle aDesc);
// Check whether we should avoid leaking distinguishing information to JS/CSS.
+ // This function can be called both in the main thread and worker threads.
static bool ShouldResistFingerprinting();
static bool ShouldResistFingerprinting(nsIDocShell* aDocShell);
@@ -2202,7 +2203,7 @@
static bool ResistFingerprinting(mozilla::dom::CallerType aCallerType)
{
return aCallerType != mozilla::dom::CallerType::System &&
- mozilla::nsRFPService::IsResistFingerprintingEnabled();
+ ShouldResistFingerprinting();
}
/**
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsGkAtomList.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsGkAtomList.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsGkAtomList.h 2017-06-16 16:00:29.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsGkAtomList.h 2017-06-17 06:11:14.000000000 +0000
@@ -598,6 +598,7 @@
GK_ATOM(keyup, "keyup")
GK_ATOM(kind, "kind")
GK_ATOM(label, "label")
+GK_ATOM(labels, "labels")
GK_ATOM(lang, "lang")
GK_ATOM(language, "language")
GK_ATOM(last, "last")
@@ -709,7 +710,6 @@
GK_ATOM(moz_opaque, "moz-opaque")
GK_ATOM(moz_action_hint, "mozactionhint")
GK_ATOM(x_moz_errormessage, "x-moz-errormessage")
-GK_ATOM(msthemecompatible, "msthemecompatible")
GK_ATOM(multicol, "multicol")
GK_ATOM(multiple, "multiple")
GK_ATOM(muted, "muted")
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsJSEnvironment.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsJSEnvironment.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/base/nsJSEnvironment.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/base/nsJSEnvironment.cpp 2017-06-17 06:11:14.000000000 +0000
@@ -1995,7 +1995,7 @@
}
TimeStamp startTimeStamp = TimeStamp::Now();
-
+ TimeDuration duration = sGCUnnotifiedTotalTime;
uintptr_t reason = reinterpret_cast(aData);
nsJSContext::GarbageCollectNow(aData ?
static_cast(reason) :
@@ -2004,20 +2004,20 @@
nsJSContext::NonShrinkingGC,
budget);
- TimeDuration duration = sGCUnnotifiedTotalTime;
sGCUnnotifiedTotalTime = TimeDuration();
-
+ TimeStamp now = TimeStamp::Now();
+ TimeDuration sliceDuration = now - startTimeStamp;
+ duration += sliceDuration;
if (duration.ToSeconds()) {
TimeDuration idleDuration;
if (!aDeadline.IsNull()) {
- TimeStamp now = TimeStamp::Now();
if (aDeadline < now) {
// This slice overflowed the idle period.
idleDuration = aDeadline - startTimeStamp;
} else {
// Note, we don't want to use duration here, since it may contain
// data also from JS engine triggered GC slices.
- idleDuration = now - startTimeStamp;
+ idleDuration = sliceDuration;
}
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/HTMLInputElement.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/HTMLInputElement.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/HTMLInputElement.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/HTMLInputElement.cpp 2017-06-17 06:11:15.000000000 +0000
@@ -8157,6 +8157,16 @@
aSequence.AppendElements(mFileData->mEntries);
}
+already_AddRefed
+HTMLInputElement::GetLabels()
+{
+ if (!IsLabelable()) {
+ return nullptr;
+ }
+
+ return nsGenericHTMLElement::Labels();
+}
+
} // namespace dom
} // namespace mozilla
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/HTMLInputElement.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/HTMLInputElement.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/HTMLInputElement.h 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/HTMLInputElement.h 2017-06-17 06:11:15.000000000 +0000
@@ -735,6 +735,8 @@
// XPCOM GetCustomVisibility() is OK
+ already_AddRefed GetLabels();
+
// XPCOM Select() is OK
Nullable GetSelectionStart(ErrorResult& aRv);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/HTMLLabelElement.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/HTMLLabelElement.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/HTMLLabelElement.cpp 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/HTMLLabelElement.cpp 2017-06-17 06:11:15.000000000 +0000
@@ -14,6 +14,7 @@
#include "nsFocusManager.h"
#include "nsIDOMMouseEvent.h"
#include "nsQueryObject.h"
+#include "mozilla/dom/ShadowRoot.h"
// construction, destruction
@@ -268,17 +269,23 @@
return GetFirstLabelableDescendant();
}
- // We have a @for. The id has to be linked to an element in the same document
+ // We have a @for. The id has to be linked to an element in the same tree
// and this element should be a labelable form control.
- //XXXsmaug It is unclear how this should work in case the element is in
- // Shadow DOM.
- // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=26365.
- nsIDocument* doc = GetUncomposedDoc();
- if (!doc) {
- return nullptr;
+ nsINode* root = SubtreeRoot();
+ ShadowRoot* shadow = ShadowRoot::FromNode(root);
+ Element* element = nullptr;
+
+ if (shadow) {
+ element = shadow->GetElementById(elementId);
+ } else {
+ nsIDocument* doc = GetUncomposedDoc();
+ if (doc) {
+ element = doc->GetElementById(elementId);
+ } else {
+ element = nsContentUtils::MatchElementId(root->AsContent(), elementId);
+ }
}
- Element* element = doc->GetElementById(elementId);
if (element && element->IsLabelable()) {
return static_cast(element);
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/nsGenericHTMLElement.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/nsGenericHTMLElement.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/nsGenericHTMLElement.cpp 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/nsGenericHTMLElement.cpp 2017-06-17 06:11:15.000000000 +0000
@@ -107,6 +107,7 @@
#include "mozilla/StyleSetHandle.h"
#include "mozilla/StyleSetHandleInlines.h"
#include "ReferrerPolicy.h"
+#include "mozilla/dom/HTMLLabelElement.h"
using namespace mozilla;
using namespace mozilla::dom;
@@ -177,8 +178,12 @@
nsresult
nsGenericHTMLElement::CopyInnerTo(Element* aDst, bool aPreallocateChildren)
{
+ MOZ_ASSERT(!aDst->GetUncomposedDoc(),
+ "Should not CopyInnerTo an Element in a document");
nsresult rv;
+ bool reparse = (aDst->OwnerDoc() != OwnerDoc());
+
rv = static_cast(aDst)->mAttrsAndChildren.
EnsureCapacityToClone(mAttrsAndChildren, aPreallocateChildren);
NS_ENSURE_SUCCESS(rv, rv);
@@ -188,11 +193,14 @@
const nsAttrName *name = mAttrsAndChildren.AttrNameAt(i);
const nsAttrValue *value = mAttrsAndChildren.AttrAt(i);
- nsAutoString valStr;
- value->ToString(valStr);
-
if (name->Equals(nsGkAtoms::style, kNameSpaceID_None) &&
value->Type() == nsAttrValue::eCSSDeclaration) {
+ // We still clone CSS attributes, even in the cross-document case.
+ // https://github.com/w3c/webappsec-csp/issues/212
+
+ nsAutoString valStr;
+ value->ToString(valStr);
+
DeclarationBlock* decl = value->GetCSSDeclarationValue();
// We can't just set this as a string, because that will fail
// to reparse the string into style data until the node is
@@ -201,13 +209,19 @@
rv = aDst->SetInlineStyleDeclaration(declClone, &valStr, false);
NS_ENSURE_SUCCESS(rv, rv);
+ } else if (reparse) {
+ nsAutoString valStr;
+ value->ToString(valStr);
- continue;
+ rv = aDst->SetAttr(name->NamespaceID(), name->LocalName(),
+ name->GetPrefix(), valStr, false);
+ NS_ENSURE_SUCCESS(rv, rv);
+ } else {
+ nsAttrValue valueCopy(*value);
+ rv = aDst->SetParsedAttr(name->NamespaceID(), name->LocalName(),
+ name->GetPrefix(), valueCopy, false);
+ NS_ENSURE_SUCCESS(rv, rv);
}
-
- rv = aDst->SetAttr(name->NamespaceID(), name->LocalName(),
- name->GetPrefix(), valStr, false);
- NS_ENSURE_SUCCESS(rv, rv);
}
return NS_OK;
@@ -498,6 +512,14 @@
}
}
+ // We need to consider a labels element is moved to another subtree
+ // with different root, it needs to update labels list and its root
+ // as well.
+ nsDOMSlots* slots = GetExistingDOMSlots();
+ if (slots && slots->mLabelsList) {
+ slots->mLabelsList->MaybeResetRoot(SubtreeRoot());
+ }
+
return rv;
}
@@ -518,6 +540,13 @@
}
}
+ // We need to consider a labels element is removed from tree,
+ // it needs to update labels list and its root as well.
+ nsDOMSlots* slots = GetExistingDOMSlots();
+ if (slots && slots->mLabelsList) {
+ slots->mLabelsList->MaybeResetRoot(SubtreeRoot());
+ }
+
nsStyledElement::UnbindFromTree(aDeep, aNullParent);
}
@@ -1666,6 +1695,30 @@
return IsAnyOfHTMLElements(nsGkAtoms::progress, nsGkAtoms::meter);
}
+/* static */ bool
+nsGenericHTMLElement::MatchLabelsElement(Element* aElement, int32_t aNamespaceID,
+ nsIAtom* aAtom, void* aData)
+{
+ HTMLLabelElement* element = HTMLLabelElement::FromContent(aElement);
+ return element && element->GetControl() == aData;
+}
+
+already_AddRefed
+nsGenericHTMLElement::Labels()
+{
+ MOZ_ASSERT(IsLabelable(),
+ "Labels() only allow labelable elements to use it.");
+ nsDOMSlots* slots = DOMSlots();
+
+ if (!slots->mLabelsList) {
+ slots->mLabelsList = new nsLabelsNodeList(SubtreeRoot(), MatchLabelsElement,
+ nullptr, this);
+ }
+
+ RefPtr labels = slots->mLabelsList;
+ return labels.forget();
+}
+
bool
nsGenericHTMLElement::IsInteractiveHTMLContent(bool aIgnoreTabindex) const
{
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/nsGenericHTMLElement.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/nsGenericHTMLElement.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/nsGenericHTMLElement.h 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/nsGenericHTMLElement.h 2017-06-17 06:11:15.000000000 +0000
@@ -851,6 +851,12 @@
}
virtual bool IsLabelable() const override;
+
+ static bool MatchLabelsElement(Element* aElement, int32_t aNamespaceID,
+ nsIAtom* aAtom, void* aData);
+
+ already_AddRefed Labels();
+
virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override;
static bool TouchEventsEnabled(JSContext* /* unused */, JSObject* /* unused */);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/test/forms/test_button_attributes_reflection.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/test/forms/test_button_attributes_reflection.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/html/test/forms/test_button_attributes_reflection.html 2017-06-16 16:00:30.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/html/test/forms/test_button_attributes_reflection.html 2017-06-17 06:11:15.000000000 +0000
@@ -128,9 +128,12 @@
"button.setCustomValidity should be a function");
// .labels
-todo("labels" in document.createElement("button"),
- "button.labels isn't implemented yet");
-
+ok("labels" in document.createElement("button"),
+ "button.labels should be an IDL attribute of the button element");
+is(typeof(document.createElement("button").labels), "object",
+ "button.labels should be an object");
+ok(document.createElement("button").labels instanceof NodeList,
+ "button.labels sohuld be an instance of NodeList");
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html 2017-06-17 06:11:16.000000000 +0000
@@ -393,21 +393,11 @@
stat.type + ".remoteCandidateId has a value. value="
+ stat.remoteCandidateId);
- // state
- ok(stat.state == "succeeded",
- stat.type + ".state is succeeded. value="
- + stat.state);
-
// priority
ok(stat.priority,
stat.type + ".priority has a value. value="
+ stat.priority);
- // nominated
- ok(stat.nominated,
- stat.type + ".nominated is true. value="
- + stat.nominated);
-
// readable
ok(stat.readable,
stat.type + ".readable is true. value="
@@ -418,31 +408,48 @@
stat.type + ".writable is true. value="
+ stat.writable);
- // bytesSent
- ok(stat.bytesSent > 20000 && stat.bytesSent < 800000,
- stat.type + ".bytesSent is a sane number (20,000<>800,000)for a short test. value="
- + stat.bytesSent);
-
- // bytesReceived
- ok(stat.bytesReceived > 20000 && stat.bytesReceived < 800000,
- stat.type + ".bytesReceived is a sane number (20,000<>800,000) for a short test. value="
- + stat.bytesReceived);
-
- // lastPacketSentTimestamp
- ok(stat.lastPacketSentTimestamp,
- stat.type + ".lastPacketSentTimestamp has a value. value="
- + stat.lastPacketSentTimestamp);
-
- // lastPacketReceivedTimestamp
- ok(stat.lastPacketReceivedTimestamp,
- stat.type + ".lastPacketReceivedTimestamp has a value. value="
- + stat.lastPacketReceivedTimestamp);
+ // state
+ if (stat.state == "succeeded") {
+ // nominated
+ ok(stat.nominated,
+ stat.type + ".nominated is true. value="
+ + stat.nominated);
+
+ // bytesSent
+ ok(stat.bytesSent > 20000 && stat.bytesSent < 800000,
+ stat.type + ".bytesSent is a sane number (20,000<>800,000)for a short test. value="
+ + stat.bytesSent);
+
+ // bytesReceived
+ ok(stat.bytesReceived > 20000 && stat.bytesReceived < 800000,
+ stat.type + ".bytesReceived is a sane number (20,000<>800,000) for a short test. value="
+ + stat.bytesReceived);
+
+ // lastPacketSentTimestamp
+ ok(stat.lastPacketSentTimestamp,
+ stat.type + ".lastPacketSentTimestamp has a value. value="
+ + stat.lastPacketSentTimestamp);
+
+ // lastPacketReceivedTimestamp
+ ok(stat.lastPacketReceivedTimestamp,
+ stat.type + ".lastPacketReceivedTimestamp has a value. value="
+ + stat.lastPacketReceivedTimestamp);
+
+ } else {
+ // nominated
+ ok(!stat.nominated,
+ stat.type + ".nominated is false. value="
+ + stat.nominated);
+ }
+
//
// Optional fields
//
// selected
- ok(stat.selected === undefined || stat.selected == true,
+ ok(stat.selected === undefined ||
+ ((stat.state == "succeeded" && stat.selected == true) ||
+ (stat.selected == false)),
stat.type + ".selected is undefined or true. value="
+ stat.selected);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/TextTrack.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/TextTrack.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/TextTrack.cpp 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/TextTrack.cpp 2017-06-17 06:11:15.000000000 +0000
@@ -205,7 +205,7 @@
// Remove all the cues from the active cue list whose end times now occur
// earlier then the current playback time.
for (uint32_t i = mActiveCueList->Length(); i > 0; i--) {
- if ((*mActiveCueList)[i - 1]->EndTime() < playbackTime) {
+ if ((*mActiveCueList)[i - 1]->EndTime() <= playbackTime) {
mActiveCueList->RemoveCueAt(i - 1);
}
}
@@ -215,7 +215,7 @@
// a valid start time as the cue list is sorted.
for (; mCuePos < mCueList->Length() &&
(*mCueList)[mCuePos]->StartTime() <= playbackTime; mCuePos++) {
- if ((*mCueList)[mCuePos]->EndTime() >= playbackTime) {
+ if ((*mCueList)[mCuePos]->EndTime() > playbackTime) {
mActiveCueList->AddCue(*(*mCueList)[mCuePos]);
}
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/Performance.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/Performance.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/Performance.cpp 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/Performance.cpp 2017-06-17 06:11:15.000000000 +0000
@@ -171,6 +171,12 @@
void
Performance::GetEntries(nsTArray>& aRetval)
{
+ // We return an empty list when 'privacy.resistFingerprinting' is on.
+ if (nsContentUtils::ShouldResistFingerprinting()) {
+ aRetval.Clear();
+ return;
+ }
+
aRetval = mResourceEntries;
aRetval.AppendElements(mUserEntries);
aRetval.Sort(PerformanceEntryComparator());
@@ -180,6 +186,12 @@
Performance::GetEntriesByType(const nsAString& aEntryType,
nsTArray>& aRetval)
{
+ // We return an empty list when 'privacy.resistFingerprinting' is on.
+ if (nsContentUtils::ShouldResistFingerprinting()) {
+ aRetval.Clear();
+ return;
+ }
+
if (aEntryType.EqualsLiteral("resource")) {
aRetval = mResourceEntries;
return;
@@ -204,6 +216,11 @@
{
aRetval.Clear();
+ // We return an empty list when 'privacy.resistFingerprinting' is on.
+ if (nsContentUtils::ShouldResistFingerprinting()) {
+ return;
+ }
+
for (PerformanceEntry* entry : mResourceEntries) {
if (entry->GetName().Equals(aName) &&
(!aEntryType.WasPassed() ||
@@ -261,6 +278,11 @@
void
Performance::Mark(const nsAString& aName, ErrorResult& aRv)
{
+ // We add nothing when 'privacy.resistFingerprinting' is on.
+ if (nsContentUtils::ShouldResistFingerprinting()) {
+ return;
+ }
+
// Don't add the entry if the buffer is full. XXX should be removed by bug 1159003.
if (mUserEntries.Length() >= mResourceTimingBufferSize) {
return;
@@ -325,6 +347,11 @@
const Optional& aEndMark,
ErrorResult& aRv)
{
+ // We add nothing when 'privacy.resistFingerprinting' is on.
+ if (nsContentUtils::ShouldResistFingerprinting()) {
+ return;
+ }
+
// Don't add the entry if the buffer is full. XXX should be removed by bug
// 1159003.
if (mUserEntries.Length() >= mResourceTimingBufferSize) {
@@ -439,6 +466,12 @@
{
MOZ_ASSERT(aEntry);
MOZ_ASSERT(mResourceEntries.Length() < mResourceTimingBufferSize);
+
+ // We won't add an entry when 'privacy.resistFingerprint' is true.
+ if (nsContentUtils::ShouldResistFingerprinting()) {
+ return;
+ }
+
if (mResourceEntries.Length() >= mResourceTimingBufferSize) {
return;
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.cpp 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.cpp 2017-06-17 06:11:15.000000000 +0000
@@ -35,7 +35,8 @@
{
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
mZeroTime = 0;
}
@@ -94,7 +95,8 @@
PerformanceTiming::FetchStartHighRes()
{
if (!mFetchStart) {
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
MOZ_ASSERT(!mAsyncOpen.IsNull(), "The fetch start time stamp should always be "
@@ -151,7 +153,8 @@
uint16_t
PerformanceTiming::GetRedirectCount() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
if (!mAllRedirectsSameOrigin) {
@@ -163,7 +166,8 @@
bool
PerformanceTiming::ShouldReportCrossOriginRedirect() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return false;
}
@@ -186,7 +190,8 @@
DOMHighResTimeStamp
PerformanceTiming::RedirectStartHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
return TimeStampToDOMHighResOrFetchStart(mRedirectStart);
@@ -219,7 +224,8 @@
DOMHighResTimeStamp
PerformanceTiming::RedirectEndHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
return TimeStampToDOMHighResOrFetchStart(mRedirectEnd);
@@ -242,7 +248,8 @@
DOMHighResTimeStamp
PerformanceTiming::DomainLookupStartHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
return TimeStampToDOMHighResOrFetchStart(mDomainLookupStart);
@@ -257,7 +264,8 @@
DOMHighResTimeStamp
PerformanceTiming::DomainLookupEndHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
// Bug 1155008 - nsHttpTransaction is racy. Return DomainLookupStart when null
@@ -274,7 +282,8 @@
DOMHighResTimeStamp
PerformanceTiming::ConnectStartHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
return mConnectStart.IsNull() ? DomainLookupEndHighRes()
@@ -290,7 +299,8 @@
DOMHighResTimeStamp
PerformanceTiming::ConnectEndHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
// Bug 1155008 - nsHttpTransaction is racy. Return ConnectStart when null
@@ -307,7 +317,8 @@
DOMHighResTimeStamp
PerformanceTiming::RequestStartHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
return TimeStampToDOMHighResOrFetchStart(mRequestStart);
@@ -322,7 +333,8 @@
DOMHighResTimeStamp
PerformanceTiming::ResponseStartHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
if (mResponseStart.IsNull() ||
@@ -341,7 +353,8 @@
DOMHighResTimeStamp
PerformanceTiming::ResponseEndHighRes()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return mZeroTime;
}
if (mResponseEnd.IsNull() ||
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.h 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.h 2017-06-17 06:11:16.000000000 +0000
@@ -116,7 +116,8 @@
// PerformanceNavigation WebIDL methods
DOMTimeMilliSec NavigationStart() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetNavigationStart();
@@ -124,7 +125,8 @@
DOMTimeMilliSec UnloadEventStart()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetUnloadEventStart();
@@ -132,7 +134,8 @@
DOMTimeMilliSec UnloadEventEnd()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetUnloadEventEnd();
@@ -180,7 +183,8 @@
DOMTimeMilliSec DomLoading()
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetDomLoading();
@@ -188,7 +192,8 @@
DOMTimeMilliSec DomInteractive() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetDomInteractive();
@@ -196,7 +201,8 @@
DOMTimeMilliSec DomContentLoadedEventStart() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetDomContentLoadedEventStart();
@@ -204,7 +210,8 @@
DOMTimeMilliSec DomContentLoadedEventEnd() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetDomContentLoadedEventEnd();
@@ -212,7 +219,8 @@
DOMTimeMilliSec DomComplete() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetDomComplete();
@@ -220,7 +228,8 @@
DOMTimeMilliSec LoadEventStart() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetLoadEventStart();
@@ -228,7 +237,8 @@
DOMTimeMilliSec LoadEventEnd() const
{
- if (!nsContentUtils::IsPerformanceTimingEnabled()) {
+ if (!nsContentUtils::IsPerformanceTimingEnabled() ||
+ nsContentUtils::ShouldResistFingerprinting()) {
return 0;
}
return GetDOMTiming()->GetLoadEventEnd();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLButtonElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLButtonElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLButtonElement.webidl 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLButtonElement.webidl 2017-06-17 06:11:16.000000000 +0000
@@ -43,6 +43,5 @@
boolean reportValidity();
void setCustomValidity(DOMString error);
-// Not yet implemented:
-// readonly attribute NodeList labels;
+ readonly attribute NodeList labels;
};
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLInputElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLInputElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLInputElement.webidl 2017-06-16 16:00:32.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLInputElement.webidl 2017-06-17 06:11:15.000000000 +0000
@@ -112,7 +112,7 @@
boolean reportValidity();
void setCustomValidity(DOMString error);
- // Bug 850365 readonly attribute NodeList labels;
+ readonly attribute NodeList? labels;
void select();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLMeterElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLMeterElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLMeterElement.webidl 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLMeterElement.webidl 2017-06-17 06:11:16.000000000 +0000
@@ -26,9 +26,5 @@
attribute double high;
[SetterThrows]
attribute double optimum;
-
- /**
- * The labels attribute will be done with bug 556743.
- */
- //readonly attribute NodeList labels;
+ readonly attribute NodeList labels;
};
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLOutputElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLOutputElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLOutputElement.webidl 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLOutputElement.webidl 2017-06-17 06:11:16.000000000 +0000
@@ -34,6 +34,5 @@
boolean reportValidity();
void setCustomValidity(DOMString error);
-// Not yet implemented (bug 556743).
-// readonly attribute NodeList labels;
+ readonly attribute NodeList labels;
};
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLProgressElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLProgressElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLProgressElement.webidl 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLProgressElement.webidl 2017-06-17 06:11:16.000000000 +0000
@@ -18,9 +18,5 @@
[SetterThrows]
attribute double max;
readonly attribute double position;
-
- /**
- * The labels attribute will be done with bug 567740.
- */
- //readonly attribute NodeList labels;
+ readonly attribute NodeList labels;
};
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLSelectElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLSelectElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLSelectElement.webidl 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLSelectElement.webidl 2017-06-17 06:11:16.000000000 +0000
@@ -54,7 +54,7 @@
boolean reportValidity();
void setCustomValidity(DOMString error);
-// NYI: readonly attribute NodeList labels;
+ readonly attribute NodeList labels;
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
void remove();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLTextAreaElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLTextAreaElement.webidl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLTextAreaElement.webidl 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLTextAreaElement.webidl 2017-06-17 06:11:16.000000000 +0000
@@ -58,7 +58,7 @@
boolean reportValidity();
void setCustomValidity(DOMString error);
- // readonly attribute NodeList labels;
+ readonly attribute NodeList labels;
void select();
[Throws]
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/workers/WorkerPrefs.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/workers/WorkerPrefs.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/workers/WorkerPrefs.h 2017-06-16 16:00:31.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/workers/WorkerPrefs.h 2017-06-17 06:11:16.000000000 +0000
@@ -43,6 +43,7 @@
WORKER_SIMPLE_PREF("dom.netinfo.enabled", NetworkInformationEnabled, NETWORKINFORMATION_ENABLED)
WORKER_SIMPLE_PREF("dom.fetchController.enabled", FetchControllerEnabled, FETCHCONTROLLER_ENABLED)
WORKER_SIMPLE_PREF("dom.fetchObserver.enabled", FetchObserverEnabled, FETCHOBSERVER_ENABLED)
+WORKER_SIMPLE_PREF("privacy.resistFingerprinting", ResistFingerprintingEnabled, RESISTFINGERPRINTING_ENABLED)
WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
WORKER_PREF("general.appname.override", AppNameOverrideChanged)
WORKER_PREF("general.appversion.override", AppVersionOverrideChanged)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp 2017-06-16 16:00:32.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp 2017-06-17 06:11:16.000000000 +0000
@@ -201,7 +201,8 @@
mResultJSON(JS::UndefinedValue()),
mResultArrayBuffer(nullptr),
mIsMappedArrayBuffer(false),
- mXPCOMifier(nullptr)
+ mXPCOMifier(nullptr),
+ mEventDispatchingSuspended(false)
{
mozilla::HoldJSObjects(this);
}
@@ -1368,7 +1369,7 @@
event->InitEvent(kLiteralString_readystatechange, false, false);
// We assume anyone who managed to call CreateReadystatechangeEvent is trusted
event->SetTrusted(true);
- DispatchDOMEvent(nullptr, event, nullptr, nullptr);
+ DispatchOrStoreEvent(this, event);
return NS_OK;
}
@@ -1411,7 +1412,7 @@
ProgressEvent::Constructor(aTarget, typeString, init);
event->SetTrusted(true);
- aTarget->DispatchDOMEvent(nullptr, event, nullptr, nullptr);
+ DispatchOrStoreEvent(aTarget, event);
if (aType == ProgressEventType::progress) {
mInLoadProgressEvent = false;
@@ -1434,6 +1435,45 @@
}
}
+void
+XMLHttpRequestMainThread::DispatchOrStoreEvent(DOMEventTargetHelper* aTarget,
+ Event* aEvent)
+{
+ MOZ_ASSERT(aTarget);
+ MOZ_ASSERT(aEvent);
+
+ if (mEventDispatchingSuspended) {
+ PendingEvent* event = mPendingEvents.AppendElement();
+ event->mTarget = aTarget;
+ event->mEvent = aEvent;
+ return;
+ }
+
+ aTarget->DispatchDOMEvent(nullptr, aEvent, nullptr, nullptr);
+}
+
+void
+XMLHttpRequestMainThread::SuspendEventDispatching()
+{
+ MOZ_ASSERT(!mEventDispatchingSuspended);
+ mEventDispatchingSuspended = true;
+}
+
+void
+XMLHttpRequestMainThread::ResumeEventDispatching()
+{
+ MOZ_ASSERT(mEventDispatchingSuspended);
+ mEventDispatchingSuspended = false;
+
+ nsTArray pendingEvents;
+ pendingEvents.SwapElements(mPendingEvents);
+
+ for (uint32_t i = 0; i < pendingEvents.Length(); ++i) {
+ pendingEvents[i].mTarget->
+ DispatchDOMEvent(nullptr, pendingEvents[i].mEvent, nullptr, nullptr);
+ }
+}
+
already_AddRefed
XMLHttpRequestMainThread::GetCurrentHttpChannel()
{
@@ -2409,10 +2449,6 @@
mTimeoutTimer->Cancel();
}
- if (mFlagSynchronous) {
- UnsuppressEventHandlingAndResume();
- }
-
// Per spec, fire the last download progress event, if any,
// before readystatechange=4/done. (Note that 0-sized responses
// will have not sent a progress event yet, so one must be sent here).
@@ -3033,6 +3069,7 @@
}
}
+ SuspendEventDispatching();
StopProgressEventTimer();
SyncTimeoutType syncTimeoutType = MaybeStartSyncTimeoutTimer();
@@ -3056,6 +3093,7 @@
}
UnsuppressEventHandlingAndResume();
+ ResumeEventDispatching();
} else {
// Now that we've successfully opened the channel, we can change state. Note
// that this needs to come after the AsyncOpen() and rv check, because this
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.h 2017-06-16 16:00:32.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.h 2017-06-17 06:11:16.000000000 +0000
@@ -401,7 +401,8 @@
ErrorResult& aRv);
void
- Abort() {
+ Abort()
+ {
ErrorResult rv;
Abort(rv);
MOZ_ASSERT(!rv.Failed());
@@ -607,8 +608,21 @@
nsresult DispatchToMainThread(already_AddRefed aRunnable);
+ void DispatchOrStoreEvent(DOMEventTargetHelper* aTarget, Event* aEvent);
+
already_AddRefed EnsureXPCOMifier();
+ void SuspendEventDispatching();
+ void ResumeEventDispatching();
+
+ struct PendingEvent
+ {
+ RefPtr mTarget;
+ RefPtr mEvent;
+ };
+
+ nsTArray mPendingEvents;
+
nsCOMPtr mContext;
nsCOMPtr mPrincipal;
nsCOMPtr mChannel;
@@ -837,6 +851,10 @@
// Helper object to manage our XPCOM scriptability bits
nsXMLHttpRequestXPCOMifier* mXPCOMifier;
+ // When this is set to true, the event dispatching is suspended. This is
+ // useful to change the correct state when XHR is working sync.
+ bool mEventDispatchingSuspended;
+
static bool sDontWarnAboutSyncXHR;
};
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp 2017-06-16 16:00:32.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp 2017-06-17 06:11:17.000000000 +0000
@@ -195,7 +195,10 @@
return IPC_OK();
}
MOZ_ASSERT(mApi);
+ MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(aImageKey)) == mActiveImageKeys.end());
+
wr::ImageDescriptor descriptor(aSize, aStride, aFormat);
+ mActiveImageKeys.insert(wr::AsUint64(aImageKey));
mApi->AddImage(aImageKey, descriptor,
aBuffer.AsSlice());
@@ -213,7 +216,10 @@
return IPC_OK();
}
MOZ_ASSERT(mApi);
+ MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(aImageKey)) == mActiveImageKeys.end());
+
wr::ImageDescriptor descriptor(aSize, aStride, aFormat);
+ mActiveImageKeys.insert(wr::AsUint64(aImageKey));
mApi->AddBlobImage(aImageKey, descriptor,
aBuffer.AsSlice());
@@ -229,7 +235,10 @@
return IPC_OK();
}
MOZ_ASSERT(mApi);
+ MOZ_ASSERT(mFontKeys.find(wr::AsUint64(aFontKey)) == mFontKeys.end());
+
auto slice = aBuffer.AsSlice();
+ mFontKeys.insert(wr::AsUint64(aFontKey));
mApi->AddRawFont(aFontKey, slice, aFontIndex);
return IPC_OK();
@@ -242,7 +251,14 @@
return IPC_OK();
}
MOZ_ASSERT(mApi);
- mApi->DeleteFont(aFontKey);
+
+ if (mFontKeys.find(wr::AsUint64(aFontKey)) != mFontKeys.end()) {
+ mFontKeys.erase(wr::AsUint64(aFontKey));
+ mApi->DeleteFont(aFontKey);
+ } else {
+ MOZ_ASSERT_UNREACHABLE("invalid FontKey");
+ }
+
return IPC_OK();
}
@@ -269,10 +285,12 @@
return IPC_OK();
}
MOZ_ASSERT(mApi);
- if (mActiveKeys.Get(wr::AsUint64(aImageKey), nullptr)) {
- mActiveKeys.Remove(wr::AsUint64(aImageKey));
+ if (mActiveImageKeys.find(wr::AsUint64(aImageKey)) != mActiveImageKeys.end()) {
+ mActiveImageKeys.erase(wr::AsUint64(aImageKey));
+ mKeysToDelete.push_back(aImageKey);
+ } else {
+ MOZ_ASSERT_UNREACHABLE("invalid ImageKey");
}
- mKeysToDelete.push_back(aImageKey);
return IPC_OK();
}
@@ -465,8 +483,8 @@
const OpAddExternalImage& op = cmd.get_OpAddExternalImage();
Range keys(&op.key(), 1);
MOZ_ASSERT(mExternalImageIds.Get(wr::AsUint64(op.externalImageId())).get());
- MOZ_ASSERT(!mActiveKeys.Get(wr::AsUint64(keys[0]), nullptr));
- mActiveKeys.Put(wr::AsUint64(keys[0]), keys[0]);
+ MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(keys[0])) == mActiveImageKeys.end());
+ mActiveImageKeys.insert(wr::AsUint64(keys[0]));
RefPtr host = mExternalImageIds.Get(wr::AsUint64(op.externalImageId()));
if (!host) {
@@ -1029,10 +1047,14 @@
mApi->ClearRootDisplayList(wr::NewEpoch(mWrEpoch), mPipelineId);
// Schedule composition to clean up Pipeline
mCompositorScheduler->ScheduleComposition();
- for (auto iter = mActiveKeys.Iter(); !iter.Done(); iter.Next()) {
- mKeysToDelete.push_back(iter.Data());
- iter.Remove();
+ for (std::unordered_set::iterator iter = mFontKeys.begin(); iter != mFontKeys.end(); iter++) {
+ mApi->DeleteFont(wr::AsFontKey(*iter));
+ }
+ mFontKeys.clear();
+ for (std::unordered_set::iterator iter = mActiveImageKeys.begin(); iter != mActiveImageKeys.end(); iter++) {
+ mKeysToDelete.push_back(wr::AsImageKey(*iter));
}
+ mActiveImageKeys.clear();
DeleteOldImages();
for (auto iter = mExternalImageIds.Iter(); !iter.Done(); iter.Next()) {
iter.Data()->ClearWrBridge();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.h 2017-06-16 16:00:32.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.h 2017-06-17 06:11:16.000000000 +0000
@@ -247,8 +247,10 @@
RefPtr mCompositorScheduler;
RefPtr mAnimStorage;
std::vector mKeysToDelete;
- // XXX How to handle active keys of non-ExternalImages?
- nsDataHashtable mActiveKeys;
+ // mActiveImageKeys and mFontKeys are used to avoid leaking animations when
+ // WebRenderBridgeParent is destroyed abnormally and Tab move between different windows.
+ std::unordered_set mActiveImageKeys;
+ std::unordered_set mFontKeys;
// mActiveAnimations is used to avoid leaking animations when WebRenderBridgeParent is
// destroyed abnormally and Tab move between different windows.
std::unordered_set mActiveAnimations;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/webrender_bindings/WebRenderTypes.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/webrender_bindings/WebRenderTypes.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/webrender_bindings/WebRenderTypes.h 2017-06-16 16:00:32.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/webrender_bindings/WebRenderTypes.h 2017-06-17 06:11:17.000000000 +0000
@@ -115,6 +115,26 @@
+ static_cast(aId.mHandle);
}
+inline ImageKey AsImageKey(const uint64_t& aId) {
+ ImageKey imageKey;
+ imageKey.mNamespace = aId >> 32;
+ imageKey.mHandle = aId;
+ return imageKey;
+}
+
+// Whenever possible, use wr::FontKey instead of manipulating uint64_t.
+inline uint64_t AsUint64(const FontKey& aId) {
+ return (static_cast(aId.mNamespace) << 32)
+ + static_cast(aId.mHandle);
+}
+
+inline FontKey AsFontKey(const uint64_t& aId) {
+ FontKey fontKey;
+ fontKey.mNamespace = aId >> 32;
+ fontKey.mHandle = aId;
+ return fontKey;
+}
+
// Whenever possible, use wr::PipelineId instead of manipulating uint64_t.
inline uint64_t AsUint64(const PipelineId& aId) {
return (static_cast(aId.mNamespace) << 32)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCAPI.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCAPI.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCAPI.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCAPI.h 2017-06-17 06:11:17.000000000 +0000
@@ -554,20 +554,6 @@
};
/**
- * Assert if a GC barrier is invoked while this class is live. This class does
- * not disable the static rooting hazard analysis.
- */
-class JS_PUBLIC_API(AutoAssertOnBarrier)
-{
- JSContext* context;
- bool prev;
-
- public:
- explicit AutoAssertOnBarrier(JSContext* cx);
- ~AutoAssertOnBarrier();
-};
-
-/**
* Disable the static rooting hazard analysis in the live region and assert if
* any allocation that could potentially trigger a GC occurs while this guard
* object is live. This is most useful to help the exact rooting hazard analysis
@@ -645,9 +631,6 @@
namespace js {
namespace gc {
-extern JS_FRIEND_API(bool)
-BarriersAreAllowedOnCurrentThread();
-
static MOZ_ALWAYS_INLINE void
ExposeGCThingToActiveJS(JS::GCCellPtr thing)
{
@@ -662,8 +645,6 @@
if (thing.mayBeOwnedByOtherRuntime())
return;
- MOZ_DIAGNOSTIC_ASSERT(BarriersAreAllowedOnCurrentThread());
-
if (IsIncrementalBarrierNeededOnTenuredGCThing(thing))
JS::IncrementalReadBarrier(thing);
else if (js::gc::detail::TenuredCellIsMarkedGray(thing.asCell()))
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCHashTable.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCHashTable.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCHashTable.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCHashTable.h 2017-06-17 06:11:18.000000000 +0000
@@ -69,6 +69,10 @@
}
}
+ bool needsSweep() const {
+ return this->initialized() && !this->empty();
+ }
+
void sweep() {
if (!this->initialized())
return;
@@ -246,6 +250,10 @@
GCPolicy::trace(trc, &e.mutableFront(), "hashset element");
}
+ bool needsSweep() const {
+ return this->initialized() && !this->empty();
+ }
+
void sweep() {
if (!this->initialized())
return;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCVector.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCVector.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCVector.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCVector.h 2017-06-17 06:11:17.000000000 +0000
@@ -135,6 +135,10 @@
GCPolicy::trace(trc, &elem, "vector element");
}
+ bool needsSweep() const {
+ return !this->empty();
+ }
+
void sweep() {
uint32_t src, dst = 0;
for (src = 0; src < length(); src++) {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HashTable.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HashTable.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HashTable.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HashTable.h 2017-06-17 06:11:18.000000000 +0000
@@ -1613,6 +1613,7 @@
{
METER(stats.rehashes++);
removedCount = 0;
+ gen++;
for (size_t i = 0; i < capacity(); ++i)
table[i].unsetCollision();
@@ -1797,6 +1798,9 @@
if (!p.isValid())
return false;
+ MOZ_ASSERT(p.generation == generation());
+ MOZ_ASSERT(p.mutationCount == mutationCount);
+
// Changing an entry from removed to live does not affect whether we
// are overloaded and can be handled separately.
if (p.entry_->isRemoved()) {
@@ -1880,6 +1884,7 @@
MOZ_ASSERT(table);
mozilla::ReentrancyGuard g(*this);
MOZ_ASSERT(p.found());
+ MOZ_ASSERT(p.generation == generation());
remove(*p.entry_);
checkUnderloaded();
}
@@ -1889,6 +1894,7 @@
MOZ_ASSERT(table);
mozilla::ReentrancyGuard g(*this);
MOZ_ASSERT(p.found());
+ MOZ_ASSERT(p.generation == generation());
typename HashTableEntry::NonConstT t(mozilla::Move(*p));
HashPolicy::setKey(t, const_cast(k));
remove(*p.entry_);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HeapAPI.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HeapAPI.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HeapAPI.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HeapAPI.h 2017-06-17 06:11:17.000000000 +0000
@@ -168,6 +168,7 @@
bool isGCSweeping() const { return gcState_ == Sweep; }
bool isGCFinished() const { return gcState_ == Finished; }
bool isGCCompacting() const { return gcState_ == Compact; }
+ bool isGCMarking() const { return gcState_ == Mark || gcState_ == MarkGray; }
bool isGCSweepingOrCompacting() const { return gcState_ == Sweep || gcState_ == Compact; }
static MOZ_ALWAYS_INLINE JS::shadow::Zone* asShadowZone(JS::Zone* zone) {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/SweepingAPI.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/SweepingAPI.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/SweepingAPI.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/SweepingAPI.h 2017-06-17 06:11:17.000000000 +0000
@@ -38,6 +38,7 @@
virtual ~WeakCacheBase() {}
virtual void sweep() = 0;
+ virtual bool needsSweep() = 0;
};
} // namespace detail
@@ -69,6 +70,10 @@
void sweep() override {
GCPolicy::sweep(&cache);
}
+
+ bool needsSweep() override {
+ return cache.needsSweep();
+ }
};
} // namespace JS
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js 2017-06-17 06:11:18.000000000 +0000
@@ -246,7 +246,7 @@
return;
if (/nsCOMPtr<.*?>.mRawPtr/.test(field))
return;
-}
+ }
var str = "";
for (var field of fields)
@@ -322,6 +322,14 @@
{
return true;
}
+
+ // AllChildrenIterator asks AppendOwnedAnonBoxes to append into an nsTArray
+ // local variable.
+ if (/nsIFrame::AppendOwnedAnonBoxes/.test(callee) &&
+ /AllChildrenIterator::AppendNativeAnonymousChildren/.test(name))
+ {
+ return true;
+ }
// Runnables are created and named on one thread, then dispatched
// (possibly to another). Writes on the origin thread are ok.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/frontend/BytecodeCompiler.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/frontend/BytecodeCompiler.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/frontend/BytecodeCompiler.cpp 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/frontend/BytecodeCompiler.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -712,13 +712,6 @@
if (!NameFunctions(cx, pn))
return false;
- // XDR the newly delazified function.
- if (script->scriptSource()->hasEncoder() &&
- !script->scriptSource()->xdrEncodeFunction(cx, fun, sourceObject))
- {
- return false;
- }
-
return true;
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Barrier.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Barrier.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Barrier.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Barrier.h 2017-06-17 06:11:18.000000000 +0000
@@ -685,7 +685,7 @@
const Value& target) const;
#endif
- void set(NativeObject* owner, Kind kind, uint32_t slot, const Value& v) {
+ MOZ_ALWAYS_INLINE void set(NativeObject* owner, Kind kind, uint32_t slot, const Value& v) {
MOZ_ASSERT(preconditionForSet(owner, kind, slot));
pre();
value = v;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Marking.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Marking.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Marking.cpp 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Marking.cpp 2017-06-17 06:11:17.000000000 +0000
@@ -340,26 +340,26 @@
}
static void
-AssertZoneIsMarking(Cell* thing)
+AssertShouldMarkInZone(Cell* thing)
{
- MOZ_ASSERT(TenuredCell::fromPointer(thing)->zone()->isGCMarking());
+ MOZ_ASSERT(thing->asTenured().zone()->shouldMarkInZone());
}
static void
-AssertZoneIsMarking(JSString* str)
+AssertShouldMarkInZone(JSString* str)
{
#ifdef DEBUG
- Zone* zone = TenuredCell::fromPointer(str)->zone();
- MOZ_ASSERT(zone->isGCMarking() || zone->isAtomsZone());
+ Zone* zone = str->asTenured().zone();
+ MOZ_ASSERT(zone->shouldMarkInZone() || zone->isAtomsZone());
#endif
}
static void
-AssertZoneIsMarking(JS::Symbol* sym)
+AssertShouldMarkInZone(JS::Symbol* sym)
{
#ifdef DEBUG
- Zone* zone = TenuredCell::fromPointer(sym)->zone();
- MOZ_ASSERT(zone->isGCMarking() || zone->isAtomsZone());
+ Zone* zone = sym->asTenured().zone();
+ MOZ_ASSERT(zone->shouldMarkInZone() || zone->isAtomsZone());
#endif
}
@@ -771,35 +771,35 @@
template
static inline bool
-MustSkipMarking(GCMarker* gcmarker, T thing)
+ShouldMark(GCMarker* gcmarker, T thing)
{
// Don't trace things that are owned by another runtime.
if (IsOwnedByOtherRuntime(gcmarker->runtime(), thing))
- return true;
+ return false;
// Don't mark things outside a zone if we are in a per-zone GC.
- return !thing->zone()->isGCMarking();
+ return thing->zone()->shouldMarkInZone();
}
template <>
bool
-MustSkipMarking(GCMarker* gcmarker, JSObject* obj)
+ShouldMark(GCMarker* gcmarker, JSObject* obj)
{
// Don't trace things that are owned by another runtime.
if (IsOwnedByOtherRuntime(gcmarker->runtime(), obj))
- return true;
+ return false;
// We may mark a Nursery thing outside the context of the
// MinorCollectionTracer because of a pre-barrier. The pre-barrier is not
// needed in this case because we perform a minor collection before each
// incremental slice.
if (IsInsideNursery(obj))
- return true;
+ return false;
// Don't mark things outside a zone if we are in a per-zone GC. It is
// faster to check our own arena, which we can do since we know that
// the object is tenured.
- return !TenuredCell::fromPointer(obj)->zone()->isGCMarking();
+ return obj->asTenured().zone()->shouldMarkInZone();
}
template
@@ -807,7 +807,7 @@
DoMarking(GCMarker* gcmarker, T* thing)
{
// Do per-type marking precondition checks.
- if (MustSkipMarking(gcmarker, thing))
+ if (!ShouldMark(gcmarker, thing))
return;
CheckTracedThing(gcmarker, thing);
@@ -834,7 +834,7 @@
NoteWeakEdge(GCMarker* gcmarker, T** thingp)
{
// Do per-type marking precondition checks.
- if (MustSkipMarking(gcmarker, *thingp))
+ if (!ShouldMark(gcmarker, *thingp))
return;
CheckTracedThing(gcmarker, *thingp);
@@ -990,7 +990,7 @@
bool
js::GCMarker::mark(T* thing)
{
- AssertZoneIsMarking(thing);
+ AssertShouldMarkInZone(thing);
MOZ_ASSERT(!IsInsideNursery(gc::TenuredCell::fromPointer(thing)));
return gc::ParticipatesInCC::value
? gc::TenuredCell::fromPointer(thing)->markIfUnmarked(markColor())
@@ -1125,7 +1125,7 @@
inline void
js::GCMarker::eagerlyMarkChildren(JSLinearString* linearStr)
{
- AssertZoneIsMarking(linearStr);
+ AssertShouldMarkInZone(linearStr);
MOZ_ASSERT(linearStr->isMarked());
MOZ_ASSERT(linearStr->JSString::isLinear());
@@ -1135,7 +1135,7 @@
MOZ_ASSERT(linearStr->JSString::isLinear());
if (linearStr->isPermanentAtom())
break;
- AssertZoneIsMarking(linearStr);
+ AssertShouldMarkInZone(linearStr);
if (!mark(static_cast(linearStr)))
break;
}
@@ -1188,7 +1188,7 @@
JS_DIAGNOSTICS_ASSERT(rope->getTraceKind() == JS::TraceKind::String);
JS_DIAGNOSTICS_ASSERT(rope->JSString::isRope());
- AssertZoneIsMarking(rope);
+ AssertShouldMarkInZone(rope);
MOZ_ASSERT(rope->isMarked());
JSRope* next = nullptr;
@@ -1674,7 +1674,7 @@
case MarkStack::ObjectTag: {
obj = stack.popPtr().as();
- AssertZoneIsMarking(obj);
+ AssertShouldMarkInZone(obj);
goto scan_obj;
}
@@ -1738,7 +1738,7 @@
scan_obj:
{
- AssertZoneIsMarking(obj);
+ AssertShouldMarkInZone(obj);
budget.step();
if (budget.isOverBudget()) {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.cpp 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.cpp 2017-06-17 06:11:17.000000000 +0000
@@ -251,8 +251,8 @@
void
JS::Zone::checkUniqueIdTableAfterMovingGC()
{
- for (UniqueIdMap::Enum e(uniqueIds()); !e.empty(); e.popFront())
- js::gc::CheckGCThingAfterMovingGC(e.front().key());
+ for (auto r = uniqueIds().all(); !r.empty(); r.popFront())
+ js::gc::CheckGCThingAfterMovingGC(r.front().key());
}
#endif
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.h 2017-06-16 16:00:33.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.h 2017-06-17 06:11:18.000000000 +0000
@@ -242,11 +242,8 @@
return CurrentThreadIsHeapMajorCollecting() && !rt->gc.isHeapCompacting() && gcState_ != NoGC;
}
- bool isGCMarking() {
- if (CurrentThreadIsHeapCollecting())
- return gcState_ == Mark || gcState_ == MarkGray;
- else
- return needsIncrementalBarrier();
+ bool shouldMarkInZone() const {
+ return needsIncrementalBarrier() || isGCMarking();
}
// Get a number that is incremented whenever this zone is collected, and
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h 2017-06-17 06:11:18.000000000 +0000
@@ -1457,6 +1457,12 @@
branchPtr(cond, scratch2, rhs, label);
}
+void
+MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label)
+{
+ branch32(cond, lhs, Imm32(rhs.value), label);
+}
+
template
inline CodeOffsetJump
MacroAssembler::branchPtrWithPatch(Condition cond, Register lhs, T rhs, RepatchLabel* label)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h 2017-06-17 06:11:19.000000000 +0000
@@ -1032,6 +1032,17 @@
branchPtr(cond, scratch, rhs, label);
}
+void
+MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label)
+{
+ vixl::UseScratchRegisterScope temps(this);
+ const Register scratch = temps.AcquireX().asUnsized();
+ MOZ_ASSERT(scratch != lhs.base);
+ MOZ_ASSERT(scratch != lhs.index);
+ loadPtr(lhs, scratch);
+ branchPtr(cond, scratch, rhs, label);
+}
+
template
CodeOffsetJump
MacroAssembler::branchPtrWithPatch(Condition cond, Register lhs, T rhs, RepatchLabel* label)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.cpp 2017-06-17 06:11:19.000000000 +0000
@@ -1414,6 +1414,11 @@
FunctionInfo(BaselineThrowUninitializedThis,
"BaselineThrowUninitializedThis");
+typedef bool (*ThrowInitializedThisFn)(JSContext*, BaselineFrame* frame);
+static const VMFunction ThrowInitializedThisInfo =
+ FunctionInfo(BaselineThrowInitializedThis,
+ "BaselineThrowInitializedThis");
+
bool
BaselineCompiler::emit_JSOP_CHECKTHIS()
{
@@ -1424,18 +1429,35 @@
}
bool
-BaselineCompiler::emitCheckThis(ValueOperand val)
+BaselineCompiler::emit_JSOP_CHECKTHISREINIT()
+{
+ frame.syncStack(0);
+ masm.loadValue(frame.addressOfStackValue(frame.peek(-1)), R0);
+
+ return emitCheckThis(R0, /* reinit = */true);
+}
+
+bool
+BaselineCompiler::emitCheckThis(ValueOperand val, bool reinit)
{
Label thisOK;
- masm.branchTestMagic(Assembler::NotEqual, val, &thisOK);
+ if (reinit)
+ masm.branchTestMagic(Assembler::Equal, val, &thisOK);
+ else
+ masm.branchTestMagic(Assembler::NotEqual, val, &thisOK);
prepareVMCall();
masm.loadBaselineFramePtr(BaselineFrameReg, val.scratchReg());
pushArg(val.scratchReg());
- if (!callVM(ThrowUninitializedThisInfo))
- return false;
+ if (reinit) {
+ if (!callVM(ThrowInitializedThisInfo))
+ return false;
+ } else {
+ if (!callVM(ThrowUninitializedThisInfo))
+ return false;
+ }
masm.bind(&thisOK);
return true;
@@ -4222,6 +4244,56 @@
masm.tagValue(JSVAL_TYPE_OBJECT, proto, R1);
frame.push(R1);
return true;
+}
+
+typedef JSObject* (*SuperFunOperationFn)(JSContext*, HandleObject);
+static const VMFunction SuperFunOperationInfo =
+ FunctionInfo(SuperFunOperation, "SuperFunOperation");
+
+bool
+BaselineCompiler::emit_JSOP_SUPERFUN()
+{
+ frame.syncStack(0);
+
+ Register callee = R0.scratchReg();
+ Register proto = R1.scratchReg();
+ Register scratch = R2.scratchReg();
+
+ // Lookup callee object of environment containing [[ThisValue]]
+ getThisEnvironmentCallee(callee);
+
+ // Load prototype of callee
+ masm.loadObjProto(callee, proto);
+
+ // Use VMCall for missing or lazy proto
+ Label needVMCall;
+ MOZ_ASSERT(uintptr_t(TaggedProto::LazyProto) == 1);
+ masm.branchPtr(Assembler::BelowOrEqual, proto, ImmWord(1), &needVMCall);
+
+ // Use VMCall for non-JSFunction objects (eg. Proxy)
+ masm.branchTestObjClass(Assembler::NotEqual, proto, scratch, &JSFunction::class_, &needVMCall);
+
+ // Use VMCall if not constructor
+ masm.load16ZeroExtend(Address(proto, JSFunction::offsetOfFlags()), scratch);
+ masm.branchTest32(Assembler::Zero, scratch, Imm32(JSFunction::CONSTRUCTOR), &needVMCall);
+
+ // Valid constructor
+ Label hasSuperFun;
+ masm.jump(&hasSuperFun);
+
+ // Slow path VM Call
+ masm.bind(&needVMCall);
+ prepareVMCall();
+ pushArg(callee);
+ if (!callVM(SuperFunOperationInfo))
+ return false;
+ masm.movePtr(ReturnReg, proto);
+
+ // Box prototype and return
+ masm.bind(&hasSuperFun);
+ masm.tagValue(JSVAL_TYPE_OBJECT, proto, R1);
+ frame.push(R1);
+ return true;
}
typedef bool (*NewArgumentsObjectFn)(JSContext*, BaselineFrame*, MutableHandleValue);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.h 2017-06-17 06:11:18.000000000 +0000
@@ -217,6 +217,7 @@
_(JSOP_RESUME) \
_(JSOP_CALLEE) \
_(JSOP_SUPERBASE) \
+ _(JSOP_SUPERFUN) \
_(JSOP_GETRVAL) \
_(JSOP_SETRVAL) \
_(JSOP_RETRVAL) \
@@ -226,6 +227,7 @@
_(JSOP_CHECKISOBJ) \
_(JSOP_CHECKISCALLABLE) \
_(JSOP_CHECKTHIS) \
+ _(JSOP_CHECKTHISREINIT) \
_(JSOP_CHECKRETURN) \
_(JSOP_NEWTARGET) \
_(JSOP_SUPERCALL) \
@@ -295,7 +297,7 @@
private:
MethodStatus emitBody();
- MOZ_MUST_USE bool emitCheckThis(ValueOperand val);
+ MOZ_MUST_USE bool emitCheckThis(ValueOperand val, bool reinit=false);
void emitLoadReturnValue(ValueOperand val);
void emitInitializeLocals();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineIC.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineIC.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineIC.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineIC.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -2397,7 +2397,7 @@
FallbackICSpew(cx, stub, "Call(%s)", CodeName[op]);
MOZ_ASSERT(argc == GET_ARGC(pc));
- bool constructing = (op == JSOP_NEW);
+ bool constructing = (op == JSOP_NEW || op == JSOP_SUPERCALL);
bool ignoresReturnValue = (op == JSOP_CALL_IGNORES_RV);
// Ensure vp array is rooted - we may GC in here.
@@ -2432,7 +2432,7 @@
}
}
- if (op == JSOP_NEW) {
+ if (constructing) {
if (!ConstructFromStack(cx, callArgs))
return false;
res.set(callArgs.rval());
@@ -2506,7 +2506,7 @@
RootedScript script(cx, frame->script());
jsbytecode* pc = stub->icEntry()->pc(script);
JSOp op = JSOp(*pc);
- bool constructing = (op == JSOP_SPREADNEW);
+ bool constructing = (op == JSOP_SPREADNEW || op == JSOP_SPREADSUPERCALL);
FallbackICSpew(cx, stub, "SpreadCall(%s)", CodeName[op]);
// Ensure vp array is rooted - we may GC in here.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/IonBuilder.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/IonBuilder.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/IonBuilder.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/IonBuilder.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -4860,6 +4860,9 @@
if (!target || !target->hasScript())
return nullptr;
+ if (target->isBoundFunction() || target->isDerivedClassConstructor())
+ return nullptr;
+
JSObject* templateObject = inspector->getTemplateObject(pc);
if (!templateObject)
return nullptr;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/MacroAssembler.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/MacroAssembler.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/MacroAssembler.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/MacroAssembler.h 2017-06-17 06:11:19.000000000 +0000
@@ -1037,6 +1037,8 @@
inline void branchPtr(Condition cond, const Address& lhs, ImmGCPtr rhs, Label* label) PER_SHARED_ARCH;
inline void branchPtr(Condition cond, const Address& lhs, ImmWord rhs, Label* label) PER_SHARED_ARCH;
+ inline void branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label) PER_SHARED_ARCH;
+
inline void branchPtr(Condition cond, const AbsoluteAddress& lhs, Register rhs, Label* label)
DEFINED_ON(arm, arm64, mips_shared, x86, x64);
inline void branchPtr(Condition cond, const AbsoluteAddress& lhs, ImmWord rhs, Label* label)
@@ -1654,6 +1656,8 @@
if (type == MIRType::Value)
branchTestGCThing(Assembler::NotEqual, address, &done);
+ else if (type == MIRType::Object || type == MIRType::String)
+ branchPtr(Assembler::Equal, address, ImmWord(0), &done);
Push(PreBarrierReg);
computeEffectiveAddress(address, PreBarrierReg);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h 2017-06-17 06:11:18.000000000 +0000
@@ -571,6 +571,13 @@
branchPtr(cond, SecondScratchReg, rhs, label);
}
+void
+MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label)
+{
+ loadPtr(lhs, SecondScratchReg);
+ branchPtr(cond, SecondScratchReg, rhs, label);
+}
+
template
CodeOffsetJump
MacroAssembler::branchPtrWithPatch(Condition cond, Register lhs, T rhs, RepatchLabel* label)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/SharedIC.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/SharedIC.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/SharedIC.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/SharedIC.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -2386,6 +2386,7 @@
MOZ_ASSERT(frame->isFunctionFrame() || frame->isEvalFrame());
MOZ_ASSERT(stub->monitorsThis() ||
*GetNextPc(pc) == JSOP_CHECKTHIS ||
+ *GetNextPc(pc) == JSOP_CHECKTHISREINIT ||
*GetNextPc(pc) == JSOP_CHECKRETURN);
if (stub->monitorsThis())
TypeScript::SetThis(cx, script, TypeSet::UnknownType());
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -1433,15 +1433,15 @@
void
MarkStringFromIon(JSRuntime* rt, JSString** stringp)
{
- if (*stringp)
- TraceManuallyBarrieredEdge(&rt->gc.marker, stringp, "write barrier");
+ MOZ_ASSERT(*stringp);
+ TraceManuallyBarrieredEdge(&rt->gc.marker, stringp, "write barrier");
}
void
MarkObjectFromIon(JSRuntime* rt, JSObject** objp)
{
- if (*objp)
- TraceManuallyBarrieredEdge(&rt->gc.marker, objp, "write barrier");
+ MOZ_ASSERT(*objp);
+ TraceManuallyBarrieredEdge(&rt->gc.marker, objp, "write barrier");
}
void
@@ -1497,6 +1497,12 @@
return ThrowUninitializedThis(cx, frame);
}
+bool
+BaselineThrowInitializedThis(JSContext* cx, BaselineFrame* frame)
+{
+ return ThrowInitializedThis(cx, frame);
+}
+
bool
ThrowObjectCoercible(JSContext* cx, HandleValue v)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.h 2017-06-17 06:11:18.000000000 +0000
@@ -832,6 +832,9 @@
BaselineThrowUninitializedThis(JSContext* cx, BaselineFrame* frame);
MOZ_MUST_USE bool
+BaselineThrowInitializedThis(JSContext* cx, BaselineFrame* frame);
+
+MOZ_MUST_USE bool
ThrowBadDerivedReturn(JSContext* cx, HandleValue v);
MOZ_MUST_USE bool
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x64/Assembler-x64.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x64/Assembler-x64.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x64/Assembler-x64.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x64/Assembler-x64.h 2017-06-17 06:11:18.000000000 +0000
@@ -871,6 +871,9 @@
case Operand::MEM_REG_DISP:
masm.cmpq_im(rhs.value, lhs.disp(), lhs.base());
break;
+ case Operand::MEM_SCALE:
+ masm.cmpq_im(rhs.value, lhs.disp(), lhs.base(), lhs.index(), lhs.scale());
+ break;
case Operand::MEM_ADDRESS32:
masm.cmpq_im(rhs.value, lhs.address());
break;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h 2017-06-17 06:11:19.000000000 +0000
@@ -582,6 +582,12 @@
branchPtrImpl(cond, lhs, rhs, label);
}
+void
+MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label)
+{
+ branchPtrImpl(cond, lhs, rhs, label);
+}
+
template
void
MacroAssembler::branchPtrImpl(Condition cond, const T& lhs, const S& rhs, L label)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/class/bug1169746.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/class/bug1169746.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/class/bug1169746.js 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/class/bug1169746.js 2017-06-17 06:11:18.000000000 +0000
@@ -0,0 +1,10 @@
+class C { }
+class D extends C { }
+
+function f()
+{
+ for (var i = 0; i < 2000; ++i)
+ new D();
+}
+
+f();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/xdr/relazify.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/xdr/relazify.js
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/xdr/relazify.js 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/xdr/relazify.js 2017-06-17 06:11:19.000000000 +0000
@@ -0,0 +1,29 @@
+load(libdir + 'bytecode-cache.js');
+var test = "";
+gczeal(0);
+
+// Check that a GC can relazify decoded functions.
+//
+// Generations 0 and 3 are executed from the source, thus f is not executed yet.
+// Generations 1 and 2 are decoded, thus we recorded the delazified f function.
+test = `
+ function f() { return 1; };
+ assertEq(isLazyFunction(f), generation == 0 || generation == 3);
+ f();
+ expect = isRelazifiableFunction(f);
+ assertEq(isLazyFunction(f), false);
+`;
+evalWithCache(test, {
+ checkAfter: function (ctx) {
+ gc(ctx.global.f, "shrinking"); // relazify f, if possible.
+ evaluate("assertEq(isLazyFunction(f), expect);", ctx);
+ }
+});
+
+evalWithCache(test, {
+ incremental: true,
+ checkAfter: function (ctx) {
+ gc(ctx.global.f, "shrinking"); // relazify f, if possible.
+ evaluate("assertEq(isLazyFunction(f), expect);", ctx);
+ }
+});
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -1347,7 +1347,6 @@
dtoaState(nullptr),
heapState(JS::HeapState::Idle),
suppressGC(0),
- allowGCBarriers(true),
#ifdef DEBUG
ionCompiling(false),
ionCompilingSafeForMinorGC(false),
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.h 2017-06-17 06:11:18.000000000 +0000
@@ -474,10 +474,6 @@
*/
js::ThreadLocalData suppressGC;
- // In some cases, invoking GC barriers (incremental or otherwise) will break
- // things. These barriers assert if this flag is set.
- js::ThreadLocalData allowGCBarriers;
-
#ifdef DEBUG
// Whether this thread is actively Ion compiling.
js::ThreadLocalData ionCompiling;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsfun.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsfun.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsfun.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsfun.cpp 2017-06-17 06:11:19.000000000 +0000
@@ -1567,6 +1567,14 @@
// Only functions without inner functions are re-lazified.
script->setLazyScript(lazy);
}
+
+ // XDR the newly delazified function.
+ if (script->scriptSource()->hasEncoder()) {
+ RootedScriptSource sourceObject(cx, lazy->sourceObject());
+ if (!script->scriptSource()->xdrEncodeFunction(cx, fun, sourceObject))
+ return false;
+ }
+
return true;
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsgc.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsgc.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsgc.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsgc.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -5233,6 +5233,9 @@
// Build a vector of sweep tasks to run on a helper thread.
WeakCacheTaskVector tasks;
bool ok = IterateWeakCaches(rt, [&] (JS::detail::WeakCacheBase* cache) {
+ if (!cache->needsSweep())
+ return true;
+
return tasks.emplaceBack(rt, *cache);
});
@@ -6009,7 +6012,6 @@
// scheduling.
return cx->heapState == JS::HeapState::Idle
&& !cx->suppressGC
- && cx->allowGCBarriers
&& !cx->inUnsafeRegion
&& !cx->generationalDisabled
&& !cx->compactingDisabledCount
@@ -7494,25 +7496,6 @@
cx_->inUnsafeRegion--;
}
-JS::AutoAssertOnBarrier::AutoAssertOnBarrier(JSContext* cx)
- : context(cx),
- prev(cx->allowGCBarriers)
-{
- context->allowGCBarriers = false;
-}
-
-JS::AutoAssertOnBarrier::~AutoAssertOnBarrier()
-{
- MOZ_ASSERT(!context->allowGCBarriers);
- context->allowGCBarriers = prev;
-}
-
-JS_FRIEND_API(bool)
-js::gc::BarriersAreAllowedOnCurrentThread()
-{
- return TlsContext.get()->allowGCBarriers;
-}
-
#ifdef DEBUG
JS::AutoAssertNoAlloc::AutoAssertNoAlloc(JSContext* cx)
: gc(nullptr)
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.cpp 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.cpp 2017-06-17 06:11:18.000000000 +0000
@@ -3554,6 +3554,12 @@
return is();
}
+bool
+JSObject::uninlinedNonProxyIsExtensible() const
+{
+ return nonProxyIsExtensible();
+}
+
void
JSObject::dump(FILE* fp) const
{
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.h 2017-06-16 16:00:34.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.h 2017-06-17 06:11:18.000000000 +0000
@@ -504,6 +504,7 @@
// places that want it (JITs and the like), and it'd be a pain to mark them
// all as friends.
inline bool nonProxyIsExtensible() const;
+ bool uninlinedNonProxyIsExtensible() const;
public:
/*
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ArrayBufferObject.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ArrayBufferObject.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ArrayBufferObject.h 2017-06-16 16:00:36.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ArrayBufferObject.h 2017-06-17 06:11:20.000000000 +0000
@@ -599,6 +599,10 @@
void sweep();
void sweepAfterMinorGC();
+ bool needsSweep() const {
+ return map.needsSweep();
+ }
+
bool needsSweepAfterMinorGC() const {
return !nurseryKeys.empty() || !nurseryKeysValid;
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.cpp 2017-06-17 06:11:20.000000000 +0000
@@ -2757,7 +2757,7 @@
CASE(JSOP_CHECKTHISREINIT)
{
if (!REGS.sp[-1].isMagic(JS_UNINITIALIZED_LEXICAL)) {
- JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_REINIT_THIS);
+ MOZ_ALWAYS_FALSE(ThrowInitializedThis(cx, REGS.fp()));
goto error;
}
}
@@ -4226,24 +4226,10 @@
CASE(JSOP_SUPERFUN)
{
ReservedRooted superEnvFunc(&rootObject0, &GetSuperEnvFunction(cx, REGS));
- MOZ_ASSERT(superEnvFunc->as().isClassConstructor());
- MOZ_ASSERT(superEnvFunc->as().nonLazyScript()->isDerivedClassConstructor());
-
ReservedRooted superFun(&rootObject1);
-
- if (!GetPrototype(cx, superEnvFunc, &superFun))
- goto error;
-
- ReservedRooted superFunVal(&rootValue0, UndefinedValue());
+ superFun = SuperFunOperation(cx, superEnvFunc);
if (!superFun)
- superFunVal = NullValue();
- else if (!superFun->isConstructor())
- superFunVal = ObjectValue(*superFun);
-
- if (superFunVal.isObjectOrNull()) {
- ReportIsNotFunction(cx, superFunVal, JSDVG_IGNORE_STACK, CONSTRUCT);
goto error;
- }
PUSH_OBJECT(*superFun);
}
@@ -5241,3 +5227,35 @@
return superBase;
}
+
+JSObject*
+js::SuperFunOperation(JSContext* cx, HandleObject callee)
+{
+ MOZ_ASSERT(callee->as().isClassConstructor());
+ MOZ_ASSERT(callee->as().nonLazyScript()->isDerivedClassConstructor());
+
+ RootedObject superFun(cx);
+
+ if (!GetPrototype(cx, callee, &superFun))
+ return nullptr;
+
+ RootedValue superFunVal(cx, UndefinedValue());
+ if (!superFun)
+ superFunVal = NullValue();
+ else if (!superFun->isConstructor())
+ superFunVal = ObjectValue(*superFun);
+
+ if (superFunVal.isObjectOrNull()) {
+ ReportIsNotFunction(cx, superFunVal, JSDVG_IGNORE_STACK, CONSTRUCT);
+ return nullptr;
+ }
+
+ return superFun;
+}
+
+bool
+js::ThrowInitializedThis(JSContext* cx, AbstractFramePtr frame)
+{
+ JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_REINIT_THIS);
+ return false;
+}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.h 2017-06-17 06:11:21.000000000 +0000
@@ -572,6 +572,9 @@
ThrowUninitializedThis(JSContext* cx, AbstractFramePtr frame);
bool
+ThrowInitializedThis(JSContext* cx, AbstractFramePtr frame);
+
+bool
DefaultClassConstructor(JSContext* cx, unsigned argc, Value* vp);
bool
@@ -592,6 +595,9 @@
JSObject*
HomeObjectSuperBase(JSContext* cx, HandleObject homeObj);
+JSObject*
+SuperFunOperation(JSContext* cx, HandleObject callee);
+
} /* namespace js */
#endif /* vm_Interpreter_h */
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject.h 2017-06-17 06:11:21.000000000 +0000
@@ -795,15 +795,16 @@
void freeSlot(JSContext* cx, uint32_t slot);
private:
- static Shape* getChildProperty(JSContext* cx, HandleNativeObject obj,
- HandleShape parent, MutableHandle child);
+ static MOZ_ALWAYS_INLINE Shape* getChildProperty(JSContext* cx, HandleNativeObject obj,
+ HandleShape parent,
+ MutableHandle child);
public:
/* Add a property whose id is not yet in this scope. */
- static Shape* addProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
- JSGetterOp getter, JSSetterOp setter,
- uint32_t slot, unsigned attrs, unsigned flags,
- bool allowDictionary = true);
+ static MOZ_ALWAYS_INLINE Shape* addProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
+ JSGetterOp getter, JSSetterOp setter,
+ uint32_t slot, unsigned attrs, unsigned flags,
+ bool allowDictionary = true);
/* Add a data property whose id is not yet in this scope. */
static Shape* addDataProperty(JSContext* cx, HandleNativeObject obj,
@@ -901,36 +902,36 @@
return getSlotAddressUnchecked(slot);
}
- HeapSlot& getSlotRef(uint32_t slot) {
+ MOZ_ALWAYS_INLINE HeapSlot& getSlotRef(uint32_t slot) {
MOZ_ASSERT(slotInRange(slot));
return *getSlotAddress(slot);
}
- const HeapSlot& getSlotRef(uint32_t slot) const {
+ MOZ_ALWAYS_INLINE const HeapSlot& getSlotRef(uint32_t slot) const {
MOZ_ASSERT(slotInRange(slot));
return *getSlotAddress(slot);
}
// Check requirements on values stored to this object.
- inline void checkStoredValue(const Value& v) {
+ MOZ_ALWAYS_INLINE void checkStoredValue(const Value& v) {
MOZ_ASSERT(IsObjectValueInCompartment(v, compartment()));
MOZ_ASSERT(AtomIsMarked(zoneFromAnyThread(), v));
}
- void setSlot(uint32_t slot, const Value& value) {
+ MOZ_ALWAYS_INLINE void setSlot(uint32_t slot, const Value& value) {
MOZ_ASSERT(slotInRange(slot));
checkStoredValue(value);
getSlotRef(slot).set(this, HeapSlot::Slot, slot, value);
}
- void initSlot(uint32_t slot, const Value& value) {
+ MOZ_ALWAYS_INLINE void initSlot(uint32_t slot, const Value& value) {
MOZ_ASSERT(getSlot(slot).isUndefined());
MOZ_ASSERT(slotInRange(slot));
checkStoredValue(value);
initSlotUnchecked(slot, value);
}
- void initSlotUnchecked(uint32_t slot, const Value& value) {
+ MOZ_ALWAYS_INLINE void initSlotUnchecked(uint32_t slot, const Value& value) {
getSlotAddressUnchecked(slot)->init(this, HeapSlot::Slot, slot, value);
}
@@ -964,30 +965,30 @@
static bool rollbackProperties(JSContext* cx, HandleNativeObject obj,
uint32_t slotSpan);
- inline void setSlotWithType(JSContext* cx, Shape* shape,
- const Value& value, bool overwriting = true);
+ MOZ_ALWAYS_INLINE void setSlotWithType(JSContext* cx, Shape* shape,
+ const Value& value, bool overwriting = true);
- inline const Value& getReservedSlot(uint32_t index) const {
+ MOZ_ALWAYS_INLINE const Value& getReservedSlot(uint32_t index) const {
MOZ_ASSERT(index < JSSLOT_FREE(getClass()));
return getSlot(index);
}
- const HeapSlot& getReservedSlotRef(uint32_t index) const {
+ MOZ_ALWAYS_INLINE const HeapSlot& getReservedSlotRef(uint32_t index) const {
MOZ_ASSERT(index < JSSLOT_FREE(getClass()));
return getSlotRef(index);
}
- HeapSlot& getReservedSlotRef(uint32_t index) {
+ MOZ_ALWAYS_INLINE HeapSlot& getReservedSlotRef(uint32_t index) {
MOZ_ASSERT(index < JSSLOT_FREE(getClass()));
return getSlotRef(index);
}
- void initReservedSlot(uint32_t index, const Value& v) {
+ MOZ_ALWAYS_INLINE void initReservedSlot(uint32_t index, const Value& v) {
MOZ_ASSERT(index < JSSLOT_FREE(getClass()));
initSlot(index, v);
}
- void setReservedSlot(uint32_t index, const Value& v) {
+ MOZ_ALWAYS_INLINE void setReservedSlot(uint32_t index, const Value& v) {
MOZ_ASSERT(index < JSSLOT_FREE(getClass()));
setSlot(index, v);
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject-inl.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject-inl.h 2017-06-17 06:11:21.000000000 +0000
@@ -420,7 +420,7 @@
return obj;
}
-inline void
+MOZ_ALWAYS_INLINE void
NativeObject::setSlotWithType(JSContext* cx, Shape* shape,
const Value& value, bool overwriting)
{
@@ -739,8 +739,9 @@
}
}
- // Check for a native property.
- if (Shape* shape = obj->lookup(cx, id)) {
+ // Check for a native property. Call Shape::search directly (instead of
+ // NativeObject::lookup) because it's inlined.
+ if (Shape* shape = obj->lastProperty()->search(cx, id)) {
propp.setNativeProperty(shape);
*donep = true;
return true;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -1907,8 +1907,8 @@
if (!table || !table->initialized())
return;
- for (NewTable::Enum e(*table); !e.empty(); e.popFront()) {
- NewEntry entry = e.front();
+ for (auto r = table->all(); !r.empty(); r.popFront()) {
+ NewEntry entry = r.front();
CheckGCThingAfterMovingGC(entry.group.unbarrieredGet());
TaggedProto proto = entry.group.unbarrieredGet()->proto();
if (proto.isObject())
@@ -1921,7 +1921,7 @@
NewEntry::Lookup lookup(clasp, proto, entry.associated);
auto ptr = table->lookup(lookup);
- MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front());
+ MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front());
}
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.h 2017-06-16 16:00:36.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.h 2017-06-17 06:11:20.000000000 +0000
@@ -390,7 +390,7 @@
inline HeapTypeSet* getProperty(JSContext* cx, JSObject* obj, jsid id);
/* Get a property only if it already exists. */
- inline HeapTypeSet* maybeGetProperty(jsid id);
+ MOZ_ALWAYS_INLINE HeapTypeSet* maybeGetProperty(jsid id);
/*
* Iterate through the group's properties. getPropertyCount overapproximates
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape.cpp 2017-06-17 06:11:20.000000000 +0000
@@ -290,7 +290,7 @@
* which must be lastProperty() if inDictionaryMode(), else parent must be
* one of lastProperty() or lastProperty()->parent.
*/
-/* static */ Shape*
+/* static */ MOZ_ALWAYS_INLINE Shape*
NativeObject::getChildProperty(JSContext* cx,
HandleNativeObject obj, HandleShape parent,
MutableHandle child)
@@ -418,30 +418,6 @@
return true;
}
-/* static */ Shape*
-NativeObject::addProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
- GetterOp getter, SetterOp setter, uint32_t slot, unsigned attrs,
- unsigned flags, bool allowDictionary)
-{
- MOZ_ASSERT(!JSID_IS_VOID(id));
- MOZ_ASSERT(getter != JS_PropertyStub);
- MOZ_ASSERT(setter != JS_StrictPropertyStub);
- MOZ_ASSERT(obj->nonProxyIsExtensible());
- MOZ_ASSERT(!obj->containsPure(id));
-
- AutoKeepShapeTables keep(cx);
- ShapeTable::Entry* entry = nullptr;
- if (obj->inDictionaryMode()) {
- ShapeTable* table = obj->lastProperty()->ensureTableForDictionary(cx, keep);
- if (!table)
- return nullptr;
- entry = &table->search(id, keep);
- }
-
- return addPropertyInternal(cx, obj, id, getter, setter, slot, attrs, flags, entry,
- allowDictionary, keep);
-}
-
static bool
ShouldConvertToDictionary(NativeObject* obj)
{
@@ -1288,12 +1264,12 @@
if (!baseShapes().initialized())
return;
- for (BaseShapeSet::Enum e(baseShapes()); !e.empty(); e.popFront()) {
- UnownedBaseShape* base = e.front().unbarrieredGet();
+ for (auto r = baseShapes().all(); !r.empty(); r.popFront()) {
+ UnownedBaseShape* base = r.front().unbarrieredGet();
CheckGCThingAfterMovingGC(base);
BaseShapeSet::Ptr ptr = baseShapes().lookup(base);
- MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front());
+ MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front());
}
}
@@ -1349,8 +1325,8 @@
* initialShapes that points into the nursery, and that the hash table
* entries are discoverable.
*/
- for (InitialShapeSet::Enum e(initialShapes()); !e.empty(); e.popFront()) {
- InitialShapeEntry entry = e.front();
+ for (auto r = initialShapes().all(); !r.empty(); r.popFront()) {
+ InitialShapeEntry entry = r.front();
JSProtoKey protoKey = entry.proto.key();
TaggedProto proto = entry.proto.proto().unbarrieredGet();
Shape* shape = entry.shape.unbarrieredGet();
@@ -1365,7 +1341,7 @@
shape->numFixedSlots(),
shape->getObjectFlags());
InitialShapeSet::Ptr ptr = initialShapes().lookup(lookup);
- MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front());
+ MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front());
}
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape-inl.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape-inl.h 2017-06-17 06:11:21.000000000 +0000
@@ -333,6 +333,30 @@
return start->searchLinear(id);
}
+/* static */ MOZ_ALWAYS_INLINE Shape*
+NativeObject::addProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
+ GetterOp getter, SetterOp setter, uint32_t slot, unsigned attrs,
+ unsigned flags, bool allowDictionary)
+{
+ MOZ_ASSERT(!JSID_IS_VOID(id));
+ MOZ_ASSERT(getter != JS_PropertyStub);
+ MOZ_ASSERT(setter != JS_StrictPropertyStub);
+ MOZ_ASSERT(obj->uninlinedNonProxyIsExtensible());
+ MOZ_ASSERT(!obj->containsPure(id));
+
+ AutoKeepShapeTables keep(cx);
+ ShapeTable::Entry* entry = nullptr;
+ if (obj->inDictionaryMode()) {
+ ShapeTable* table = obj->lastProperty()->ensureTableForDictionary(cx, keep);
+ if (!table)
+ return nullptr;
+ entry = &table->search(id, keep);
+ }
+
+ return addPropertyInternal(cx, obj, id, getter, setter, slot, attrs, flags, entry,
+ allowDictionary, keep);
+}
+
} /* namespace js */
#endif /* vm_Shape_inl_h */
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/TypeInference-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/TypeInference-inl.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/TypeInference-inl.h 2017-06-16 16:00:36.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/TypeInference-inl.h 2017-06-17 06:11:20.000000000 +0000
@@ -405,11 +405,10 @@
}
MOZ_ALWAYS_INLINE bool
-HasTypePropertyId(JSObject* obj, jsid id, TypeSet::Type type)
+HasTrackedPropertyType(JSObject* obj, jsid id, TypeSet::Type type)
{
- id = IdToTypeId(id);
- if (!TrackPropertyTypes(obj, id))
- return true;
+ MOZ_ASSERT(id == IdToTypeId(id));
+ MOZ_ASSERT(TrackPropertyTypes(obj, id));
if (HeapTypeSet* types = obj->group()->maybeGetProperty(id)) {
if (!types->hasType(type))
@@ -424,6 +423,16 @@
}
MOZ_ALWAYS_INLINE bool
+HasTypePropertyId(JSObject* obj, jsid id, TypeSet::Type type)
+{
+ id = IdToTypeId(id);
+ if (!TrackPropertyTypes(obj, id))
+ return true;
+
+ return HasTrackedPropertyType(obj, id, type);
+}
+
+MOZ_ALWAYS_INLINE bool
HasTypePropertyId(JSObject* obj, jsid id, const Value& value)
{
return HasTypePropertyId(obj, id, TypeSet::GetValueType(value));
@@ -433,20 +442,18 @@
void AddTypePropertyId(JSContext* cx, ObjectGroup* group, JSObject* obj, jsid id, const Value& value);
/* Add a possible type for a property of obj. */
-inline void
+MOZ_ALWAYS_INLINE void
AddTypePropertyId(JSContext* cx, JSObject* obj, jsid id, TypeSet::Type type)
{
id = IdToTypeId(id);
- if (TrackPropertyTypes(obj, id))
+ if (TrackPropertyTypes(obj, id) && !HasTrackedPropertyType(obj, id, type))
AddTypePropertyId(cx, obj->group(), obj, id, type);
}
-inline void
+MOZ_ALWAYS_INLINE void
AddTypePropertyId(JSContext* cx, JSObject* obj, jsid id, const Value& value)
{
- id = IdToTypeId(id);
- if (TrackPropertyTypes(obj, id))
- AddTypePropertyId(cx, obj->group(), obj, id, value);
+ return AddTypePropertyId(cx, obj, id, TypeSet::GetValueType(value));
}
inline void
@@ -830,7 +837,7 @@
// Lookup an entry in a hash set, return nullptr if it does not exist.
template
- static inline U*
+ static MOZ_ALWAYS_INLINE U*
Lookup(U** values, unsigned count, T key)
{
if (count == 0)
@@ -1126,7 +1133,7 @@
return &base->types;
}
-inline HeapTypeSet*
+MOZ_ALWAYS_INLINE HeapTypeSet*
ObjectGroup::maybeGetProperty(jsid id)
{
MOZ_ASSERT(JSID_IS_VOID(id) || JSID_IS_EMPTY(id) || JSID_IS_STRING(id) || JSID_IS_SYMBOL(id));
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/nsIPresShell.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/nsIPresShell.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/nsIPresShell.h 2017-06-16 16:00:36.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/nsIPresShell.h 2017-06-17 06:11:20.000000000 +0000
@@ -955,20 +955,6 @@
virtual void UnsuppressPainting() = 0;
/**
- * Called to disable nsITheme support in a specific presshell.
- */
- void DisableThemeSupport()
- {
- // Doesn't have to be dynamic. Just set the bool.
- mIsThemeSupportDisabled = true;
- }
-
- /**
- * Indicates whether theme support is enabled.
- */
- bool IsThemeSupportEnabled() const { return !mIsThemeSupportDisabled; }
-
- /**
* Get the set of agent style sheets for this presentation
*/
virtual nsresult GetAgentStyleSheets(
@@ -1862,9 +1848,6 @@
// For all documents we initially lock down painting.
bool mPaintingSuppressed : 1;
- // Whether or not form controls should use nsITheme in this shell.
- bool mIsThemeSupportDisabled : 1;
-
bool mIsActive : 1;
bool mFrozen : 1;
bool mIsFirstPaint : 1;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/PresShell.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/PresShell.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/PresShell.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/PresShell.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -786,7 +786,6 @@
, mIsDestroying(false)
, mIsReflowing(false)
, mPaintingSuppressed(false)
- , mIsThemeSupportDisabled(false)
, mIsActive(false)
, mFrozen(false)
, mIsFirstPaint(false)
@@ -853,7 +852,6 @@
mLastOSWake = mLoadBegin = TimeStamp::Now();
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
- mIsThemeSupportDisabled = false;
mIsActive = true;
// FIXME/bug 735029: find a better solution to this problem
mIsFirstPaint = true;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -182,16 +182,19 @@
bool mShouldPostHints;
bool mShouldComputeHints;
nsChangeHint mComputedHint;
+ nsChangeHint mHintsHandled;
TextPostTraversalState(nsStyleContext& aParentContext,
ServoStyleSet& aStyleSet,
- bool aDisplayContentsParentStyleChanged)
+ bool aDisplayContentsParentStyleChanged,
+ nsChangeHint aHintsHandled)
: mParentContext(aParentContext)
, mStyleSet(aStyleSet)
, mStyle(nullptr)
, mShouldPostHints(aDisplayContentsParentStyleChanged)
, mShouldComputeHints(aDisplayContentsParentStyleChanged)
, mComputedHint(nsChangeHint_Empty)
+ , mHintsHandled(aHintsHandled)
{}
nsStyleContext& ComputeStyle(nsIContent* aTextNode)
@@ -230,6 +233,7 @@
oldContext->CalcStyleDifference(&aNewContext,
&equalStructs,
&samePointerStructs);
+ mComputedHint = NS_RemoveSubsumedHints(mComputedHint, mHintsHandled);
}
if (mComputedHint) {
@@ -312,12 +316,15 @@
ServoRestyleManager::ProcessPostTraversal(Element* aElement,
nsStyleContext* aParentContext,
ServoStyleSet* aStyleSet,
- nsStyleChangeList& aChangeList)
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aChangesHandled)
{
nsIFrame* styleFrame = nsLayoutUtils::GetStyleFrame(aElement);
// Grab the change hint from Servo.
nsChangeHint changeHint = Servo_TakeChangeHint(aElement);
+ changeHint = NS_RemoveSubsumedHints(changeHint, aChangesHandled);
+ aChangesHandled |= changeHint;
// Handle lazy frame construction by posting a reconstruct for any lazily-
// constructed roots.
@@ -446,12 +453,15 @@
StyleChildrenIterator it(aElement);
TextPostTraversalState textState(
- *upToDateContext, *aStyleSet, displayContentsNode && recreateContext);
+ *upToDateContext,
+ *aStyleSet,
+ displayContentsNode && recreateContext,
+ aChangesHandled);
for (nsIContent* n = it.GetNextChild(); n; n = it.GetNextChild()) {
if (traverseElementChildren && n->IsElement()) {
recreatedAnyContext |=
ProcessPostTraversal(n->AsElement(), upToDateContext,
- aStyleSet, aChangeList);
+ aStyleSet, aChangeList, aChangesHandled);
} else if (traverseTextChildren && n->IsNodeOfType(nsINode::eTEXT)) {
recreatedAnyContext |=
ProcessPostTraversalForText(n, aChangeList, textState);
@@ -616,7 +626,8 @@
bool anyStyleChanged = false;
while (Element* root = iter.GetNextStyleRoot()) {
anyStyleChanged |=
- ProcessPostTraversal(root, nullptr, styleSet, currentChanges);
+ ProcessPostTraversal(
+ root, nullptr, styleSet, currentChanges, nsChangeHint(0));
}
// Process the change hints.
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.h 2017-06-17 06:11:21.000000000 +0000
@@ -128,7 +128,8 @@
bool ProcessPostTraversal(Element* aElement,
nsStyleContext* aParentContext,
ServoStyleSet* aStyleSet,
- nsStyleChangeList& aChangeList);
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aChangesHandledForDescendants);
struct TextPostTraversalState;
bool ProcessPostTraversalForText(nsIContent* aTextNode,
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -1189,15 +1189,10 @@
}
void
-nsComboboxControlFrame::DoUpdateStyleOfOwnedAnonBoxes(
- ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsComboboxControlFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult)
{
- UpdateStyleOfChildAnonBox(mDropdownFrame, aStyleSet, aChangeList,
- aHintForThisFrame);
- UpdateStyleOfChildAnonBox(mDisplayFrame, aStyleSet, aChangeList,
- aHintForThisFrame);
+ aResult.AppendElement(OwnedAnonBox(mDropdownFrame));
+ aResult.AppendElement(OwnedAnonBox(mDisplayFrame));
}
nsresult
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -117,10 +117,8 @@
virtual nsContainerFrame* GetContentInsertionFrame() override;
- // Update the style on the block wrappers around our kids.
- void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override;
+ // Return the dropdown and display frame.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override;
// nsIFormControlFrame
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) override;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -664,13 +664,10 @@
}
void
-nsFieldSetFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsFieldSetFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult)
{
- nsIFrame* kid = GetInner();
- if (kid) {
- UpdateStyleOfChildAnonBox(kid, aStyleSet, aChangeList, aHintForThisFrame);
+ if (nsIFrame* kid = GetInner()) {
+ aResult.AppendElement(OwnedAnonBox(kid));
}
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -73,11 +73,8 @@
return do_QueryFrame(GetInner());
}
- // Update the style on the block wrappers around our kids.
- virtual void DoUpdateStyleOfOwnedAnonBoxes(
- mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override;
+ // Return the block wrapper around our kids.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override;
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() override;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -396,16 +396,12 @@
}
void
-nsHTMLButtonControlFrame::DoUpdateStyleOfOwnedAnonBoxes(
- ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsHTMLButtonControlFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult)
{
MOZ_ASSERT(mFrames.FirstChild(), "Must have our button-content anon box");
MOZ_ASSERT(!mFrames.FirstChild()->GetNextSibling(),
"Must only have our button-content anon box");
- UpdateStyleOfChildAnonBox(mFrames.FirstChild(),
- aStyleSet, aChangeList, aHintForThisFrame);
+ aResult.AppendElement(OwnedAnonBox(mFrames.FirstChild()));
}
#ifdef DEBUG
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -98,12 +98,9 @@
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
}
- /**
- * Update the style of our ::-moz-button-content anonymous box.
- */
- void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override;
+ // Return the ::-moz-button-content anonymous box.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override;
+
protected:
nsHTMLButtonControlFrame(nsStyleContext* aContext, nsIFrame::ClassID aID);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/1364361-1.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/1364361-1.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/1364361-1.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/1364361-1.html 2017-06-17 06:11:21.000000000 +0000
@@ -0,0 +1,45 @@
+
+
+
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+abcde
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/crashtests.list thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/crashtests.list
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/crashtests.list 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/crashtests.list 2017-06-17 06:11:21.000000000 +0000
@@ -652,5 +652,6 @@
load 1316649.html
load 1349650.html
asserts-if(browserIsRemote,0-5) load 1349816-1.html # bug 1350352
+load 1364361-1.html
load 1367413-1.html
load 1368617-1.html
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -1260,10 +1260,7 @@
}
void
-nsColumnSetFrame::DoUpdateStyleOfOwnedAnonBoxes(
- mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsColumnSetFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult)
{
// Everything in mFrames is continuations of the first thing in mFrames.
nsIFrame* column = mFrames.FirstChild();
@@ -1276,7 +1273,7 @@
MOZ_ASSERT(column->StyleContext()->GetPseudo() ==
nsCSSAnonBoxes::columnContent,
"What sort of child is this?");
- UpdateStyleOfChildAnonBox(column, aStyleSet, aChangeList, aHintForThisFrame);
+ aResult.AppendElement(OwnedAnonBox(column));
}
#ifdef DEBUG
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.h 2017-06-17 06:11:20.000000000 +0000
@@ -77,12 +77,8 @@
*/
void DrainOverflowColumns();
- /**
- * Update the style on our column-content frames.
- */
- void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override;
+ // Return the column-content frame.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.cpp 2017-06-17 06:11:20.000000000 +0000
@@ -46,7 +46,7 @@
#include "mozilla/GeckoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
-
+#include "nsInlineFrame.h"
#include "nsIDOMNode.h"
#include "nsISelection.h"
#include "nsISelectionPrivate.h"
@@ -10201,10 +10201,10 @@
}
void
-nsFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
- ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsIFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
+ ServoStyleSet& aStyleSet,
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aHintForThisFrame)
{
MOZ_ASSERT(aChildFrame->GetParent() == this,
"This should only be used for children!");
@@ -10479,16 +10479,73 @@
return IsFrameScrolledOutOfView(this);
}
-/* virtual */
void
nsIFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aHintForThisFrame)
+{
+ // As a special case, we check for {ib}-split block frames here, rather
+ // than have an nsInlineFrame::AppendDirectlyOwnedAnonBoxes implementation
+ // that returns them.
+ //
+ // (If we did handle them in AppendDirectlyOwnedAnonBoxes, we would have to
+ // return *all* of the in-flow {ib}-split block frames, not just the first
+ // one. For restyling, we really just need the first in flow, and the other
+ // user of the AppendOwnedAnonBoxes API, AllChildIterator, doesn't need to
+ // know about them at all, since these block frames never create NAC. So we
+ // avoid any unncessary hashtable lookups for the {ib}-split frames by calling
+ // UpdateStyleOfOwnedAnonBoxesForIBSplit directly here.)
+ if (IsInlineFrame()) {
+ if ((GetStateBits() & NS_FRAME_PART_OF_IBSPLIT)) {
+ static_cast(this)->
+ UpdateStyleOfOwnedAnonBoxesForIBSplit(aStyleSet, aChangeList,
+ aHintForThisFrame);
+ }
+ return;
+ }
+
+ AutoTArray frames;
+ AppendDirectlyOwnedAnonBoxes(frames);
+ for (OwnedAnonBox& box : frames) {
+ if (box.mUpdateStyleFn) {
+ box.mUpdateStyleFn(this, box.mAnonBoxFrame,
+ aStyleSet, aChangeList, aHintForThisFrame);
+ } else {
+ UpdateStyleOfChildAnonBox(box.mAnonBoxFrame,
+ aStyleSet, aChangeList, aHintForThisFrame);
+ }
+ }
+}
+
+/* virtual */ void
+nsIFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult)
{
MOZ_ASSERT(!(GetStateBits() & NS_FRAME_OWNS_ANON_BOXES));
MOZ_ASSERT(false, "Why did this get called?");
}
+void
+nsIFrame::DoAppendOwnedAnonBoxes(nsTArray& aResult)
+{
+ size_t i = aResult.Length();
+ AppendDirectlyOwnedAnonBoxes(aResult);
+
+ // After appending the directly owned anonymous boxes of this frame to
+ // aResult above, we need to check each of them to see if they own
+ // any anonymous boxes themselves. Note that we keep progressing
+ // through aResult, looking for additional entries in aResult from these
+ // subsequent AppendDirectlyOwnedAnonBoxes calls. (Thus we can't
+ // use a ranged for loop here.)
+
+ while (i < aResult.Length()) {
+ nsIFrame* f = aResult[i].mAnonBoxFrame;
+ if (f->GetStateBits() & NS_FRAME_OWNS_ANON_BOXES) {
+ f->AppendDirectlyOwnedAnonBoxes(aResult);
+ }
+ ++i;
+ }
+}
+
nsIFrame::CaretPosition::CaretPosition()
: mContentOffset(0)
{
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -701,13 +701,6 @@
// Fire DOM event. If no aContent argument use frame's mContent.
void FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent = nullptr);
- // A helper for implementing UpdateStyleOfOwnedAnonBoxes for the specific case
- // of the owned anon box being a child of this frame.
- void UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
- mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame);
-
private:
void BoxReflow(nsBoxLayoutState& aState,
nsPresContext* aPresContext,
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsGfxScrollFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsGfxScrollFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsGfxScrollFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsGfxScrollFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -1042,12 +1042,9 @@
return mHelper.IsRootScrollFrameOfDocument();
}
- // Update the style on our scrolled frame.
- virtual void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override {
- UpdateStyleOfChildAnonBox(mHelper.GetScrolledFrame(), aStyleSet,
- aChangeList, aHintForThisFrame);
+ // Return the scrolled frame.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override {
+ aResult.AppendElement(OwnedAnonBox(mHelper.GetScrolledFrame()));
}
#ifdef DEBUG_FRAME_DUMP
@@ -1487,11 +1484,9 @@
return mHelper.IsRootScrollFrameOfDocument();
}
- virtual void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override {
- UpdateStyleOfChildAnonBox(mHelper.GetScrolledFrame(), aStyleSet,
- aChangeList, aHintForThisFrame);
+ // Return the scrolled frame.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override {
+ aResult.AppendElement(OwnedAnonBox(mHelper.GetScrolledFrame()));
}
#ifdef DEBUG_FRAME_DUMP
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.cpp 2017-06-17 06:11:20.000000000 +0000
@@ -414,15 +414,12 @@
}
void
-nsHTMLCanvasFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsHTMLCanvasFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult)
{
MOZ_ASSERT(mFrames.FirstChild(), "Must have our canvas content anon box");
MOZ_ASSERT(!mFrames.FirstChild()->GetNextSibling(),
"Must only have our canvas content anon box");
- UpdateStyleOfChildAnonBox(mFrames.FirstChild(),
- aStyleSet, aChangeList, aHintForThisFrame);
+ aResult.AppendElement(OwnedAnonBox(mFrames.FirstChild()));
}
#ifdef ACCESSIBILITY
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -97,12 +97,9 @@
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
}
- /**
- * Update the style of our ::-moz-html-canvas-content anonymous box.
- */
- void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override;
+ // Return the ::-moz-html-canvas-content anonymous box.
+ void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override;
+
protected:
virtual ~nsHTMLCanvasFrame();
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsIFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsIFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsIFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsIFrame.h 2017-06-17 06:11:20.000000000 +0000
@@ -3310,6 +3310,22 @@
}
}
+protected:
+ // This does the actual work of UpdateStyleOfOwnedAnonBoxes. It calls
+ // AppendDirectlyOwnedAnonBoxes to find all of the anonymous boxes
+ // owned by this frame, and then updates styles on each of them.
+ void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aHintForThisFrame);
+
+ // A helper for DoUpdateStyleOfOwnedAnonBoxes for the specific case
+ // of the owned anon box being a child of this frame.
+ void UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
+ mozilla::ServoStyleSet& aStyleSet,
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aHintForThisFrame);
+
+public:
// A helper both for UpdateStyleOfChildAnonBox, and to update frame-backed
// pseudo-elements in ServoRestyleManager.
//
@@ -3318,17 +3334,57 @@
// and adding to the change list as appropriate.
//
// Returns the generated change hint for the frame.
- nsChangeHint UpdateStyleOfOwnedChildFrame(nsIFrame* aChildFrame,
- nsStyleContext* aNewStyleContext,
- nsStyleChangeList& aChangeList);
+ nsChangeHint UpdateStyleOfOwnedChildFrame(
+ nsIFrame* aChildFrame,
+ nsStyleContext* aNewStyleContext,
+ nsStyleChangeList& aChangeList);
+
+ struct OwnedAnonBox
+ {
+ typedef void (*UpdateStyleFn)(nsIFrame* aOwningFrame, nsIFrame* aAnonBox,
+ mozilla::ServoStyleSet&,
+ nsStyleChangeList&, nsChangeHint);
+
+ explicit OwnedAnonBox(nsIFrame* aAnonBoxFrame,
+ UpdateStyleFn aUpdateStyleFn = nullptr)
+ : mAnonBoxFrame(aAnonBoxFrame)
+ , mUpdateStyleFn(aUpdateStyleFn)
+ {}
+
+ nsIFrame* mAnonBoxFrame;
+ UpdateStyleFn mUpdateStyleFn;
+ };
+
+ /**
+ * Appends information about all of the anonymous boxes owned by this frame,
+ * including other anonymous boxes owned by those which this frame owns
+ * directly.
+ */
+ void AppendOwnedAnonBoxes(nsTArray& aResult) {
+ if (GetStateBits() & NS_FRAME_OWNS_ANON_BOXES) {
+ if (IsInlineFrame()) {
+ // See comment in nsIFrame::DoUpdateStyleOfOwnedAnonBoxes for why
+ // we skip nsInlineFrames.
+ return;
+ }
+ DoAppendOwnedAnonBoxes(aResult);
+ }
+ }
+
+protected:
+ // This does the actual work of AppendOwnedAnonBoxes.
+ void DoAppendOwnedAnonBoxes(nsTArray& aResult);
+public:
/**
- * Hook subclasses can override to actually implement updating of style of
- * owned anon boxes.
+ * Hook subclasses can override to return their owned anonymous boxes.
+ *
+ * This function only appends anonymous boxes that are directly owned by
+ * this frame, i.e. direct children or (for certain frames) a wrapper
+ * parent, unlike AppendOwnedAnonBoxes, which will append all anonymous
+ * boxes transitively owned by this frame.
*/
- virtual void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame);
+ virtual void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult);
/**
* Determines whether a frame is visible for painting;
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -1014,9 +1014,10 @@
#endif
void
-nsInlineFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame)
+nsInlineFrame::UpdateStyleOfOwnedAnonBoxesForIBSplit(
+ ServoStyleSet& aStyleSet,
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aHintForThisFrame)
{
MOZ_ASSERT(GetStateBits() & NS_FRAME_OWNS_ANON_BOXES,
"Why did we get called?");
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.h
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.h 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.h 2017-06-17 06:11:21.000000000 +0000
@@ -114,12 +114,12 @@
: (!GetNextInFlow());
}
- // Update the style on the block wrappers around our non-inline-outside kids.
+ // Restyles the block wrappers around our non-inline-outside kids.
// This will only be called when such wrappers in fact exist.
- virtual void DoUpdateStyleOfOwnedAnonBoxes(
- mozilla::ServoStyleSet& aStyleSet,
- nsStyleChangeList& aChangeList,
- nsChangeHint aHintForThisFrame) override;
+ void UpdateStyleOfOwnedAnonBoxesForIBSplit(
+ mozilla::ServoStyleSet& aStyleSet,
+ nsStyleChangeList& aChangeList,
+ nsChangeHint aHintForThisFrame);
protected:
// Additional reflow state used during our reflow methods
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inDOMUtils.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inDOMUtils.cpp
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inDOMUtils.cpp 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inDOMUtils.cpp 2017-06-17 06:11:21.000000000 +0000
@@ -1108,6 +1108,7 @@
NS_IMETHODIMP
inDOMUtils::RemoveContentState(nsIDOMElement* aElement,
EventStates::InternalType aState,
+ bool aClearActiveDocument,
bool* aRetVal)
{
NS_ENSURE_ARG_POINTER(aElement);
@@ -1117,6 +1118,15 @@
NS_ENSURE_TRUE(esm, NS_ERROR_INVALID_ARG);
*aRetVal = esm->SetContentState(nullptr, EventStates(aState));
+
+ if (aClearActiveDocument && EventStates(aState) == NS_EVENT_STATE_ACTIVE) {
+ EventStateManager* activeESM = static_cast(
+ EventStateManager::GetActiveEventStateManager());
+ if (activeESM == esm) {
+ EventStateManager::ClearGlobalActiveContent(nullptr);
+ }
+ }
+
return NS_OK;
}
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inIDOMUtils.idl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inIDOMUtils.idl
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inIDOMUtils.idl 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inIDOMUtils.idl 2017-06-17 06:11:21.000000000 +0000
@@ -152,7 +152,7 @@
in boolean aShowingAnonymousContent);
nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode,
in boolean aShowingAnonymousContent);
-
+
// XBL utilities
nsIArray getBindingURLs(in nsIDOMElement aElement);
@@ -164,11 +164,15 @@
* that for the remove case we simply pass in nullptr for the element.
* Use them accordingly.
*
+ * When removing the active state, you may optionally also clear the active
+ * document as well by setting aClearActiveDocument
+ *
* @return Returns true if the state was set successfully. See more details
* in EventStateManager.h SetContentState.
*/
bool setContentState(in nsIDOMElement aElement, in unsigned long long aState);
- bool removeContentState(in nsIDOMElement aElement, in unsigned long long aState);
+ bool removeContentState(in nsIDOMElement aElement, in unsigned long long aState,
+ [optional] in bool aClearActiveDocument);
nsIDOMFontFaceList getUsedFontFaces(in nsIDOMRange aRange);
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html 2017-06-17 06:11:22.000000000 +0000
@@ -28,8 +28,6 @@
system: extends katakana-iroha;
}
-
-
@@ -43,7 +41,6 @@
-
@@ -57,7 +54,6 @@
-
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html 2017-06-16 16:00:38.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html 2017-06-17 06:11:21.000000000 +0000
@@ -15,8 +15,6 @@
-
-
@@ -30,7 +28,6 @@
-
@@ -44,7 +41,6 @@
-
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin.html 2017-06-16 16:00:38.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin.html 2017-06-17 06:11:21.000000000 +0000
@@ -7,6 +7,9 @@
@counter-style decimal {
system: extends upper-roman;
}
+ @counter-style disc {
+ system: extends decimal;
+ }
@counter-style hebrew {
system: extends cjk-decimal;
}
@@ -14,5 +17,6 @@
foo
bar
+ baz
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html 2017-06-16 16:00:37.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html 2017-06-17 06:11:21.000000000 +0000
@@ -3,5 +3,6 @@
foo
bar
+ baz
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col.html 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col-ref.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col-ref.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col-ref.html 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row.html 2017-06-17 06:11:21.000000000 +0000
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row-ref.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row-ref.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row-ref.html 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col.html 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row.html 2017-06-17 06:11:21.000000000 +0000
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/reftest.list thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/reftest.list
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/reftest.list 1970-01-01 00:00:00.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/reftest.list 2017-06-17 06:11:22.000000000 +0000
@@ -0,0 +1,4 @@
+== frameset-add-row.html frameset-add-row-ref.html
+== frameset-remove-row.html frameset-remove-row-ref.html
+== frameset-add-col.html frameset-add-col-ref.html
+== frameset-remove-col.html frameset-remove-col-ref.html
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/mathml/reftest.list thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/mathml/reftest.list
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/mathml/reftest.list 2017-06-16 16:00:38.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/mathml/reftest.list 2017-06-17 06:11:22.000000000 +0000
@@ -294,8 +294,8 @@
== mathvariant-4.html mathvariant-4-ref.html
== mathvariant-5.html mathvariant-5-ref.html
== dtls-1.html dtls-1-ref.html
-fails-if(styloVsGecko||stylo) == dtls-2.html dtls-2-ref.html # bug 1366206
-fails-if(styloVsGecko||stylo) == dtls-3.html dtls-3-ref.html # bug 1366206
+== dtls-2.html dtls-2-ref.html
+== dtls-3.html dtls-3-ref.html
== ssty-1.html ssty-1-ref.html
== ssty-2.html ssty-2-ref.html
== ssty-3.html ssty-3-ref.html
diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html
--- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html 2017-06-16 16:00:38.000000000 +0000
+++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html 2017-06-17 06:11:22.000000000 +0000
@@ -1,6 +1,5 @@
-
-