Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12078 closed defect (fixed)

Chrome: Gui.html test failure

Reported by: Douglas Hays Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

Run dijit/tests/layout/robot/Gui.html in Chrome 8/WinXP.
The first test fails consistently:

GROUP "API" has 1 test to run
failed with hint: 
	center inside embeddedBC{"x":310,"y":266,"w":454,"h":0}{"x":310,"y":257,"w":454,"h":8}			
FAILED test: initialConditions 4 ms

Change History (5)

comment:1 Changed 9 years ago by bill

Thanks. Hmm, I'm seeing something similar, on my PC the "Info" tab slightly overlaps the ContentPane above it, and the draggable splitter is also too high (compared to the bottom of that ContentPane). So there are panes actually overlapping, and it's not because of lack of viewport size either.

comment:2 Changed 9 years ago by bill

This is an architectural problem with BorderContainer, nothing particular to do with chrome.

At the beginning of _layoutChildren(), it queries the height of the top and bottom panes:

topHeight = changedRegion == "top" ? changedRegionSize : dojo._getMarginSize(this._top).h;
...

Then much later on, it changes the width of the top and bottom panes:

if(sidebarLayout){
	topStyle.left = bottomStyle.left = leftWidth + leftSplitterThickness + pe.l + "px";
	topStyle.right = bottomStyle.right = rightWidth + rightSplitterThickness + pe.r + "px";
}else{
	topStyle.left = bottomStyle.left = pe.l + "px";
	topStyle.right = bottomStyle.right = pe.r + "px";
}

In this test case (depending on viewport size and font/font size), the top pane of the "bottomSplit" BorderContainer has a bunch of text that all fits into one line. However, after the width of the pane is changed (reduced by 10px, to account for the padding of the BorderContainer), that text overflows to two lines, thus increasing the height of the top pane.

The order of operations is incorrect.

This would be fixed by #11030, or perhaps there's a more minimal change to get it working.

comment:3 Changed 9 years ago by bill

Resolution: fixed
Status: newclosed

(In [23340]) Convert BorderContainer to use dijit.layout.layoutChildren() rather than custom layout code. Refs #11030, fixes #12078 !strict.

comment:4 Changed 9 years ago by bill

(In [23346]) Get ExpandoPane working again after [23276] (refs #11816) and [23340] (refs #12078), !strict.

Reintroduced separate ContentPane._layoutChildren() method since ExpandoPane was referencing it and other classes might be theoretically referencing it too.

comment:5 Changed 9 years ago by bill

(In [23380]) Fix [23340] regression where you can't see the splitters being dragged when liveSplitters=false. Refs #11030, fixes #12078 !strict.

Note: See TracTickets for help on using tickets.