Closed Bug 270804 Opened 20 years ago Closed 20 years ago

relatively positioned does not take 100% width until clicked

Categories

(Core :: Web Painting, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: schizoduckie, Assigned: roc)

References

()

Details

(Keywords: testcase)

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 The bug kinda looks like IE's peek-a-boo bug : http://positioniseverything.net/explorer/peekaboo.html If you check out http://www.schizofreend.nl/windowtest/ you'll see some of my DHTML experiments. The bug is in the header part of the 'windows'. The titlebar should as usual fill out over the entire width of the parent element, but it does not until clicked. Please note that the entire site is built dynamically using javascripts. Reproducible: Didn't try Steps to Reproduce: 1. 2. 3. Expected Results: The titlebar of each window should as usual fill out over the entire width of the parent element, but it does not until clicked.
Attached image Bug rendered in browser
This shows the bug in progress
Attached image expected results.
This shows what the page looks like after the 'faulty' elements have been clicked.: The element is expanded as expected.
I have not had the time to break this example down to a bare example, mostly due to lack of time. Please note that the bug doesn't occur in two of the five windows. Why this happens i don't know.
I'm seeing this also with: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041119 Firefox/0.9.1+ A simple example/testcase is needed here.
Attached file Testcase
The window is an absolute positioned div, with no width set (=auto), so the div shrink wraps around the content. When content gets added dynamically, the div gets larger, but the title div doesn't 'grow' along. This does also happen with float:left on .window instead of position: absolute; and with width:100% for .title.
It's clearly a bug in Mozilla, but it might be a duplicate (but I couldn't find one).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Attached patch fixSplinter Review
The problem is that the shrink-wrap logic requires us to mark dirty any lines that need to be reflowed once we know the final width. ReflowBlockFrame and PlaceLine (for inline lines) do this for the blocks and inlines that get reflowed. But if we skip reflowing a line during the first pass, then we won't reflow it during the shrink-wrap fixup pass either. This patch just forces any lines that we skipped reflowing to be reflowed during the shrink-wrap fixup pass. I can't think of a better way right now. Maybe post-reflow-refactoring, this could work better.
Attachment #167066 - Flags: superreview?(dbaron)
Attachment #167066 - Flags: review?(dbaron)
Comment on attachment 167066 [details] [diff] [review] fix Do you need to mark the line dirty, or is just setting the flag enough? If so, maybe we should just get rid of BRS_NEEDRESIZEREFLOW entirely.
Comment on attachment 167066 [details] [diff] [review] fix never mind, I read your comment now. But BRS_NEEDRESIZEREFLOW should probably go anyway, although that could just be part of reflow refactoring.
Attachment #167066 - Flags: superreview?(dbaron)
Attachment #167066 - Flags: superreview+
Attachment #167066 - Flags: review?(dbaron)
Attachment #167066 - Flags: review+
checked in, with an additional comment: // XXX For inlines, we could record in the line box // that HorzontalAlignFrames does not depend on the line width, // and thus we don't have to mark it dirty here
So is this fixed?
Depends on: 277766
Note that that patch caused a regression when moving around position:fixed elements (which it really shouldn't have...). See bug 277766
Sorry, this is fixed ... modulo the regression, which I'll work on there.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Depends on: 297039
Depends on: 301026
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: