Closed Bug 237734 Opened 20 years ago Closed 20 years ago

Failure to display content with certain combination of background-attachment: fixed, vertical-align, and <a>


(Core :: Layout, defect, P2)






(Reporter: bugzilla, Assigned: bernd_mozilla)




(Keywords: regression)


(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040311 Firefox/0.8 StumbleUpon/1.9 (BlueFyre)
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040311 Firefox/0.8 StumbleUpon/1.9 (BlueFyre)

On official 0.8, it renders fine, showing some text, a linked image, then some
more text.
On builds of 0.8 made in the last few days, nothing appears. Sometimes it
appears very briefly and then disappears when the page stops rendering. Yet the
text is considered to be there, as the cursor changes when you hover over it.

I found 3 ways of getting it to work on the newer builds, which implies a
complex relationship:
- commenting out the background-attachment: fixed part of the 'broken' class's style
- changing vertical-align: on the image from bottom to default (top seemed to be
broken too)
- removing the <a> tag surrounding the image. 

Reproducible: Always
Steps to Reproduce:
1. Open test case at

Actual Results:  
Nothing visible in browser window.

Expected Results:  
Displayed some text, with a hyperlinked graphic in the middle.

Also confirmed on NT 5.1 (XP?) and Linux.  (See mozillazine link above.)

Some more complex variations of this problem (eg. where the block element has an
absolute size) seem to continue to show the fixed background but the text is
invisible. I expect this is a variation on the same bug but I don't have a
minimal test case for that.
Do you know the exact day it regressed?
I'm not sure, but it was probably 2 or maybe even 3 weeks ago. I was seeing the
symptoms for quite a while before I took the time to isolate the problem and
generate the test case.
This regressed between 2004-02-27 and 2004-02-28 (main changes in that timeframe
are bug 53966, bug 235778 and bug 229371). Backing out the changes from bug
235778 seem to solve the problem.
Assignee: firefox → nobody
Component: General → Layout
Ever confirmed: true
Keywords: regression
OS: Windows 98 → All
Product: Firefox → Browser
QA Contact: core.layout
Version: unspecified → Trunk
Assignee: nobody → roc
Priority: -- → P2
Attached patch fixSplinter Review
The following sequence happens during incremental reflow in
-- We incrementally reflow the row
  -- which reflows the cell (getting an empty overflow area for the cell, since
the cell defers overflow calculation to until VerticallyAlignChild is called)
  -- and does FinishReflowChild on the cell which sets its view to the overflow
area, which is empty
-- we choose not to call DidResize on the table row, because the height did not
change, here:

This is bad; we were relying on DidResize to call VerticallyAlignChild to set
the cell's overflow area and resynchronize the view.
-- Result: the view remains empty and the cell disappears.

This patch solves the problem by preserving the old overflow area for the cell
in nsTableCellFrame::Reflow. If incremental reflow skips DidResize, we
basically assume the overflow area hasn't changed.

This is very low risk and clearly better than what we have now --- suitable for
1.7. However I'm not sure it's a complete fix since incremental reflow could
change the overflow area without changing the actual cell height, and I think
in that case we would fail to record the changed overflow area. A full fix
might be to call DidResize whether the cell height changed or not, but that
might be a bit riskier. Let's see what bernd says.
Attachment #144887 - Flags: superreview?(dbaron)
Attachment #144887 - Flags: review?(bernd.mielke)
I don't think we need this patch. Robert the patch that you r/sr'ed in bug
230730 looks more compact and does fix the testcase.
Depends on: 230730
The patch in bug 230730 does NOT fix this bug. I tried it.
We oughta be able to fix this layout regression for 1.7.
Flags: blocking1.7?
Attached patch patchSplinter Review
This patch is identical to the thing that I just checked in, that is used in
VerticalAlignChild. The patch for bug 230730 fixes the url in this bug on
initial load (that should be a lesson for me to use still the viewer.exe :-().
With this patch I can even reload the testcase and the content does not vanish.
Robert could you please retest.
Attachment #144887 - Flags: superreview?(dbaron)
Attachment #144887 - Flags: review?(bernd.mielke)
Comment on attachment 144941 [details] [diff] [review]

Indeed, this is the right fix. bernd, you're a hero!
Attachment #144941 - Flags: superreview+
Attachment #144941 - Flags: review+
Attachment #144941 - Flags: approval1.7?
taking for checkin.
Assignee: roc → bernd_mozilla
Comment on attachment 144941 [details] [diff] [review]

a=chofmann for 1.7
Attachment #144941 - Flags: approval1.7? → approval1.7+
fix checked in
Closed: 20 years ago
Resolution: --- → FIXED
Flags: blocking1.7?
You need to log in before you can comment on or make changes to this bug.