Merge m-c to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2015-10-13 12:27:01 +02:00
commit 41a0a7d209
44 changed files with 526 additions and 305 deletions

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
@ -135,7 +135,7 @@
<project groups="invensense" name="platform/hardware/invensense" path="hardware/invensense" revision="e6d9ab28b4f4e7684f6c07874ee819c9ea0002a2"/>
<project name="platform/hardware/ril" path="hardware/ril" revision="865ce3b4a2ba0b3a31421ca671f4d6c5595f8690"/>
<project name="kernel/common" path="kernel" revision="0f36762ab0c1d8ce10c6a5eda948b05d5d6cc379"/>
<project name="platform/system/core" path="system/core" revision="4b989b1bec28b0838420c4d5bb454c78afa62bea"/>
<project name="platform/system/core" path="system/core" revision="4776448ebcd3f07d58b91503c478da9b54cb58a0"/>
<project name="u-boot" path="u-boot" revision="f1502910977ac88f43da7bf9277c3523ad4b0b2f"/>
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="7d6e1269be7186b2073fa568958b357826692c4b"/>
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="295ff253b74353751a99aafd687196a28c84a58e"/>

View File

@ -19,7 +19,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="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="25554535ee69d4c0c24a51f6a55bbabe5cb0a6b8"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -19,7 +19,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="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "0b934d06c04adff2cd9bdd0bc204f974a18b710f",
"git_revision": "d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "dee47434923493d57f151448eec00f793f113bfd",
"revision": "d382a1ff9028efabb8bbc18812ff7de12759a29e",
"repo_path": "integration/gaia-central"
}

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>

View File

@ -18,7 +18,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="25554535ee69d4c0c24a51f6a55bbabe5cb0a6b8"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b934d06c04adff2cd9bdd0bc204f974a18b710f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d400cda6bf0f8b30dcf7d7d71bfa61f29a3f1588"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>

View File

@ -16,7 +16,7 @@
%define forwardTransitionLength 150ms
%define conditionalForwardWithUrlbar window:not([chromehidden~="toolbar"]) #urlbar-wrapper
%define conditionalForwardWithUrlbarWidth 30
%define conditionalForwardWithUrlbarWidth 31
:root {
--backbutton-urlbar-overlap: 6px;
@ -64,6 +64,10 @@
background-color: rgba(0,0,0,.3);
}
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
background-image: linear-gradient(@toolbarHighlight@, @toolbarHighlight@);
}
#navigator-toolbox > toolbar:not(:-moz-lwtheme):not(#toolbar-menubar):not(#TabsToolbar) {
-moz-appearance: none;
border-style: none;
@ -98,7 +102,6 @@
}
#nav-bar {
background-image: linear-gradient(@toolbarHighlight@, transparent);
box-shadow: 0 1px 0 @toolbarHighlight@ inset;
padding-top: 2px;
padding-bottom: 2px;
@ -573,6 +576,18 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
}
/* Primary toolbar buttons */
.toolbarbutton-1 > .toolbarbutton-icon,
.toolbarbutton-1 > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon {
max-width: 16px;
}
.toolbarbutton-1:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-icon,
.toolbarbutton-1:-moz-any(@primaryToolbarButtons@) > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon,
#bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
max-width: 18px;
}
.findbar-button,
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 {
@ -603,15 +618,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
padding: 3px 7px;
}
/* Help SDK icons fit: */
toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-icon,
toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-badge-stack > .toolbarbutton-icon {
width: 16px;
}
:-moz-any(#TabsToolbar, #nav-bar) toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
/* XXXgijs box models strike again: this is 16px + 2 * 7px padding + 2 * 1px border (from the rules above) */
width: 32px;
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-icon,
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
:-moz-any(#TabsToolbar, #nav-bar) #bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
/* horizontal padding + border + actual icon width */
max-width: 32px;
}
#nav-bar #PanelUI-menu-button {
@ -725,6 +736,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
#back-button > .toolbarbutton-icon {
border-radius: 10000px;
padding: 6px;
max-width: 32px; /* horizontal padding + border + icon width */
}
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon {
@ -741,6 +753,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
padding-right: 3px;
border-left-style: none;
border-radius: 0;
max-width: @conditionalForwardWithUrlbarWidth@px;
}
@conditionalForwardWithUrlbar@:not([switchingtabs]) > #forward-button {
@ -1515,11 +1528,12 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 64, 16, 48);
}
.tab-close-button:not(:hover):-moz-lwtheme-brighttext,
#TabsToolbar[brighttext] .tab-close-button:not([visuallyselected]):not(:hover) {
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 80, 16, 64);
}
.tab-close-button:not([visuallyselected]):not(:hover):-moz-lwtheme-darktext {
.tab-close-button:not(:hover):-moz-lwtheme-darktext {
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 96, 16, 80);
}

View File

@ -5,6 +5,6 @@
%filter substitution
%define toolbarHighlight rgba(255,255,255,.3)
%define fgTabTexture linear-gradient(transparent 0px, transparent 2px, hsla(0,0%,100%,0.35) 2px, hsla(0,0%,100%,0.35) 3px, hsla(0,0%,100%,0.65) 3px, hsla(0,0%,100%,0.65) 4px, @toolbarHighlight@)
%define fgTabTexture linear-gradient(transparent 2px, @toolbarHighlight@ 2px, @toolbarHighlight@)
%define fgTabTextureLWT @fgTabTexture@
%define fgTabBackgroundColor -moz-dialog

View File

@ -596,6 +596,18 @@ toolbarpaletteitem[place="palette"] > #personal-bookmarks > #bookmarks-toolbar-p
/* ----- PRIMARY TOOLBAR BUTTONS ----- */
.toolbarbutton-1 > .toolbarbutton-icon,
.toolbarbutton-1 > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon {
max-width: 16px;
margin: 1px;
}
.toolbarbutton-1:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-icon,
.toolbarbutton-1:-moz-any(@primaryToolbarButtons@) > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon {
max-width: 18px;
margin: 0;
}
toolbar .toolbarbutton-1:not([type="menu-button"]),
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
@ -1070,12 +1082,6 @@ toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-ic
-moz-image-region: rect(36px, 1440px, 72px, 1404px);
}
:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-icon,
:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-badge-stack > .toolbarbutton-icon,
:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
width: 18px;
}
#add-share-provider {
list-style-image: url(chrome://browser/skin/menuPanel-small@2x.png);
-moz-image-region: rect(0px, 192px, 32px, 160px);
@ -1087,17 +1093,6 @@ toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button {
min-width: 28px;
}
/* Help 16px icons fit: */
toolbar .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon {
margin: 2px;
}
/* Help SDK icons fit: */
toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-icon,
toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-badge-stack > .toolbarbutton-icon {
width: 16px;
}
#main-window:not([customizing]) .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon,
#main-window:not([customizing]) .toolbarbutton-1[disabled="true"] > .toolbarbutton-badge-stack > .toolbarbutton-icon,
#main-window:not([customizing]) .toolbarbutton-1 > .toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon {

View File

@ -3,9 +3,9 @@
%filter substitution
%define fgTabTexture linear-gradient(transparent, transparent 2px, hsla(0,0%,100%,0.6) 2px, hsla(0,0%,100%,0.6) 3px, hsl(0,0%,99%) 3px, hsl(0,0%,93%))
%define fgTabTexture linear-gradient(transparent 2px, hsla(0,0%,100%,.6) 2px, hsla(0,0%,100%,.6) 3px, hsl(0,0%,99%) 3px, hsl(0,0%,93%))
%define toolbarColorLWT rgba(253,253,253,0.45)
%define fgTabTextureLWT linear-gradient(transparent, transparent 2px, rgba(254,254,254,0.72) 2px, @toolbarColorLWT@)
%define fgTabTextureLWT linear-gradient(transparent 2px, rgba(254,254,254,.72) 2px, @toolbarColorLWT@)
%define fgTabBackgroundColor transparent
%define hudButton -moz-appearance: none; color: #434343; border-radius: 4px; border: 1px solid #b5b5b5; background: linear-gradient(#fff, #f2f2f2); box-shadow: inset 0 1px rgba(255,255,255,.8), inset 0 0 1px rgba(255,255, 255,.25), 0 1px rgba(255,255,255,.3); background-clip: padding-box; background-origin: padding-box; padding: 2px 6px;
%define hudButtonPressed box-shadow: inset 0 1px 4px -3px #000, 0 1px rgba(255,255,255,.3);

View File

@ -138,6 +138,23 @@
border-style: none;
}
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
background-clip: padding-box;
background-image: linear-gradient(@toolbarHighlight@, @toolbarHighlight@);
}
@media (-moz-os-version: windows-xp),
(-moz-os-version: windows-vista),
(-moz-os-version: windows-win7) {
#nav-bar {
background-image: linear-gradient(@toolbarHighlight@, transparent) !important;
}
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar) {
background-image: none;
}
}
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme) {
background-color: -moz-Dialog;
}
@ -344,11 +361,6 @@
z-index: 1;
}
#nav-bar {
background-clip: padding-box;
background-image: linear-gradient(@toolbarHighlight@, transparent);
}
#nav-bar {
border-top: 1px solid @toolbarShadowColor@ !important;
box-shadow: 0 1px 0 @toolbarHighlight@ inset;
@ -673,6 +685,17 @@ toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
-moz-margin-end: 0;
}
.toolbarbutton-1 > .toolbarbutton-icon,
.toolbarbutton-1 > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon {
max-width: 16px;
}
.toolbarbutton-1:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-icon,
.toolbarbutton-1:-moz-any(@primaryToolbarButtons@) > :-moz-any(.toolbarbutton-menubutton-button, .toolbarbutton-badge-stack) > .toolbarbutton-icon,
#bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
max-width: 18px;
}
.findbar-button,
#nav-bar .toolbarbutton-1,
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button {
@ -733,20 +756,11 @@ toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
transition-duration: 150ms;
}
toolbaritem[cui-areatype="toolbar"] > :-moz-any(@nestedButtons@) > .toolbarbutton-icon,
:-moz-any(@primaryToolbarButtons@):-moz-any([cui-areatype="toolbar"],:not([cui-areatype])):not(:-moz-any(@nestedButtons@)) > .toolbarbutton-icon,
:-moz-any(@primaryToolbarButtons@):-moz-any([cui-areatype="toolbar"],:not([cui-areatype])) > .toolbarbutton-badge-stack > .toolbarbutton-icon,
:-moz-any(@primaryToolbarButtons@):-moz-any([cui-areatype="toolbar"],:not([cui-areatype])) > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
width: 18px;
}
#nav-bar toolbaritem[cui-areatype="toolbar"] > :-moz-any(@nestedButtons@) > .toolbarbutton-icon,
#nav-bar :-moz-any(@primaryToolbarButtons@):-moz-any([cui-areatype="toolbar"],:not([cui-areatype])):not(:-moz-any(@nestedButtons@)) > .toolbarbutton-icon,
#nav-bar :-moz-any(@primaryToolbarButtons@):-moz-any([cui-areatype="toolbar"],:not([cui-areatype])) > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1 > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#nav-bar #bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
/* horizontal padding + border + actual icon width */
width: 32px;
max-width: 32px;
}
@media (-moz-os-version: windows-xp),
@ -794,17 +808,6 @@ toolbaritem[cui-areatype="toolbar"] > :-moz-any(@nestedButtons@) > .toolbarbutto
padding: calc(var(--toolbarbutton-vertical-inner-padding) + 1px) 7px;
}
/* Help SDK icons fit: */
toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-icon,
toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-badge-stack > .toolbarbutton-icon {
width: 16px;
}
#nav-bar toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
/* XXXgijs box models strike again: this is 16px + 2 * 7px padding + 2 * 1px border (from the rules above) */
width: 32px;
}
#nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-badge-stack,
#nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button):not(#back-button):not(#forward-button) > .toolbarbutton-icon,
@ -819,7 +822,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
#nav-bar #bookmarks-menu-button[cui-areatype="toolbar"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
/* horizontal padding + border + actual icon width */
width: 31px;
max-width: 31px;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
@ -940,7 +943,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
padding-right: 3px !important;
% icon width + border + horizontal padding without --backbutton-urlbar-overlap
%define forwardButtonWidth 25
width: calc(@forwardButtonWidth@px + var(--backbutton-urlbar-overlap)) !important;
max-width: calc(@forwardButtonWidth@px + var(--backbutton-urlbar-overlap)) !important;
}
@conditionalForwardWithUrlbar@:not([switchingtabs]) > #forward-button {
@ -982,7 +985,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
#back-button > .toolbarbutton-icon {
border-radius: 10000px !important;
padding: 6px !important;
width: 32px !important; /* icon width + horizontal padding + border */
max-width: 32px !important; /* icon width + horizontal padding + border */
}
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon {
@ -2004,12 +2007,14 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
/* Invert the unhovered close tab icons on bright-text tabs */
@media not all and (min-resolution: 1.1dppx) {
.tab-close-button:-moz-lwtheme-brighttext,
#TabsToolbar[brighttext] .tab-close-button:not([visuallyselected="true"]) {
list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}
}
@media (min-resolution: 1.1dppx) {
.tab-close-button:-moz-lwtheme-brighttext,
#TabsToolbar[brighttext] .tab-close-button:not([visuallyselected="true"]) {
list-style-image: url("chrome://global/skin/icons/close-inverted@2x.png");
}

View File

@ -4,8 +4,8 @@
%filter substitution
%define toolbarHighlight rgba(253,253,253,0.45)
%define fgTabTexture linear-gradient(transparent, transparent 2px, rgba(254,254,254,0.72) 2px, rgba(254,254,254,0.72) 2px, rgba(250,250,250,0.88) 3px, rgba(250,250,250,0.88) 3px, rgba(254,254,254,0.72) 4px, rgba(254,254,254,0.72) 4px, @toolbarHighlight@)
%define toolbarHighlight rgba(255,255,255,.3)
%define fgTabTexture linear-gradient(transparent 2px, @toolbarHighlight@ 2px, @toolbarHighlight@)
%define fgTabBackgroundColor -moz-dialog
%define fgTabTextureLWT @fgTabTexture@

View File

@ -11,7 +11,6 @@
#include "BluetoothSocket.h"
#include "BluetoothUtils.h"
#include "BluetoothUuid.h"
#include "ObexBase.h"
#include "mozilla/dom/BluetoothPbapParametersBinding.h"
#include "mozilla/dom/File.h"
@ -46,6 +45,31 @@ namespace {
}
};
// App parameters to pull phonebook
static const AppParameterTag sPhonebookTags[] = {
AppParameterTag::Format,
AppParameterTag::PropertySelector,
AppParameterTag::MaxListCount,
AppParameterTag::ListStartOffset,
AppParameterTag::vCardSelector
};
// App parameters to pull vCard listing
static const AppParameterTag sVCardListingTags[] = {
AppParameterTag::Order,
AppParameterTag::SearchValue,
AppParameterTag::SearchProperty,
AppParameterTag::MaxListCount,
AppParameterTag::ListStartOffset,
AppParameterTag::vCardSelector
};
// App parameters to pull vCard entry
static const AppParameterTag sVCardEntryTags[] = {
AppParameterTag::Format,
AppParameterTag::PropertySelector
};
StaticRefPtr<BluetoothPbapManager> sPbapManager;
static bool sInShutdown = false;
}
@ -261,7 +285,7 @@ BluetoothPbapManager::ReceiveSocketData(BluetoothSocket* aSocket,
return;
}
uint8_t response = SetPhoneBookPath(data[3], pktHeaders);
ObexResponseCode response = SetPhoneBookPath(pktHeaders, data[3]);
if (response != ObexResponseCode::Success) {
ReplyError(response);
return;
@ -271,18 +295,22 @@ BluetoothPbapManager::ReceiveSocketData(BluetoothSocket* aSocket,
break;
}
case ObexRequestCode::Get:
// Section 6.2.2 "OBEX Headers in Multi-Packet Responses", IrOBEX 1.2
// All OBEX request messages shall be sent as one OBEX packet containing
// all of the headers. I.e. OBEX GET with opcode 0x83 shall always be
// used. OBEX GET with opcode 0x03 shall never be used.
/*
* Section 6.2.2 "OBEX Headers in Multi-Packet Responses", IrOBEX 1.2
* All OBEX request messages shall be sent as one OBEX packet containing
* all the headers, i.e., OBEX GET with opcode 0x83 shall always be
* used, and GET with opcode 0x03 shall never be used.
*/
BT_LOGR("PBAP shall always use OBEX GetFinal instead of Get.");
// no break. Treat 'Get' as 'GetFinal' for error tolerance.
case ObexRequestCode::GetFinal: {
// When |mVCardDataStream| requires multiple response packets to complete,
// the client should continue to issue GET requests until the final body
// information (i.e., End-of-Body header) arrives, along with
// ObexResponseCode::Success
/*
* When |mVCardDataStream| requires multiple response packets to complete,
* the client should continue to issue GET requests until the final body
* information (i.e., End-of-Body header) arrives, along with
* ObexResponseCode::Success
*/
if (mVCardDataStream) {
if (!ReplyToGet()) {
BT_LOGR("Failed to reply to PBAP GET request.");
@ -300,33 +328,18 @@ BluetoothPbapManager::ReceiveSocketData(BluetoothSocket* aSocket,
return;
}
nsString type;
pktHeaders.GetContentType(type);
uint8_t response;
if (type.EqualsLiteral("x-bt/vcard-listing")) {
response = PullvCardListing(pktHeaders);
} else if (type.EqualsLiteral("x-bt/vcard")) {
response = PullvCardEntry(pktHeaders);
} else if (type.EqualsLiteral("x-bt/phonebook")) {
response = PullPhonebook(pktHeaders);
} else {
response = ObexResponseCode::BadRequest;
BT_LOGR("Unknown PBAP request type: %s",
NS_ConvertUTF16toUTF8(type).get());
}
// The OBEX success response will be sent after Gaia replies the PBAP
// request.
ObexResponseCode response = NotifyPbapRequest(pktHeaders);
if (response != ObexResponseCode::Success) {
ReplyError(response);
return;
}
// OBEX success response will be sent after gaia replies PBAP request
break;
}
case ObexRequestCode::Put:
case ObexRequestCode::PutFinal:
ReplyError(ObexResponseCode::BadRequest);
BT_LOGR("Unsupported ObexRequestCode %x", opCode);
break;
default:
ReplyError(ObexResponseCode::NotImplemented);
@ -363,9 +376,9 @@ BluetoothPbapManager::CompareHeaderTarget(const ObexHeaderSet& aHeader)
return true;
}
uint8_t
BluetoothPbapManager::SetPhoneBookPath(uint8_t flags,
const ObexHeaderSet& aHeader)
ObexResponseCode
BluetoothPbapManager::SetPhoneBookPath(const ObexHeaderSet& aHeader,
uint8_t flags)
{
// Section 5.2 "SetPhoneBook Function", PBAP 1.2
// flags bit 1 must be 1 and bit 2~7 be 0
@ -424,103 +437,66 @@ BluetoothPbapManager::SetPhoneBookPath(uint8_t flags,
return ObexResponseCode::Success;
}
uint8_t
BluetoothPbapManager::PullPhonebook(const ObexHeaderSet& aHeader)
ObexResponseCode
BluetoothPbapManager::NotifyPbapRequest(const ObexHeaderSet& aHeader)
{
MOZ_ASSERT(NS_IsMainThread());
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
return ObexResponseCode::PreconditionFailed;
}
InfallibleTArray<BluetoothNamedValue> data;
nsString name;
// Get content type and name
nsString type, name;
aHeader.GetContentType(type);
aHeader.GetName(name);
// Ensure the name of phonebook object is legal
if (!IsLegalPhonebookName(name)) {
BT_LOGR("Illegal phone book object name [%s]",
NS_ConvertUTF16toUTF8(name).get());
return ObexResponseCode::NotFound;
// Configure request based on content type
nsString reqId;
uint8_t tagCount;
const AppParameterTag* tags;
if (type.EqualsLiteral("x-bt/phonebook")) {
reqId.AssignLiteral(PULL_PHONEBOOK_REQ_ID);
tagCount = MOZ_ARRAY_LENGTH(sPhonebookTags);
tags = sPhonebookTags;
// Ensure the name of phonebook object is legal
if (!IsLegalPhonebookName(name)) {
BT_LOGR("Illegal phone book object name [%s]",
NS_ConvertUTF16toUTF8(name).get());
return ObexResponseCode::NotFound;
}
} else if (type.EqualsLiteral("x-bt/vcard-listing")) {
reqId.AssignLiteral(PULL_VCARD_LISTING_REQ_ID);
tagCount = MOZ_ARRAY_LENGTH(sVCardListingTags);
tags = sVCardListingTags;
// Section 5.3.3 "Name", PBAP 1.2:
// ... PullvCardListing function uses relative paths. An empty name header
// may be sent to retrieve the vCard Listing object of the current folder.
name = name.IsEmpty() ? mCurrentPath
: mCurrentPath + NS_LITERAL_STRING("/") + name;
} else if (type.EqualsLiteral("x-bt/vcard")) {
reqId.AssignLiteral(PULL_VCARD_ENTRY_REQ_ID);
tagCount = MOZ_ARRAY_LENGTH(sVCardEntryTags);
tags = sVCardEntryTags;
} else {
BT_LOGR("Unknown PBAP request type: %s",
NS_ConvertUTF16toUTF8(type).get());
return ObexResponseCode::BadRequest;
}
AppendNamedValue(data, "name", name);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::Format);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::PropertySelector);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::MaxListCount);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::ListStartOffset);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::vCardSelector);
bs->DistributeSignal(NS_LITERAL_STRING(PULL_PHONEBOOK_REQ_ID),
NS_LITERAL_STRING(KEY_ADAPTER),
data);
return ObexResponseCode::Success;
}
uint8_t
BluetoothPbapManager::PullvCardListing(const ObexHeaderSet& aHeader)
{
MOZ_ASSERT(NS_IsMainThread());
// Ensure bluetooth service is available
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
BT_LOGR("Failed to get Bluetooth service");
return ObexResponseCode::PreconditionFailed;
}
// Pack PBAP request
InfallibleTArray<BluetoothNamedValue> data;
nsString folderName;
aHeader.GetName(folderName);
// Section 5.3.3 "Name", PBAP 1.2
// ... PullvCardListing function uses relative paths. An empty name header may
// be sent to retrieve the vCard Listing object of the current folder.
nsString folderPath = mCurrentPath;
if (!folderName.IsEmpty()) {
folderPath += NS_LITERAL_STRING("/") + folderName;
}
AppendNamedValue(data, "name", folderPath);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::Order);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::SearchValue);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::SearchProperty);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::MaxListCount);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::ListStartOffset);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::vCardSelector);
bs->DistributeSignal(NS_LITERAL_STRING(PULL_VCARD_LISTING_REQ_ID),
NS_LITERAL_STRING(KEY_ADAPTER),
data);
return ObexResponseCode::Success;
}
uint8_t
BluetoothPbapManager::PullvCardEntry(const ObexHeaderSet& aHeader)
{
MOZ_ASSERT(NS_IsMainThread());
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
return ObexResponseCode::PreconditionFailed;
}
InfallibleTArray<BluetoothNamedValue> data;
nsString name;
aHeader.GetName(name);
AppendNamedValue(data, "name", name);
for (uint8_t i = 0; i < tagCount; i++) {
AppendNamedValueByTagId(aHeader, data, tags[i]);
}
AppendNamedValueByTagId(aHeader, data, AppParameterTag::Format);
AppendNamedValueByTagId(aHeader, data, AppParameterTag::PropertySelector);
bs->DistributeSignal(NS_LITERAL_STRING(PULL_VCARD_ENTRY_REQ_ID),
NS_LITERAL_STRING(KEY_ADAPTER),
data);
bs->DistributeSignal(reqId, NS_LITERAL_STRING(KEY_ADAPTER), data);
return ObexResponseCode::Success;
}
@ -553,64 +529,41 @@ BluetoothPbapManager::AppendNamedValueByTagId(
AppendNamedValue(aValues, "searchKey", searchKey);
break;
}
case AppParameterTag::SearchValue: {
case AppParameterTag::SearchValue:
// Section 5.3.4.3 "SearchValue {<text string>}", PBAP 1.2
// The UTF-8 character set shall be used for <text string>.
// Use nsCString to store UTF-8 string here to follow the suggestion of
// 'MDN:Internal_strings'.
nsCString text((char *) buf);
AppendNamedValue(aValues, "searchText", text);
// Store UTF-8 string with nsCString to follow MDN:Internal_strings
AppendNamedValue(aValues, "searchText", nsCString((char *) buf));
break;
}
case AppParameterTag::MaxListCount: {
uint16_t maxListCount = *((uint16_t *)buf);
// convert big endian to little endian
maxListCount = (maxListCount >> 8) | (maxListCount << 8);
// Section 5 "Phone Book Access Profile Functions", PBAP 1.2
// Replying 'PhonebookSize' is mandatory if 'MaxListCount' parameter is
// present in the request with a value of 0, else it is excluded.
mPhonebookSizeRequired = !maxListCount;
uint16_t maxListCount = ReadLittleEndianUInt16(buf);
AppendNamedValue(aValues, "maxListCount",
static_cast<uint32_t>(maxListCount));
// Section 5 "Phone Book Access Profile Functions", PBAP 1.2
// Replying 'PhonebookSize' is mandatory if 'MaxListCount' parameter
// is present in the request with a value of 0, else it is excluded.
mPhonebookSizeRequired = !maxListCount;
break;
}
case AppParameterTag::ListStartOffset: {
uint16_t listStartOffset = *((uint16_t *)buf);
// convert big endian to little endian
listStartOffset = (listStartOffset >> 8) | (listStartOffset << 8);
case AppParameterTag::ListStartOffset:
AppendNamedValue(aValues, "listStartOffset",
static_cast<uint32_t>(listStartOffset));
static_cast<uint32_t>(ReadLittleEndianUInt16(buf)));
break;
}
case AppParameterTag::PropertySelector: {
InfallibleTArray<uint32_t> props = PackPropertiesMask(buf, 64);
AppendNamedValue(aValues, "propSelector", props);
case AppParameterTag::PropertySelector:
AppendNamedValue(aValues, "propSelector", PackPropertiesMask(buf, 64));
break;
}
case AppParameterTag::Format: {
bool usevCard3 = buf[0];
AppendNamedValue(aValues, "format", usevCard3);
case AppParameterTag::Format:
AppendNamedValue(aValues, "format", static_cast<bool>(buf[0]));
break;
}
case AppParameterTag::vCardSelector: {
InfallibleTArray<uint32_t> props = PackPropertiesMask(buf, 64);
bool hasVCardSelectorOperator = aHeader.GetAppParameter(
bool hasSelectorOperator = aHeader.GetAppParameter(
AppParameterTag::vCardSelectorOperator, buf, 64);
if (hasVCardSelectorOperator && buf[0]) {
AppendNamedValue(aValues, "vCardSelector_AND", BluetoothValue(props));
} else {
AppendNamedValue(aValues, "vCardSelector_OR", BluetoothValue(props));
}
AppendNamedValue(aValues,
hasSelectorOperator && buf[0] ? "vCardSelector_AND"
: "vCardSelector_OR",
PackPropertiesMask(buf, 64));
break;
}
default:
@ -906,10 +859,7 @@ BluetoothPbapManager::ReplyToGet(uint16_t aPhonebookSize)
if (mPhonebookSizeRequired) {
// ---- Part 2: [headerId:1][length:2][PhonebookSize:4] ---- //
// convert little endian to big endian
uint8_t phonebookSize[2];
phonebookSize[0] = (aPhonebookSize & 0xFF00) >> 8;
phonebookSize[1] = aPhonebookSize & 0x00FF;
uint16_t pbSizeBigEndian = ConvertEndiannessUInt16(aPhonebookSize);
// Section 6.2.1 "Application Parameters Header", PBAP 1.2
// appParameters: [headerId:1][length:2][PhonebookSize:4], where
@ -917,9 +867,9 @@ BluetoothPbapManager::ReplyToGet(uint16_t aPhonebookSize)
uint8_t appParameters[4];
AppendAppParameter(appParameters,
sizeof(appParameters),
(uint8_t) AppParameterTag::PhonebookSize,
phonebookSize,
sizeof(phonebookSize));
static_cast<uint8_t>(AppParameterTag::PhonebookSize),
(uint8_t*) &pbSizeBigEndian,
sizeof(pbSizeBigEndian));
index += AppendHeaderAppParameters(&res[index],
mRemoteMaxPacketLength,

View File

@ -12,9 +12,9 @@
#include "BluetoothSocketObserver.h"
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
#include "mozilla/ipc/SocketBase.h"
#include "ObexBase.h"
class nsIInputStream;
namespace mozilla {
namespace dom {
class Blob;
@ -141,20 +141,18 @@ private:
void ReplyToConnect();
void ReplyToDisconnectOrAbort();
void ReplyToSetPath();
bool ReplyToGet(uint16_t aPhonebookSize = 0);
void ReplyError(uint8_t aError);
void SendObexData(uint8_t* aData, uint8_t aOpcode, int aSize);
bool ReplyToGet(uint16_t aPhonebookSize = 0);
uint8_t SetPhoneBookPath(uint8_t flags, const ObexHeaderSet& aHeader);
uint8_t PullPhonebook(const ObexHeaderSet& aHeader);
uint8_t PullvCardListing(const ObexHeaderSet& aHeader);
uint8_t PullvCardEntry(const ObexHeaderSet& aHeader);
void AppendNamedValueByTagId(
const ObexHeaderSet& aHeader,
InfallibleTArray<BluetoothNamedValue>& aValues,
const AppParameterTag aTagId);
ObexResponseCode SetPhoneBookPath(const ObexHeaderSet& aHeader,
uint8_t flags);
ObexResponseCode NotifyPbapRequest(const ObexHeaderSet& aHeader);
void AppendNamedValueByTagId(const ObexHeaderSet& aHeader,
InfallibleTArray<BluetoothNamedValue>& aValues,
const AppParameterTag aTagId);
InfallibleTArray<uint32_t> PackPropertiesMask(uint8_t* aData, int aSize);
InfallibleTArray<uint32_t> PackPropertiesMask(uint8_t* aData, int aSize);
bool CompareHeaderTarget(const ObexHeaderSet& aHeader);
bool IsLegalPath(const nsAString& aPath);
bool IsLegalPhonebookName(const nsAString& aName);

View File

@ -604,4 +604,16 @@ InsertNamedValue(InfallibleTArray<BluetoothNamedValue>& aArray,
aArray.InsertElementAt(aIndex, BluetoothNamedValue(name, aValue));
}
uint16_t
ConvertEndiannessUInt16(uint16_t aValue)
{
return (aValue >> 8) | (aValue << 8);
}
uint16_t
ReadLittleEndianUInt16(const uint8_t* aBuf)
{
return ConvertEndiannessUInt16(*((uint16_t *) aBuf));
}
END_BLUETOOTH_NAMESPACE

View File

@ -272,6 +272,20 @@ void InsertNamedValue(InfallibleTArray<BluetoothNamedValue>& aArray,
uint8_t aIndex, const char* aName,
const BluetoothValue& aValue);
//
// Big/Little endianness conversion
//
/**
* Convert a big/little endian uint16_t value to little/big endian one.
*/
uint16_t ConvertEndiannessUInt16(uint16_t aValue);
/**
* Read an uint16_t from array and convert it to little endian one.
*/
uint16_t ReadLittleEndianUInt16(const uint8_t* aBuf);
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_BluetoothUtils_h

View File

@ -299,6 +299,43 @@ PreallocatedProcessManagerImpl::GetSpareProcess()
return process.forget();
}
static bool
TestCaseEnabled()
{
return Preferences::GetBool("dom.ipc.preallocatedProcessManager.testMode");
}
static void
SendTestOnlyNotification(const char* aMessage)
{
if (!TestCaseEnabled()) {
return;
}
AutoSafeJSContext cx;
nsString message;
message.AppendPrintf("%s", aMessage);
nsCOMPtr<nsIMessageBroadcaster> ppmm =
do_GetService("@mozilla.org/parentprocessmessagemanager;1");
mozilla::unused << ppmm->BroadcastAsyncMessage(
message, JS::NullHandleValue, JS::NullHandleValue, cx, 1);
}
static void
KillOrCloseProcess(ContentParent* aProcess)
{
if (TestCaseEnabled()) {
// KillHard() the process because we don't want the process to abort when we
// close the IPC channel while it's still running and creating actors.
aProcess->KillHard("Killed by test case.");
}
else {
aProcess->Close();
}
}
/**
* Publish a ContentParent to spare process list.
*/
@ -307,14 +344,7 @@ PreallocatedProcessManagerImpl::PublishSpareProcess(ContentParent* aContent)
{
MOZ_ASSERT(NS_IsMainThread());
if (Preferences::GetBool("dom.ipc.preallocatedProcessManager.testMode")) {
AutoJSContext cx;
nsCOMPtr<nsIMessageBroadcaster> ppmm =
do_GetService("@mozilla.org/parentprocessmessagemanager;1");
mozilla::unused << ppmm->BroadcastAsyncMessage(
NS_LITERAL_STRING("TEST-ONLY:nuwa-add-new-process"),
JS::NullHandleValue, JS::NullHandleValue, cx, 1);
}
SendTestOnlyNotification("TEST-ONLY:nuwa-add-new-process");
mSpareProcesses.AppendElement(aContent);
}
@ -333,7 +363,7 @@ PreallocatedProcessManagerImpl::MaybeForgetSpare(ContentParent* aContent)
mIsNuwaReady = false;
while (mSpareProcesses.Length() > 0) {
nsRefPtr<ContentParent> process = mSpareProcesses[mSpareProcesses.Length() - 1];
process->Close();
KillOrCloseProcess(aContent);
mSpareProcesses.RemoveElementAt(mSpareProcesses.Length() - 1);
}
ScheduleDelayedNuwaFork();
@ -353,14 +383,8 @@ PreallocatedProcessManagerImpl::OnNuwaReady()
ProcessPriorityManager::SetProcessPriority(mPreallocatedAppProcess,
hal::PROCESS_PRIORITY_MASTER);
mIsNuwaReady = true;
if (Preferences::GetBool("dom.ipc.preallocatedProcessManager.testMode")) {
AutoJSContext cx;
nsCOMPtr<nsIMessageBroadcaster> ppmm =
do_GetService("@mozilla.org/parentprocessmessagemanager;1");
mozilla::unused << ppmm->BroadcastAsyncMessage(
NS_LITERAL_STRING("TEST-ONLY:nuwa-ready"),
JS::NullHandleValue, JS::NullHandleValue, cx, 1);
}
SendTestOnlyNotification("TEST-ONLY:nuwa-ready");
NuwaFork();
}
@ -370,7 +394,6 @@ PreallocatedProcessManagerImpl::PreallocatedProcessReady()
return !mSpareProcesses.IsEmpty();
}
void
PreallocatedProcessManagerImpl::NuwaFork()
{
@ -399,7 +422,7 @@ PreallocatedProcessManagerImpl::Disable()
#ifdef MOZ_NUWA_PROCESS
while (mSpareProcesses.Length() > 0){
nsRefPtr<ContentParent> process = mSpareProcesses[0];
process->Close();
KillOrCloseProcess(process);
mSpareProcesses.RemoveElementAt(0);
}
mIsNuwaReady = false;

View File

@ -14,7 +14,7 @@ skip-if = buildapp == 'b2g' || buildapp == 'mulet' || e10s || toolkit == 'androi
[test_cpow_cookies.html]
skip-if = buildapp == 'b2g' || buildapp == 'mulet'
[test_NuwaProcessCreation.html]
skip-if = true # bug 1166923
skip-if = toolkit != 'gonk'
[test_NuwaProcessDeadlock.html]
skip-if = true # bug 1166923
[test_child_docshell.html]

View File

@ -14,6 +14,9 @@ Test if Nuwa process created successfully.
function runTest()
{
info("Shut down processes by disabling process prelaunch");
SpecialPowers.setBoolPref('dom.ipc.processPrelaunch.enabled', false);
info("Launch the Nuwa process");
let cpmm = SpecialPowers.Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(SpecialPowers.Ci.nsISyncMessageSender);
@ -22,12 +25,11 @@ function runTest()
receiveMessage: function receiveMessage(msg) {
msg = SpecialPowers.wrap(msg);
if (msg.name == 'TEST-ONLY:nuwa-ready') {
ok(true, "Got nuwa-ready");
is(seenNuwaReady, false, "Already received nuwa ready");
is(seenNuwaReady, false, "The Nuwa process is launched");
seenNuwaReady = true;
} else if (msg.name == 'TEST-ONLY:nuwa-add-new-process') {
ok(true, "Got nuwa-add-new-process");
is(seenNuwaReady, true, "Receive nuwa-add-new-process before nuwa-ready");
is(seenNuwaReady, true, "The preallocated process is launched from the Nuwa process");
shutdown();
}
}
@ -56,7 +58,6 @@ function setup()
SpecialPowers.pushPrefEnv({
'set': [
['dom.ipc.processPrelaunch.enabled', false],
['dom.ipc.preallocatedProcessManager.testMode', true]
]
}, runTest);

View File

@ -98,7 +98,14 @@ MobileMessageDatabaseService::MarkMessageRead(int32_t aMessageId,
bool aSendReadReport,
nsIMobileMessageCallback* aRequest)
{
// TODO: This would need to be implemented as part of Bug 748391
if (!AndroidBridge::Bridge()) {
return NS_OK;
}
AndroidBridge::Bridge()->MarkMessageRead(aMessageId,
aValue,
aSendReadReport,
aRequest);
return NS_OK;
}

View File

@ -393,5 +393,36 @@ SmsManager::NotifyCursorDone(int32_t aRequestId)
NS_DispatchToMainThread(runnable);
}
} // namespace
/*static*/
void
SmsManager::NotifySmsMarkedAsRead(bool aMarkedAsRead, int32_t aRequestId)
{
nsCOMPtr<nsIRunnable> runnable = NS_NewRunnableFunction([=]() {
nsCOMPtr<nsIMobileMessageCallback> request =
AndroidBridge::Bridge()->DequeueSmsRequest(aRequestId);
if (!request) {
return;
}
request->NotifyMessageMarkedRead(aMarkedAsRead);
});
NS_DispatchToMainThread(runnable);
}
/*static*/
void
SmsManager::NotifySmsMarkAsReadFailed(int32_t aError, int32_t aRequestId)
{
nsCOMPtr<nsIRunnable> runnable = NS_NewRunnableFunction([=]() {
nsCOMPtr<nsIMobileMessageCallback> request =
AndroidBridge::Bridge()->DequeueSmsRequest(aRequestId);
if (!request) {
return;
}
request->NotifyMarkMessageReadFailed(aError);
});
NS_DispatchToMainThread(runnable);
}
} // namespace

