mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Merge mozilla-central to fx-team
This commit is contained in:
commit
ad40d046ef
@ -816,11 +816,7 @@ pref("network.sntp.port", 123);
|
||||
pref("network.sntp.timeout", 30); // In seconds.
|
||||
|
||||
// Enable dataStore
|
||||
#ifdef RELEASE_BUILD
|
||||
pref("dom.datastore.enabled", false);
|
||||
#else
|
||||
pref("dom.datastore.enabled", true);
|
||||
#endif
|
||||
|
||||
// DOM Inter-App Communication API.
|
||||
pref("dom.inter-app-communication-api.enabled", true);
|
||||
|
@ -10,13 +10,16 @@ xul|window xul|scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html xul|scrollbar[root="true"] {
|
||||
position: relative;
|
||||
z-index: 2147483647;
|
||||
}
|
||||
|
||||
html xul|scrollbar {
|
||||
-moz-appearance: none !important;
|
||||
position: relative;
|
||||
background-color: transparent !important;
|
||||
background-image: none !important;
|
||||
border: 0px solid transparent !important;
|
||||
z-index: 2147483647;
|
||||
pointer-events: none;
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -751,6 +751,10 @@ var CustomEventManager = {
|
||||
case 'inputmethod-update-layouts':
|
||||
KeyboardHelper.handleEvent(detail);
|
||||
break;
|
||||
case 'nfc-hardware-state-change':
|
||||
Services.obs.notifyObservers(null, 'nfc-hardware-state-change',
|
||||
JSON.stringify({ nfcHardwareState: detail.nfcHardwareState }));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="e33ea242b4328fb0d1824c951f379332b5021512"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="788d9ce293a9b44f64536130cf4ad577e8101dbe"/>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "b82f9138def9e1b0ce69667ca29069cd8b785d5e",
|
||||
"revision": "34a411a6261587124fc6746fb18a19c05571437a",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="e33ea242b4328fb0d1824c951f379332b5021512"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="788d9ce293a9b44f64536130cf4ad577e8101dbe"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -241,6 +241,7 @@ static int do_main(int argc, char* argv[], nsIFile *xreDirectory)
|
||||
// relaunches Metro Firefox with this command line arg.
|
||||
mainFlags = XRE_MAIN_FLAG_USE_METRO;
|
||||
} else {
|
||||
#ifndef RELEASE_BUILD
|
||||
// This command-line flag is used to test the metro browser in a desktop
|
||||
// environment.
|
||||
for (int idx = 1; idx < argc; idx++) {
|
||||
@ -252,6 +253,7 @@ static int do_main(int argc, char* argv[], nsIFile *xreDirectory)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -298,13 +300,6 @@ static int do_main(int argc, char* argv[], nsIFile *xreDirectory)
|
||||
return 255;
|
||||
}
|
||||
|
||||
char appEnv[MAXPATHLEN];
|
||||
snprintf(appEnv, MAXPATHLEN, "XUL_APP_FILE=%s", path.get());
|
||||
if (putenv(appEnv)) {
|
||||
Output("Couldn't set %s.\n", appEnv);
|
||||
return 255;
|
||||
}
|
||||
|
||||
nsXREAppData *appData;
|
||||
rv = XRE_CreateAppData(iniFile, &appData);
|
||||
if (NS_FAILED(rv) || !appData) {
|
||||
|
@ -1,7 +1,5 @@
|
||||
/* Border box all the things by default */
|
||||
*, *:before, *:after {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,6 @@ dfn {
|
||||
*/
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
@ -351,15 +350,12 @@ input[type="radio"] {
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; /* 2 */
|
||||
box-sizing: content-box;
|
||||
box-sizing: content-box; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -852,7 +852,7 @@ chatbox:-moz-full-screen-ancestor {
|
||||
max-width: none !important;
|
||||
min-height: 0 !important;
|
||||
max-height: none !important;
|
||||
-moz-box-sizing: border-box !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
/* hide chat chrome when chat is fullscreen */
|
||||
|
@ -184,6 +184,9 @@ let SessionHistoryInternal = {
|
||||
if (shEntry.isSrcdocEntry)
|
||||
entry.isSrcdocEntry = shEntry.isSrcdocEntry;
|
||||
|
||||
if (shEntry.baseURI)
|
||||
entry.baseURI = shEntry.baseURI;
|
||||
|
||||
if (shEntry.contentType)
|
||||
entry.contentType = shEntry.contentType;
|
||||
|
||||
@ -328,6 +331,8 @@ let SessionHistoryInternal = {
|
||||
shEntry.referrerURI = Utils.makeURI(entry.referrer);
|
||||
if (entry.isSrcdocEntry)
|
||||
shEntry.srcdocData = entry.srcdocData;
|
||||
if (entry.baseURI)
|
||||
shEntry.baseURI = entry.baseURI;
|
||||
|
||||
if (entry.cacheKey) {
|
||||
var cacheKey = Cc["@mozilla.org/supports-PRUint32;1"].
|
||||
|
@ -14,7 +14,7 @@ body {
|
||||
}
|
||||
|
||||
#header {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 6px 9px;
|
||||
display: -moz-box;
|
||||
@ -39,7 +39,7 @@ body {
|
||||
|
||||
#main {
|
||||
margin: 0 10px 10px 10px;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: calc(100% - 2 * 10px);
|
||||
position: absolute;
|
||||
border-width: 1px;
|
||||
|
@ -203,7 +203,6 @@ body {
|
||||
white-space:pre;
|
||||
}
|
||||
.sideBar {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -118,7 +118,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
@ -158,7 +157,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
padding-bottom: 30px;
|
||||
margin-bottom: -32px;
|
||||
|
@ -838,7 +838,6 @@ html[dir="rtl"] .secondaryToolbarButton.print::before {
|
||||
|
||||
.toolbarButton.bookmark,
|
||||
.secondaryToolbarButton.bookmark {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
padding-top: 4px;
|
||||
|
@ -68,7 +68,7 @@ body {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
min-width: 3em;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ ul {
|
||||
padding-top: 0;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 5px #000000;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
@ -141,7 +141,7 @@ ul {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
background-color: #ffffff;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 5px #000000;
|
||||
overflow-x: hidden;
|
||||
max-width: 40em;
|
||||
@ -270,7 +270,7 @@ li {
|
||||
|
||||
.pref-button {
|
||||
display: inline-block;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 10px 1em;
|
||||
border-left: 1px solid rgba(0,0,0,0.1);
|
||||
|
@ -45,7 +45,7 @@ richgrid > .richgrid-grid {
|
||||
-moz-column-gap: 0;
|
||||
-moz-column-count: auto;
|
||||
display: block;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
overflow-x: hidden; /* clipping will only kick in if an explicit width is set */
|
||||
transition: 100ms transform ease-out;
|
||||
}
|
||||
@ -60,7 +60,7 @@ richgriditem {
|
||||
position: relative;
|
||||
width: @grid_double_column_width@;
|
||||
height: @grid_row_height@;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-moz-column-gap: 0;
|
||||
overflow:hidden;
|
||||
cursor: default;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
|
@ -1,5 +1,5 @@
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
.theme-body {
|
||||
color: hsl(210,100%,85%) !important;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#main {
|
||||
|
@ -22,7 +22,7 @@
|
||||
/* From content */
|
||||
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
|
@ -1,5 +1,5 @@
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
.theme-body {
|
||||
color: hsl(210,100%,85%) !important;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#main {
|
||||
|
@ -78,7 +78,7 @@ body.edit-connection #banner-editing {
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
|
@ -5,7 +5,7 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-family: Lucida Grande, Helvetica, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
/* From content */
|
||||
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
|
@ -1,5 +1,5 @@
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
.theme-body {
|
||||
color: hsl(210,100%,85%) !important;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#main {
|
||||
|
@ -415,6 +415,9 @@ endif
|
||||
endif # MOZ_PROFILE_USE
|
||||
endif # NO_PROFILE_GUIDED_OPTIMIZE
|
||||
|
||||
ifdef _MSC_VER
|
||||
OS_LDFLAGS += $(DELAYLOAD_LDFLAGS)
|
||||
endif # _MSC_VER
|
||||
|
||||
# Does the makefile specifies the internal XPCOM API linkage?
|
||||
ifneq (,$(MOZILLA_INTERNAL_API)$(LIBXUL_LIBRARY))
|
||||
|
@ -530,6 +530,12 @@ ifeq ($(OS_ARCH),GNU)
|
||||
OS_CPPFLAGS += -DPATH_MAX=1024 -DMAXPATHLEN=1024
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef USE_DELAYIMP
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,delayimp)
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# MINGW32
|
||||
#
|
||||
|
@ -71,7 +71,7 @@ GCONF_VERSION=1.2.1
|
||||
GIO_VERSION=2.20
|
||||
STARTUP_NOTIFICATION_VERSION=0.8
|
||||
DBUS_VERSION=0.60
|
||||
SQLITE_VERSION=3.8.2
|
||||
SQLITE_VERSION=3.8.3
|
||||
|
||||
MSMANIFEST_TOOL=
|
||||
|
||||
|
@ -665,7 +665,7 @@ EventSource::GetInterface(const nsIID & aIID,
|
||||
|
||||
// static
|
||||
bool
|
||||
EventSource::PrefEnabled()
|
||||
EventSource::PrefEnabled(JSContext* aCx, JSObject* aGlobal)
|
||||
{
|
||||
return Preferences::GetBool("dom.server-events.enabled", false);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
void Close();
|
||||
|
||||
// Determine if preferences allow EventSource
|
||||
static bool PrefEnabled();
|
||||
static bool PrefEnabled(JSContext* aCx = nullptr, JSObject* aGlobal = nullptr);
|
||||
|
||||
virtual void DisconnectFromOwner() MOZ_OVERRIDE;
|
||||
|
||||
|
@ -234,12 +234,6 @@ ShadowRoot::GetElementsByClassName(const nsAString& aClasses)
|
||||
return nsContentUtils::GetElementsByClassName(this, aClasses);
|
||||
}
|
||||
|
||||
bool
|
||||
ShadowRoot::PrefEnabled()
|
||||
{
|
||||
return Preferences::GetBool("dom.webcomponents.enabled", false);
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::AddInsertionPoint(HTMLContentElement* aInsertionPoint)
|
||||
{
|
||||
|
@ -48,7 +48,6 @@ public:
|
||||
|
||||
void AddToIdTable(Element* aElement, nsIAtom* aId);
|
||||
void RemoveFromIdTable(Element* aElement, nsIAtom* aId);
|
||||
static bool PrefEnabled();
|
||||
void InsertSheet(nsCSSStyleSheet* aSheet, nsIContent* aLinkingContent);
|
||||
void RemoveSheet(nsCSSStyleSheet* aSheet);
|
||||
bool ApplyAuthorStyles();
|
||||
|
@ -954,7 +954,7 @@ WebSocket::CreateAndDispatchCloseEvent(bool aWasClean,
|
||||
}
|
||||
|
||||
bool
|
||||
WebSocket::PrefEnabled()
|
||||
WebSocket::PrefEnabled(JSContext* aCx, JSObject* aGlobal)
|
||||
{
|
||||
return Preferences::GetBool("network.websocket.enabled", true);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
public: // static helpers:
|
||||
|
||||
// Determine if preferences allow WebSocket
|
||||
static bool PrefEnabled();
|
||||
static bool PrefEnabled(JSContext* aCx = nullptr, JSObject* aGlobal = nullptr);
|
||||
|
||||
public: // WebIDL interface:
|
||||
|
||||
|
@ -526,6 +526,8 @@ nsFrameLoader::ReallyStartLoadingInternal()
|
||||
rv = NS_NewURI(getter_AddRefs(referrer), referrerStr);
|
||||
|
||||
loadInfo->SetSrcdocData(srcdoc);
|
||||
nsCOMPtr<nsIURI> baseURI = mOwnerContent->GetBaseURI();
|
||||
loadInfo->SetBaseURI(baseURI);
|
||||
}
|
||||
else {
|
||||
rv = mOwnerContent->NodePrincipal()->GetURI(getter_AddRefs(referrer));
|
||||
|
@ -11,7 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=320799
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=320799">Mozilla Bug 320799</a>
|
||||
<p id="display">
|
||||
<select id="s" style="width: 100px; -moz-box-sizing: padding-box">
|
||||
<select id="s" style="width: 100px; box-sizing: padding-box">
|
||||
<option>This is a test, it really is a test I tell you</option>
|
||||
</select>
|
||||
<select id="s2">
|
||||
|
@ -123,9 +123,7 @@ TextTrack*
|
||||
HTMLTrackElement::Track()
|
||||
{
|
||||
if (!mTrack) {
|
||||
// We're expected to always have an internal TextTrack so create
|
||||
// an empty object to return if we don't already have one.
|
||||
mTrack = new TextTrack(OwnerDoc()->GetParentObject(), mMediaParent);
|
||||
CreateTextTrack();
|
||||
}
|
||||
|
||||
return mTrack;
|
||||
@ -145,8 +143,7 @@ HTMLTrackElement::CreateTextTrack()
|
||||
kind = TextTrackKind::Subtitles;
|
||||
}
|
||||
|
||||
mTrack = new TextTrack(OwnerDoc()->GetParentObject(), mMediaParent, kind,
|
||||
label, srcLang);
|
||||
mTrack = new TextTrack(OwnerDoc()->GetParentObject(), kind, label, srcLang);
|
||||
|
||||
if (mMediaParent) {
|
||||
mMediaParent->AddTextTrack(mTrack);
|
||||
|
@ -32,9 +32,10 @@ TextTrackManager::TextTrackManager(HTMLMediaElement *aMediaElement)
|
||||
{
|
||||
MOZ_COUNT_CTOR(TextTrackManager);
|
||||
mNewCues = new TextTrackCueList(mMediaElement->OwnerDoc()->GetParentObject());
|
||||
mTextTracks = new TextTrackList(mMediaElement->OwnerDoc()->GetParentObject());
|
||||
mTextTracks = new TextTrackList(mMediaElement->OwnerDoc()->GetParentObject(),
|
||||
this);
|
||||
mPendingTextTracks =
|
||||
new TextTrackList(mMediaElement->OwnerDoc()->GetParentObject());
|
||||
new TextTrackList(mMediaElement->OwnerDoc()->GetParentObject(), this);
|
||||
|
||||
if (!sParserWrapper) {
|
||||
nsCOMPtr<nsIWebVTTParserWrapper> parserWrapper =
|
||||
@ -60,7 +61,7 @@ TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel,
|
||||
const nsAString& aLanguage)
|
||||
{
|
||||
nsRefPtr<TextTrack> ttrack =
|
||||
mTextTracks->AddTextTrack(mMediaElement, aKind, aLabel, aLanguage);
|
||||
mTextTracks->AddTextTrack(aKind, aLabel, aLanguage);
|
||||
ttrack->SetReadyState(HTMLTrackElement::READY_STATE_LOADED);
|
||||
AddCues(ttrack);
|
||||
return ttrack.forget();
|
||||
|
@ -74,12 +74,12 @@ public:
|
||||
|
||||
void PopulatePendingList();
|
||||
|
||||
private:
|
||||
// The HTMLMediaElement that this TextTrackManager manages the TextTracks of.
|
||||
// This is a weak reference as the life time of TextTrackManager is dependent
|
||||
// on the HTMLMediaElement, so it should not be trying to hold the
|
||||
// HTMLMediaElement alive.
|
||||
HTMLMediaElement* mMediaElement;
|
||||
private:
|
||||
// List of the TextTrackManager's owning HTMLMediaElement's TextTracks.
|
||||
nsRefPtr<TextTrackList> mTextTracks;
|
||||
// List of text track objects awaiting loading.
|
||||
|
@ -1227,11 +1227,3 @@ UndoManager::Disconnect()
|
||||
{
|
||||
mIsDisconnected = true;
|
||||
}
|
||||
|
||||
bool
|
||||
UndoManager::PrefEnabled()
|
||||
{
|
||||
static bool sPrefValue = Preferences::GetBool("dom.undo_manager.enabled", false);
|
||||
return sPrefValue;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,6 @@ public:
|
||||
uint32_t GetPosition(ErrorResult& aRv);
|
||||
void ClearUndo(ErrorResult& aRv);
|
||||
void ClearRedo(ErrorResult& aRv);
|
||||
static bool PrefEnabled();
|
||||
void Disconnect();
|
||||
|
||||
nsISupports* GetParentObject() const
|
||||
|
@ -17,10 +17,9 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_6(TextTrack,
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrack,
|
||||
nsDOMEventTargetHelper,
|
||||
mParent,
|
||||
mMediaElement,
|
||||
mCueList,
|
||||
mActiveCueList,
|
||||
mRegionList,
|
||||
@ -38,21 +37,26 @@ TextTrack::TextTrack(nsISupports* aParent)
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
TextTrack::TextTrack(nsISupports* aParent, HTMLMediaElement* aMediaElement)
|
||||
: mParent(aParent)
|
||||
, mMediaElement(aMediaElement)
|
||||
{
|
||||
SetDefaultSettings();
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
TextTrack::TextTrack(nsISupports* aParent,
|
||||
HTMLMediaElement* aMediaElement,
|
||||
TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage)
|
||||
: mParent(aParent)
|
||||
, mMediaElement(aMediaElement)
|
||||
{
|
||||
SetDefaultSettings();
|
||||
mKind = aKind;
|
||||
mLabel = aLabel;
|
||||
mLanguage = aLanguage;
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
TextTrack::TextTrack(nsISupports* aParent,
|
||||
TextTrackList* aTextTrackList,
|
||||
TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage)
|
||||
: mParent(aParent)
|
||||
, mTextTrackList(aTextTrackList)
|
||||
{
|
||||
SetDefaultSettings();
|
||||
mKind = aKind;
|
||||
@ -85,8 +89,8 @@ TextTrack::SetMode(TextTrackMode aValue)
|
||||
{
|
||||
if (mMode != aValue) {
|
||||
mMode = aValue;
|
||||
if (mMediaElement) {
|
||||
mMediaElement->TextTracks()->CreateAndDispatchChangeEvent();
|
||||
if (mTextTrackList) {
|
||||
mTextTrackList->CreateAndDispatchChangeEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -95,8 +99,11 @@ void
|
||||
TextTrack::AddCue(TextTrackCue& aCue)
|
||||
{
|
||||
mCueList->AddCue(aCue);
|
||||
if (mMediaElement) {
|
||||
mMediaElement->AddCue(aCue);
|
||||
if (mTextTrackList) {
|
||||
HTMLMediaElement* mediaElement = mTextTrackList->GetMediaElement();
|
||||
if (mediaElement) {
|
||||
mediaElement->AddCue(aCue);
|
||||
}
|
||||
}
|
||||
SetDirty();
|
||||
}
|
||||
@ -141,7 +148,12 @@ TextTrack::RemoveRegion(const TextTrackRegion& aRegion, ErrorResult& aRv)
|
||||
void
|
||||
TextTrack::UpdateActiveCueList()
|
||||
{
|
||||
if (mMode == TextTrackMode::Disabled || !mMediaElement) {
|
||||
if (mMode == TextTrackMode::Disabled || !mTextTrackList) {
|
||||
return;
|
||||
}
|
||||
|
||||
HTMLMediaElement* mediaElement = mTextTrackList->GetMediaElement();
|
||||
if (!mediaElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -154,7 +166,7 @@ TextTrack::UpdateActiveCueList()
|
||||
mActiveCueList->RemoveAll();
|
||||
}
|
||||
|
||||
double playbackTime = mMediaElement->CurrentTime();
|
||||
double playbackTime = mediaElement->CurrentTime();
|
||||
// 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--) {
|
||||
@ -197,9 +209,15 @@ void
|
||||
TextTrack::SetReadyState(uint16_t aState)
|
||||
{
|
||||
mReadyState = aState;
|
||||
if (mMediaElement && (mReadyState == HTMLTrackElement::READY_STATE_LOADED ||
|
||||
|
||||
if (!mTextTrackList) {
|
||||
return;
|
||||
}
|
||||
|
||||
HTMLMediaElement* mediaElement = mTextTrackList->GetMediaElement();
|
||||
if (mediaElement && (mReadyState == HTMLTrackElement::READY_STATE_LOADED ||
|
||||
mReadyState == HTMLTrackElement::READY_STATE_ERROR)) {
|
||||
mMediaElement->RemoveTextTrack(this, true);
|
||||
mediaElement->RemoveTextTrack(this, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@ class TextTrackCue;
|
||||
class TextTrackCueList;
|
||||
class TextTrackRegion;
|
||||
class TextTrackRegionList;
|
||||
class HTMLMediaElement;
|
||||
|
||||
class TextTrack MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
{
|
||||
@ -31,9 +30,11 @@ public:
|
||||
|
||||
TextTrack(nsISupports* aParent);
|
||||
TextTrack(nsISupports* aParent,
|
||||
HTMLMediaElement* aMediaElement);
|
||||
TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage);
|
||||
TextTrack(nsISupports* aParent,
|
||||
HTMLMediaElement* aMediaElement,
|
||||
TextTrackList* aTextTrackList,
|
||||
TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage);
|
||||
@ -114,7 +115,6 @@ private:
|
||||
void UpdateActiveCueList();
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
nsRefPtr<HTMLMediaElement> mMediaElement;
|
||||
nsRefPtr<TextTrackList> mTextTrackList;
|
||||
|
||||
TextTrackKind mKind;
|
||||
|
@ -8,14 +8,16 @@
|
||||
#include "mozilla/dom/TrackEvent.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/dom/TextTrackCue.h"
|
||||
#include "mozilla/dom/TextTrackManager.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(TextTrackList,
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_3(TextTrackList,
|
||||
nsDOMEventTargetHelper,
|
||||
mGlobal,
|
||||
mTextTracks)
|
||||
mTextTracks,
|
||||
mTextTrackManager)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(TextTrackList, nsDOMEventTargetHelper)
|
||||
NS_IMPL_RELEASE_INHERITED(TextTrackList, nsDOMEventTargetHelper)
|
||||
@ -27,6 +29,13 @@ TextTrackList::TextTrackList(nsISupports* aGlobal) : mGlobal(aGlobal)
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
TextTrackList::TextTrackList(nsISupports* aGlobal, TextTrackManager* aTextTrackManager)
|
||||
: mGlobal(aGlobal)
|
||||
, mTextTrackManager(aTextTrackManager)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
void
|
||||
TextTrackList::GetAllActiveCues(nsTArray<nsRefPtr<TextTrackCue> >& aCues)
|
||||
{
|
||||
@ -53,16 +62,13 @@ TextTrackList::IndexedGetter(uint32_t aIndex, bool& aFound)
|
||||
}
|
||||
|
||||
already_AddRefed<TextTrack>
|
||||
TextTrackList::AddTextTrack(HTMLMediaElement* aMediaElement,
|
||||
TextTrackKind aKind,
|
||||
TextTrackList::AddTextTrack(TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage)
|
||||
{
|
||||
nsRefPtr<TextTrack> track = new TextTrack(mGlobal, aMediaElement, aKind,
|
||||
aLabel, aLanguage);
|
||||
nsRefPtr<TextTrack> track = new TextTrack(mGlobal, this, aKind, aLabel, aLanguage);
|
||||
if (mTextTracks.AppendElement(track)) {
|
||||
CreateAndDispatchTrackEventRunner(track, NS_LITERAL_STRING("addtrack"));
|
||||
track->SetTextTrackList(this);
|
||||
}
|
||||
|
||||
return track.forget();
|
||||
@ -159,5 +165,20 @@ TextTrackList::CreateAndDispatchTrackEventRunner(TextTrack* aTrack,
|
||||
NS_DispatchToMainThread(eventRunner, NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
HTMLMediaElement*
|
||||
TextTrackList::GetMediaElement()
|
||||
{
|
||||
if (mTextTrackManager) {
|
||||
return mTextTrackManager->mMediaElement;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
TextTrackList::SetTextTrackManager(TextTrackManager* aTextTrackManager)
|
||||
{
|
||||
mTextTrackManager = aTextTrackManager;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -14,6 +14,8 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLMediaElement;
|
||||
class TextTrackManager;
|
||||
class TrackEvent;
|
||||
class TrackEventRunner;
|
||||
|
||||
@ -24,6 +26,7 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, nsDOMEventTargetHelper)
|
||||
|
||||
TextTrackList(nsISupports* aGlobal);
|
||||
TextTrackList(nsISupports* aGlobal, TextTrackManager* aTextTrackManager);
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
@ -43,8 +46,7 @@ public:
|
||||
|
||||
TextTrack* IndexedGetter(uint32_t aIndex, bool& aFound);
|
||||
|
||||
already_AddRefed<TextTrack> AddTextTrack(HTMLMediaElement* aMediaElement,
|
||||
TextTrackKind aKind,
|
||||
already_AddRefed<TextTrack> AddTextTrack(TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage);
|
||||
TextTrack* GetTrackById(const nsAString& aId);
|
||||
@ -57,6 +59,9 @@ public:
|
||||
void RemoveTextTrack(TextTrack* aTrack);
|
||||
void DidSeek();
|
||||
|
||||
HTMLMediaElement* GetMediaElement();
|
||||
void SetTextTrackManager(TextTrackManager* aTextTrackManager);
|
||||
|
||||
nsresult DispatchTrackEvent(nsIDOMEvent* aEvent);
|
||||
void CreateAndDispatchChangeEvent();
|
||||
|
||||
@ -67,6 +72,7 @@ public:
|
||||
private:
|
||||
nsCOMPtr<nsISupports> mGlobal;
|
||||
nsTArray< nsRefPtr<TextTrack> > mTextTracks;
|
||||
nsRefPtr<TextTrackManager> mTextTrackManager;
|
||||
|
||||
void CreateAndDispatchTrackEventRunner(TextTrack* aTrack,
|
||||
const nsAString& aEventName);
|
||||
|
@ -294,32 +294,28 @@ bool MediaPluginReader::DecodeAudioData()
|
||||
int64_t pos = mDecoder->GetResource()->Tell();
|
||||
|
||||
// Read next frame
|
||||
MPAPI::AudioFrame frame;
|
||||
if (!mPlugin->ReadAudio(mPlugin, &frame, mAudioSeekTimeUs)) {
|
||||
MPAPI::AudioFrame source;
|
||||
if (!mPlugin->ReadAudio(mPlugin, &source, mAudioSeekTimeUs)) {
|
||||
return false;
|
||||
}
|
||||
mAudioSeekTimeUs = -1;
|
||||
|
||||
// Ignore empty buffers which stagefright media read will sporadically return
|
||||
if (frame.mSize == 0)
|
||||
if (source.mSize == 0)
|
||||
return true;
|
||||
|
||||
nsAutoArrayPtr<AudioDataValue> buffer(new AudioDataValue[frame.mSize/2] );
|
||||
memcpy(buffer.get(), frame.mData, frame.mSize);
|
||||
uint32_t frames = source.mSize / (source.mAudioChannels *
|
||||
sizeof(AudioDataValue));
|
||||
|
||||
uint32_t frames = frame.mSize / (2 * frame.mAudioChannels);
|
||||
CheckedInt64 duration = FramesToUsecs(frames, frame.mAudioSampleRate);
|
||||
if (!duration.isValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mAudioQueue.Push(new AudioData(pos,
|
||||
frame.mTimeUs,
|
||||
duration.value(),
|
||||
frames,
|
||||
buffer.forget(),
|
||||
frame.mAudioChannels));
|
||||
return true;
|
||||
typedef AudioCompactor::NativeCopy MPCopy;
|
||||
return mAudioCompactor.Push(pos,
|
||||
source.mTimeUs,
|
||||
source.mAudioSampleRate,
|
||||
frames,
|
||||
source.mAudioChannels,
|
||||
MPCopy(static_cast<uint8_t *>(source.mData),
|
||||
source.mSize,
|
||||
source.mAudioChannels));
|
||||
}
|
||||
|
||||
nsresult MediaPluginReader::Seek(int64_t aTarget, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime)
|
||||
|
@ -6,3 +6,4 @@ support-files =
|
||||
seek.webm
|
||||
|
||||
[test_texttrack_chrome.html]
|
||||
[test_texttracklist_chrome.html]
|
||||
|
30
content/media/test/test_texttracklist_chrome.html
Normal file
30
content/media/test/test_texttracklist_chrome.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=881976
|
||||
-->
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>Test for Bug 881976 - TextTrackCue Computed Position</title>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
<div id="content">
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
|
||||
function() {
|
||||
var video = document.createElement("video");
|
||||
is(video.textTracks.mediaElement, video, "Video's TextTrackList's MediaElement reference should be set to the video.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -424,7 +424,7 @@ WaveReader::LoadFormatChunk(uint32_t aChunkSize)
|
||||
// but the channels check is intentionally limited to mono or stereo
|
||||
// when the media is intended for direct playback because that's what the
|
||||
// audio backend currently supports.
|
||||
unsigned int actualFrameSize = sampleFormat == 8 ? 1 : 2 * channels;
|
||||
unsigned int actualFrameSize = (sampleFormat == 8 ? 1 : 2) * channels;
|
||||
if (rate < 100 || rate > 96000 ||
|
||||
(((channels < 1 || channels > MAX_CHANNELS) ||
|
||||
(frameSize != 1 && frameSize != 2 && frameSize != 4)) &&
|
||||
|
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace {
|
||||
|
||||
bool gPrefInitialized = false;
|
||||
bool gWebSpeechEnabled = false;
|
||||
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
/* static */ bool
|
||||
EnableWebSpeechRecognitionCheck::PrefEnabled()
|
||||
{
|
||||
if (!gPrefInitialized) {
|
||||
Preferences::AddBoolVarCache(&gWebSpeechEnabled, "media.webspeech.recognition.enable");
|
||||
gPrefInitialized = true;
|
||||
}
|
||||
return gWebSpeechEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef EnableWebSpeechRecognitionCheck_h
|
||||
#define EnableWebSpeechRecognitionCheck_h
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class EnableWebSpeechRecognitionCheck
|
||||
{
|
||||
public:
|
||||
static bool PrefEnabled();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -16,16 +16,13 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class GlobalObject;
|
||||
|
||||
class SpeechGrammar MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableWebSpeechRecognitionCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
SpeechGrammar(nsISupports* aParent);
|
||||
|
@ -7,7 +7,6 @@
|
||||
#ifndef mozilla_dom_SpeechGrammarList_h
|
||||
#define mozilla_dom_SpeechGrammarList_h
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
@ -26,8 +25,7 @@ class SpeechGrammar;
|
||||
template<typename> class Optional;
|
||||
|
||||
class SpeechGrammarList MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableWebSpeechRecognitionCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
SpeechGrammarList(nsISupports* aParent);
|
||||
|
@ -696,7 +696,7 @@ SpeechRecognition::SetServiceURI(const nsAString& aArg, ErrorResult& aRv)
|
||||
void
|
||||
SpeechRecognition::Start(ErrorResult& aRv)
|
||||
{
|
||||
if (!mCurrentState == STATE_IDLE) {
|
||||
if (mCurrentState != STATE_IDLE) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
}
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "mozilla/WeakPtr.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
#include "SpeechGrammarList.h"
|
||||
#include "SpeechRecognitionResultList.h"
|
||||
#include "SpeechStreamListener.h"
|
||||
@ -56,7 +55,6 @@ PRLogModuleInfo* GetSpeechRecognitionLog();
|
||||
|
||||
class SpeechRecognition MOZ_FINAL : public nsDOMEventTargetHelper,
|
||||
public nsIObserver,
|
||||
public EnableWebSpeechRecognitionCheck,
|
||||
public SupportsWeakPtr<SpeechRecognition>
|
||||
{
|
||||
public:
|
||||
|
@ -15,16 +15,13 @@
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class SpeechRecognition;
|
||||
|
||||
class SpeechRecognitionAlternative MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableWebSpeechRecognitionCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
SpeechRecognitionAlternative(SpeechRecognition* aParent);
|
||||
|
@ -16,15 +16,13 @@
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
#include "SpeechRecognitionAlternative.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class SpeechRecognitionResult MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableWebSpeechRecognitionCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
SpeechRecognitionResult(SpeechRecognition* aParent);
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "EnableWebSpeechRecognitionCheck.h"
|
||||
#include "SpeechRecognitionResult.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -24,8 +23,7 @@ namespace dom {
|
||||
class SpeechRecognition;
|
||||
|
||||
class SpeechRecognitionResultList MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableWebSpeechRecognitionCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
SpeechRecognitionResultList(SpeechRecognition* aParent);
|
||||
|
@ -24,7 +24,6 @@ EXPORTS.mozilla.dom += [
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'EnableWebSpeechRecognitionCheck.cpp',
|
||||
'endpointer.cc',
|
||||
'energy_endpointer.cc',
|
||||
'energy_endpointer_params.cc',
|
||||
|
@ -1,33 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#include "EnableSpeechSynthesisCheck.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace {
|
||||
|
||||
bool gPrefInitialized = false;
|
||||
bool gWebSpeechEnabled = false;
|
||||
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
/* static */ bool
|
||||
EnableSpeechSynthesisCheck::PrefEnabled()
|
||||
{
|
||||
if (!gPrefInitialized) {
|
||||
Preferences::AddBoolVarCache(&gWebSpeechEnabled, "media.webspeech.synth.enabled");
|
||||
gPrefInitialized = true;
|
||||
}
|
||||
|
||||
return gWebSpeechEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
#ifndef mozilla_dom_EnableSpeechSynthesisCheck_h
|
||||
#define mozilla_dom_EnableSpeechSynthesisCheck_h
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
// This is a helper class which enables Web Speech to be enabled or disabled
|
||||
// as whole. Individual Web Speech object classes should inherit from this.
|
||||
class EnableSpeechSynthesisCheck
|
||||
{
|
||||
public:
|
||||
static bool PrefEnabled();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -13,7 +13,6 @@
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
#include "EnableSpeechSynthesisCheck.h"
|
||||
#include "SpeechSynthesisUtterance.h"
|
||||
#include "SpeechSynthesisVoice.h"
|
||||
|
||||
@ -25,8 +24,7 @@ namespace dom {
|
||||
class nsSpeechTask;
|
||||
|
||||
class SpeechSynthesis MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableSpeechSynthesisCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
SpeechSynthesis(nsPIDOMWindow* aParent);
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsString.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
#include "EnableSpeechSynthesisCheck.h"
|
||||
#include "nsSpeechTask.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -22,8 +21,7 @@ class SpeechSynthesisVoice;
|
||||
class SpeechSynthesis;
|
||||
class nsSynthVoiceRegistry;
|
||||
|
||||
class SpeechSynthesisUtterance MOZ_FINAL : public nsDOMEventTargetHelper,
|
||||
public EnableSpeechSynthesisCheck
|
||||
class SpeechSynthesisUtterance MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
{
|
||||
friend class SpeechSynthesis;
|
||||
friend class nsSpeechTask;
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsWrapperCache.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
#include "EnableSpeechSynthesisCheck.h"
|
||||
#include "nsISpeechService.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -22,8 +21,7 @@ class nsSynthVoiceRegistry;
|
||||
class SpeechSynthesis;
|
||||
|
||||
class SpeechSynthesisVoice MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache,
|
||||
public EnableSpeechSynthesisCheck
|
||||
public nsWrapperCache
|
||||
{
|
||||
friend class nsSynthVoiceRegistry;
|
||||
friend class SpeechSynthesis;
|
||||
|
@ -16,7 +16,6 @@ if CONFIG['MOZ_WEBSPEECH']:
|
||||
]
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
'EnableSpeechSynthesisCheck.h',
|
||||
'ipc/SpeechSynthesisChild.h',
|
||||
'ipc/SpeechSynthesisParent.h',
|
||||
'nsSpeechTask.h',
|
||||
@ -27,7 +26,6 @@ if CONFIG['MOZ_WEBSPEECH']:
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'EnableSpeechSynthesisCheck.cpp',
|
||||
'ipc/SpeechSynthesisChild.cpp',
|
||||
'ipc/SpeechSynthesisParent.cpp',
|
||||
'nsSpeechTask.cpp',
|
||||
|
@ -1,6 +1,6 @@
|
||||
This is sqlite 3.8.2
|
||||
This is sqlite 3.8.3
|
||||
|
||||
-- Ryan VanderMeulen <ryanvm@gmail.com>, 12/2013
|
||||
-- Ryan VanderMeulen <ryanvm@gmail.com>, 2/2014
|
||||
|
||||
See http://www.sqlite.org/ for more info.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -107,9 +107,9 @@ extern "C" {
|
||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.8.2"
|
||||
#define SQLITE_VERSION_NUMBER 3008002
|
||||
#define SQLITE_SOURCE_ID "2013-12-06 14:53:30 27392118af4c38c5203a04b8013e1afdb1cebd0d"
|
||||
#define SQLITE_VERSION "3.8.3"
|
||||
#define SQLITE_VERSION_NUMBER 3008003
|
||||
#define SQLITE_SOURCE_ID "2014-02-03 14:04:11 6c643e45c274e755dc5a1a65673df79261c774be"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
@ -491,6 +491,7 @@ SQLITE_API int sqlite3_exec(
|
||||
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
||||
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
||||
#define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8))
|
||||
#define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4<<8))
|
||||
#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8))
|
||||
#define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1<<8))
|
||||
#define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2<<8))
|
||||
@ -558,7 +559,8 @@ SQLITE_API int sqlite3_exec(
|
||||
** after reboot following a crash or power loss, the only bytes in a
|
||||
** file that were written at the application level might have changed
|
||||
** and that adjacent bytes, even bytes within the same sector are
|
||||
** guaranteed to be unchanged.
|
||||
** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
|
||||
** flag indicate that a file cannot be deleted when open.
|
||||
*/
|
||||
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
||||
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
||||
@ -789,15 +791,29 @@ struct sqlite3_io_methods {
|
||||
** additional information.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]
|
||||
** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by
|
||||
** SQLite and sent to all VFSes in place of a call to the xSync method
|
||||
** when the database connection has [PRAGMA synchronous] set to OFF.)^
|
||||
** Some specialized VFSes need this signal in order to operate correctly
|
||||
** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most
|
||||
** VFSes do not need this signal and should silently ignore this opcode.
|
||||
** Applications should not call [sqlite3_file_control()] with this
|
||||
** opcode as doing so may disrupt the operation of the specialized VFSes
|
||||
** that do require it.
|
||||
** No longer in use.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_SYNC]]
|
||||
** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and
|
||||
** sent to the VFS immediately before the xSync method is invoked on a
|
||||
** database file descriptor. Or, if the xSync method is not invoked
|
||||
** because the user has configured SQLite with
|
||||
** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place
|
||||
** of the xSync method. In most cases, the pointer argument passed with
|
||||
** this file-control is NULL. However, if the database file is being synced
|
||||
** as part of a multi-database commit, the argument points to a nul-terminated
|
||||
** string containing the transactions master-journal file name. VFSes that
|
||||
** do not need this signal should silently ignore this opcode. Applications
|
||||
** should not call [sqlite3_file_control()] with this opcode as doing so may
|
||||
** disrupt the operation of the specialized VFSes that do require it.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_COMMIT_PHASETWO]]
|
||||
** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite
|
||||
** and sent to the VFS after a transaction has been committed immediately
|
||||
** but before the database is unlocked. VFSes that do not need this signal
|
||||
** should silently ignore this opcode. Applications should not call
|
||||
** [sqlite3_file_control()] with this opcode as doing so may disrupt the
|
||||
** operation of the specialized VFSes that do require it.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]]
|
||||
** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic
|
||||
@ -921,6 +937,12 @@ struct sqlite3_io_methods {
|
||||
** SQLite stack may generate instances of this file control if
|
||||
** the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_HAS_MOVED]]
|
||||
** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a
|
||||
** pointer to an integer and it writes a boolean into that integer depending
|
||||
** on whether or not the file has been renamed, moved, or deleted since it
|
||||
** was first opened.
|
||||
**
|
||||
** </ul>
|
||||
*/
|
||||
#define SQLITE_FCNTL_LOCKSTATE 1
|
||||
@ -941,6 +963,9 @@ struct sqlite3_io_methods {
|
||||
#define SQLITE_FCNTL_TEMPFILENAME 16
|
||||
#define SQLITE_FCNTL_MMAP_SIZE 18
|
||||
#define SQLITE_FCNTL_TRACE 19
|
||||
#define SQLITE_FCNTL_HAS_MOVED 20
|
||||
#define SQLITE_FCNTL_SYNC 21
|
||||
#define SQLITE_FCNTL_COMMIT_PHASETWO 22
|
||||
|
||||
/*
|
||||
** CAPI3REF: Mutex Handle
|
||||
@ -2375,11 +2400,13 @@ SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
|
||||
** applications to access the same PRNG for other purposes.
|
||||
**
|
||||
** ^A call to this routine stores N bytes of randomness into buffer P.
|
||||
** ^If N is less than one, then P can be a NULL pointer.
|
||||
**
|
||||
** ^The first time this routine is invoked (either internally or by
|
||||
** the application) the PRNG is seeded using randomness obtained
|
||||
** from the xRandomness method of the default [sqlite3_vfs] object.
|
||||
** ^On all subsequent invocations, the pseudo-randomness is generated
|
||||
** ^If this routine has not been previously called or if the previous
|
||||
** call had N less than one, then the PRNG is seeded using randomness
|
||||
** obtained from the xRandomness method of the default [sqlite3_vfs] object.
|
||||
** ^If the previous call to this routine had an N of 1 or more then
|
||||
** the pseudo-randomness is generated
|
||||
** internally and without recourse to the [sqlite3_vfs] xRandomness
|
||||
** method.
|
||||
*/
|
||||
@ -2539,6 +2566,7 @@ SQLITE_API int sqlite3_set_authorizer(
|
||||
#define SQLITE_FUNCTION 31 /* NULL Function Name */
|
||||
#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */
|
||||
#define SQLITE_COPY 0 /* No longer used */
|
||||
#define SQLITE_RECURSIVE 33 /* NULL NULL */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Tracing And Profiling Functions
|
||||
@ -3957,15 +3985,24 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
||||
**
|
||||
** ^The fourth parameter, eTextRep, specifies what
|
||||
** [SQLITE_UTF8 | text encoding] this SQL function prefers for
|
||||
** its parameters. Every SQL function implementation must be able to work
|
||||
** with UTF-8, UTF-16le, or UTF-16be. But some implementations may be
|
||||
** more efficient with one encoding than another. ^An application may
|
||||
** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
|
||||
** times with the same function but with different values of eTextRep.
|
||||
** its parameters. The application should set this parameter to
|
||||
** [SQLITE_UTF16LE] if the function implementation invokes
|
||||
** [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the
|
||||
** implementation invokes [sqlite3_value_text16be()] on an input, or
|
||||
** [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8]
|
||||
** otherwise. ^The same SQL function may be registered multiple times using
|
||||
** different preferred text encodings, with different implementations for
|
||||
** each encoding.
|
||||
** ^When multiple implementations of the same function are available, SQLite
|
||||
** will pick the one that involves the least amount of data conversion.
|
||||
** If there is only a single implementation which does not care what text
|
||||
** encoding is used, then the fourth argument should be [SQLITE_ANY].
|
||||
**
|
||||
** ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC]
|
||||
** to signal that the function will always return the same result given
|
||||
** the same inputs within a single SQL statement. Most SQL functions are
|
||||
** deterministic. The built-in [random()] SQL function is an example of a
|
||||
** function that is not deterministic. The SQLite query planner is able to
|
||||
** perform additional optimizations on deterministic functions, so use
|
||||
** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.
|
||||
**
|
||||
** ^(The fifth parameter is an arbitrary pointer. The implementation of the
|
||||
** function can gain access to this pointer using [sqlite3_user_data()].)^
|
||||
@ -4051,9 +4088,19 @@ SQLITE_API int sqlite3_create_function_v2(
|
||||
#define SQLITE_UTF16LE 2
|
||||
#define SQLITE_UTF16BE 3
|
||||
#define SQLITE_UTF16 4 /* Use native byte order */
|
||||
#define SQLITE_ANY 5 /* sqlite3_create_function only */
|
||||
#define SQLITE_ANY 5 /* Deprecated */
|
||||
#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Function Flags
|
||||
**
|
||||
** These constants may be ORed together with the
|
||||
** [SQLITE_UTF8 | preferred text encoding] as the fourth argument
|
||||
** to [sqlite3_create_function()], [sqlite3_create_function16()], or
|
||||
** [sqlite3_create_function_v2()].
|
||||
*/
|
||||
#define SQLITE_DETERMINISTIC 0x800
|
||||
|
||||
/*
|
||||
** CAPI3REF: Deprecated Functions
|
||||
** DEPRECATED
|
||||
|
@ -1337,6 +1337,7 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
||||
nsXPIDLString target;
|
||||
nsAutoString srcdoc;
|
||||
nsCOMPtr<nsIDocShell> sourceDocShell;
|
||||
nsCOMPtr<nsIURI> baseURI;
|
||||
|
||||
uint32_t loadType = MAKE_LOAD_TYPE(LOAD_NORMAL, aLoadFlags);
|
||||
|
||||
@ -1367,6 +1368,7 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
||||
aLoadInfo->GetIsSrcdocLoad(&isSrcdoc);
|
||||
aLoadInfo->GetSrcdocData(srcdoc);
|
||||
aLoadInfo->GetSourceDocShell(getter_AddRefs(sourceDocShell));
|
||||
aLoadInfo->GetBaseURI(getter_AddRefs(baseURI));
|
||||
}
|
||||
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
@ -1613,6 +1615,7 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
||||
aFirstParty,
|
||||
srcdoc,
|
||||
sourceDocShell,
|
||||
baseURI,
|
||||
nullptr, // No nsIDocShell
|
||||
nullptr); // No nsIRequest
|
||||
}
|
||||
@ -2893,7 +2896,7 @@ nsDocShell::SetItemType(int32_t aItemType)
|
||||
nsRefPtr<nsPresContext> presContext = nullptr;
|
||||
GetPresContext(getter_AddRefs(presContext));
|
||||
if (presContext) {
|
||||
presContext->InvalidateIsChromeCache();
|
||||
presContext->UpdateIsChrome();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -4816,7 +4819,8 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const char16_t *aURL,
|
||||
return InternalLoad(errorPageURI, nullptr, nullptr,
|
||||
INTERNAL_LOAD_FLAGS_INHERIT_OWNER, nullptr, nullptr,
|
||||
NullString(), nullptr, nullptr, LOAD_ERROR_PAGE,
|
||||
nullptr, true, NullString(), this, nullptr, nullptr);
|
||||
nullptr, true, NullString(), this, nullptr, nullptr,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
|
||||
@ -4862,6 +4866,7 @@ nsDocShell::Reload(uint32_t aReloadFlags)
|
||||
nsAutoString srcdoc;
|
||||
nsIPrincipal* principal = nullptr;
|
||||
nsAutoString contentTypeHint;
|
||||
nsCOMPtr<nsIURI> baseURI;
|
||||
if (doc) {
|
||||
principal = doc->NodePrincipal();
|
||||
doc->GetContentType(contentTypeHint);
|
||||
@ -4869,6 +4874,7 @@ nsDocShell::Reload(uint32_t aReloadFlags)
|
||||
if (doc->IsSrcdocDocument()) {
|
||||
doc->GetSrcdocData(srcdoc);
|
||||
flags |= INTERNAL_LOAD_FLAGS_IS_SRCDOC;
|
||||
baseURI = doc->GetBaseURI();
|
||||
}
|
||||
}
|
||||
rv = InternalLoad(mCurrentURI,
|
||||
@ -4885,6 +4891,7 @@ nsDocShell::Reload(uint32_t aReloadFlags)
|
||||
true,
|
||||
srcdoc, // srcdoc argument for iframe
|
||||
this, // For reloads we are the source
|
||||
baseURI,
|
||||
nullptr, // No nsIDocShell
|
||||
nullptr); // No nsIRequest
|
||||
}
|
||||
@ -8690,7 +8697,8 @@ public:
|
||||
const char* aTypeHint, nsIInputStream * aPostData,
|
||||
nsIInputStream * aHeadersData, uint32_t aLoadType,
|
||||
nsISHEntry * aSHEntry, bool aFirstParty,
|
||||
const nsAString &aSrcdoc, nsIDocShell* aSourceDocShell) :
|
||||
const nsAString &aSrcdoc, nsIDocShell* aSourceDocShell,
|
||||
nsIURI * aBaseURI) :
|
||||
mSrcdoc(aSrcdoc),
|
||||
mDocShell(aDocShell),
|
||||
mURI(aURI),
|
||||
@ -8702,7 +8710,8 @@ public:
|
||||
mFlags(aFlags),
|
||||
mLoadType(aLoadType),
|
||||
mFirstParty(aFirstParty),
|
||||
mSourceDocShell(aSourceDocShell)
|
||||
mSourceDocShell(aSourceDocShell),
|
||||
mBaseURI(aBaseURI)
|
||||
{
|
||||
// Make sure to keep null things null as needed
|
||||
if (aTypeHint) {
|
||||
@ -8715,7 +8724,8 @@ public:
|
||||
nullptr, mTypeHint.get(),
|
||||
NullString(), mPostData, mHeadersData,
|
||||
mLoadType, mSHEntry, mFirstParty,
|
||||
mSrcdoc, mSourceDocShell, nullptr, nullptr);
|
||||
mSrcdoc, mSourceDocShell, mBaseURI,
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -8736,6 +8746,7 @@ private:
|
||||
uint32_t mLoadType;
|
||||
bool mFirstParty;
|
||||
nsCOMPtr<nsIDocShell> mSourceDocShell;
|
||||
nsCOMPtr<nsIURI> mBaseURI;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -8770,6 +8781,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
bool aFirstParty,
|
||||
const nsAString &aSrcdoc,
|
||||
nsIDocShell* aSourceDocShell,
|
||||
nsIURI* aBaseURI,
|
||||
nsIDocShell** aDocShell,
|
||||
nsIRequest** aRequest)
|
||||
{
|
||||
@ -9025,6 +9037,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
aFirstParty,
|
||||
aSrcdoc,
|
||||
aSourceDocShell,
|
||||
aBaseURI,
|
||||
aDocShell,
|
||||
aRequest);
|
||||
if (rv == NS_ERROR_NO_CONTENT) {
|
||||
@ -9096,7 +9109,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
new InternalLoadEvent(this, aURI, aReferrer, aOwner, aFlags,
|
||||
aTypeHint, aPostData, aHeadersData,
|
||||
aLoadType, aSHEntry, aFirstParty, aSrcdoc,
|
||||
aSourceDocShell);
|
||||
aSourceDocShell, aBaseURI);
|
||||
return NS_DispatchToCurrentThread(ev);
|
||||
}
|
||||
|
||||
@ -9545,7 +9558,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
(aFlags & INTERNAL_LOAD_FLAGS_FIRST_LOAD) != 0,
|
||||
(aFlags & INTERNAL_LOAD_FLAGS_BYPASS_CLASSIFIER) != 0,
|
||||
(aFlags & INTERNAL_LOAD_FLAGS_FORCE_ALLOW_COOKIES) != 0,
|
||||
srcdoc);
|
||||
srcdoc, aBaseURI);
|
||||
if (req && aRequest)
|
||||
NS_ADDREF(*aRequest = req);
|
||||
|
||||
@ -9624,7 +9637,8 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
||||
bool aIsNewWindowTarget,
|
||||
bool aBypassClassifier,
|
||||
bool aForceAllowCookies,
|
||||
const nsAString &aSrcdoc)
|
||||
const nsAString &aSrcdoc,
|
||||
nsIURI * aBaseURI)
|
||||
{
|
||||
#ifdef MOZ_VISUAL_EVENT_TRACER
|
||||
nsAutoCString urlSpec;
|
||||
@ -9709,7 +9723,8 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
||||
nsViewSourceHandler *vsh = nsViewSourceHandler::GetInstance();
|
||||
NS_ENSURE_TRUE(vsh,NS_ERROR_FAILURE);
|
||||
|
||||
rv = vsh->NewSrcdocChannel(aURI, aSrcdoc,getter_AddRefs(channel));
|
||||
rv = vsh->NewSrcdocChannel(aURI, aSrcdoc, aBaseURI,
|
||||
getter_AddRefs(channel));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
else {
|
||||
@ -9718,6 +9733,9 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
||||
NS_LITERAL_CSTRING("text/html"),
|
||||
true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIInputStreamChannel> isc = do_QueryInterface(channel);
|
||||
MOZ_ASSERT(isc);
|
||||
isc->SetBaseURI(aBaseURI);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10976,6 +10994,9 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
|
||||
nsAutoString srcdoc;
|
||||
inStrmChan->GetSrcdocData(srcdoc);
|
||||
entry->SetSrcdocData(srcdoc);
|
||||
nsCOMPtr<nsIURI> baseURI;
|
||||
inStrmChan->GetBaseURI(getter_AddRefs(baseURI));
|
||||
entry->SetBaseURI(baseURI);
|
||||
}
|
||||
}
|
||||
/* If cache got a 'no-store', ask SH not to store
|
||||
@ -11129,9 +11150,11 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, uint32_t aLoadType)
|
||||
|
||||
nsAutoString srcdoc;
|
||||
bool isSrcdoc;
|
||||
nsCOMPtr<nsIURI> baseURI;
|
||||
aEntry->GetIsSrcdocEntry(&isSrcdoc);
|
||||
if (isSrcdoc) {
|
||||
aEntry->GetSrcdocData(srcdoc);
|
||||
aEntry->GetBaseURI(getter_AddRefs(baseURI));
|
||||
flags |= INTERNAL_LOAD_FLAGS_IS_SRCDOC;
|
||||
}
|
||||
else {
|
||||
@ -11156,6 +11179,7 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, uint32_t aLoadType)
|
||||
true,
|
||||
srcdoc,
|
||||
nullptr, // Source docshell, see comment above
|
||||
baseURI,
|
||||
nullptr, // No nsIDocShell
|
||||
nullptr); // No nsIRequest
|
||||
return rv;
|
||||
@ -12571,6 +12595,7 @@ nsDocShell::OnLinkClickSync(nsIContent *aContent,
|
||||
true, // first party site
|
||||
NullString(), // No srcdoc
|
||||
this, // We are the source
|
||||
nullptr, // baseURI not needed
|
||||
aDocShell, // DocShell out-param
|
||||
aRequest); // Request out-param
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -287,7 +287,8 @@ protected:
|
||||
bool aIsNewWindowTarget,
|
||||
bool aBypassClassifier,
|
||||
bool aForceAllowCookies,
|
||||
const nsAString &aSrcdoc);
|
||||
const nsAString &aSrcdoc,
|
||||
nsIURI * baseURI);
|
||||
NS_IMETHOD AddHeadersToChannel(nsIInputStream * aHeadersData,
|
||||
nsIChannel * aChannel);
|
||||
virtual nsresult DoChannelLoad(nsIChannel * aChannel,
|
||||
|
@ -225,6 +225,21 @@ NS_IMETHODIMP nsDocShellLoadInfo::SetSourceDocShell(nsIDocShell* aSourceDocShell
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetBaseURI(nsIURI** aBaseURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aBaseURI);
|
||||
|
||||
*aBaseURI = mBaseURI;
|
||||
NS_IF_ADDREF(*aBaseURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::SetBaseURI(nsIURI* aBaseURI)
|
||||
{
|
||||
mBaseURI = aBaseURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShellLoadInfo: Helpers
|
||||
//*****************************************************************************
|
||||
|
@ -45,6 +45,7 @@ protected:
|
||||
bool mIsSrcdocLoad;
|
||||
nsString mSrcdocData;
|
||||
nsCOMPtr<nsIDocShell> mSourceDocShell;
|
||||
nsCOMPtr<nsIURI> mBaseURI;
|
||||
};
|
||||
|
||||
#endif /* nsDocShellLoadInfo_h__ */
|
||||
|
@ -44,7 +44,7 @@ interface nsIReflowObserver;
|
||||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
[scriptable, builtinclass, uuid(af035c67-1690-431b-9c4d-d38e3cc3137a)]
|
||||
[scriptable, builtinclass, uuid(d0eaef67-4234-47de-b05a-9c7b324eb4f4)]
|
||||
interface nsIDocShell : nsIDocShellTreeItem
|
||||
{
|
||||
/**
|
||||
@ -139,6 +139,9 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
* contents of this parameter will be loaded instead
|
||||
* of aURI.
|
||||
* @param aSourceDocShell - The source browsing context for the navigation.
|
||||
* @param aBaseURI - The base URI to be used for the load. Set in
|
||||
* srcdoc loads as it cannot otherwise be inferred
|
||||
* in certain situations such as view-source.
|
||||
*/
|
||||
[noscript]void internalLoad(in nsIURI aURI,
|
||||
in nsIURI aReferrer,
|
||||
@ -154,6 +157,7 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
in boolean firstParty,
|
||||
in AString aSrcdoc,
|
||||
in nsIDocShell aSourceDocShell,
|
||||
in nsIURI aBaseURI,
|
||||
out nsIDocShell aDocShell,
|
||||
out nsIRequest aRequest);
|
||||
|
||||
|
@ -18,7 +18,7 @@ interface nsIDocShell;
|
||||
|
||||
typedef long nsDocShellInfoLoadType;
|
||||
|
||||
[scriptable, uuid(c6b15de3-2f4f-4e80-bb20-95f43b5598c7)]
|
||||
[scriptable, uuid(c8d3b1e1-565a-427e-9d68-b109910ce9b7)]
|
||||
interface nsIDocShellLoadInfo : nsISupports
|
||||
{
|
||||
/** This is the referrer for the load. */
|
||||
@ -98,4 +98,10 @@ interface nsIDocShellLoadInfo : nsISupports
|
||||
|
||||
/** When set, this is the Source Browsing Context for the navigation. */
|
||||
attribute nsIDocShell sourceDocShell;
|
||||
|
||||
/**
|
||||
* Used for srcdoc loads to give view-source knowledge of the load's base
|
||||
* URI as this information isn't embedded in the load's URI.
|
||||
*/
|
||||
attribute nsIURI baseURI;
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ class nsSHEntryShared;
|
||||
[ptr] native nsDocShellEditorDataPtr(nsDocShellEditorData);
|
||||
[ptr] native nsSHEntryShared(nsSHEntryShared);
|
||||
|
||||
[scriptable, uuid(c2a5827e-0fc0-11e3-bb95-59e799890b3c)]
|
||||
[scriptable, uuid(9eed7e92-1121-46f2-95e5-2f5c0dca46f0)]
|
||||
interface nsISHEntry : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -277,6 +277,13 @@ interface nsISHEntry : nsISupports
|
||||
* Setting this sets isSrcdocEntry to true
|
||||
*/
|
||||
attribute AString srcdocData;
|
||||
|
||||
/**
|
||||
* When isSrcdocEntry is true, this contains the baseURI of the srcdoc
|
||||
* document for use in situations where it cannot otherwise be determined,
|
||||
* for example with view-source.
|
||||
*/
|
||||
attribute nsIURI baseURI;
|
||||
};
|
||||
|
||||
[scriptable, uuid(bb66ac35-253b-471f-a317-3ece940f04c5)]
|
||||
|
@ -53,6 +53,7 @@ nsSHEntry::nsSHEntry(const nsSHEntry &other)
|
||||
, mStateData(other.mStateData)
|
||||
, mIsSrcdocEntry(other.mIsSrcdocEntry)
|
||||
, mSrcdocData(other.mSrcdocData)
|
||||
, mBaseURI(other.mBaseURI)
|
||||
{
|
||||
}
|
||||
|
||||
@ -516,7 +517,20 @@ nsSHEntry::SetSrcdocData(const nsAString &aSrcdocData)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSHEntry::GetBaseURI(nsIURI **aBaseURI)
|
||||
{
|
||||
*aBaseURI = mBaseURI;
|
||||
NS_IF_ADDREF(*aBaseURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSHEntry::SetBaseURI(nsIURI *aBaseURI)
|
||||
{
|
||||
mBaseURI = aBaseURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsSHEntry: nsISHContainer
|
||||
|
@ -62,6 +62,7 @@ private:
|
||||
nsCOMPtr<nsIStructuredCloneContainer> mStateData;
|
||||
bool mIsSrcdocEntry;
|
||||
nsString mSrcdocData;
|
||||
nsCOMPtr<nsIURI> mBaseURI;
|
||||
};
|
||||
|
||||
#endif /* nsSHEntry_h */
|
||||
|
@ -151,13 +151,18 @@ let Activities = {
|
||||
// ActivityProxy.js
|
||||
"Activity:Start",
|
||||
|
||||
// ActivityWrapper.js
|
||||
"Activity:Ready",
|
||||
|
||||
// ActivityRequestHandler.js
|
||||
"Activity:PostResult",
|
||||
"Activity:PostError",
|
||||
|
||||
"Activities:Register",
|
||||
"Activities:Unregister",
|
||||
"Activities:GetContentTypes"
|
||||
"Activities:GetContentTypes",
|
||||
|
||||
"child-process-shutdown"
|
||||
],
|
||||
|
||||
init: function activities_init() {
|
||||
@ -226,6 +231,7 @@ let Activities = {
|
||||
.getService(Ci.nsISystemMessagesInternal);
|
||||
if (!sysmm) {
|
||||
// System message is not present, what should we do?
|
||||
delete Activities.callers[aMsg.id];
|
||||
return;
|
||||
}
|
||||
|
||||
@ -280,7 +286,8 @@ let Activities = {
|
||||
let obsData;
|
||||
|
||||
if (aMessage.name == "Activity:PostResult" ||
|
||||
aMessage.name == "Activity:PostError") {
|
||||
aMessage.name == "Activity:PostError" ||
|
||||
aMessage.name == "Activity:Ready") {
|
||||
caller = this.callers[msg.id];
|
||||
if (!caller) {
|
||||
debug("!! caller is null for msg.id=" + msg.id);
|
||||
@ -293,12 +300,16 @@ let Activities = {
|
||||
|
||||
switch(aMessage.name) {
|
||||
case "Activity:Start":
|
||||
this.callers[msg.id] = { mm: aMessage.target,
|
||||
this.callers[msg.id] = { mm: mm,
|
||||
manifestURL: msg.manifestURL,
|
||||
pageURL: msg.pageURL };
|
||||
this.startActivity(msg);
|
||||
break;
|
||||
|
||||
case "Activity:Ready":
|
||||
caller.childMM = mm;
|
||||
break;
|
||||
|
||||
case "Activity:PostResult":
|
||||
caller.mm.sendAsyncMessage("Activity:FireSuccess", msg);
|
||||
delete this.callers[msg.id];
|
||||
@ -341,6 +352,18 @@ let Activities = {
|
||||
case "Activities:GetContentTypes":
|
||||
this.sendContentTypes(mm);
|
||||
break;
|
||||
case "child-process-shutdown":
|
||||
for (let id in this.callers) {
|
||||
if (this.callers[id].childMM == mm) {
|
||||
this.callers[id].mm.sendAsyncMessage("Activity:FireError", {
|
||||
"id": id,
|
||||
"error": "USER_ABORT"
|
||||
});
|
||||
delete this.callers[id];
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -23,11 +23,6 @@ public:
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
|
||||
static bool PrefEnabled()
|
||||
{
|
||||
return Preferences::GetBool("dom.sysmsg.enabled", false);
|
||||
}
|
||||
|
||||
static already_AddRefed<Activity>
|
||||
Constructor(const GlobalObject& aOwner,
|
||||
nsIDOMMozActivityOptions* aOptions,
|
||||
|
@ -30,6 +30,13 @@ function ActivityWrapper() {
|
||||
ActivityWrapper.prototype = {
|
||||
wrapMessage: function wrapMessage(aMessage, aWindow) {
|
||||
debug("Wrapping " + JSON.stringify(aMessage));
|
||||
|
||||
// This message is useful to communicate that the activity message has been
|
||||
// properly received by the app. If the app will be killed, the
|
||||
// ActivitiesService will be able to fire an error and complete the
|
||||
// Activity workflow.
|
||||
cpmm.sendAsyncMessage("Activity:Ready", { id: aMessage.id });
|
||||
|
||||
let handler = Cc["@mozilla.org/dom/activities/request-handler;1"]
|
||||
.createInstance(Ci.nsIDOMMozActivityRequestHandler);
|
||||
handler.wrappedJSObject._id = aMessage.id;
|
||||
|
@ -180,7 +180,7 @@ AlarmsManager.prototype = {
|
||||
// Get the manifest URL if this is an installed app
|
||||
let appsService = Cc["@mozilla.org/AppsService;1"]
|
||||
.getService(Ci.nsIAppsService);
|
||||
this._pageURL = principal.URI.spec;
|
||||
this._pageURL = aWindow.location.href;
|
||||
this._manifestURL = appsService.getManifestURLByLocalId(principal.appId);
|
||||
this._window = aWindow;
|
||||
},
|
||||
|
@ -1926,6 +1926,11 @@ Navigator::HasDataStoreSupport(JSContext* cx, JSObject* aGlobal)
|
||||
{
|
||||
JS::Rooted<JSObject*> global(cx, aGlobal);
|
||||
|
||||
// DataStore is enabled by default for chrome code.
|
||||
if (nsContentUtils::IsCallerChrome()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// First of all, the general pref has to be turned on.
|
||||
bool enabled = false;
|
||||
Preferences::GetBool("dom.datastore.enabled", &enabled);
|
||||
|
@ -3571,7 +3571,7 @@ nsGlobalWindow::GetSpeechSynthesis(nsISupports** aSpeechSynthesis)
|
||||
{
|
||||
ErrorResult rv;
|
||||
nsCOMPtr<nsISupports> speechSynthesis;
|
||||
if (SpeechSynthesis::PrefEnabled()) {
|
||||
if (Preferences::GetBool("media.webspeech.synth.enabled")) {
|
||||
speechSynthesis = GetSpeechSynthesis(rv);
|
||||
}
|
||||
speechSynthesis.forget(aSpeechSynthesis);
|
||||
|
@ -36,6 +36,9 @@ namespace dom {
|
||||
// so we can use IsBaseOf to detect dictionary template arguments.
|
||||
struct DictionaryBase
|
||||
{
|
||||
protected:
|
||||
bool ParseJSON(JSContext* aCx, const nsAString& aJSON,
|
||||
JS::MutableHandle<JS::Value> aVal);
|
||||
};
|
||||
|
||||
// Struct that serves as a base class for all typed arrays and array buffers and
|
||||
@ -45,13 +48,6 @@ struct AllTypedArraysBase {
|
||||
};
|
||||
|
||||
|
||||
struct MainThreadDictionaryBase : public DictionaryBase
|
||||
{
|
||||
protected:
|
||||
bool ParseJSON(JSContext *aCx, const nsAString& aJSON,
|
||||
JS::MutableHandle<JS::Value> aVal);
|
||||
};
|
||||
|
||||
struct EnumEntry {
|
||||
const char* value;
|
||||
size_t length;
|
||||
|
@ -1529,9 +1529,9 @@ SetXrayExpandoChain(JSObject* obj, JSObject* chain)
|
||||
}
|
||||
|
||||
bool
|
||||
MainThreadDictionaryBase::ParseJSON(JSContext *aCx,
|
||||
const nsAString& aJSON,
|
||||
JS::MutableHandle<JS::Value> aVal)
|
||||
DictionaryBase::ParseJSON(JSContext* aCx,
|
||||
const nsAString& aJSON,
|
||||
JS::MutableHandle<JS::Value> aVal)
|
||||
{
|
||||
if (aJSON.IsEmpty()) {
|
||||
return true;
|
||||
|
@ -2139,8 +2139,6 @@ class CGConstructorEnabled(CGAbstractMethod):
|
||||
if func:
|
||||
assert isinstance(func, list) and len(func) == 1
|
||||
conditions.append("%s(aCx, aObj)" % func[0])
|
||||
if iface.getExtendedAttribute("PrefControlled"):
|
||||
conditions.append("%s::PrefEnabled()" % self.descriptor.nativeType)
|
||||
availableIn = getAvailableInTestFunc(iface)
|
||||
if availableIn:
|
||||
conditions.append("%s(aCx, aObj)" % availableIn)
|
||||
@ -5236,6 +5234,7 @@ if (!${obj}) {
|
||||
'jsvalHandle': 'args.rval()',
|
||||
'returnsNewObject': returnsNewObject,
|
||||
'successCode': successCode,
|
||||
'obj' : "reflector" if setSlot else "obj",
|
||||
}
|
||||
try:
|
||||
wrapCode = CGGeneric(wrapForType(self.returnType, self.descriptor,
|
||||
@ -9047,7 +9046,7 @@ class CGDictionary(CGThing):
|
||||
def base(self):
|
||||
if self.dictionary.parent:
|
||||
return self.makeClassName(self.dictionary.parent)
|
||||
return "MainThreadDictionaryBase"
|
||||
return "DictionaryBase"
|
||||
|
||||
def initMethod(self):
|
||||
body = (
|
||||
|
@ -483,7 +483,6 @@ class Descriptor(DescriptorProvider):
|
||||
static methods or attributes.
|
||||
"""
|
||||
return (self.interface.isExternal() or self.concrete or
|
||||
self.interface.getExtendedAttribute("PrefControlled") or
|
||||
self.interface.hasInterfacePrototypeObject() or
|
||||
any((m.isAttr() or m.isMethod()) and m.isStatic() for m
|
||||
in self.interface.members))
|
||||
@ -492,7 +491,6 @@ class Descriptor(DescriptorProvider):
|
||||
return (self.interface.getExtendedAttribute("Pref") or
|
||||
self.interface.getExtendedAttribute("ChromeOnly") or
|
||||
self.interface.getExtendedAttribute("Func") or
|
||||
self.interface.getExtendedAttribute("PrefControlled") or
|
||||
self.interface.getExtendedAttribute("AvailableIn"))
|
||||
|
||||
def needsXrayResolveHooks(self):
|
||||
|
@ -965,8 +965,7 @@ class IDLInterface(IDLObjectWithScope):
|
||||
raise WebIDLError("[Global] must take no arguments",
|
||||
[attr.location])
|
||||
self._isOnGlobalProtoChain = True
|
||||
elif (identifier == "PrefControlled" or
|
||||
identifier == "NeedNewResolve" or
|
||||
elif (identifier == "NeedNewResolve" or
|
||||
identifier == "OverrideBuiltins" or
|
||||
identifier == "ChromeOnly"):
|
||||
# Known extended attributes that do not take values
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user