Merge fx-team to m-c a=merge CLOSED TREE

This commit is contained in:
Wes Kocher 2015-03-03 17:11:40 -08:00
Родитель 0de76a4c17 270e09d47a
Коммит 6467d2d950
60 изменённых файлов: 382 добавлений и 219 удалений

Просмотреть файл

@ -1889,8 +1889,10 @@ pref("dom.ipc.reportProcessHangs", false);
pref("dom.ipc.reportProcessHangs", true);
#endif
#ifndef NIGHTLY_BUILD
// Disable reader mode by default.
pref("reader.parse-on-load.enabled", false);
#endif
// Disable ReadingList by default.
pref("browser.readinglist.enabled", false);

Просмотреть файл

@ -167,6 +167,15 @@ let gEMEHandler = {
let message = gNavigatorBundle.getFormattedString(msgId, [this._brandShortName]);
let anchorId = "eme-notification-icon";
let firstPlayPref = "browser.eme.ui.firstContentShown";
if (!Services.prefs.getPrefType(firstPlayPref) ||
!Services.prefs.getBoolPref(firstPlayPref)) {
document.getElementById(anchorId).setAttribute("firstplay", "true");
Services.prefs.setBoolPref(firstPlayPref, true);
} else {
document.getElementById(anchorId).removeAttribute("firstplay");
}
let mainAction = {
label: gNavigatorBundle.getString(btnLabelId),

Просмотреть файл

@ -155,6 +155,9 @@
<treechildren id="metatreechildren" flex="1"/>
</tree>
</groupbox>
<hbox pack="end">
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
</hbox>
</vbox>
<!-- Media information -->
@ -251,6 +254,9 @@
icon="save" id="mediasaveasbutton"
oncommand="saveMedia();"/>
</hbox>
<hbox pack="end">
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
</hbox>
</vbox>
<!-- Feeds -->
@ -290,6 +296,9 @@
</hbox>
</vbox>
</vbox>
<hbox pack="end">
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
</hbox>
</vbox>
<!-- Security & Privacy -->
@ -407,6 +416,9 @@
<description id="security-technical-longform2" class="fieldLabel"/>
</vbox>
</groupbox>
<hbox pack="end">
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
</hbox>
</vbox>
<!-- Others added by overlay -->
</deck>

Просмотреть файл

@ -976,11 +976,11 @@ const DownloadsView = {
}
let dataTransfer = aEvent.dataTransfer;
dataTransfer.mozSetDataAt("application/x-moz-file", localFile, 0);
dataTransfer.mozSetDataAt("application/x-moz-file", file, 0);
dataTransfer.effectAllowed = "copyMove";
var url = Services.io.newFileURI(localFile).spec;
dataTransfer.setData("text/uri-list", url);
dataTransfer.setData("text/plain", url);
let spec = NetUtil.newURI(file).spec;
dataTransfer.setData("text/uri-list", spec);
dataTransfer.setData("text/plain", spec);
dataTransfer.addElement(element);
aEvent.stopPropagation();

Просмотреть файл

@ -360,7 +360,7 @@
label="&updateManual.label;"
accesskey="&updateManual.accesskey;"/>
</radiogroup>
<separator class="thin"/>
<hbox>
<button id="showUpdateHistory"
label="&updateHistory.label;"
@ -387,7 +387,8 @@
<!-- Certificates -->
<tabpanel id="encryptionPanel" orient="vertical">
<groupbox id="certSelection" align="start">
<caption><label>&certSelection.label;</label></caption>
<description id="CertSelectionDesc" control="certSelection">&certSelection.description;</description>
<!--
@ -395,33 +396,38 @@
they're not - this preference uses *those strings* as its values.
I KID YOU NOT.
-->
<radiogroup id="certSelection" orient="horizontal" preftype="string"
<radiogroup id="certSelection"
preftype="string"
preference="security.default_personal_cert"
aria-labelledby="CertSelectionDesc">
<radio label="&certs.auto;" accesskey="&certs.auto.accesskey;"
<radio label="&certs.auto;"
accesskey="&certs.auto.accesskey;"
value="Select Automatically"/>
<radio label="&certs.ask;" accesskey="&certs.ask.accesskey;"
<radio label="&certs.ask;"
accesskey="&certs.ask.accesskey;"
value="Ask Every Time"/>
</radiogroup>
</groupbox>
<separator/>
<checkbox id="enableOCSP"
label="&enableOCSP.label;"
accesskey="&enableOCSP.accesskey;"
onsyncfrompreference="return gAdvancedPane.readEnableOCSP();"
onsynctopreference="return gAdvancedPane.writeEnableOCSP();"
preference="security.OCSP.enabled"/>
<separator/>
<hbox>
<button id="viewCertificatesButton"
label="&viewCerts.label;" accesskey="&viewCerts.accesskey;"
flex="1"
label="&viewCerts.label;"
accesskey="&viewCerts.accesskey;"
preference="security.disable_button.openCertManager"/>
<button id="viewSecurityDevicesButton"
label="&viewSecurityDevices.label;" accesskey="&viewSecurityDevices.accesskey;"
flex="1"
label="&viewSecurityDevices.label;"
accesskey="&viewSecurityDevices.accesskey;"
preference="security.disable_button.openDeviceManager"/>
<hbox flex="10"/>
</hbox>
</tabpanel>
</tabpanels>

Просмотреть файл

@ -87,17 +87,9 @@
<!-- Fonts and Colors -->
<groupbox id="fontsGroup" data-category="paneContent" hidden="true">
<caption><label>&fontsAndColors.label;</label></caption>
<grid id="fontsGrid">
<columns>
<column flex="1"/>
<column/>
</columns>
<rows id="fontsRows">
<row id="fontRow">
<hbox align="center">
<label control="defaultFont" accesskey="&defaultFont.accesskey;">&defaultFont.label;</label>
<menulist id="defaultFont" />
<menulist id="defaultFont" flex="1"/>
<label control="defaultFontSize" accesskey="&defaultSize.accesskey;">&defaultSize.label;</label>
<menulist id="defaultFontSize">
<menupopup>
@ -128,19 +120,13 @@
<menuitem value="72" label="72"/>
</menupopup>
</menulist>
</hbox>
<button id="advancedFonts" icon="select-font"
label="&advancedFonts.label;"
accesskey="&advancedFonts.accesskey;"/>
</row>
<row id="colorsRow">
<hbox/>
<button id="colors" icon="select-color"
label="&colors.label;"
accesskey="&colors.accesskey;"/>
</row>
</rows>
</grid>
</hbox>
</groupbox>
<!-- Languages -->

Просмотреть файл

@ -131,37 +131,33 @@
<label>&historyHeader.post.label;</label>
</hbox>
<deck id="historyPane">
<vbox align="center" id="historyRememberPane">
<vbox id="historyRememberPane">
<hbox align="center" flex="1">
<spacer flex="1" class="indent"/>
<vbox flex="2">
<vbox>
<description>&rememberDescription.label;</description>
<separator/>
<separator class="thin"/>
<description>&rememberActions.pre.label;<html:a
class="inline-link" id="historyRememberClear" href="#"
>&rememberActions.clearHistory.label;</html:a>&rememberActions.middle.label;<html:a
class="inline-link" id="historyRememberCookies" href="#"
>&rememberActions.removeCookies.label;</html:a>&rememberActions.post.label;</description>
</vbox>
<spacer flex="1" class="indent"/>
</hbox>
</vbox>
<vbox align="center" id="historyDontRememberPane">
<vbox id="historyDontRememberPane">
<hbox align="center" flex="1">
<spacer flex="1" class="indent"/>
<vbox flex="2">
<vbox>
<description>&dontrememberDescription.label;</description>
<separator/>
<separator class="thin"/>
<description>&dontrememberActions.pre.label;<html:a
class="inline-link" id="historyDontRememberClear" href="#"
>&dontrememberActions.clearHistory.label;</html:a>&dontrememberActions.post.label;</description>
</vbox>
<spacer flex="1" class="indent"/>
</hbox>
</vbox>
<vbox id="historyCustomPane">
<separator class="thin"/>
<vbox class="indent">
<vbox>
<vbox align="start">
<checkbox id="privateBrowsingAutoStart"
label="&privateBrowsingPermanent2.label;"

Просмотреть файл

@ -83,20 +83,29 @@
accesskey="&passwordExceptions.accesskey;"
preference="pref.privacy.disable_button.view_passwords_exceptions"/>
</hbox>
<grid id="passwordGrid">
<columns>
<column flex="1"/>
<column/>
</columns>
<rows id="passwordRows">
<row id="masterPasswordRow">
<hbox id="masterPasswordBox">
<checkbox id="useMasterPassword"
label="&useMasterPassword.label;"
accesskey="&useMasterPassword.accesskey;"/>
<spacer flex="1"/>
</hbox>
<button id="changeMasterPassword"
label="&changeMasterPassword.label;"
accesskey="&changeMasterPassword.accesskey;"/>
</hbox>
<hbox id="showPasswordsBox">
<spacer flex="1"/>
</row>
<row id="showPasswordRow">
<hbox id="showPasswordsBox"/>
<button id="showPasswords"
label="&savedPasswords.label;" accesskey="&savedPasswords.accesskey;"
preference="pref.privacy.disable_button.view_passwords"/>
</hbox>
</row>
</rows>
</grid>
</groupbox>

Просмотреть файл

@ -173,14 +173,14 @@
</label>
</hbox>
</groupbox>
<hbox id="tosPP-normal" pack="center">
<vbox id="tosPP-normal">
<label id="tosPP-normal-ToS" class="text-link">
&prefs.tosLink.label;
</label>
<label id="tosPP-normal-PP" class="text-link">
&prefs.ppLink.label;
</label>
</hbox>
</vbox>
</vbox>
<vbox id="needsUpdate" align="center" pack="center">
@ -226,7 +226,8 @@
<deck id="fxaLoginStatus">
<!-- logged in and verified and all is good -->
<hbox align="center">
<hbox id="fxaLoginVerified"
align="center">
<label id="fxaEmailAddress1"/>
<spacer flex="1"/>
<button id="verifiedManage"
@ -236,7 +237,8 @@
</hbox>
<!-- logged in to an unverified account -->
<hbox flex="1">
<hbox id="fxaLoginUnverified"
flex="1">
<description>
&signedInUnverified.beforename.label;
<label id="fxaEmailAddress2"/>
@ -253,7 +255,8 @@
</hbox>
<!-- logged in locally but server rejected credentials -->
<hbox flex="1">
<hbox id="fxaLoginRejected"
flex="1">
<description>
&signedInLoginFailure.beforename.label;
<label id="fxaEmailAddress3"/>
@ -306,13 +309,13 @@
flex="1"/>
</hbox>
<spacer flex="1"/>
<hbox id="tosPP-small" pack="center">
<vbox id="tosPP-small">
<label id="tosPP-small-ToS" class="text-link small">
&prefs.tosLink.label;
</label>
<label id="tosPP-small-PP" class="text-link small">
&fxaPrivacyNotice.link.label;
</label>
</hbox>
</vbox>
</vbox>
</deck>

Просмотреть файл

@ -778,6 +778,11 @@ let gDevToolsBrowser = {
return !!(widgetWrapper && widgetWrapper.provider == CustomizableUI.PROVIDER_API);
},
/**
* The deferred promise will be resolved by WebIDE's UI.init()
*/
isWebIDEInitialized: promise.defer(),
/**
* Uninstall WebIDE widget
*/

Просмотреть файл

@ -155,7 +155,7 @@ function Editor(config) {
extraKeys: {},
indentWithTabs: useTabs,
styleActiveLine: true,
autoCloseBrackets: "()[]{}''\"\"",
autoCloseBrackets: "()[]{}''\"\"``",
autoCloseEnabled: useAutoClose,
theme: "mozilla",
themeSwitching: true,

Просмотреть файл

@ -71,7 +71,7 @@ function test() {
is(ed.getOption("enableCodeFolding"), undefined, "enableCodeFolding is correct");
is(ed.getOption("indentWithTabs"), false, "indentWithTabs is correct");
is(ed.getOption("keyMap"), "sublime", "keyMap is correct");
is(ed.getOption("autoCloseBrackets"), "()[]{}''\"\"", "autoCloseBrackets is correct");
is(ed.getOption("autoCloseBrackets"), "()[]{}''\"\"``", "autoCloseBrackets is correct");
is(ed.getOption("autocomplete"), true, "autocomplete is correct");
ok(ed.isAutocompletionEnabled(), "Autocompletion is enabled");

Просмотреть файл

@ -107,6 +107,8 @@ let UI = {
.QueryInterface(Ci.nsIDocShell)
.contentViewer;
this.contentViewer.fullZoom = Services.prefs.getCharPref("devtools.webide.zoom");
gDevToolsBrowser.isWebIDEInitialized.resolve();
},
uninit: function() {

Просмотреть файл

@ -21,6 +21,10 @@
Task.spawn(function* () {
let win = yield openWebIDE();
const {gDevToolsBrowser} = Cu.import("resource:///modules/devtools/gDevTools.jsm");
yield gDevToolsBrowser.isWebIDEInitialized.promise;
ok(true, "WebIDE was initialized");
ok(win, "Found a window");
ok(win.AppManager, "App Manager accessible");
let appmgr = win.AppManager;

Просмотреть файл

@ -83,3 +83,5 @@
<!ENTITY securityView.privacy.viewPasswords.accessKey "w">
<!ENTITY securityView.technical.header "Technical Details">
<!ENTITY helpButton.label "Help">

Просмотреть файл

@ -113,6 +113,7 @@
<!ENTITY offlineAppRemove.confirm "Remove offline data">
<!ENTITY certificateTab.label "Certificates">
<!ENTITY certSelection.label "Requests">
<!ENTITY certSelection.description "When a server requests my personal certificate:">
<!ENTITY certs.auto "Select one automatically">
<!ENTITY certs.auto.accesskey "S">

Просмотреть файл

@ -2217,6 +2217,17 @@ chatbox {
list-style-image: url("chrome://browser/skin/drm-icon.svg#chains-pressed");
}
#eme-notification-icon[firstplay=true] {
animation: emeTeachingMoment 0.2s linear 0s 5 normal;
}
@keyframes emeTeachingMoment {
0% {transform: translateX(0); }
25% {transform: translateX(3px) }
75% {transform: translateX(-3px) }
100% { transform: translateX(0); }
}
/* Customization mode */
%include ../shared/customizableui/customizeMode.inc.css

Просмотреть файл

@ -4647,6 +4647,17 @@ window > chatbox {
list-style-image: url("chrome://browser/skin/drm-icon.svg#chains-pressed");
}
#eme-notification-icon[firstplay=true] {
animation: emeTeachingMoment 0.2s linear 0s 5 normal;
}
@keyframes emeTeachingMoment {
0% {transform: translateX(0); }
25% {transform: translateX(3px) }
75% {transform: translateX(-3px) }
100% { transform: translateX(0); }
}
/* Customization mode */
%include ../shared/customizableui/customizeMode.inc.css

Просмотреть файл

@ -191,6 +191,20 @@ treecol {
-moz-margin-end: 8px !important;
}
/* Collapse the non-active vboxes in decks to use only the height the
active vbox needs */
#historyPane:not([selectedIndex="1"]) > #historyDontRememberPane,
#historyPane:not([selectedIndex="2"]) > #historyCustomPane,
#weavePrefsDeck:not([selectedIndex="1"]) > #hasAccount,
#weavePrefsDeck:not([selectedIndex="2"]) > #needsUpdate,
#weavePrefsDeck:not([selectedIndex="3"]) > #fxaDeterminingStatus,
#weavePrefsDeck:not([selectedIndex="4"]) > #noFxaAccount,
#weavePrefsDeck:not([selectedIndex="5"]) > #hasFxaAccount,
#fxaLoginStatus:not([selectedIndex="1"]) > #fxaLoginUnverified,
#fxaLoginStatus:not([selectedIndex="2"]) > #fxaLoginRejected {
visibility: collapse;
}
/* XXX This style is for bug 740213 and should be removed once that
bug has a solution. */
description > html|a {
@ -218,10 +232,6 @@ description > html|a {
-moz-margin-end: 4px; /* add the 4px end-margin of other elements */
}
#encryptionPanel {
margin-top: 15px;
}
#telemetryLearnMore,
#FHRLearnMore,
#crashReporterLearnMore {
@ -246,6 +256,10 @@ description > html|a {
}
}
#showUpdateHistory {
-moz-margin-start: 0;
}
/**
* Dialog
*/

Просмотреть файл

@ -2838,6 +2838,17 @@ chatbox {
list-style-image: url("chrome://browser/skin/drm-icon.svg#chains-pressed");
}
#eme-notification-icon[firstplay=true] {
animation: emeTeachingMoment 0.2s linear 0s 5 normal;
}
@keyframes emeTeachingMoment {
0% {transform: translateX(0); }
25% {transform: translateX(3px) }
75% {transform: translateX(-3px) }
100% { transform: translateX(0); }
}
/* Customization mode */
%include ../shared/customizableui/customizeMode.inc.css

Просмотреть файл

@ -858,3 +858,6 @@ pref("reader.color_scheme.values", "[\"light\",\"dark\",\"auto\"]");
// Whether to use a vertical or horizontal toolbar.
pref("reader.toolbar.vertical", false);
// Whether or not to display buttons related to reading list in reader view.
pref("browser.readinglist.enabled", true);

Просмотреть файл

@ -154,7 +154,7 @@ public class RemoteTabsExpandableListAdapter extends BaseExpandableListAdapter {
if (isExpanded && !client.tabs.isEmpty()) {
deviceTypeResId = "desktop".equals(client.deviceType) ? R.drawable.sync_desktop : R.drawable.sync_mobile;
textColorResId = R.color.home_text_color;
textColorResId = R.color.placeholder_active_grey;
deviceExpandedResId = R.drawable.home_group_expanded;
} else {
deviceTypeResId = "desktop".equals(client.deviceType) ? R.drawable.sync_desktop_inactive : R.drawable.sync_mobile_inactive;

Просмотреть файл

@ -5,7 +5,6 @@
package org.mozilla.gecko.background.fxa.oauth;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.util.Locale;
import java.util.concurrent.Executor;
@ -127,7 +126,7 @@ public abstract class FxAccountAbstractClient {
} else {
resource.post(requestBody);
}
} catch (UnsupportedEncodingException e) {
} catch (Exception e) {
invokeHandleError(delegate, e);
return;
}

Просмотреть файл

@ -4,7 +4,6 @@
package org.mozilla.gecko.browserid.verifier;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
@ -52,7 +51,7 @@ public class BrowserIDRemoteVerifierClient20 extends AbstractBrowserIDRemoteVeri
try {
r.post(requestBody);
} catch (UnsupportedEncodingException e) {
} catch (Exception e) {
delegate.handleError(e);
}
}

Просмотреть файл

@ -7,12 +7,12 @@
android:color="@color/text_color_primary_inverse"/>
<item android:state_checked="true"
android:color="@color/text_color_secondary"/>
android:color="@color/placeholder_grey"/>
<item android:state_checked="false"
gecko:state_dark="true"
android:color="@color/text_color_primary_inverse"/>
<item android:color="@color/text_color_secondary"/>
<item android:color="@color/placeholder_grey"/>
</selector>

Просмотреть файл

@ -2,6 +2,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/text_color_primary_disable_only" />
<item android:color="@color/text_color_primary"/>
<item android:color="@color/placeholder_active_grey"/>
</selector>

Просмотреть файл

@ -2,6 +2,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/text_color_primary_disable_only" />
<item android:color="@color/text_color_secondary"/>
<item android:color="@color/placeholder_grey"/>
</selector>

Просмотреть файл

@ -9,6 +9,6 @@
<item android:state_empty="true" android:color="#80777777" />
<!-- default -->
<item android:color="#FF777777"/>
<item android:color="@color/placeholder_grey"/>
</selector>

Просмотреть файл

@ -13,9 +13,9 @@
<item gecko:state_dark="true" android:color="#FFDDDDDD"/>
<!-- light theme -->
<item gecko:state_light="true" android:color="#FF222222"/>
<item gecko:state_light="true" android:color="@color/placeholder_active_grey"/>
<!-- normal mode -->
<item android:color="#FF222222"/>
<item android:color="@color/placeholder_active_grey"/>
</selector>

Просмотреть файл

@ -15,7 +15,7 @@
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
<shape android:shape="rectangle">
<solid android:color="@color/new_tablet_highlight_pb"/>
<solid android:color="@color/placeholder_active_grey"/>
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
</shape>
</inset>

Просмотреть файл

@ -9,7 +9,7 @@
<!-- private pressed state -->
<item gecko:state_private="true"
android:state_pressed="true"
android:drawable="@color/new_tablet_highlight_pb"/>
android:drawable="@color/placeholder_active_grey"/>
<!-- focused state -->
<item gecko:state_private="true"

Просмотреть файл

@ -5,7 +5,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/firstrun_pager_button" />
<solid android:color="@color/action_orange" />
<corners
android:radius="@dimen/fxaccount_corner_radius" />
</shape>

Просмотреть файл

@ -5,7 +5,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/firstrun_pager_button_pressed" />
<solid android:color="@color/action_orange_pressed" />
<corners
android:radius="@dimen/fxaccount_corner_radius" />
</shape>

Просмотреть файл

@ -13,7 +13,7 @@
<item>
<shape android:shape="rectangle">
<solid android:color="@color/remote_tabs_setup_button_background"/>
<solid android:color="@color/action_orange"/>
<corners android:radius="@dimen/fxaccount_corner_radius"/>
</shape>
</item>

Просмотреть файл

@ -4,7 +4,7 @@
<item android:state_pressed="true">
<shape>
<gradient android:angle="90"
android:startColor="#E66000"
android:startColor="@color/action_orange"
android:endColor="@color/fennec_ui_orange"
android:type="linear"/>
@ -21,7 +21,7 @@
android:type="linear"/>
<stroke android:width="2dp"
android:color="#E66000" />
android:color="@color/action_orange" />
<corners android:radius="4dp"/>
</shape>

Просмотреть файл

@ -35,7 +35,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:visibility="gone"/>
<View android:id="@+id/divider_choices"

Просмотреть файл

@ -7,6 +7,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:textColor="#FF222222"
android:textColor="@color/placeholder_active_grey"
android:textSize="14sp"
android:background="@drawable/action_bar_button"/>

Просмотреть файл

@ -48,7 +48,7 @@
android:ellipsize="end"
android:maxLines="2"
android:scrollHorizontally="true"
android:textColor="@color/text_color_primary"
android:textColor="@color/placeholder_active_grey"
android:textSize="17sp"/>
<!-- Subtitle (url) -->
@ -56,7 +56,7 @@
android:id="@+id/subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/text_color_secondary"/>
android:textColor="@color/placeholder_grey"/>
</LinearLayout>

Просмотреть файл

@ -33,7 +33,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:textColor="@color/text_color_primary"
android:textColor="@color/placeholder_active_grey"
android:textSize="14sp"
android:drawableLeft="@drawable/overlay_check"/>

Просмотреть файл

@ -29,28 +29,28 @@
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:text="@string/identity_connected_to"/>
<TextView android:id="@+id/host"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:textStyle="bold"/>
<TextView android:id="@+id/owner_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:text="@string/identity_run_by"
android:paddingTop="12dip"/>
<TextView android:id="@+id/owner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:textSize="16sp"
android:textStyle="bold"/>
@ -58,7 +58,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:paddingTop="12dip"/>
</LinearLayout>

Просмотреть файл

@ -13,13 +13,13 @@
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:text="@string/identity_no_info"/>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/doorhanger_text"
android:textColor="@color/placeholder_active_grey"
android:text="@string/identity_not_encrypted"
android:paddingTop="12dip"/>

Просмотреть файл

@ -21,7 +21,7 @@
<TextView android:id="@+id/suggestion_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#222222"
android:textColor="@color/placeholder_active_grey"
android:textSize="14sp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"/>

Просмотреть файл

@ -40,7 +40,7 @@
android:padding="4dip"
style="@style/TabLayoutItemTextAppearance"
android:textSize="12sp"
android:textColor="#FF222222"
android:textColor="@color/placeholder_active_grey"
android:singleLine="true"
android:duplicateParentState="true"/>

Просмотреть файл

@ -11,7 +11,7 @@
</style>
<style name="TextAppearance.EmptyView.Message" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">#777777</item>
<item name="android:textColor">@color/placeholder_grey</item>
<item name="android:textSize">16sp</item>
<item name="android:lineSpacingExtra">4sp</item>
</style>

Просмотреть файл

@ -51,7 +51,6 @@
<!-- (bug 1077195) Focused state values are temporary. -->
<color name="new_tablet_highlight_focused">#C0C9D0</color>
<color name="new_tablet_highlight_pb">#222222</color>
<color name="new_tablet_highlight_focused_pb">#363B40</color>
<!-- highlight on shaped button: 20% white over background_tabs -->
@ -70,15 +69,11 @@
<color name="firstrun_background">#99000000</color>
<color name="firstrun_tabstrip">#1193CB</color>
<color name="firstrun_pager_background">#16A3DF</color>
<color name="firstrun_pager_button">#E66000</color>
<color name="firstrun_pager_button_pressed">#DC5600</color>
<!--
Application theme colors
-->
<!-- Default colors -->
<color name="text_color_primary">#222222</color>
<color name="text_color_secondary">#777777</color>
<color name="text_color_tertiary">#9198A1</color>
<!-- Default inverse colors -->
@ -119,7 +114,6 @@
<color name="splash_urlfont">#000000</color>
<color name="splash_content">#ffffff</color>
<color name="doorhanger_text">#FF222222</color>
<color name="doorhanger_link">#FF2AA1FE</color>
<color name="doorhanger_background_dark">#FFDDE4EA</color>
@ -146,7 +140,6 @@
<color name="home_button_bar_bg">#FFF5F7F9</color>
<!-- Colour used for share overlay button labels -->
<color name="home_text_color">@color/text_color_primary</color>
<color name="home_text_color_disabled">#AFB1B3</color>
<color name="panel_image_item_background">#D1D9E1</color>
@ -162,7 +155,6 @@
<color name="swipe_refresh_orange4">#FFB44C</color>
<!-- Remote tabs setup -->
<color name="remote_tabs_setup_button_background">#E66000</color>
<color name="remote_tabs_setup_button_background_hit">#D95300</color>
<!-- Button toast colors. -->

Просмотреть файл

@ -164,9 +164,6 @@
<!-- PanelGridView dimensions -->
<dimen name="panel_grid_view_column_width">150dp</dimen>
<!-- TabsGridView dimensions -->
<dimen name="tabs_grid_view_column_width">200dp</dimen>
<!-- PanelItemView dimensions -->
<dimen name="panel_article_item_height">95dp</dimen>

Просмотреть файл

@ -33,7 +33,7 @@
</style>
<style name="TextAppearance.EmptyView.Message" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">#777777</item>
<item name="android:textColor">@color/placeholder_grey</item>
<item name="android:textSize">16sp</item>
</style>

Просмотреть файл

@ -198,9 +198,11 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:paddingTop">0dp</item>
<item name="android:stretchMode">columnWidth</item>
<item name="android:stretchMode">spacingWidth</item>
<item name="android:scrollbarStyle">outsideOverlay</item>
<item name="android:gravity">center</item>
<item name="android:numColumns">auto_fit</item>
<item name="android:columnWidth">@dimen/tabs_grid_view_column_width</item>
<item name="android:columnWidth">@dimen/new_tablet_tab_panel_column_width</item>
<item name="android:horizontalSpacing">2dp</item>
<item name="android:verticalSpacing">@dimen/new_tablet_tab_panel_grid_vspacing</item>
<item name="android:drawSelectorOnTop">true</item>
@ -278,7 +280,7 @@
<item name="android:layout_width">@dimen/firstrun_content_width</item>
<item name="android:layout_height">60dp</item>
<item name="android:textColor">@color/android:white</item>
<item name="android:background">@color/firstrun_pager_button</item>
<item name="android:background">@color/action_orange</item>
<item name="android:textSize">18sp</item>
</style>
@ -412,12 +414,12 @@
</style>
<style name="TextAppearance.Widget.DoorHanger.Medium" parent="TextAppearance.Medium">
<item name="android:textColor">@color/doorhanger_text</item>
<item name="android:textColor">@color/placeholder_active_grey</item>
<item name="android:textColorLink">@color/doorhanger_link</item>
</style>
<style name="TextAppearance.Widget.DoorHanger.Small" parent="TextAppearance.Small">
<item name="android:textColor">@color/doorhanger_text</item>
<item name="android:textColor">@color/placeholder_active_grey</item>
<item name="android:textColorLink">@color/doorhanger_link</item>
</style>
@ -655,7 +657,7 @@
</style>
<style name="WebView.Titlebar.Title">
<item name="android:textColor">#ff222222</item>
<item name="android:textColor">@color/placeholder_active_grey</item>
</style>
<style name="GeckoDialogTitle">
@ -775,7 +777,7 @@
<style name="GeckoActionBar.Buttons">
<item name="android:background">@android:color/transparent</item>
<item name="android:textColor">@color/text_color_primary</item>
<item name="android:textColor">@color/placeholder_active_grey</item>
<item name="android:gravity">right</item>
</style>
@ -834,13 +836,13 @@
<style name="TextAppearance.FirstrunRegular.Body">
<item name="android:textSize">16sp</item>
<item name="android:textColor">#777777</item>
<item name="android:textColor">@color/placeholder_grey</item>
<item name="android:lineSpacingMultiplier">1.25</item>
</style>
<style name="TextAppearance.FirstrunRegular.Link">
<item name="android:textSize">16sp</item>
<item name="android:textColor">#0096DD</item>
<item name="android:textColor">@color/link_blue</item>
</style>
<!-- Remote Tabs home panel -->
@ -862,7 +864,7 @@
</style>
<style name="RemoteTabsPanelItem.TextAppearance">
<item name="android:textColor">#777777</item>
<item name="android:textColor">@color/placeholder_grey</item>
<item name="android:textSize">16sp</item>
<item name="android:lineSpacingMultiplier">1.25</item>
<item name="android:layout_marginLeft">8dp</item>
@ -870,7 +872,7 @@
</style>
<style name="RemoteTabsPanelItem.TextAppearance.Header">
<item name="android:textColor">#222222</item>
<item name="android:textColor">@color/placeholder_active_grey</item>
<item name="android:textSize">20sp</item>
<item name="android:layout_marginBottom">8dp</item>
</style>

Просмотреть файл

@ -173,6 +173,37 @@ public class ExtendedJSONObject {
this.object = o;
}
public ExtendedJSONObject deepCopy() {
final ExtendedJSONObject out = new ExtendedJSONObject();
@SuppressWarnings("unchecked")
final Set<Map.Entry<String, Object>> entries = this.object.entrySet();
for (Map.Entry<String, Object> entry : entries) {
final String key = entry.getKey();
final Object value = entry.getValue();
if (value instanceof JSONArray) {
// Oh god.
try {
out.put(key, new JSONParser().parse(((JSONArray) value).toJSONString()));
} catch (ParseException e) {
// This should never occur, because we're round-tripping.
}
continue;
}
if (value instanceof JSONObject) {
out.put(key, new ExtendedJSONObject((JSONObject) value).deepCopy().object);
continue;
}
if (value instanceof ExtendedJSONObject) {
out.put(key, ((ExtendedJSONObject) value).deepCopy());
continue;
}
// Oh well.
out.put(key, value);
}
return out;
}
public ExtendedJSONObject(Reader in) throws IOException, ParseException, NonObjectJSONException {
if (in == null) {
this.object = new JSONObject();
@ -191,11 +222,28 @@ public class ExtendedJSONObject {
this(jsonString == null ? null : new StringReader(jsonString));
}
@Override
public ExtendedJSONObject clone() {
return new ExtendedJSONObject((JSONObject) this.object.clone());
}
// Passthrough methods.
public Object get(String key) {
return this.object.get(key);
}
public long getLong(String key, long def) {
if (!object.containsKey(key)) {
return def;
}
Long val = getLong(key);
if (val == null) {
return def;
}
return val.longValue();
}
public Long getLong(String key) {
return (Long) this.get(key);
}
@ -304,7 +352,7 @@ public class ExtendedJSONObject {
if (o instanceof JSONObject) {
return new ExtendedJSONObject((JSONObject) o);
}
throw new NonObjectJSONException("key must be a JSON object: " + key);
throw new NonObjectJSONException("value must be a JSON object for key: " + key);
}
@SuppressWarnings("unchecked")

Просмотреть файл

@ -349,7 +349,7 @@ public class BaseResource implements Resource {
this.go(request);
}
protected static StringEntity stringEntityWithContentTypeApplicationJSON(String s) throws UnsupportedEncodingException {
protected static StringEntity stringEntityWithContentTypeApplicationJSON(String s) {
StringEntity e = new StringEntity(s, "UTF-8");
e.setContentType("application/json");
return e;
@ -359,7 +359,7 @@ public class BaseResource implements Resource {
* Helper for turning a JSON object into a payload.
* @throws UnsupportedEncodingException
*/
protected static StringEntity jsonEntity(JSONObject body) throws UnsupportedEncodingException {
protected static StringEntity jsonEntity(JSONObject body) {
return stringEntityWithContentTypeApplicationJSON(body.toJSONString());
}
@ -367,7 +367,7 @@ public class BaseResource implements Resource {
* Helper for turning an extended JSON object into a payload.
* @throws UnsupportedEncodingException
*/
protected static StringEntity jsonEntity(ExtendedJSONObject body) throws UnsupportedEncodingException {
protected static StringEntity jsonEntity(ExtendedJSONObject body) {
return stringEntityWithContentTypeApplicationJSON(body.toJSONString());
}
@ -456,7 +456,7 @@ public class BaseResource implements Resource {
put(jsonEntity(jsonObject));
}
public void post(ExtendedJSONObject o) throws UnsupportedEncodingException {
public void post(ExtendedJSONObject o) {
post(jsonEntity(o));
}

Просмотреть файл

@ -263,8 +263,23 @@ public class RepoUtils {
return a.equals(b);
}
public static String computeSQLLongInClause(long[] items, String field) {
final StringBuilder builder = new StringBuilder(field);
builder.append(" IN (");
int i = 0;
for (; i < items.length - 1; ++i) {
builder.append(items[i]);
builder.append(", ");
}
if (i < items.length) {
builder.append(items[i]);
}
builder.append(")");
return builder.toString();
}
public static String computeSQLInClause(int items, String field) {
StringBuilder builder = new StringBuilder(field);
final StringBuilder builder = new StringBuilder(field);
builder.append(" IN (");
int i = 0;
for (; i < items - 1; ++i) {

Просмотреть файл

@ -79,18 +79,12 @@ class TabsGridLayout extends GridView
}
});
setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
setStretchMode(GridView.STRETCH_SPACING);
setGravity(Gravity.CENTER);
setNumColumns(GridView.AUTO_FIT);
// The clipToPadding setting in the styles.xml doesn't seem to be working (bug 1101784)
// so lets set it manually in code for the moment as it's needed for the padding animation
setClipToPadding(false);
final Resources resources = getResources();
mColumnWidth = resources.getDimensionPixelSize(R.dimen.new_tablet_tab_panel_column_width);
setColumnWidth(mColumnWidth);
final int padding = resources.getDimensionPixelSize(R.dimen.new_tablet_tab_panel_grid_padding);
final int paddingTop = resources.getDimensionPixelSize(R.dimen.new_tablet_tab_panel_grid_padding_top);

Просмотреть файл

@ -69,7 +69,7 @@ abstract class NavButton extends ShapedButton {
}
final StateListDrawable stateList = new StateListDrawable();
stateList.addState(PRIVATE_PRESSED_STATE_SET, getColorDrawable(R.color.new_tablet_highlight_pb));
stateList.addState(PRIVATE_PRESSED_STATE_SET, getColorDrawable(R.color.placeholder_active_grey));
stateList.addState(PRESSED_ENABLED_STATE_SET, getColorDrawable(R.color.new_tablet_highlight));
stateList.addState(PRIVATE_FOCUSED_STATE_SET, getColorDrawable(R.color.new_tablet_highlight_focused_pb));
stateList.addState(FOCUSED_STATE_SET, getColorDrawable(R.color.new_tablet_highlight_focused));

Просмотреть файл

@ -13,7 +13,7 @@ var SelectHelper = {
handleClick: function(aTarget) {
// if we're busy looking at a select we want to eat any clicks that
// come to us, but not to process them
if (this._uiBusy || !this._isMenu(aTarget) || aTarget.disabled)
if (this._uiBusy || !this._isMenu(aTarget) || this._isDisabledElement(aTarget))
return;
this._uiBusy = true;
@ -134,5 +134,16 @@ var SelectHelper = {
setTimeout(function() {
aElement.dispatchEvent(evt);
}, 0);
},
_isDisabledElement : function(aElement) {
let currentElement = aElement;
while (currentElement) {
if (currentElement.disabled)
return true;
currentElement = currentElement.parentElement;
}
return false;
}
};

Просмотреть файл

@ -61,9 +61,16 @@ let AboutReader = function(mm, win) {
this._setupStyleDropdown();
this._setupButton("close-button", this._onReaderClose.bind(this), "aboutReader.toolbar.close");
this._setupButton("toggle-button", this._onReaderToggle.bind(this), "aboutReader.toolbar.addToReadingList");
this._setupButton("share-button", this._onShare.bind(this), "aboutReader.toolbar.share");
try {
if (Services.prefs.getBoolPref("browser.readinglist.enabled")) {
this._setupButton("toggle-button", this._onReaderToggle.bind(this), "aboutReader.toolbar.addToReadingList");
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
}
} catch (e) {
// Pref doesn't exist.
}
let colorSchemeValues = JSON.parse(Services.prefs.getCharPref("reader.color_scheme.values"));
let colorSchemeOptions = colorSchemeValues.map((value) => {
@ -797,6 +804,7 @@ AboutReader.prototype = {
this._setButtonTip(id, titleEntity);
let button = this._doc.getElementById(id);
button.removeAttribute("hidden");
button.addEventListener("click", function(aEvent) {
if (!aEvent.isTrusted)
return;

Просмотреть файл

@ -41,8 +41,8 @@
<div class="dropdown-arrow"/>
</li>
</ul>
<li><button id="toggle-button" class="button toggle-button"/></li>
<li><button id="list-button" class="button list-button"/></li>
<li><button id="toggle-button" class="button toggle-button" hidden="true"/></li>
<li><button id="list-button" class="button list-button" hidden="true"/></li>
</ul>
</body>

Просмотреть файл

@ -104,6 +104,7 @@
this.durationValue = "";
this.valueBar = null;
this.isDragging = false;
this.isDraggingComplete = true;
this.wasPausedBeforeDrag = true;
this.thumb = document.getAnonymousElementByAttribute(this, "class", "scale-thumb");
@ -173,12 +174,16 @@
this.isDragging = isDragging;
if (isDragging) {
this.wasPausedBeforeDrag = this.Utils.video.paused;
this.isDraggingComplete = false;
this.previousPlaybackRate = this.Utils.video.playbackRate;
this.Utils.video.pause();
} else if (!this.wasPausedBeforeDrag) {
} else if (!this.wasPausedBeforeDrag && !this.isDraggingComplete) {
this.isDraggingComplete = true;
// After the drag ends, resume playing.
this.Utils.video.playbackRate = this.previousPlaybackRate;
this.Utils.video.play();
} else {
this.isDraggingComplete = true;
}
}
]]>
@ -1008,6 +1013,7 @@
if (!element.hasAttribute("fadeout"))
return;
this.scrubber.dragStateChanged(false);
element.hidden = true;
},

Просмотреть файл

@ -2845,11 +2845,18 @@ SourceActor.prototype = {
*/
setBreakpoint: function (originalLine, originalColumn, condition) {
let originalLocation = new OriginalLocation(this, originalLine, originalColumn);
let actor = this.breakpointActorMap.getActor(originalLocation);
if (!actor) {
actor = new BreakpointActor(this.threadActor, originalLocation);
this.threadActor.threadLifetimePool.addActor(actor);
this.breakpointActorMap.setActor(originalLocation, actor);
}
actor.condition = condition;
return this.threadActor.sources.getGeneratedLocation(originalLocation)
.then(generatedLocation => {
let actor = this._getOrCreateBreakpointActor(originalLocation,
generatedLocation,
condition);
return generatedLocation.generatedSourceActor
.setBreakpointForActor(actor, generatedLocation);
});
@ -4665,15 +4672,10 @@ FrameActor.prototype.requestTypes = {
*
* @param ThreadActor aThreadActor
* The parent thread actor that contains this breakpoint.
* @param OriginalLocation originalLocation
* @param OriginalLocation aOriginalLocation
* The original location of the breakpoint.
* @param GeneratedLocation generatedLocation
* The generated location of the breakpoint.
* @param string aCondition
* Optional. A condition which, when false, will cause the breakpoint to
* be skipped.
*/
function BreakpointActor(aThreadActor, aOriginalLocation, aGeneratedLocation, aCondition)
function BreakpointActor(aThreadActor, aOriginalLocation)
{
// The set of Debugger.Script instances that this breakpoint has been set
// upon.
@ -4681,8 +4683,7 @@ function BreakpointActor(aThreadActor, aOriginalLocation, aGeneratedLocation, aC
this.threadActor = aThreadActor;
this.originalLocation = aOriginalLocation;
this.generatedLocation = aGeneratedLocation;
this.condition = aCondition;
this.condition = null;
}
BreakpointActor.prototype = {

Просмотреть файл

@ -69,7 +69,7 @@ xul|prefpane > xul|*.content-box {
xul|groupbox {
-moz-appearance: none;
border: none;
margin: 15px 0;
margin: 15px 0 0;
-moz-padding-start: 0;
-moz-padding-end: 0;
font-size: 1.25rem;

Просмотреть файл

@ -259,6 +259,10 @@ body {
border-bottom: 1px solid #c1c1c1;
}
.button[hidden] {
display: none;
}
.dropdown {
text-align: center;
list-style: none;