Bug 725376 - Don't do column balancing deeper than 2 nested levels to avoid hang. r=roc
authorMats Palmgren <matspal@gmail.com>
Sat, 18 Feb 2012 02:34:21 +0100
changeset 87148 f0ac2d720c7b1e75b61a51ba31751b063c9a6e41
parent 87147 aaed6b9c89528ad6360ca2acbed3adcc74a83a96
child 87149 ece583b83508f0dda79f1e2ff63393150d9b0731
push id22083
push userbmo@edmorley.co.uk
push dateSat, 18 Feb 2012 11:19:19 +0000
treeherdermozilla-central@20478b673212 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs725376
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 725376 - Don't do column balancing deeper than 2 nested levels to avoid hang. r=roc
layout/generic/nsColumnSetFrame.cpp
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -361,17 +361,17 @@ nsColumnSetFrame::ChooseColumnStrategy(c
     colHeight = aReflowState.ComputedHeight();
   }
 
   nscoord colGap = GetColumnGap(this, colStyle);
   PRInt32 numColumns = colStyle->mColumnCount;
 
   bool isBalancing = colStyle->mColumnFill == NS_STYLE_COLUMN_FILL_BALANCE;
   if (isBalancing) {
-    const PRUint32 MAX_NESTED_COLUMN_BALANCING = 5;
+    const PRUint32 MAX_NESTED_COLUMN_BALANCING = 2;
     PRUint32 cnt = 1;
     for (const nsHTMLReflowState* rs = aReflowState.parentReflowState;
          rs && cnt < MAX_NESTED_COLUMN_BALANCING;
          rs = rs->parentReflowState) {
       if (rs->mFlags.mIsColumnBalancing) {
         ++cnt;
       }
     }