Closed
Bug 244117
Opened 21 years ago
Closed 21 years ago
a table cell containing <script> tag spreads to the width of a table
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
RESOLVED
DUPLICATE
of bug 234593
People
(Reporter: hsaito54, Unassigned)
References
Details
Attachments
(3 files, 3 obsolete files)
546 bytes,
text/html
|
Details | |
20.97 KB,
image/jpeg
|
Details | |
897 bytes,
patch
|
Details | Diff | Splinter Review |
There are the following two problems which have a common cause.
1. a table cell containing <script> tag spreads to the width of a table.
2. a table cell containing <script> tag shrinks and causes some funny text
wrapping on the bonsai query page.
In the first case, when measuring the contents of the first cell, the contents
of the second cell were empty.
This problem was reported by Bugzilla-jp
http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=3700
actual testcase:
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2157&action=view
simple testcase:
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2214&action=view
In the second case, when measuring the contents of the first cell, the contents
of the first cell were short like the following texts.
Modify Query
Mail everyone on this page (12 people)
This problem was repored at Bug 232838.
http://bugzilla.mozilla.org/show_bug.cgi?id=232838#c20
Refer to following screen shot.
http://bugzilla.mozilla.org/attachment.cgi?id=143915&action=view
I think that this problem is regression of attachment 131205 [details] [diff] [review] of Bug 210269.
Reporter | ||
Comment 1•21 years ago
|
||
Reporter | ||
Comment 2•21 years ago
|
||
![]() |
||
Comment 3•21 years ago
|
||
As long as we don't check that second patch in no matter what.... ;)
Reporter | ||
Comment 4•21 years ago
|
||
What I meant with the second patch is to prevent from flushing the notification
in the script processing by the next program in nsPresShell.cpp.
// force flushing of any pending notifications
mDocument->BeginUpdate(UPDATE_ALL);
mDocument->EndUpdate(UPDATE_ALL);
![]() |
||
Comment 5•21 years ago
|
||
Yeah, well... that code should arguably be removed -- there's no reason for
presshell to flush content before reflow.
Currently, there is a reason: in some places we set attributes during reflow,
and if that causes a content flush which causes a reframe, deleting frames we're
in the middle of reflowing, we crash nastily. If we get rid of all attribute
setting during reflow, then we can not flush, but we're some ways away from that.
These are just table incremental reflow bugs, aren't they? We should be able to
cope with content flushing and reflow at any point during load.
A reflow log and discussion what is going on might be a good idea. I don't think
that the current patch is correct.
![]() |
||
Comment 8•21 years ago
|
||
I don't think Hideo Saito is claiming the patches are correct (hence "test
patch")...
Reporter | ||
Updated•21 years ago
|
Attachment #148907 -
Attachment is obsolete: true
Reporter | ||
Updated•21 years ago
|
Attachment #148908 -
Attachment is obsolete: true
Reporter | ||
Comment 9•21 years ago
|
||
Reporter | ||
Comment 10•21 years ago
|
||
Reporter | ||
Comment 11•21 years ago
|
||
Reporter | ||
Comment 12•21 years ago
|
||
For the testcase of for a first cell shrinks, its structure is simplified as
follows. It seems that a <br> and an incremental reflow are related.
<b>text<br>text<script src=""></script>text</b>
Reporter | ||
Comment 13•21 years ago
|
||
The first cell width is set by an incremental reflow without |NeedStrategyInit|
is set to true by |nsTableRowFrame::AppendFrames| that is
|nsTableRowFrame::AppendFrames| is called after an incremental reflow. If the
NS_FRAME_IS_DIRTY bit of |mState| does not set, |resetComputedWidth| should be
set to true, however
its pass2 is not desired.
This patch is added to the patch of attachment 150077 [details] [diff] [review] on Bug 237366.
Comment 14•21 years ago
|
||
Won't that patch create a situation where a table cell will be reflown with an
unconstrained computed size but there is no guarantee that a second reflow will
be issued?
Comment 15•21 years ago
|
||
When I remove the overflow hidden from attachment 150623 [details] the rendering changes
dramatically. This makes me wonder whether the patch is targetting the correct
place. Hideo can you provide a testcase without the overflow style? And as I
stated in comment 7 a reflow log discussion for this case would be good.
Reporter | ||
Comment 16•21 years ago
|
||
In the case of attachment 150623 [details], a scrollable frame is necessary, but its
overflow does not need hidden.
In the case of attachment 150623 [details], |nsFrameManager::AppendFrames| calls following
functions and an incremental reflow is proceeded. I think it is cause that
|resetComputedWidth| is false in first incremental reflow.
nsBlockFrame::AppendFrames
nsBlockFrame::AppendFrames
nsInlineFrame::AppendFrames
nsBlockFrame::AppendFrames
nsTableFrame::Reflow, eReflowReason_Incremental, resetComputedWidth is false
nsBlockFrame::AppendFrames
nsTableRowFrame::AppendFrames
nsBlockFrame::AppendFrames
nsTableFrame::Reflow, eReflowReason_Incremental, resetComputedWidth is true
If second <script> tag is suppressed, the first cell width does not spread.
nsBlockFrame::AppendFrames
nsBlockFrame::AppendFrames
nsInlineFrame::AppendFrames
nsBlockFrame::AppendFrames
nsTableRowFrame::AppendFrames
nsBlockFrame::AppendFrames
nsTableFrame::Reflow, eReflowReason_Incremental, resetComputedWidth is true
Component: Layout → Layout: Tables
QA Contact: core.layout → core.layout.tables
Comment 17•21 years ago
|
||
So one needs that overflow that creates a scrollable frame to reproduce the problem.
resetComputedWidth is true either
aTableFrame.NeedStrategyInit()
aTableFrame.NeedStrategyBalance
are true.
Are they true if no scrollable frame is involved? They usually become true if
the MEW of the cell content changes. Are you sure that the code does not suffer
from the code path:
http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsBoxFrame.cpp#894
which seems very wrong to me.
(With reflow log I mean
http://lxr.mozilla.org/seamonkey/source/layout/doc/frame_reflow_debug.html)
Reporter | ||
Comment 18•21 years ago
|
||
If its frame's overflow is visible, the first cell width does not spread,
because |nsBoxFrame::Reflow| is not called from |nsGfxScrollFrame::Reflow|
although resetComputedWidth is false.
Reporter | ||
Comment 19•21 years ago
|
||
Comment on attachment 150624 [details]
testcase for a first cell shrinks
This problem had been already fixed on trunk by patch of Bug 238472, although I
checked it using a build from the source of released mozilla-1.7rc2.
Attachment #150624 -
Attachment is obsolete: true
Comment 20•21 years ago
|
||
Hideo, does that mean the bug is wfm for you? If yes could you mark so.
Reporter | ||
Comment 21•21 years ago
|
||
I reported following two problems. The later problem(2.) is wfm, however the
former problem(1.) still remains.
> 1. a table cell containing <script> tag spreads to the width of a table.
> 2. a table cell containing <script> tag shrinks and causes some funny text
> wrapping on the bonsai query page.
Reporter | ||
Comment 22•21 years ago
|
||
*** This bug has been marked as a duplicate of 234593 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•