XTFVisual using div's are not laid out properly

RESOLVED WORKSFORME

Status

SeaMonkey
General
RESOLVED WORKSFORME
14 years ago
13 years ago

People

(Reporter: Allan Beaufour, Assigned: Alex Fritze)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
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.
(Reporter)

Comment 1

14 years ago
Created attachment 163828 [details]
Example file

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.
(Reporter)

Updated

14 years ago
Blocks: 265216
(Reporter)

Updated

14 years ago
Blocks: 264329

Comment 2

14 years ago
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;
}
(Reporter)

Updated

14 years ago
Blocks: 269132
(Reporter)

Updated

14 years ago
No longer blocks: 264329
Product: Browser → Seamonkey
(Reporter)

Comment 3

14 years ago
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
(Reporter)

Updated

14 years ago
Blocks: 264329
(Reporter)

Comment 4

14 years ago
*** Bug 277440 has been marked as a duplicate of this bug. ***

Comment 5

14 years ago
> 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?

Comment 7

14 years ago
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).
(Reporter)

Comment 9

13 years ago
We solved this a long time ago, isn't this INVALID?
(Reporter)

Updated

13 years ago
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.