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

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

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

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

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

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

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

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

@ -969,19 +969,19 @@ var SelectionHelperUI = {
if (json.updateStart) {
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);
}
if (json.updateEnd) {
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);
}
if (json.updateCaret) {
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
// attach to. If not, there's no text in the control, and hence no caret
// position information we can use.

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

@ -154,9 +154,11 @@ SelectionPrototype.prototype = {
let containedCoords = this._restrictCoordinateToEditBounds(aX, aY);
let cp = this._contentWindow.document.caretPositionFromPoint(containedCoords.xPos,
containedCoords.yPos);
let input = cp.offsetNode;
let offset = cp.offset;
input.selectionStart = input.selectionEnd = offset;
if (cp) {
let input = cp.offsetNode;
let offset = cp.offset;
input.selectionStart = input.selectionEnd = offset;
}
},
/*
@ -300,20 +302,19 @@ SelectionPrototype.prototype = {
let constrainedPoint =
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
let cp =
this._contentWindow.document.caretPositionFromPoint(constrainedPoint.xPos,
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;
}
if (aMarker == "start") {
this._targetElement.selectionStart = cp.offset;
} else {

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

@ -540,6 +540,7 @@ pref("ui.dragThresholdY", 50);
// prevent tooltips from showing up
pref("browser.chrome.toolbar_tips", false);
#ifdef NIGHTLY_BUILD
// 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
// handler just that it is an option.
@ -551,6 +552,7 @@ pref("pdfjs.firstRun", true);
// became the default.
pref("pdfjs.previousHandler.preferredAction", 0);
pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
#endif
#ifdef NIGHTLY_BUILD
pref("shumway.disabled", true);

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

@ -128,7 +128,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
private ImageButton mSiteSecurity;
private PageActionLayout mPageActionLayout;
private Animation mProgressSpinner;
//private Animation mProgressSpinner;
private TabCounter mTabsCounter;
private GeckoImageButton mMenu;
private GeckoImageView mMenuIcon;
@ -303,7 +303,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
mSiteIdentityPopup = new SiteIdentityPopup(mActivity);
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);
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.
if (!mSpinnerVisible) {
setPageActionVisibility(true);
mFavicon.setAnimation(mProgressSpinner);
mProgressSpinner.start();
//mFavicon.setAnimation(mProgressSpinner);
//mProgressSpinner.start();
mSpinnerVisible = true;
}
Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber start");
@ -799,7 +799,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
if (mSpinnerVisible) {
setPageActionVisibility(false);
mFavicon.setAnimation(null);
mProgressSpinner.cancel();
//mProgressSpinner.cancel();
mSpinnerVisible = false;
}
Log.i(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - Throbber stop");

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

@ -42,8 +42,16 @@ nsAndroidHistory::RegisterVisitedCallback(nsIURI *aURI, Link *aContent)
if (!aContent || !aURI)
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;
nsresult rv = aURI->GetSpec(uri);
rv = aURI->GetSpec(uri);
if (NS_FAILED(rv)) return rv;
NS_ConvertUTF8toUTF16 uriString(uri);
@ -99,7 +107,8 @@ inline bool
nsAndroidHistory::IsRecentlyVisitedURI(nsIURI* aURI) {
bool equals = false;
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);
}
return equals;