Closed Bug 92143 Opened 23 years ago Closed 23 years ago

resizing the browser window distorts the layout

Categories

(Core :: Layout: Tables, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.5

People

(Reporter: madhur, Assigned: alexsavulov)

References

()

Details

(Keywords: testcase, top100, topembed, Whiteboard: bugscape 10403)

Attachments

(6 files)

buildid: 20010724 window2000

1. go to http://www.hotmail.com
2. resize the window

actual:
you will notice that the layout of the page gets distorted. The right hand side 
table overlaps the left hand side table.
Please view the screen shot I have attached.

NOTE: This bug can be seen in neither Netscape 4.77 nor Netscape 6.01.
But I see this layout distortion problem right from Netscape 6.1 Preview 
release onwards.
This is will directly affect the user experience. Therefore should be looked 
into with the hightest urgency.
Attached image screen shot
Attached file Testcase
Component: Layout → HTMLTables
Keywords: testcase, top100
QA Contact: petersen → amar
Adding kw testcase,top100 and -> HTMLTables
Seems to be a NOWRAP issue again.
*** Bug 92185 has been marked as a duplicate of this bug. ***
Over to attinasi while karnaze is out.
Assignee: karnaze → attinasi
adding keyword 'topembed' - corresponding bugscape bug 
http://bugscape.mcom.com/show_bug.cgi?id=7897.

I will be attaching another reduced testcase also.
Keywords: topembed
Attached file reduced testcase
WFM, recent linux CVS build.
The second testcase works fine, but the first testcase and the actual URL still
do not work. It looks like a cell with a specified width and NOWRAP is allowed
to shrink below the specified width, and is allowed to wrap as well (?). Same
problem on Linux ans Win2K

Looks like a table bug to me... cc'in Alex so he can check it out.
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla0.9.5
ressigning to me
Assignee: attinasi → alexsavulov
when we rebalance the table after the initial reflow, we have to keep the fixed
width on a width cell even though the available width falls below the fixed
width of the cell.
that means that in quirks mode we have to check for nowrap on a fixed width cell
and change the way rebalancing column widths works (honour the width request) to
emulate the IE behaviour. (BTW: Opera does the same we do at the moment)
the proposed patch [attachment 49291 [details] [diff] [review]] fixes the URL hotmail.com.
 
in this patch in the case of a fixed width cell, I check for quirks mode and
then  I check the HTML content for the nowrap attribute. I cannot check the cell
frame be cause we don't map nowrap if there is a fixed width on the cell. one
may propose to map the nowrap so we don't have to check the content, but this
would result in displaying the text in a sigle line and this is not what the
effect of the pach is intended to be. IE/NAV use the nowrap attribute as a hint
for not resizing (shrinking) the cell bellow the fixed width size. 

the patch is not perfect be cause if i add a procentage cell on the same row, 

  <tr>
   <td width="312" nowrap>...</td>
   <td width="50%"></td>
  </tr>

this will cause the WIDTH="..." of the fixed width cell to be ignored. IE/NAV
keep the width of the fixed width cell (that also has nowrap on it) even then
when the adjacent cell has a procentage width on it while resizing.

anyway, with the proposed patch mozilla performs better than what we did before
in quirks mode and repairs a top100/topembed issue

need r/sr=
Status: NEW → ASSIGNED
modified the first patch. moved to nsTableCellFrame as proposed by Chris Karnaze.

the new patch is testing for the following conditions to modify the min width
(max element size) of a cell:

- the cell has to have either width="[number]" or width: [number]px | cm | em...
- the cell does not have white-space: nowrap | pre
- the cell has nowrap in the tag (not mapped but still visible in the content)

then the max element size is set to the value of the fixed width.

need sr=/r=
Comment on attachment 49958 [details] [diff] [review]
moved patch from BasicTableLayoutStrategy to nsTableCellFrame

You do not need to call get() on cellContent, just use the operator -> like cellContent->GetAttr(...)

check the result via NS_SUCCEEDED(result) instead of comparing to NS_OK.

Those two nits, and a review from karnaze and sr=attinasi
Attachment #49958 - Flags: superreview+
r=karnaze, assumming it passes the table regression tests.
Actually, check the documentation for GetAttr, it says:

 * <LI>If the attribute is not set and has no default value, return
 * NS_CONTENT_ATTR_NOT_THERE.
 * <LI>If the attribute exists, but has no value, return
 * NS_CONTENT_ATTR_NO_VALUE.
 * <LI>If the attribute has a non-empty value, set ret to
 * be the value, and return NS_CONTENT_ATTR_HAS_VALUE (== NS_OK).

So for NOWRAP, I think you need to check for NS_CONTENT_ATTR_NO_VALUE and for
NS_CONTENT_ATTR_HAS_VALUE. Please disregard what I said before about checking
for NS_SUCCESS, it is incorrect for this call.
Attachment #50006 - Flags: superreview+
Attachment #50006 - Flags: review+
we (Marc and I) agreed subsequently that checking 

NS_CONTENT_ATTR_NOT_THERE != result

is sufficient in this case
*** Bug 93318 has been marked as a duplicate of this bug. ***
*** Bug 95936 has been marked as a duplicate of this bug. ***
The patch has been checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 89427 has been marked as a duplicate of this bug. ***
I can still see the bug on win2000 -- buildID : 2001-10-16-05-0.9.4 (branch 
build)
this needs PDT+ approval to be checked into the branch (work in progress)
was this present in Netscape 6.1?
was this present in Netscape 6.1?
yes, the bug is present in Netscape 6.1
amar: can you verify that this bug was fixed on the trunk? Thanks
Keywords: edt0.9.4
Whiteboard: bugscape 10403
 The checkins fixed the problem. verified on build ID : 2001103103- Trunk
Platforms: WIN2K and redhat linux 7.1
Status: RESOLVED → VERIFIED
please land on the 0.9.4 branch and mark it w/ the "fixed0.9.4" keyword once
it's landed there.
Keywords: edt0.9.4edt0.9.4+
fixed on branch 0.9.4 (+ fix for bug 101883 that had to go with this fix)
Keywords: fixed0.9.4
 Verified.. Fixed on branch 0.9.4ec build Id: 2002011320. Adding "verified0.9.4" 
keyword
Keywords: verified0.9.4
Keywords: fixed0.9.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: