Bug 804486 - s/fontHeight/increment/ to make some code less confusing. r=roc
authorMats Palmgren <matspal@gmail.com>
Mon, 29 Oct 2012 06:44:31 +0100
changeset 111791 1212408eac299dbecf4036aabe83920e51b6fabc
parent 111790 49fdae25aac952dc7db9b6c9f3234a3c640668d1
child 111792 a886c22fe9d135754dc3059d1f21a4e0009fbd81
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs804486
milestone19.0a1
Bug 804486 - s/fontHeight/increment/ to make some code less confusing. r=roc
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3421,29 +3421,29 @@ nsGfxScrollFrameInner::ReflowFinished()
   if (vScroll || hScroll) {
     nsWeakFrame weakFrame(mOuter);
     nsPoint scrollPos = GetScrollPosition();
     nsSize lineScrollAmount = GetLineScrollAmount();
     if (vScroll) {
       const double kScrollMultiplier =
         Preferences::GetInt("toolkit.scrollbox.verticalScrollDistance",
                             NS_DEFAULT_VERTICAL_SCROLL_DISTANCE);
-      nscoord fontHeight = lineScrollAmount.height * kScrollMultiplier;
-      // We normally use (scrollArea.height - fontHeight) for height
+      nscoord increment = lineScrollAmount.height * kScrollMultiplier;
+      // We normally use (scrollArea.height - increment) for height
       // of page scrolling.  However, it is too small when
-      // fontHeight is very large. (If fontHeight is larger than
+      // increment is very large. (If increment is larger than
       // scrollArea.height, direction of scrolling will be opposite).
       // To avoid it, we use (float(scrollArea.height) * 0.8) as
       // lower bound value of height of page scrolling. (bug 383267)
       // XXX shouldn't we use GetPageScrollAmount here?
-      nscoord pageincrement = nscoord(mScrollPort.height - fontHeight);
+      nscoord pageincrement = nscoord(mScrollPort.height - increment);
       nscoord pageincrementMin = nscoord(float(mScrollPort.height) * 0.8);
       FinishReflowForScrollbar(vScroll, minY, maxY, scrollPos.y,
                                NS_MAX(pageincrement, pageincrementMin),
-                               fontHeight);
+                               increment);
     }
     if (hScroll) {
       const double kScrollMultiplier =
         Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance",
                             NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE);
       nscoord increment = lineScrollAmount.width * kScrollMultiplier;
       FinishReflowForScrollbar(hScroll, minX, maxX, scrollPos.x,
                                nscoord(float(mScrollPort.width) * 0.8),