View File

@ -66,6 +66,8 @@ public:
bool aRead,
int32_t aRequestId);
static void NotifyCursorDone(int32_t aRequestId);
static void NotifySmsMarkedAsRead(bool aMarkedAsRead, int32_t aRequestId);
static void NotifySmsMarkAsReadFailed(int32_t aError, int32_t aRequestId);
};
} // namespace

View File

@ -2361,6 +2361,15 @@ public class GeckoAppShell
SmsManager.getInstance().deleteMessage(aMessageId, aRequestId);
}
@WrapForJNI
public static void markMessageRead(int aMessageId, boolean aValue, boolean aSendReadReport, int aRequestId) {
if (!SmsManager.isEnabled()) {
return;
}
SmsManager.getInstance().markMessageRead(aMessageId, aValue, aSendReadReport, aRequestId);
}
@WrapForJNI(stubName = "CreateMessageCursorWrapper")
public static void createMessageCursor(long aStartDate, long aEndDate, String[] aNumbers, int aNumbersCount, String aDelivery, boolean aHasRead, boolean aRead, boolean aHasThreadId, long aThreadId, boolean aReverse, int aRequestId) {
if (!SmsManager.isEnabled()) {

View File

@ -762,6 +762,48 @@ public class GeckoSmsManager
aRequestId);
}
@Override
public void markMessageRead(int aMessageId, boolean aValue, boolean aSendReadReport, int aRequestId) {
class MarkMessageReadRunnable implements Runnable {
private final int mMessageId;
private final boolean mValue;
private final int mRequestId;
MarkMessageReadRunnable(int aMessageId, boolean aValue, int aRequestId) {
mMessageId = aMessageId;
mValue = aValue;
mRequestId = aRequestId;
}
@Override
public void run() {
try {
ContentResolver cr = GeckoAppShell.getContext().getContentResolver();
Uri message = ContentUris.withAppendedId(kSmsContentUri, mMessageId);
ContentValues updatedProps = new ContentValues();
updatedProps.put("read", mValue);
int count = cr.update(message, updatedProps, null, null);
notifySmsMarkedAsRead(count == 1, mRequestId);
} catch (Exception e) {
Log.e("GeckoSmsManager", "Error while trying to mark message as read: " + e);
notifySmsMarkAsReadFailed(kUnknownError, mRequestId);
}
}
}
if (aSendReadReport == true) {
Log.w("GeckoSmsManager", "Android SmsManager doesn't suport read receipts for SMS.");
}
if (!SmsIOThread.getInstance().execute(new MarkMessageReadRunnable(aMessageId, aValue, aRequestId))) {
Log.e("GeckoSmsManager", "Failed to add MarkMessageReadRunnable to the SmsIOThread");
notifySmsMarkAsReadFailed(kUnknownError, aRequestId);
}
}
@Override
public void createMessageCursor(long aStartDate, long aEndDate, String[] aNumbers, int aNumbersCount, String aDelivery, boolean aHasRead, boolean aRead, boolean aHasThreadId, long aThreadId, boolean aReverse, int aRequestId) {
class CreateMessageCursorRunnable implements Runnable {
@ -1101,6 +1143,10 @@ public class GeckoSmsManager
@WrapForJNI
private static native void notifySmsDeleteFailed(int aError, int aRequestId);
@WrapForJNI
private static native void notifySmsMarkedAsRead(boolean aMarkedAsRead, int aRequestId);
@WrapForJNI
private static native void notifySmsMarkAsReadFailed(int aError, int aRequestId);
@WrapForJNI
private static native void notifyCursorError(int aError, int aRequestId);
@WrapForJNI
private static native void notifyThreadCursorResult(long aId, String aLastMessageSubject, String aBody, long aUnreadCount, Object[] aParticipants, long aTimestamp, String aLastMessageType, int aRequestId);

View File

@ -31,6 +31,7 @@ public class SmsManager {
void send(String aNumber, String aMessage, int aRequestId);
void getMessage(int aMessageId, int aRequestId);
void deleteMessage(int aMessageId, int aRequestId);
void markMessageRead(int aMessageId, boolean aValue, boolean aSendReadReport, int aRequestId);
void createMessageCursor(long aStartDate, long aEndDate, String[] aNumbers, int aNumbersCount, String aDelivery, boolean aHasRead, boolean aRead, boolean aHasThreadId, long aThreadId, boolean aReverse, int aRequestId);
void createThreadCursor(int aRequestId);
void getNextThread(int aRequestId);

View File

@ -9,8 +9,8 @@
Base application theme.
-->
<style name="GeckoBase" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:colorPrimary">@color/text_and_tabs_tray_grey</item>
<item name="android:colorPrimaryDark">@color/text_and_tabs_tray_grey</item>
<item name="colorPrimary">@color/text_and_tabs_tray_grey</item>
<item name="colorPrimaryDark">@color/text_and_tabs_tray_grey</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:actionBarStyle">@style/GeckoActionBar</item>

View File

@ -615,7 +615,7 @@ Http2Stream::GenerateOpen()
messageSize += Http2Session::kFrameHeaderBytes + 5; // frame header + priority overhead in HEADERS frame
messageSize += (numFrames - 1) * Http2Session::kFrameHeaderBytes; // frame header overhead in CONTINUATION frames
EnsureBuffer(mTxInlineFrame, messageSize,
EnsureBuffer(mTxInlineFrame, dataLength + messageSize,
mTxInlineFrameUsed, mTxInlineFrameSize);
mTxInlineFrameUsed += messageSize;

View File

@ -1352,7 +1352,15 @@ BookmarksStore.prototype = {
getAllIDs: function BStore_getAllIDs() {
let items = {"menu": true,
"toolbar": true};
"toolbar": true,
"unfiled": true,
};
// We also want "mobile" but only if a local mobile folder already exists
// (otherwise we'll later end up creating it, which we want to avoid until
// we actually need it.)
if (kSpecialIds.findMobileRoot(false)) {
items["mobile"] = true;
}
for each (let guid in kSpecialIds.guids) {
if (guid != "places" && guid != "tags")
this._getChildren(guid, items);

View File

@ -227,7 +227,7 @@ add_task(function test_restorePromptsReupload() {
_("Verify that there's only one bookmark on the server, and it's Thunderbird.");
// Of course, there's also the Bookmarks Toolbar and Bookmarks Menu...
let wbos = collection.keys(function (id) {
return ["menu", "toolbar", "mobile", folder1_guid].indexOf(id) == -1;
return ["menu", "toolbar", "mobile", "unfiled", folder1_guid].indexOf(id) == -1;
});
do_check_eq(wbos.length, 1);
do_check_eq(wbos[0], bmk2_guid);
@ -257,7 +257,7 @@ add_task(function test_restorePromptsReupload() {
do_check_true(found);
_("Have the correct number of IDs locally, too.");
do_check_eq(count, ["menu", "toolbar", folder1_id, bmk1_id].length);
do_check_eq(count, ["menu", "toolbar", "mobile", "unfiled", folder1_id, bmk1_id].length);
_("Sync again. This'll wipe bookmarks from the server.");
try {
@ -277,7 +277,9 @@ add_task(function test_restorePromptsReupload() {
let folderWBOs = payloads.filter(function (wbo) {
return ((wbo.type == "folder") &&
(wbo.id != "menu") &&
(wbo.id != "toolbar"));
(wbo.id != "toolbar") &&
(wbo.id != "unfiled") &&
(wbo.id != "mobile"));
});
do_check_eq(bookmarkWBOs.length, 1);

View File

@ -112,7 +112,7 @@ add_test(function test_annotation_uploaded() {
try {
engine.sync();
let wbos = collection.keys(function (id) {
return ["menu", "toolbar", "mobile"].indexOf(id) == -1;
return ["menu", "toolbar", "mobile", "unfiled"].indexOf(id) == -1;
});
do_check_eq(wbos.length, 1);

View File

@ -20,7 +20,7 @@ task:
--test-suite crashtest
--installer-url {{build_url}}
--test-packages-url {{test_packages_url}}
--xre-url https://queue.taskcluster.net/v1/task/wXAHAaxDQpqxoWF1iljJjg/runs/0/artifacts/public/cache/xulrunner-sdk-40.zip
--xre-url https://queue.taskcluster.net/v1/task/YNNF94qRSyCXiSU_AQgFOQ/runs/0/artifacts/public/cache/xulrunner-sdk-40.zip
--this-chunk {{chunk}}
--total-chunk {{total_chunks}}
artifacts:

View File

@ -19,7 +19,7 @@ task:
--test-suite reftest
--installer-url {{build_url}}
--test-packages-url {{test_packages_url}}
--xre-url https://queue.taskcluster.net/v1/task/wXAHAaxDQpqxoWF1iljJjg/runs/0/artifacts/public/cache/xulrunner-sdk-40.zip
--xre-url https://queue.taskcluster.net/v1/task/YNNF94qRSyCXiSU_AQgFOQ/runs/0/artifacts/public/cache/xulrunner-sdk-40.zip
--this-chunk {{chunk}}
--total-chunk {{total_chunks}}
artifacts:

View File

@ -690,14 +690,10 @@ PopupNotifications.prototype = {
if (!notifications)
notifications = this._currentNotifications;
let notificationsToShow = [];
// Filter out notifications that have been dismissed.
notificationsToShow = notifications.filter(function (n) {
return !n.dismissed && !n.options.neverShow;
});
if (!anchors.size && notificationsToShow.length)
anchors = this._getAnchorsForNotifications(notificationsToShow);
let haveNotifications = notifications.length > 0;
if (!anchors.size && haveNotifications)
anchors = this._getAnchorsForNotifications(notifications);
let useIconBox = !!this.iconBox;
if (useIconBox && anchors.size) {
@ -709,24 +705,31 @@ PopupNotifications.prototype = {
}
}
// Filter out notifications that have been dismissed.
let notificationsToShow = notifications.filter(function (n) {
return !n.dismissed && !n.options.neverShow;
});
if (useIconBox) {
// hide icons of the previous tab.
// Hide icons of the previous tab.
this._hideIcons();
}
let haveNotifications = notifications.length > 0;
if (haveNotifications) {
if (useIconBox) {
this._showIcons(notifications);
this.iconBox.hidden = false;
} else if (anchors.size) {
this._updateAnchorIcons(notifications, anchors);
}
// Also filter out notifications that are for a different anchor.
notificationsToShow = notificationsToShow.filter(function (n) {
return anchors.has(n.anchorElement);
});
if (useIconBox) {
this._showIcons(notifications);
this.iconBox.hidden = false;
// Make sure that panels can only be attached to anchors of shown
// notifications inside an iconBox.
anchors = this._getAnchorsForNotifications(notificationsToShow);
} else if (anchors.size) {
this._updateAnchorIcons(notifications, anchors);
}
}
if (notificationsToShow.length > 0) {

View File

@ -1101,6 +1101,25 @@ AndroidBridge::DeleteMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequ
GeckoAppShell::DeleteMessageWrapper(aMessageId, requestId);
}
void
AndroidBridge::MarkMessageRead(int32_t aMessageId,
bool aValue,
bool aSendReadReport,
nsIMobileMessageCallback* aRequest)
{
ALOG_BRIDGE("AndroidBridge::MarkMessageRead");
uint32_t requestId;
if (!QueueSmsRequest(aRequest, &requestId)) {
return;
}
GeckoAppShell::MarkMessageRead(aMessageId,
aValue,
aSendReadReport,
requestId);
}
NS_IMPL_ISUPPORTS0(MessageCursorContinueCallback)
NS_IMETHODIMP

View File

@ -270,6 +270,10 @@ public:
nsIMobileMessageCallback* aRequest);
void GetMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequest);
void DeleteMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequest);
void MarkMessageRead(int32_t aMessageId,
bool aValue,
bool aSendReadReport,
nsIMobileMessageCallback* aRequest);
already_AddRefed<nsICursorContinueCallback>
CreateMessageCursor(bool aHasStartDate,
uint64_t aStartDate,

View File

@ -104,6 +104,14 @@ public:
mozilla::jni::NativeStub<GeckoSmsManager::NotifySmsDelivery_t, Impl>
::template Wrap<&Impl::NotifySmsDelivery>),
mozilla::jni::MakeNativeMethod<GeckoSmsManager::NotifySmsMarkAsReadFailed_t>(
mozilla::jni::NativeStub<GeckoSmsManager::NotifySmsMarkAsReadFailed_t, Impl>
::template Wrap<&Impl::NotifySmsMarkAsReadFailed>),
mozilla::jni::MakeNativeMethod<GeckoSmsManager::NotifySmsMarkedAsRead_t>(
mozilla::jni::NativeStub<GeckoSmsManager::NotifySmsMarkedAsRead_t, Impl>
::template Wrap<&Impl::NotifySmsMarkedAsRead>),
mozilla::jni::MakeNativeMethod<GeckoSmsManager::NotifySmsReceived_t>(
mozilla::jni::NativeStub<GeckoSmsManager::NotifySmsReceived_t, Impl>
::template Wrap<&Impl::NotifySmsReceived>),

View File

@ -518,6 +518,14 @@ auto GeckoAppShell::LockScreenOrientation(int32_t a0) -> void
return mozilla::jni::Method<LockScreenOrientation_t>::Call(nullptr, nullptr, a0);
}
constexpr char GeckoAppShell::MarkMessageRead_t::name[];
constexpr char GeckoAppShell::MarkMessageRead_t::signature[];
auto GeckoAppShell::MarkMessageRead(int32_t a0, bool a1, bool a2, int32_t a3) -> void
{
return mozilla::jni::Method<MarkMessageRead_t>::Call(nullptr, nullptr, a0, a1, a2, a3);
}
constexpr char GeckoAppShell::MarkURIVisited_t::name[];
constexpr char GeckoAppShell::MarkURIVisited_t::signature[];
@ -857,6 +865,12 @@ constexpr char GeckoSmsManager::NotifySmsDeleted_t::signature[];
constexpr char GeckoSmsManager::NotifySmsDelivery_t::name[];
constexpr char GeckoSmsManager::NotifySmsDelivery_t::signature[];
constexpr char GeckoSmsManager::NotifySmsMarkAsReadFailed_t::name[];
constexpr char GeckoSmsManager::NotifySmsMarkAsReadFailed_t::signature[];
constexpr char GeckoSmsManager::NotifySmsMarkedAsRead_t::name[];
constexpr char GeckoSmsManager::NotifySmsMarkedAsRead_t::signature[];
constexpr char GeckoSmsManager::NotifySmsReceived_t::name[];
constexpr char GeckoSmsManager::NotifySmsReceived_t::signature[];

View File

@ -1243,6 +1243,27 @@ public:
static auto LockScreenOrientation(int32_t) -> void;
public:
struct MarkMessageRead_t {
typedef GeckoAppShell Owner;
typedef void ReturnType;
typedef void SetterType;
typedef mozilla::jni::Args<
int32_t,
bool,
bool,
int32_t> Args;
static constexpr char name[] = "markMessageRead";
static constexpr char signature[] =
"(IZZI)V";
static const bool isStatic = true;
static const bool isMultithreaded = false;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
};
static auto MarkMessageRead(int32_t, bool, bool, int32_t) -> void;
public:
struct MarkURIVisited_t {
typedef GeckoAppShell Owner;
@ -2181,6 +2202,40 @@ public:
mozilla::jni::ExceptionMode::ABORT;
};
public:
struct NotifySmsMarkAsReadFailed_t {
typedef GeckoSmsManager Owner;
typedef void ReturnType;
typedef void SetterType;
typedef mozilla::jni::Args<
int32_t,
int32_t> Args;
static constexpr char name[] = "notifySmsMarkAsReadFailed";
static constexpr char signature[] =
"(II)V";
static const bool isStatic = true;
static const bool isMultithreaded = false;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
};
public:
struct NotifySmsMarkedAsRead_t {
typedef GeckoSmsManager Owner;
typedef void ReturnType;
typedef void SetterType;
typedef mozilla::jni::Args<
bool,
int32_t> Args;
static constexpr char name[] = "notifySmsMarkedAsRead";
static constexpr char signature[] =
"(ZI)V";
static const bool isStatic = true;
static const bool isMultithreaded = false;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
};
public:
struct NotifySmsReceived_t {
typedef GeckoSmsManager Owner;