Permalink
Browse files

Backed out 3 changesets (bug 710297, bug 712386, bug 712761) for perm…

…a-orange on Android native m1 and m2

Backed out changeset 3b1e6033d3ff (bug 712761)
Backed out changeset bb41941cdf9d (bug 710297)
Backed out changeset d4f9960e286a (bug 712386)
  • Loading branch information...
1 parent d7c78a1 commit 80a36e73afbba974dbb50beee62fa89a91ed7d34 @darktrojan darktrojan committed Dec 27, 2011
Showing with 8 additions and 22 deletions.
  1. +0 −8 mobile/android/base/ui/PanZoomController.java
  2. +8 −14 mobile/android/chrome/content/browser.js
@@ -937,14 +937,6 @@ public boolean onScale(ScaleGestureDetector detector) {
synchronized (mController) {
float newZoomFactor = mController.getZoomFactor() * spanRatio;
- if (newZoomFactor >= MAX_ZOOM) {
- // apply resistance when zooming past MAX_ZOOM,
- // such that it asymptotically reaches MAX_ZOOM + 1.0
- // but never exceeds that
- float excessZoom = newZoomFactor - MAX_ZOOM;
- excessZoom = 1.0f - (float)Math.exp(-excessZoom);
- newZoomFactor = MAX_ZOOM + excessZoom;
- }
mController.scrollBy(new PointF(mLastZoomFocus.x - detector.getFocusX(),
mLastZoomFocus.y - detector.getFocusY()));
@@ -1085,7 +1085,7 @@ nsBrowserAccess.prototype = {
openURI: function browser_openURI(aURI, aOpener, aWhere, aContext) {
let browser = this._getBrowser(aURI, aOpener, aWhere, aContext);
- return browser ? browser.contentWindow : null;
+ return browser ? browser.QueryInterface(Ci.nsIFrameLoaderOwner) : null;
},
openURIInFrame: function browser_openURIInFrame(aURI, aOpener, aWhere, aContext) {
@@ -1338,27 +1338,21 @@ Tab.prototype = {
this._viewport.x = Math.round(this._viewport.x * this._viewport.zoom);
this._viewport.y = Math.round(this._viewport.y * this._viewport.zoom);
+ /*
+ * Don't alter the page size until we hit DOMContentLoaded, because this causes the page size
+ * to jump around wildly during page load.
+ */
let doc = this.browser.contentDocument;
- if (doc != null) {
+ if (doc != null && doc.readyState === 'complete') {
let pageWidth = this._viewport.width, pageHeight = this._viewport.height;
let body = doc.body || { scrollWidth: pageWidth, scrollHeight: pageHeight };
let html = doc.documentElement || { scrollWidth: pageWidth, scrollHeight: pageHeight };
pageWidth = Math.max(body.scrollWidth, html.scrollWidth);
pageHeight = Math.max(body.scrollHeight, html.scrollHeight);
/* Transform the page width and height based on the zoom factor. */
- pageWidth = Math.round(pageWidth * this._viewport.zoom);
- pageHeight = Math.round(pageHeight * this._viewport.zoom);
-
- /*
- * Avoid sending page sizes of less than screen size before we hit DOMContentLoaded, because
- * this causes the page size to jump around wildly during page load. After the page is loaded,
- * send updates regardless of page size; we'll zoom to fit the content as needed.
- */
- if (doc.readyState === 'complete' || (pageWidth >= gScreenWidth && pageHeight >= gScreenHeight)) {
- this._viewport.pageWidth = pageWidth;
- this._viewport.pageHeight = pageHeight;
- }
+ this._viewport.pageWidth = Math.round(pageWidth * this._viewport.zoom);
+ this._viewport.pageHeight = Math.round(pageHeight * this._viewport.zoom);
}
return this._viewport;

0 comments on commit 80a36e7

Please sign in to comment.