Merge fx-team to m-c.

This commit is contained in:
Ryan VanderMeulen 2014-04-21 15:59:10 -04:00
commit 800a96471b
10 changed files with 88 additions and 100 deletions

View File

@ -691,9 +691,9 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
// Do this now so that the items still exist!
bumpParents(cr, Bookmarks.URL, uri);
// Toggling bookmark on an URL should not affect the items in the reading list
final String[] urlArgs = new String[] { uri, String.valueOf(Bookmarks.FIXED_READING_LIST_ID) };
final String urlEquals = Bookmarks.URL + " = ? AND " + Bookmarks.PARENT + " != ?";
// Toggling bookmark on an URL should not affect the items in the reading list or pinned sites.
final String[] urlArgs = new String[] { uri, String.valueOf(Bookmarks.FIXED_READING_LIST_ID), String.valueOf(Bookmarks.FIXED_PINNED_LIST_ID) };
final String urlEquals = Bookmarks.URL + " = ? AND " + Bookmarks.PARENT + " != ? AND " + Bookmarks.PARENT + " != ? ";
cr.delete(contentUri, urlEquals, urlArgs);
}

View File

@ -1353,18 +1353,13 @@ class JavaPanZoomController
}
@Override
public boolean onSingleTapUp(final MotionEvent motionEvent) {
public boolean onSingleTapUp(MotionEvent motionEvent) {
// When double-tapping is allowed, we have to wait to see if this is
// going to be a double-tap.
// However, if mMediumPress is true then we know there will be no
// double-tap so we treat this as a click.
if (mMediumPress || !mTarget.getZoomConstraints().getAllowDoubleTapZoom()) {
mTarget.post(new Runnable() {
@Override
public void run() {
sendPointToGecko("Gesture:SingleTap", motionEvent);
}
});
sendPointToGecko("Gesture:SingleTap", motionEvent);
}
// return false because we still want to get the ACTION_UP event that triggers this
return false;

View File

@ -79,6 +79,10 @@ public class BrowserSearch extends HomeFragment
// for an autocomplete result
private static final int MAX_AUTOCOMPLETE_SEARCH = 20;
// Length of https:// + 1 required to make autocomplete
// fill in the domain, for both http:// and https://
private static final int HTTPS_PREFIX_LENGTH = 9;
// Duration for fade-in animation
private static final int ANIMATION_DURATION = 250;
@ -418,7 +422,8 @@ public class BrowserSearch extends HomeFragment
// Does the completion match against the whole URL? This will match
// about: pages, as well as user input including "http://...".
if (url.startsWith(searchTerm)) {
return uriSubstringUpToMatchedPath(url, 0, searchLength);
return uriSubstringUpToMatchedPath(url, 0,
(searchLength > HTTPS_PREFIX_LENGTH) ? searchLength : HTTPS_PREFIX_LENGTH);
}
final Uri uri = Uri.parse(url);

View File

@ -16,8 +16,8 @@
<LinearLayout android:id="@+id/title_desc_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:paddingTop="15dip"
android:paddingBottom="15dip"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:minHeight="@dimen/page_row_height"

View File

@ -23,8 +23,6 @@ XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
.getInterface(Ci.nsIDOMWindow)
.QueryInterface(Ci.nsIDOMChromeWindow));
XPCOMUtils.defineLazyGetter(window, "SelectHelper", function() gChromeWin.SelectHelper);
var ContextMenus = {
target: null,
@ -159,11 +157,6 @@ var Addons = {
details.className = "details";
inner.appendChild(details);
let tagPart = document.createElement("div");
tagPart.textContent = gStringBundle.GetStringFromName("addonType." + aAddon.type);
tagPart.className = "tag";
details.appendChild(tagPart);
let titlePart = document.createElement("div");
titlePart.textContent = aAddon.name;
titlePart.className = "title";
@ -308,7 +301,6 @@ var Addons = {
detailItem.querySelector(".title").textContent = addon.name;
detailItem.querySelector(".version").textContent = addon.version;
detailItem.querySelector(".tag").textContent = gStringBundle.GetStringFromName("addonType." + addon.type);
detailItem.querySelector(".description-full").textContent = addon.description;
detailItem.querySelector(".status-uninstalled").textContent =
gStringBundle.formatStringFromName("addonStatus.uninstalled", [addon.name], 1);

View File

@ -42,11 +42,12 @@
<img class="icon"/>
<div class="inner">
<div class="details">
<div class="tag"></div>
<div class="title"></div>
<div class="version"></div>
</div>
<div class="description-full"></div>
<div class="options-header">&aboutAddons.options;</div>
<div class="options-box"></div>
</div>
<div class="status status-uninstalled show-on-uninstall"></div>
<div class="buttons">
@ -55,8 +56,6 @@
<button id="uninstall-btn" class="hide-on-uninstall" >&addonAction.uninstall;</button>
<button id="cancel-btn" class="show-on-uninstall" >&addonAction.undo;</button>
</div>
<div class="options-header">&aboutAddons.options;</div>
<div class="options-box"></div>
</div>
</div>

View File

@ -2,6 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%filter substitution
%include defines.inc
.details {
width: 100%;
}
@ -15,15 +18,6 @@
margin-left: .67em;
}
.tag {
float: right;
margin-left: .67em;
/* compensate for the title baseline */
position: relative;
bottom: -3px;
}
#header-button {
background-image: url("chrome://browser/skin/images/amo-logo.png"), url("chrome://browser/skin/images/chevron.png");
background-size: 20px 20px, 8px 20px;
@ -38,7 +32,7 @@
}
.status {
background-color: #eef2f5;
background-color: @color_about_item_inner@;
border-top: 2px solid;
-moz-border-top-colors: #bac2ac #ffffff;
font-weight: bold;
@ -48,11 +42,8 @@
.options-header {
font-weight: bold;
padding: 1em 1.3em;
}
.options-box {
margin: 0 .67em;
text-transform: uppercase;
margin-top: 1em;
}
.addon-item[isDisabled="true"] .options-header,
@ -64,45 +55,41 @@
display: none;
}
/* Settings */
setting {
padding: 1em .67em;
border-top: 2px solid;
-moz-border-top-colors: #bac2ac #ffffff;
padding-bottom: 1em;
-moz-box-align: center;
box-sizing: border-box;
width: 100%;
}
setting[type="integer"],
setting[type="string"],
setting[type="menulist"],
setting[type="control"] {
-moz-box-orient: vertical;
-moz-box-align: start;
}
setting > vbox {
-moz-box-flex: 1;
}
.preferences-title {
font-weight: bold;
}
.preferences-description {
margin-top: 4px;
color: #666;
}
.preferences-description:empty {
display: none;
}
/* Put setting textboxes on a separate row */
setting[type="integer"],
setting[type="string"] {
-moz-box-align: center;
-moz-box-orient: vertical;
}
.preferences-alignment > textbox {
margin: .67em 0 0 0;
font-size: 1.2em !important;
}
/* Checkbox */
checkbox {
-moz-binding: url("chrome://global/content/bindings/checkbox.xml#checkbox-with-spacing") !important;
margin: 0;
}
checkbox[label=""] > .checkbox-label-box,
@ -111,10 +98,11 @@ checkbox:not([label]) > .checkbox-label-box {
}
.checkbox-check {
background: url("chrome://browser/skin/images/checkbox_unchecked.png") no-repeat 50% 50%;
border: 0 transparent;
width: 2.6em;
height: 2.6em;
background-color: transparent;
background-image: url("chrome://browser/skin/images/checkbox_unchecked.png");
border: none;
height: 48px;
width: 48px;
}
setting:active checkbox > .checkbox-spacer-box > .checkbox-check {
@ -144,14 +132,22 @@ textbox[type="number"] > spinbuttons {
}
textbox {
background: white -moz-linear-gradient(top, rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 3px, rgba(255,255,255,0.2) 16px);
border-radius: 3px;
border-color: rgb(94,128,153);
padding: 0 !important;
min-width: 200px;
margin: 2px 0;
padding: 0.5em !important;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
color: #333;
}
.textbox-input-box {
padding: .4em .67em;
/* Button */
button {
margin: 2px 0;
background: #fff;
border: 1px solid #ccc;
padding: 0.5em;
}
/* Menulist */
@ -159,34 +155,20 @@ textbox {
menulist {
-moz-appearance: none !important;
-moz-user-focus: ignore;
/* min-width: 200px !important; */
color: #000 !important;
border-radius: 5px;
border-color: rgb(94,128,153);
border-style: solid;
padding: .4em .67em;
background: white;
border: 1px solid #cacdd5;
border-style: solid;
border-color: rgb(94,128,153);
min-width: 200px;
}
.menulist-label {
background-color: transparent !important;
}
menulist > menupopup > menuitem > label {
-moz-padding-start: 3px !important;
-moz-padding-end: 7px !important;
margin: 2px 0;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
padding: 0.5em;
}
menulist > dropmarker {
height: 1.8em;
width: 1.8em;
margin-left: @margin_snormal@;
background-color: transparent; /* for windows */
border: none; /* for windows */
background-color: transparent;
border: none;
-moz-box-align: center;
-moz-box-pack: center;
list-style-image: url("chrome://browser/skin/images/dropmarker.svg") !important;
@ -194,6 +176,17 @@ menulist > dropmarker {
display: block;
}
/* Select */
select {
min-width: 200px;
margin: 2px 0;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
padding: 1em;
}
/* XBL bindings */
settings {

View File

@ -2,10 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%filter substitution
%include defines.inc
html {
font-family: Roboto,"Droid Sans",helvetica,arial,clean,sans-serif;
font-size: 12px;
background-color: #ced7de;
font-size: 14px;
background-color: @color_about_background@;
-moz-text-size-adjust: none;
}
@ -46,7 +49,7 @@ body {
.list-item {
color: black;
background-color: #e6e9eb;
background-color: @color_about_item@;
border-bottom: 2px solid;
-moz-border-bottom-colors: #ffffff #bac2ac;
position: relative;
@ -66,9 +69,8 @@ body {
}
.inner {
background-color: #eef2f5;
min-height: 3.8em;
padding: 0.5em;
background-color: @color_about_item_inner@;
padding: 1em;
/* make room for the favicon */
-moz-margin-start: 4.5em;
@ -111,9 +113,8 @@ body[dir="ltr"] .icon {
border-top-color: #bac2ac;
-moz-border-start-color: #bac2ac;
background-image: none;
background-color: #edf0f5;
background-color: @color_about_item_inner@;
border-radius: 0px !important;
flex: 1;
padding: 0.75em 0.5em;
}
@ -136,14 +137,13 @@ body[dir="ltr"] .icon {
}
.title {
font-size: 1.2em;
font-weight: bold;
overflow: hidden;
flex: 1;
}
#browse-title {
margin-top: 1em;
margin: 0.5em 0;
background-image: url("chrome://browser/skin/images/chevron.png");
background-size: 8px 20px;
background-position: right;

View File

@ -1,5 +1,9 @@
%filter substitution
%define color_about_background #ced7de
%define color_about_item #e6e9eb
%define color_about_item_inner #eef2f5
%define color_background_active #525252
%define color_background_default #000
%define color_text_default #fff

View File

@ -8,9 +8,9 @@ chrome.jar:
% skin browser classic/1.0 %skin/
skin/aboutPage.css (aboutPage.css)
skin/about.css (about.css)
skin/aboutAddons.css (aboutAddons.css)
* skin/aboutAddons.css (aboutAddons.css)
skin/aboutApps.css (aboutApps.css)
skin/aboutBase.css (aboutBase.css)
* skin/aboutBase.css (aboutBase.css)
* skin/aboutDownloads.css (aboutDownloads.css)
skin/aboutFeedback.css (aboutFeedback.css)
#ifdef MOZ_SERVICES_HEALTHREPORT