Last Comment Bug 213781 - Floating object rendered vertically incorrectly
: Floating object rendered vertically incorrectly
Status: VERIFIED FIXED
[patch]
: testcase
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: mozilla1.5beta
Assigned To: David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch)
: Hixie (not reading bugmail)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-24 14:48 PDT by MichaelC
Modified: 2003-07-26 08:32 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (2.02 KB, text/html)
2003-07-25 01:50 PDT, Bill Mason
no flags Details
simpler testcase (446 bytes, text/html; charset=UTF-8)
2003-07-25 14:09 PDT, David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch)
no flags Details
patch (2.20 KB, patch)
2003-07-25 14:33 PDT, David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch)
bzbarsky: review+
bzbarsky: superreview+
Details | Diff | Splinter Review

Description MichaelC 2003-07-24 14:48:14 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030516 MSIE/0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030516 /0.6

In the page:
http://customwire.ap.org/dynamic/stories/D/DOWNLOADING_MUSIC?SITE=OHCLE&SECTION=HOME&TEMPLATE=DEFAULT
there is an element rendered incorrectly in terms of vertical positioning.  The
incorrectly rendered object is a grey box, bounded in a thin black line,
containing a couple of advertisements.  The box is rendered as top aligned with
the 5'th paragraph, when it should be aligned with the top of the 6'th
paragraph.  I noticed that this error only because the offending item overlays
some text.

Reproducible: Always

Steps to Reproduce:
Load page, start reading, and the error is almost immediately evident
Comment 1 MichaelC 2003-07-24 14:50:28 PDT
My mistake . . . the useragent should have "Mozilla Firebird" in the name.  I
had to delete that and insert MSIE in order to allow the browser to get to sites
that restrict access to Internet Explorer
Comment 2 Boris Zbarsky [:bz] 2003-07-24 15:02:33 PDT
Hmm.. That content is not actually positioned. It's not clear to me how it ends
up outside its iframe.

What we need here is something like a smallish testcase....
Comment 3 Bill Mason 2003-07-25 01:50:27 PDT
Created attachment 128490 [details]
testcase
Comment 4 Bill Mason 2003-07-25 01:56:34 PDT
I don't understand what's happening either.  But hopefully to help someone, here
are several things, any one of which I find fixes the problem if you pare it out
of the testcase:

1. Delete the top of page IFRAME
2. Remove align=left from the overall containing TABLE
3. Remove the invalid SPAN tag that is wrapped around all the page content
4. Remove the align=right from the TABLE holding the IFRAME that is the point of
contention of this bug report.
Comment 5 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 14:05:34 PDT
Looks like a view positioning problem.  I'm guessing we're not copying
NS_FRAME_HAS_CHILD_WITH_VIEW state bits.
Comment 6 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 14:09:38 PDT
Created attachment 128514 [details]
simpler testcase
Comment 7 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 14:10:18 PDT
(I also wonder why the IFRAME doesn't occupy its full height on the initial reflow.)
Comment 8 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 14:33:35 PDT
Created attachment 128521 [details] [diff] [review]
patch

Fix the bug by setting NS_FRAME_HAS_CHILD_WITH_VIEW correctly.
Comment 9 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 14:41:19 PDT
Never mind the IFRAME stuff -- I think the initial incorrect position is
probably coming from the "unconstrained reflow" or something like that.
Comment 10 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 14:41:55 PDT
Taking.
Comment 11 David Baron :dbaron: ⌚️UTC+2 (mostly busy through August 4; review requests must explain patch) 2003-07-25 15:07:46 PDT
Fix checked in to trunk, 2003-07-25 15:04 -0700.
Comment 12 Bill Mason 2003-07-26 08:32:15 PDT
Verified 2003072604 PC/WinXP

Note You need to log in before you can comment on or make changes to this bug.