Open Bug 434174 Opened 17 years ago Updated 2 years ago

trimmed trailing whitespace inside inline disables vertical alignment quirk, causing misalignment

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

People

(Reporter: florin.dinulescu, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0 After the webside loads the banner, the banner content goes 4 pixels up and the part that exits the screen apears under the banner as it would be sort of repeating itself. Tested www.e-safety.ro on other web browsers too and it looks ok, including mozilla firefox 2.0.And i've noticed the problem repeats on other sites that have flash banners too, i dont know yet if the version of flash matter. If www.e-safety isn't loading, try another site that has flash banner, like http://www.electronica.pub.ro/Home.php. Reproducible: Always Steps to Reproduce: 1.open the website, wait for it to load 2.that's it, the flash banner will apear as i explained Actual Results: - Expected Results: - -
Blocks: 393096
Component: General → Layout
Keywords: regression
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file testcase
It seems to be related to white-space in the <object> element.
Keywords: testcase
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
No explanation for the resolution. Either the specific bug / patch that fixed the browser has not been referenced, or this is really a Tech Evangelism bug.
Resolution: FIXED → WORKSFORME
Floring, the site may have fixed the problem by adjusting their code, but this bug needs to remain open for now. A decision needs to be made if the current behavior on trunk is considered what is wanted or not.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
The <embed> and <object> are inline elements, so you'd expect the <embed> to be baseline-aligned with space below it for the descent of the current font. If you put Martijn's testcase in standards mode that's exactly what you get. I know that in quirks mode we have a specific quirk regarding replaced elements in table cells that eliminates the descent. I'm not sure why that quirk isn't kicking in for the testcase with whitespace, it certainly did in FF2.
The problem is this code: for (PerFrameData* pfd = psd->mFirstFrame; pfd; pfd = pfd->mNext) { if (pfd->GetFlag(PFD_ISTEXTFRAME) && (pfd->GetFlag(PFD_ISNONWHITESPACETEXTFRAME) || preMode || pfd->mBounds.width != 0)) { zeroEffectiveSpanBox = PR_FALSE; break; In the first table of Martijn's testcase, the space after the <embed> is given nonzero width during its reflow. It is not and will never be collapsed with prior whitespace, since the <embed> is immediately before it. It will be *trimmed* because it ends up at the end of the line, but we have no way of knowing that here because we're calling VerticalAlignFrames after we've finished reflowing the span, before we've finished reflowing the line. Therefore I can't see an easy way to fix this bug. We probably shouldn't vertically align spans as we go, but instead vertically align the entire line's frame subtree after reflowing the line. Since this actually gives us standards mode behaviour in more cases, if this isn't breaking much real content then I think we could live with the change. But I'm not sure.
Is the regression because we changed when we do whitespace trimming? Doing all of the vertical alignment at the end makes sense; just don't trip over my patch in bug 118501 (writing some good tests for that is on my list of things to do soon...).
I don't know off the top of my head why this would have worked before. I'd have to debug it in an old build. It might be possible to restructures inline layout to put all vertical alignment at the end without much regression risk ... but it might not. It's not something I want to do right away.
All/All, more details to the summary. Bug 437183 has another (real-world) case of this that appeared following the fix for bug 393096, as well a a testcase (attachment 323749 [details]) demonstrating that the problem existed (in some situations) even before bug 393096 was fixed.
Flags: wanted1.9.1?
OS: Windows XP → All
Hardware: PC → All
Summary: flash banner displayes incorrectly → flash banner displayes incorrectly (whitespace inside inline disables vertical alignment quirk)
Flags: wanted1.9.1?
Flags: wanted1.9.1-
Flags: blocking1.9.1-
Status: REOPENED → NEW
Priority: -- → P3
Summary: flash banner displayes incorrectly (whitespace inside inline disables vertical alignment quirk) → trimmed trailing whitespace inside inline disables vertical alignment quirk, causing misalignment
Component: Layout → Layout: Block and Inline
QA Contact: layout → layout.block-and-inline
Flags: wanted1.9.2-
Flags: blocking1.9.2?
Flags: blocking1.9.2-
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 4 duplicates.
:jfkthame, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jfkthame)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: