Project

General

Profile

Actions

Bug #901

closed

bug: StdGridLayoutImpl.js in 3.1.10

Added by DQ Qin over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
07/14/2011
Due date:
% Done:

0%

Estimated time:

Description

the last change of StdGridLayoutImpl.js make WHBoxLayout with AlignLeft flag has different result than 3.1.9.

and sometimes make javascript crash. see the attachment files.

the only change:

3.1.9

     if (!shallow) {
       p = ch.parentNode;
       w = p.offsetWidth - self.marginH(ch);
       if (self.getColumn(col)) {
     var cw = self.getColumn(col).style.width, cwl = cw.length;
     if (cwl > 0 && cw[cwl-1] == '%') {
       ch.style.position = 'absolute';
       ch.style.width = w+'px';
     }
       }
     }

3.1.10

     if (!shallow) {
       p = ch.parentNode;
       w = p.offsetWidth - self.marginH(ch);

       if (p.className == 'Wt-chwrap') {
     if (!WT.isIE) {
       ch.style.position = 'relative';
       ch = ch.firstChild;
     }
     ch.style.width = w + 'px';
     ch.style.position = 'absolute';
       }
     }

ch.style.width = w + 'px';

sometimes w<0 make javascript crash.

when i restore the StdGridLayoutImpl.min.js of version 3.1.9

the result is correct, and crash never found.


Files

test1.cpp (1.21 KB) test1.cpp DQ Qin, 07/14/2011 04:38 AM
incorrect.gif (3.02 KB) incorrect.gif DQ Qin, 07/14/2011 04:38 AM
correct.gif (3.04 KB) correct.gif DQ Qin, 07/14/2011 04:38 AM
Actions #1

Updated by Koen Deforche over 13 years ago

  • Status changed from New to InProgress
Actions #2

Updated by Koen Deforche over 13 years ago

  • Status changed from InProgress to Resolved
  • Target version set to 3.1.11

Hey,

Good catch. I've fixed this (without reverting to 3.1.9 ;-) )

Regards,

koen

Actions #3

Updated by DQ Qin over 13 years ago

Good job, koen!

Actions #4

Updated by DQ Qin over 13 years ago

Hey, koen

latest git solve the crash.

but do you think the new layout result make sence when WHBoxLayout with AlignLeft flag?

my test1.cpp remain the "incorrect.gif" result!

DQ

Actions #5

Updated by DQ Qin over 13 years ago

sorry,

it's my fault

i don't notice the StdGridLayoutImpl.C also changed.

Regards

DQ

Actions #6

Updated by Koen Deforche about 13 years ago

  • Status changed from Resolved to Closed

Resolved in Wt 3.1.11

Actions

Also available in: Atom PDF