Closed
Bug 31257
Opened 25 years ago
Closed 24 years ago
Extra uneeded reflow when combobox drops down
Categories
(Core :: Layout, defect, P3)
Tracking
()
M17
People
(Reporter: rods, Assigned: buster)
Details
(Keywords: perf)
Attachments
(1 file)
(deleted),
text/html
|
Details |
When the user clicks on the combobox it sets an attribute that causes CSS to
change the style attr of the dropdown from collapsed to visible. This generates
an Incremental reflow on the combobox dropdown. This is fine. But for some
reason the block containing the comboxbox thinks its dirty and that it needs to
be reflowed. At times this can be expensive.
The easiest thing to do is to load the attached example, then set a break point
in the AppendReflowCommand in the PresShell. The first stop is fine the second
stop is uneeded.
Note that the block frame that thinks it has dirty children is 0x0117f8ec, and
it is the frame that contains the combobox.
Here is the call stack at that point:
PresShell::AppendReflowCommand(PresShell * const 0x024e5230, nsIReflowCommand *
0x0155d1d0) line 1890
nsFrame::CreateAndPostReflowCommand(nsIPresShell * 0x024e5230, nsIFrame *
0x0117f8ec, nsIReflowCommand::ReflowType ReflowDirty, nsIFrame * 0x00000000,
nsIAtom * 0x00000000 {???}, nsIAtom * 0x00000000 {???}) line 2738
nsBlockFrame::ReflowDirtyChild(nsBlockFrame * const 0x0117f8ec, nsIPresShell *
0x024e5230, nsIFrame * 0x00000000) line 6192 + 21 bytes
nsBlockFrame::Reflow(nsBlockFrame * const 0x0117f8ec, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...},
unsigned int & 0) line 1559 + 34 bytes
nsBlockReflowContext::ReflowBlock(nsIFrame * 0x0117f8ec, const nsRect & {x=0 y=0
width=13380 height=1073741824}, int 1, int 0, int 1, nsMargin & {top=0 right=0
bottom=0 left=0}, unsigned int & 0) line 449 + 45 bytes
nsBlockFrame::ReflowBlockFrame(nsBlockReflowState & {...}, nsLineBox *
0x024fc8e0, int * 0x0012ea44) line 3550 + 59 bytes
nsBlockFrame::ReflowLine(nsBlockReflowState & {...}, nsLineBox * 0x024fc8e0, int
* 0x0012ea44, int 1) line 2863 + 23 bytes
nsBlockFrame::ReflowDirtyLines(nsBlockReflowState & {...}) line 2670 + 27 bytes
nsBlockFrame::Reflow(nsBlockFrame * const 0x0117f864, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...},
unsigned int & 0) line 1589 + 15 bytes
nsAreaFrame::Reflow(nsAreaFrame * const 0x0117f864, nsIPresContext * 0x02478600,
nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...}, unsigned int & 0)
line 272 + 25 bytes
nsContainerFrame::ReflowChild(nsIFrame * 0x0117f864, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...}, int 0,
int 0, unsigned int 0, unsigned int & 0) line 646 + 31 bytes
RootFrame::Reflow(RootFrame * const 0x0117f7ec, nsIPresContext * 0x02478600,
nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...}, unsigned int & 0)
line 331
nsContainerFrame::ReflowChild(nsIFrame * 0x0117f7ec, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...}, int 0,
int 0, unsigned int 1, unsigned int & 0) line 646 + 31 bytes
nsScrollFrame::Reflow(nsScrollFrame * const 0x0117f828, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...},
unsigned int & 0) line 680
nsContainerFrame::ReflowChild(nsIFrame * 0x0117f828, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...}, int 0,
int 0, unsigned int 0, unsigned int & 0) line 646 + 31 bytes
ViewportFrame::Reflow(ViewportFrame * const 0x0117f7b0, nsIPresContext *
0x02478600, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & {...},
unsigned int & 0) line 531
nsHTMLReflowCommand::Dispatch(nsHTMLReflowCommand * const 0x0155a030,
nsIPresContext * 0x02478600, nsHTMLReflowMetrics & {...}, const nsSize &
{width=13380 height=2835}, nsIRenderingContext & {...}) line 145
PresShell::ProcessReflowCommands(PresShell * const 0x024e5230, int 0) line 2056
PresShell::FlushPendingNotifications(PresShell * const 0x024e5230) line 2520
nsComboboxControlFrame::ShowList(nsIPresContext * 0x02478600, int 1) line 539
nsComboboxControlFrame::ToggleList(nsComboboxControlFrame * const 0x0117faa4,
nsIPresContext * 0x02478600) line 1863
nsComboboxControlFrame::ShowDropDown(nsComboboxControlFrame * const 0x0117faf4,
int 1) line 1797
nsListControlFrame::MouseDown(nsIDOMEvent * 0x0153df24) line 2845
nsEventListenerManager::HandleEvent(nsIPresContext * 0x02478600, nsEvent *
0x0012fc1c, nsIDOMEvent * * 0x0012f8d4, unsigned int 7, nsEventStatus *
0x0012fb28) line 758 + 17 bytes
nsGenericElement::HandleDOMEvent(nsIPresContext * 0x02478600, nsEvent *
0x0012fc1c, nsIDOMEvent * * 0x0012f8d4, unsigned int 1, nsEventStatus *
0x0012fb28) line 1010
nsHTMLSelectElement::HandleDOMEvent(nsHTMLSelectElement * const 0x02507b44,
nsIPresContext * 0x02478600, nsEvent * 0x0012fc1c, nsIDOMEvent * * 0x00000000,
unsigned int 1, nsEventStatus * 0x0012fb28) line 1060
PresShell::HandleEvent(PresShell * const 0x024e5234, nsIView * 0x024ff1a0,
nsGUIEvent * 0x0012fc1c, nsEventStatus * 0x0012fb28) line 3019 + 39 bytes
nsView::HandleEvent(nsView * const 0x024ff1a0, nsGUIEvent * 0x0012fc1c, unsigned
int 8, nsEventStatus * 0x0012fb28, int & 0) line 799
nsView::HandleEvent(nsView * const 0x024f97b0, nsGUIEvent * 0x0012fc1c, unsigned
int 8, nsEventStatus * 0x0012fb28, int & 0) line 784
nsView::HandleEvent(nsView * const 0x024f9850, nsGUIEvent * 0x0012fc1c, unsigned
int 8, nsEventStatus * 0x0012fb28, int & 0) line 784
nsView::HandleEvent(nsView * const 0x024e5890, nsGUIEvent * 0x0012fc1c, unsigned
int 28, nsEventStatus * 0x0012fb28, int & 0) line 784
nsViewManager2::DispatchEvent(nsViewManager2 * const 0x024e5b10, nsGUIEvent *
0x0012fc1c, nsEventStatus * 0x0012fb28) line 1216
HandleEvent(nsGUIEvent * 0x0012fc1c) line 69
nsWindow::DispatchEvent(nsWindow * const 0x024ffef4, nsGUIEvent * 0x0012fc1c,
nsEventStatus & nsEventStatus_eIgnore) line 493 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012fc1c) line 514
nsWindow::DispatchMouseEvent(unsigned int 302, nsPoint * 0x00000000 {x=???
y=???}) line 2973 + 21 bytes
ChildWindow::DispatchMouseEvent(unsigned int 302, nsPoint * 0x00000000 {x=???
y=???}) line 3191
nsWindow::ProcessMessage(unsigned int 513, unsigned int 1, long 1572907, long *
0x0012feb8) line 2254 + 24 bytes
nsWindow::WindowProc(HWND__ * 0x09930826, unsigned int 513, unsigned int 1, long
1572907) line 684 + 27 bytes
Here is the frame dump:
webshell=01508190
Viewport(-1)@0117F7B0 [view=024E5890] {0,0,13380,2835} [state=00002014] sc=024F8
B90<
Scroll(-1)@0117F828 [view=024F9850] {0,0,13380,2835} [state=00002004] sc=024F9
AA0<
Root(-1)@0117F7EC [view=024FF1A0] {0,0,13380,2835} [state=00002000] sc=024FF
3A0<
Area(html)(-1)@0117F864 {0,0,13380,2835} [state=000c0014] sc=024FECE0(i=1,
b=1)<
line 024FC940: count=1 state=inline,,,[0x400] {0,0,0,0} <
Text(1)@0117F8B0[0,1,T] next=0117F8EC {0,0,0,0} [state=41000024] sc=0
24FE160<
"\n"
>
>
line 024FC8E0: count=1 state=block,,,[0x402] {120,120,13140,330} <
Block(body)(2)@0117F8EC {120,120,13140,330} [state=00000014] sc=024FCB
B0(i=1,b=1)<
line 02506A90: count=3 state=inline,,,trimmed[0xc08] {0,0,1260,330}
<
Text(0)@0117F934[0,1,T] next=0117FAA4 {0,330,0,0} [state=41000024
] sc=024FB480<
"\n"
>
ComboboxControl(select)(1)@0117FAA4 next=0117FED8 {0,0,1260,330} [
state=00010034] sc=02504CE0(i=1,b=0)<
line 02501E50: count=1 state=inline,,,[0x400] {30,30,240,270} <
ButtonControl(input)(-1)@0117FD24 {990,30,240,270} [state=0000
04a4] sc=02501810<
Area(input)(-1)@0117FDCC {75,195,0,0} [state=00090004] sc=02
503620(i=1,b=0)<
line 02503460: count=1 state=inline,,,[0x400] {0,0,0,0} <
Text(-1)@0117FE18[0,2,T] {0,0,0,0} [state=41000024] sc=
0155FC00<
" "
>
>
>
>
>
Popup-list<
Scroll(select)(1)@0117FB88 [view=02504080] {0,330,1200,300} [s
tate=00002014] sc=0155E340<
Area(select)(1)@0117FC54 [view=02502A40] {30,30,1140,240} [s
tate=00012000] sc=0155F430(i=0,b=1)<
line 02501EB0: count=1 state=block,,,[0x402] mew=840 {0,0,
1140,240} <
Block(option)(0)@0117FCA0 {0,0,1140,240} [state=00000004
] sc=0155C720(i=1,b=0)<
line 02501FC0: count=1 state=inline,,,[0x400] mew=795
{45,0,795,240} <
Text(0)@0117FCE8[0,8,T] {45,0,795,240} [state=40000
024] sc=0153A560<
"One Fish"
>
>
>
>
>
>
>
>
Text(2)@0117FED8[0,1,T] next=0117F970 {1260,105,0,285} [state=600
00024] sc=024FB480<
"\n"
>
>
line 02505C20: count=1 state=block,,,[0x402] {0,330,0,0} <
TableOuter(table)(3)@0117F970 {0,330,0,0} [state=00000004] sc=024F
A1F0<
Table(table)(3)@0117F9C4 {0,0,0,0} [state=00000004] sc=024FA1F0<
Block(form)(0)@0117FA30 {0,0,0,0} [state=00000004] sc=025002D0
(i=0,b=0)<
>
>
>
>
>
>
>
>
>
>
Reporter | ||
Comment 2•25 years ago
|
||
Reporter | ||
Comment 3•25 years ago
|
||
I forgot to mention that you do not even have to select anything. This happens
when the list is being dropped down and then again when it is popped up.
Reporter | ||
Comment 4•25 years ago
|
||
This is a performance issue, it causes dropsdowns to act slowly
Comment 5•25 years ago
|
||
Is this seen also my testcase to other bug?
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=6164
When you drop down leftmost combobox, its gets a bit wider and
others shift right. This doesnt happen on first row, and only on
leftmost column.
*** This bug has been marked as a duplicate of 15155 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•