summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-05-27 11:02:59 +0300
committerMike Antipov <mantipov@productengine.com>2010-05-27 11:02:59 +0300
commit990e31bb692b62e05f6065b04207acb8ca50cce4 (patch)
tree8bb88d17e763d1a0be37f3c3ff1056f5306a4e77 /indra/llui
parent46de549bfba0b95b068b617026e095404ccff2f6 (diff)
parentf33fdbf0ef25c485bdd09faaf1177d2b2b1a7694 (diff)
Merge from default branch.
Incoming changes in (924d091c166c) moved SidebarCameraMovement logic out of special widget to camera setup code are reset changes in (380b2422b864) EXT-7434 FIX Worldview rect wasn't updated when "SidebarCameraMovement" variable But seems bug is not reproduced. --HG-- branch : product-engine
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltextbase.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 390ec234d3..78a6ab1eaa 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1116,8 +1116,19 @@ void LLTextBase::reflow()
updateSegments();
+ S32 reflow_count = 0;
while(mReflowIndex < S32_MAX)
{
+ // we can get into an infinite loop if the document height does not monotonically increase
+ // with decreasing width (embedded ui elements with alternate layouts). In that case,
+ // we want to stop reflowing after 2 iterations. We use 2, since we need to handle the case
+ // of introducing a vertical scrollbar causing a reflow with less width. We should also always
+ // use an even number of iterations to avoid user visible oscillation of the layout
+ if(++reflow_count > 2)
+ {
+ lldebugs << "Breaking out of reflow due to possible infinite loop in " << getName() << llendl;
+ break;
+ }
S32 start_index = mReflowIndex;
mReflowIndex = S32_MAX;