Closed Bug 266685 Opened 20 years ago Closed 19 years ago

XTFVisual using div's are not laid out properly

Categories

(SeaMonkey :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: allan, Assigned: alex)

References

()

Details

Attachments

(1 file)

I create an XTFVisual element, that uses a XHTML DIV tag as VisualContent and InsertionPoint. I then have two of these right after each other. The first get shown correctly, but the following is rendered badly in the far right side of the browser window.
Attached file Example file (deleted) —
Here is an example using the <group> element from https://bugzilla.mozilla.org/show_bug.cgi?id=265216 If you enter some text inbetween the two <xforms:group> tags, both are rendered correctly.
Blocks: 265216
Blocks: 264329
You want to create a block type box, but by default boxes are inline. So XTF creates an inline box which then has a block box (the div element) as a child. Apparently something goes wrong there. XTF code doesn't handle properly block-inside-inline cases. One way to fix this problem (temporarily) is to set the box type of the group: @namespace xf url("http://www.w3.org/2002/xforms"); xf|group { display: block; }
Depends on: 266772
Blocks: 269132
No longer blocks: 264329
Product: Browser → Seamonkey
We can fix it permanently by installing our own stylesheet, using the approach in bug 179006.
Depends on: 179006
Summary: XTFVisual using div's are not layouted properly → XTFVisual using div's are not laid out properly
Blocks: 264329
*** Bug 277440 has been marked as a duplicate of this bug. ***
> So XTF creates an inline box which then has a block box (the div element) as > a child. Apparently something goes wrong there. XTF code doesn't handle > properly block-inside-inline cases. I believe that block-inside-inline is not permitted by HTML, so are you sure this is really XTF specific? perhaps the XTF API should give the implementor the ability to specify block vs. inline. From section 7.5.3 of the HTML 4.01 specification: Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline elements may contain only data and other inline elements.
> I believe that block-inside-inline is not permitted by HTML This is CSS block and inline, not HTML block and inline. In CSS, you can have a block child of an inline. The HTML thing is a parse-time constraint, not a layout-time one. XTF is parsed as XML, not by HTML rules, no?
bz: very interesting, thanks for the info. XTF is parsed as XML, yes. i was assuming XHTML inherited the same rule from HTML.
No, XHTML is parsed as XML; any tag is allowed to contain any other tag (eg <img> can contain kids).
We solved this a long time ago, isn't this INVALID?
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: