This commit is contained in:
Ryan VanderMeulen 2014-01-02 16:13:34 -05:00
Родитель d33104ca91 ba6c1b4316
Коммит 8419c2ed8f
9 изменённых файлов: 39 добавлений и 23 удалений

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

@ -39,6 +39,7 @@ libs:: $(FINAL_TARGET)/chrome/shumway.manifest
endif endif
ifdef MOZ_METRO ifdef MOZ_METRO
ifdef NIGHTLY_BUILD
$(DIST)/bin/metro/chrome/pdfjs.manifest: $(GLOBAL_DEPS) $(DIST)/bin/metro/chrome/pdfjs.manifest: $(GLOBAL_DEPS)
printf 'manifest pdfjs/chrome.manifest' > $@ printf 'manifest pdfjs/chrome.manifest' > $@
@ -49,7 +50,6 @@ libs:: $(DIST)/bin/metro/chrome/pdfjs.manifest
$(DIST)/bin/metro/chrome $(DIST)/bin/metro/chrome
$(call py_action,buildlist,$(DIST)/bin/metro/chrome.manifest 'manifest chrome/pdfjs.manifest') $(call py_action,buildlist,$(DIST)/bin/metro/chrome.manifest 'manifest chrome/pdfjs.manifest')
ifdef NIGHTLY_BUILD
$(DIST)/bin/metro/chrome/shumway.manifest: $(GLOBAL_DEPS) $(DIST)/bin/metro/chrome/shumway.manifest: $(GLOBAL_DEPS)
printf 'manifest shumway/chrome.manifest' > $@ printf 'manifest shumway/chrome.manifest' > $@

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

@ -609,9 +609,9 @@
@BINPATH@/browser/chrome.manifest @BINPATH@/browser/chrome.manifest
@BINPATH@/browser/chrome/browser@JAREXT@ @BINPATH@/browser/chrome/browser@JAREXT@
@BINPATH@/browser/chrome/browser.manifest @BINPATH@/browser/chrome/browser.manifest
#ifdef NIGHTLY_BUILD
@BINPATH@/browser/chrome/pdfjs.manifest @BINPATH@/browser/chrome/pdfjs.manifest
@BINPATH@/browser/chrome/pdfjs/* @BINPATH@/browser/chrome/pdfjs/*
#ifdef NIGHTLY_BUILD
@BINPATH@/browser/chrome/shumway.manifest @BINPATH@/browser/chrome/shumway.manifest
@BINPATH@/browser/chrome/shumway/* @BINPATH@/browser/chrome/shumway/*
#endif #endif

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

@ -40,11 +40,13 @@ XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
XPCOMUtils.defineLazyModuleGetter(this, "Promise", XPCOMUtils.defineLazyModuleGetter(this, "Promise",
"resource://gre/modules/commonjs/sdk/core/promise.js"); "resource://gre/modules/commonjs/sdk/core/promise.js");
#ifdef NIGHTLY_BUILD
XPCOMUtils.defineLazyModuleGetter(this, "ShumwayUtils", XPCOMUtils.defineLazyModuleGetter(this, "ShumwayUtils",
"resource://shumway/ShumwayUtils.jsm"); "resource://shumway/ShumwayUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PdfJs", XPCOMUtils.defineLazyModuleGetter(this, "PdfJs",
"resource://pdf.js/PdfJs.jsm"); "resource://pdf.js/PdfJs.jsm");
#endif
XPCOMUtils.defineLazyModuleGetter(this, "Task", XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm"); "resource://gre/modules/Task.jsm");

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

@ -154,7 +154,9 @@ var BrowserUI = {
DialogUI.init(); DialogUI.init();
FormHelperUI.init(); FormHelperUI.init();
FindHelperUI.init(); FindHelperUI.init();
#ifdef NIGHTLY_BUILD
PdfJs.init(); PdfJs.init();
#endif
} catch(ex) { } catch(ex) {
Util.dumpLn("Exception in delay load module:", ex.message); Util.dumpLn("Exception in delay load module:", ex.message);
} }

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

@ -969,19 +969,19 @@ var SelectionHelperUI = {
if (json.updateStart) { if (json.updateStart) {
let x = this._msgTarget.btocx(json.start.xPos, true); let x = this._msgTarget.btocx(json.start.xPos, true);
let y = this._msgTarget.btocx(json.start.yPos, true); let y = this._msgTarget.btocy(json.start.yPos, true);
this.startMark.position(x, y); this.startMark.position(x, y);
} }
if (json.updateEnd) { if (json.updateEnd) {
let x = this._msgTarget.btocx(json.end.xPos, true); let x = this._msgTarget.btocx(json.end.xPos, true);
let y = this._msgTarget.btocx(json.end.yPos, true); let y = this._msgTarget.btocy(json.end.yPos, true);
this.endMark.position(x, y); this.endMark.position(x, y);
} }
if (json.updateCaret) { if (json.updateCaret) {
let x = this._msgTarget.btocx(json.caret.xPos, true); let x = this._msgTarget.btocx(json.caret.xPos, true);
let y = this._msgTarget.btocx(json.caret.yPos, true); let y = this._msgTarget.btocy(json.caret.yPos, true);
// If selectionRangeFound is set SelectionHelper found a range we can // If selectionRangeFound is set SelectionHelper found a range we can
// attach to. If not, there's no text in the control, and hence no caret // attach to. If not, there's no text in the control, and hence no caret
// position information we can use. // position information we can use.

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

@ -154,9 +154,11 @@ SelectionPrototype.prototype = {
let containedCoords = this._restrictCoordinateToEditBounds(aX, aY); let containedCoords = this._restrictCoordinateToEditBounds(aX, aY);
let cp = this._contentWindow.document.caretPositionFromPoint(containedCoords.xPos, let cp = this._contentWindow.document.caretPositionFromPoint(containedCoords.xPos,
containedCoords.yPos); containedCoords.yPos);
let input = cp.offsetNode; if (cp) {
let offset = cp.offset; let input = cp.offsetNode;
input.selectionStart = input.selectionEnd = offset; let offset = cp.offset;
input.selectionStart = input.selectionEnd = offset;
}
}, },
/* /*
@ -300,20 +302,19 @@ SelectionPrototype.prototype = {
let constrainedPoint = let constrainedPoint =
this._constrainPointWithinControl(aAdjustedClientPoint); this._constrainPointWithinControl(aAdjustedClientPoint);
// For textareas we fall back on the selectAtPoint logic due to various
// issues with caretPositionFromPoint (bug 882149).
if (Util.isMultilineInput(this._targetElement)) {
this._adjustSelectionAtPoint(aMarker, constrainedPoint, aEndOfSelection);
return;
}
// Add or subtract selection // Add or subtract selection
let cp = let cp =
this._contentWindow.document.caretPositionFromPoint(constrainedPoint.xPos, this._contentWindow.document.caretPositionFromPoint(constrainedPoint.xPos,
constrainedPoint.yPos); constrainedPoint.yPos);
if (!cp || !this._offsetNodeIsValid(cp.offsetNode)) {
// For textareas or if cpfp fails we fall back on the selectAtPoint
// logic (bugs 882149, 943071).
if (Util.isMultilineInput(this._targetElement) || !cp ||
!this._offsetNodeIsValid(cp.offsetNode)) {
this._adjustSelectionAtPoint(aMarker, constrainedPoint, aEndOfSelection);
return; return;
} }
if (aMarker == "start") { if (aMarker == "start") {
this._targetElement.selectionStart = cp.offset; this._targetElement.selectionStart = cp.offset;
} else { } else {

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

@ -540,6 +540,7 @@ pref("ui.dragThresholdY", 50);
// prevent tooltips from showing up // prevent tooltips from showing up
pref("browser.chrome.toolbar_tips", false); pref("browser.chrome.toolbar_tips", false);
#ifdef NIGHTLY_BUILD
// Completely disable pdf.js as an option to preview pdfs within firefox. // Completely disable pdf.js as an option to preview pdfs within firefox.
// Note: if this is not disabled it does not necessarily mean pdf.js is the pdf // Note: if this is not disabled it does not necessarily mean pdf.js is the pdf
// handler just that it is an option. // handler just that it is an option.
@ -551,6 +552,7 @@ pref("pdfjs.firstRun", true);
// became the default. // became the default.
pref("pdfjs.previousHandler.preferredAction", 0); pref("pdfjs.previousHandler.preferredAction", 0);
pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false); pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
#endif
#ifdef NIGHTLY_BUILD #ifdef NIGHTLY_BUILD
pref("shumway.disabled", true); pref("shumway.disabled", true);

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

@ -128,7 +128,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
private ImageButton mSiteSecurity; private ImageButton mSiteSecurity;
private PageActionLayout mPageActionLayout; private PageActionLayout mPageActionLayout;
private Animation mProgressSpinner; //private Animation mProgressSpinner;
private TabCounter mTabsCounter; private TabCounter mTabsCounter;
private GeckoImageButton mMenu; private GeckoImageButton mMenu;
private GeckoImageView mMenuIcon; private GeckoImageView mMenuIcon;
@ -303,7 +303,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
mSiteIdentityPopup = new SiteIdentityPopup(mActivity); mSiteIdentityPopup = new SiteIdentityPopup(mActivity);
mSiteIdentityPopup.setAnchor(mSiteSecurity); mSiteIdentityPopup.setAnchor(mSiteSecurity);
mProgressSpinner = AnimationUtils.loadAnimation(mActivity, R.anim.progress_spinner); //mProgressSpinner = AnimationUtils.loadAnimation(mActivity, R.anim.progress_spinner);
mStop = (ImageButton) findViewById(R.id.stop); mStop = (ImageButton) findViewById(R.id.stop);
mPageActionLayout = (PageActionLayout) findViewById(R.id.page_action_layout); mPageActionLayout = (PageActionLayout) findViewById(R.id.page_action_layout);
@ -785,8 +785,8 @@ public class BrowserToolbar extends GeckoRelativeLayout
// To stop the glitch caused by multiple start() calls. // To stop the glitch caused by multiple start() calls.
if (!mSpinnerVisible) { if (!mSpinnerVisible) {
setPageActionVisibility(true); setPageActionVisibility(true);
mFavicon.setAnimation(mProgressSpinner); //mFavicon.setAnimation(mProgressSpinner);
mProgressSpinner.start(); //mProgressSpinner.start();
mSpinnerVisible = true; mSpinnerVisible = true;
} }
Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber start"); Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber start");
@ -799,7 +799,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
if (mSpinnerVisible) { if (mSpinnerVisible) {
setPageActionVisibility(false); setPageActionVisibility(false);
mFavicon.setAnimation(null); mFavicon.setAnimation(null);
mProgressSpinner.cancel(); //mProgressSpinner.cancel();
mSpinnerVisible = false; mSpinnerVisible = false;
} }
Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber stop"); Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber stop");

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

@ -42,8 +42,16 @@ nsAndroidHistory::RegisterVisitedCallback(nsIURI *aURI, Link *aContent)
if (!aContent || !aURI) if (!aContent || !aURI)
return NS_OK; return NS_OK;
// Silently return if URI is something we would never add to DB.
bool canAdd;
nsresult rv = CanAddURI(aURI, &canAdd);
NS_ENSURE_SUCCESS(rv, rv);
if (!canAdd) {
return NS_OK;
}
nsAutoCString uri; nsAutoCString uri;
nsresult rv = aURI->GetSpec(uri); rv = aURI->GetSpec(uri);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
NS_ConvertUTF8toUTF16 uriString(uri); NS_ConvertUTF8toUTF16 uriString(uri);
@ -99,7 +107,8 @@ inline bool
nsAndroidHistory::IsRecentlyVisitedURI(nsIURI* aURI) { nsAndroidHistory::IsRecentlyVisitedURI(nsIURI* aURI) {
bool equals = false; bool equals = false;
RecentlyVisitedArray::index_type i; RecentlyVisitedArray::index_type i;
for (i = 0; i < mRecentlyVisitedURIs.Length() && !equals; ++i) { RecentlyVisitedArray::size_type length = mRecentlyVisitedURIs.Length();
for (i = 0; i < length && !equals; ++i) {
aURI->Equals(mRecentlyVisitedURIs.ElementAt(i), &equals); aURI->Equals(mRecentlyVisitedURIs.ElementAt(i), &equals);
} }
return equals; return equals;