Bug 824483: about:home is cut off in landscape mode. [r=wesj] [a=lsblakk]
authorSriram Ramasubramanian <sriram@mozilla.com>
Tue, 12 Feb 2013 15:32:13 -0800
changeset 127515 53a7311047ef99f41aa31b48621b2a7a51771f9d
parent 127514 45e785af89970c1f9b711fa2b1d84a22e37646c0
child 127516 9e4a356f693ec472e95b977f410ed92152b2a11d
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, lsblakk
bugs824483
milestone20.0a2
Bug 824483: about:home is cut off in landscape mode. [r=wesj] [a=lsblakk]
mobile/android/base/AboutHomeContent.java
--- a/mobile/android/base/AboutHomeContent.java
+++ b/mobile/android/base/AboutHomeContent.java
@@ -801,23 +801,18 @@ public class AboutHomeContent extends Sc
             super(context, attrs);
         }
 
         public int getColumnWidth() {
             return getColumnWidth(getWidth());
         }
 
         public int getColumnWidth(int width) {
-            int s = -1;
-            if (android.os.Build.VERSION.SDK_INT >= 16)
-                s= super.getColumnWidth();
-            else
-                s = (width - getPaddingLeft() - getPaddingRight()) / mNumberOfCols;
-
-            return s;
+            // super.getColumnWidth() doesn't always return the correct value.
+            return (width - getPaddingLeft() - getPaddingRight()) / mNumberOfCols;
         }
 
         @Override
         protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
             int measuredWidth = View.MeasureSpec.getSize(widthMeasureSpec);
             int numRows;
 
             SimpleCursorAdapter adapter = (SimpleCursorAdapter) getAdapter();