From cb0589715265dc1568626fe238aac7417b44ef89 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Tue, 25 May 2010 14:17:11 +0300
Subject: EXT-6726 WIP Added handlers for most of Appearance SP context/gear
 menus.

Reviewed by Mike Antipov and Nyx at https://codereview.productengine.com/secondlife/r/428/

--HG--
branch : product-engine
---
 indra/llui/llview.cpp | 2 --
 1 file changed, 2 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index c091686ffb..bd56da9121 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1319,8 +1319,6 @@ void LLView::drawChildren()
 
 			if (viewp->getVisible() && viewp->getRect().isValid())
 			{
-				// check for bad data
-				llassert_always(viewp->getVisible() == TRUE);
 				// Only draw views that are within the root view
 				localRectToScreen(viewp->getRect(),&screenRect);
 				if ( rootRect.overlaps(screenRect)  && LLUI::sDirtyRect.overlaps(screenRect))
-- 
cgit v1.2.3


From a01de4d25feb598179daf52e3bcf81ab9d7d433a Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 26 May 2010 10:10:20 -0700
Subject: EXT-7058 FIX Viewer freezes if IM chat floater with teleport offer is
 resized a few times

---
 indra/llui/lltextbase.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'indra/llui')

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;
 
-- 
cgit v1.2.3