Bug 472322. Don't treat non-XUL listboxbody/listitem specially in XUL frame construction. r=enndeakin, sr=roc
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 06 Jan 2009 14:18:04 -0500
changeset 23378 612f2c665b1e099ad58f6947356c410909619e3f
parent 23377 fc12d81653dd38c6ccedaf2d31c385a3d1ba3d4c
child 23379 79d1f3cbc95a0e3f57d901a6b8a55624a3c8e26a
push id4506
push userbzbarsky@mozilla.com
push dateTue, 06 Jan 2009 19:18:29 +0000
treeherdermozilla-central@612f2c665b1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin, roc
bugs472322
milestone1.9.2a1pre
Bug 472322. Don't treat non-XUL listboxbody/listitem specially in XUL frame construction. r=enndeakin, sr=roc
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -5912,17 +5912,17 @@ nsCSSFrameConstructor::ConstructXULFrame
         // Boxes can scroll.
         mayBeScrollable = PR_TRUE;
       } //------- End Grid ------
 
       // ------- Begin Rows/Columns ---------
       else if (display->mDisplay == NS_STYLE_DISPLAY_GRID_GROUP) {
         nsCOMPtr<nsIBoxLayout> layout;
       
-        if (aTag == nsGkAtoms::listboxbody) {
+        if (isXULNS && aTag == nsGkAtoms::listboxbody) {
           NS_NewListBoxLayout(mPresShell, layout);
           newFrame = NS_NewListBoxBodyFrame(mPresShell, aStyleContext, PR_FALSE, layout);
         }
         else
         {
           NS_NewGridRowGroupLayout(mPresShell, getter_AddRefs(layout));
           newFrame = NS_NewGridRowGroupFrame(mPresShell, aStyleContext, PR_FALSE, layout);
         }
@@ -5944,17 +5944,17 @@ nsCSSFrameConstructor::ConstructXULFrame
 
       // ------- Begin Row/Column ---------
       else if (display->mDisplay == NS_STYLE_DISPLAY_GRID_LINE) {
         nsCOMPtr<nsIBoxLayout> layout;
 
 
         NS_NewGridRowLeafLayout(mPresShell, getter_AddRefs(layout));
 
-        if (aTag == nsGkAtoms::listitem)
+        if (isXULNS && aTag == nsGkAtoms::listitem)
           newFrame = NS_NewListItemFrame(mPresShell, aStyleContext, PR_FALSE, layout);
         else
           newFrame = NS_NewGridRowLeafFrame(mPresShell, aStyleContext, PR_FALSE, layout);
 
         // Boxes can scroll.
         mayBeScrollable = PR_TRUE;
       } //------- End Grid ------
       // End of STACK CONSTRUCTION logic