Closed Bug 368622 Opened 19 years ago Closed 19 years ago

::before { display: inline-block; } behaves like display: block;

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha2

People

(Reporter: hsivonen, Assigned: dbaron)

References

()

Details

(Whiteboard: [patch])

Attachments

(3 files, 1 obsolete file)

Build ID: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a2pre) Gecko/20070129 Minefield/3.0a2pre Steps to reproduce: 1) Load http://hsivonen.iki.fi/test/before-inline-block.html Expected results: Expected the number 1 to be on the same line as Foo and 2 on the same line as Bar. Actual results: The numbers occupy lines of their own.
Attached file simple testcase
I see this with winXP Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070129 Minefield/3.0a2pre
Attached patch partial patch (obsolete) — Splinter Review
I'd expect this to work, but the 'width:3em;' doesn't, and I also get some assertions in nsLayoutUtils::ComputeWidthDependentValue.
So nsCSSFrameConstructor::CreateGeneratedContentFrame needs to call ConstructFrameByDisplayType, although I'm not sure whether that alone makes the necessary anonymous table objects (inside and outside)...
Attached patch patchSplinter Review
This takes the simple approach; I think attacking allowing arbitrary 'display', 'position', 'float', and 'overflow' for generated content needs to wait for a redesign of frame construction.
Assignee: nobody → dbaron
Attachment #253410 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #253677 - Flags: superreview?(bzbarsky)
Attachment #253677 - Flags: review?(bzbarsky)
OS: Mac OS X → All
Priority: -- → P3
Hardware: Macintosh → All
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9beta
Comment on attachment 253677 [details] [diff] [review] patch Looks fine, but shouldn't you pass the SPACE_MGR and MARGIN_ROOT flags in the inline-block case?
Attachment #253677 - Flags: superreview?(bzbarsky)
Attachment #253677 - Flags: superreview+
Attachment #253677 - Flags: review?(bzbarsky)
Attachment #253677 - Flags: review+
Checked in to trunk, with the flag-setting.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9 M8 → mozilla1.9alpha2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: