Closed
Bug 154780
Opened 24 years ago
Closed 24 years ago
accessing "document.body.clientHeight" while layout causes layoutproblems
Categories
(Core :: Layout: Tables, defect, P3)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: bugzilla, Assigned: bernd_mozilla)
References
Details
(Keywords: testcase, Whiteboard: [PATCH])
Attachments
(4 files, 2 obsolete files)
|
6.20 KB,
text/plain
|
Details | |
|
3.10 KB,
text/plain
|
Details | |
|
3.26 KB,
patch
|
alexsavulov
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
|
6.06 KB,
patch
|
karnaze
:
review+
karnaze
:
superreview+
jesup
:
approval+
|
Details | Diff | Splinter Review |
this is causing big problems at our portal (largest portal in Denmark)
I've narrowed it down to two small files. Please load and compare these two files:
http://gemal.dk/test/opasia2.html
http://gemal.dk/test/opasia.html
which layout diffently!
The difference in those two files is:
<script>
var i = document.body.clientHeight;
</script>
I dont do anything with clientHeight. I just access it.
It seems that accessing clientHeight *while* the page layouts causes the page to
layout differently. Is it due to some reflow stuff??
If I access clientHeight when the page has finish loading as in:
http://gemal.dk/test/opasia3.html
it layout ok.
2002062713 on Windows 2000
Comment 2•24 years ago
|
||
tables bug. The access causes a flush and reflow to make sure the height is up
to date, and the tables code seems to not deal well..
Assignee: attinasi → karnaze
Component: Layout → HTMLTables
OS: Windows 2000 → All
QA Contact: petersen → amar
Hardware: PC → All
as visible from the attached reflow log the culprit is the wrong maxElementsize
(MES) reported back from the block layout code. ( the log has been created as
described in
http://lxr.mozilla.org/seamonkey/source/layout/doc/frame_reflow_debug.html)
cell 02511794 r=1 a=8880,UC c=8850,UC cnt=890
block 025138AC r=1 a=8850,UC c=8850,UC cnt=891
block 02513BCC r=1 a=8850,UC c=1500,UC cnt=892
text 02513CA0 r=2 a=UC,UC c=UC,UC cnt=893
text 02513CA0 d=900,285 me=840
text 02514514 r=0 a=UC,UC c=UC,UC cnt=894
text 02514514 d=0,0 me=0
text 02513CA0 r=2 a=1500,UC c=UC,UC cnt=895
text 02513CA0 d=900,285
text 02514514 r=2 a=600,UC c=UC,UC cnt=896
text 02514514 d=0,0
block 02513BCC d=1500,300 me=1500 m=840
text 02514558 r=0 a=UC,UC c=UC,UC cnt=897
text 02514558 d=0,0 me=0
text 02514558 r=2 a=8850,UC c=UC,UC cnt=898
text 02514558 d=0,0
block 025138AC d=8850,300 me=8850 m=8190 !!!!!!!
cell 02511794 d=8880,330 me=8880 m=8880
while on first reflow it returns:
block 025138AC d=1500,300 me=1500
cell 02511794 d=1530,330 me=1530
and as usual when the block code spoils the MES calculation table-layout suffers
nsBlockFrame::ReflowLine block 02A8B738 line 02A8B90C setting
aLine.mMaxElementWidth to 44611444
looks pretty much like an unitialized use of mMaxElementSize
Updated•24 years ago
|
Priority: -- → P2
just my next debug step:
http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsBlockFrame.cpp#2589
mBounds.XMost() has already the unitialized value.
The patch still needs to be qualified, I did not run the regression tests yet.
Comment 10•24 years ago
|
||
The first part of the patch looks fine, but the change to nsTableRowFrame is
covering up a block bug. On cnt=116, the cell block is return m=8130, which is
too big.
rowG 02FF7D08 r=1 a=8910,UC c=8910,UC cnt=110
row 02FF7E94 r=1 a=8910,UC c=8910,UC cnt=111
cell 03005DDC r=0 a=UC,UC c=UC,UC cnt=112
block 03005E3C r=0 a=UC,UC c=UC,UC cnt=113
block 03005E3C d=315,300 me=315
cell 03005DDC d=375,360 me=375
cell 02FF8060 r=1 a=8850,UC c=8790,UC cnt=115
block 03004F40 r=1 a=8790,UC c=8790,UC cnt=116
block 03004F40 d=8790,330 me=1530 m=8130
cell 02FF8060 d=8850,390 me=1590 m=8190
row 02FF7E94 d=8910,390
rowG 02FF7D08 d=8910,390
Status: NEW → ASSIGNED
Priority: P2 → P3
Target Milestone: --- → mozilla1.2alpha
Comment 11•24 years ago
|
||
Oh, I take that back. I didn't see the computed value in
cell 02FF8060 r=1 a=8850,UC c=8790,UC cnt=115
which is causing the problem.
Comment 12•24 years ago
|
||
The regression tests need to be run.
Attachment #94141 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•24 years ago
|
||
taking the bug
Assignee: karnaze → bernd.mielke
Status: ASSIGNED → NEW
| Assignee | ||
Comment 14•24 years ago
|
||
the patch together with the patch for bug 162691 produces a regression when
printing
http://lxr.mozilla.org/seamonkey/source/layout/html/tests/table/printing/bug153785-1.html
:-(
| Assignee | ||
Comment 15•24 years ago
|
||
If I remove the aTableFrame.NeedStrategyBalance() then the page prints
correctly. I will discuss this with Chris when he is back from vacation.
Comment 16•24 years ago
|
||
Attachment #94339 -
Attachment is obsolete: true
Attachment #97692 -
Flags: superreview+
Comment 17•24 years ago
|
||
Comment on attachment 97692 [details] [diff] [review]
revised patch to not skip calculation if the table will be balanced
sr=kin@netscape.com
Comment 18•24 years ago
|
||
Comment on attachment 97692 [details] [diff] [review]
revised patch to not skip calculation if the table will be balanced
r= alexsavulov
Attachment #97692 -
Flags: review+
Comment 19•24 years ago
|
||
The patch is in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Regarding the change to nsBlockReflowContext -- you should never be seeing
null-unit margins in computed style data. That explicitly disagrees with the
comment in nsStyleStruct.h (and it also doesn't make sense -- we already allow
the auto unit):
nsStyleSides mMargin; // [reset] length, percent, auto, inherit
Were you actually seeing such margins in the style data? In what testcase? (I
think that change is incorrect and should be reversed and the cause of a
null-unit margin should be fixed, or at the very least the purpose of such a
thing should be documented in nsStyleStruct.h.)
Filed comment 20 as bug 166588.
Comment 22•24 years ago
|
||
Updated•24 years ago
|
Attachment #98447 -
Flags: superreview+
Attachment #98447 -
Flags: review+
Comment 23•24 years ago
|
||
Reopening after moving the better patch over from bug 166577.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•24 years ago
|
Status: REOPENED → ASSIGNED
Whiteboard: [PATCH]
Comment 24•24 years ago
|
||
Comment on attachment 98447 [details] [diff] [review]
more efficient patch from bug 166577 to be applied over previous one
a=rjesup@wgate.com
Attachment #98447 -
Flags: approval+
Comment 25•24 years ago
|
||
The 2nd patch is in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
The second patch caused a major regression on many cnn.com pages. See bug
169620, particularly bug 169620 comment 42.
You need to log in
before you can comment on or make changes to this bug.
Description
•