#113117 Fixing another 'fatal' layout error. This time some components pfe_duringpmd_2
authorpzavadsky@netbeans.org
Fri, 17 Aug 2007 23:49:17 +0000
changeset 1318405ec282ffe2
parent 1317 3e6e4406012b
child 1319 a80cc8c459cc
#113117 Fixing another 'fatal' layout error. This time some components
were not positioned.
visualweb.designer/src/org/netbeans/modules/visualweb/css2/ContainerBox.java
visualweb.designer/src/org/netbeans/modules/visualweb/css2/LineBoxGroup.java
     1.1 --- a/visualweb.designer/src/org/netbeans/modules/visualweb/css2/ContainerBox.java	Fri Aug 17 22:32:15 2007 +0000
     1.2 +++ b/visualweb.designer/src/org/netbeans/modules/visualweb/css2/ContainerBox.java	Fri Aug 17 23:49:17 2007 +0000
     1.3 @@ -1151,8 +1151,11 @@
     1.4  
     1.5                  layoutChild(box, context, true);
     1.6  
     1.7 -                if ((box.getBoxType() != BoxType.LINEBOX) &&
     1.8 -                        (box.isBlockLevel() || box.getBoxType().isAbsolutelyPositioned())) {
     1.9 +//                if ((box.getBoxType() != BoxType.LINEBOX) &&
    1.10 +//                        (box.isBlockLevel() || box.getBoxType().isAbsolutelyPositioned())) {
    1.11 +                // XXX #113117 To be sure also the normal flow elements have position set.
    1.12 +                if ((box.getBoxType() != BoxType.LINEBOX)
    1.13 +                && (box.isBlockLevel() || box.getBoxType().isAbsolutelyPositioned() || box.getBoxType().isNormalFlow())) {
    1.14                      positionBox(box, context);
    1.15                  }
    1.16              }
     2.1 --- a/visualweb.designer/src/org/netbeans/modules/visualweb/css2/LineBoxGroup.java	Fri Aug 17 22:32:15 2007 +0000
     2.2 +++ b/visualweb.designer/src/org/netbeans/modules/visualweb/css2/LineBoxGroup.java	Fri Aug 17 23:49:17 2007 +0000
     2.3 @@ -415,6 +415,8 @@
     2.4                      super.layoutChild(box, context, true);
     2.5  
     2.6                      //No: positionBox(box, context);
     2.7 +                    // XXX #113117 To be sure also the position is set.
     2.8 +                    positionBox(box, context);
     2.9                  }
    2.10  
    2.11                  if (!wrap || (lineBox == null) || lineBox.isEmpty() || 
    2.12 @@ -555,6 +557,9 @@
    2.13                      // XXX true here - what if we're doing this layout as part
    2.14                      // of a child notify - in that case we shouldn't relayout the children!
    2.15                      super.layoutChild(box, context, true);
    2.16 +                    
    2.17 +                    // XXX #113117 To be sure also the position is set.
    2.18 +                    positionBox(box, context); // TEMP
    2.19                  }
    2.20                  
    2.21                  int theY = targetY;