Closed Bug 413195 Opened 17 years ago Closed 17 years ago

Warning: XUL box for a element contained an inline #text child, forcing all its children to be wrapped in a block.

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: matt, Assigned: dbaron)

References

()

Details

(Keywords: late-l10n, testcase, top100)

Attachments

(3 files, 1 obsolete file)

I get the JS warning "Warning: XUL box for a element contained an inline #text child, forcing all its children to be wrapped in a block." on many pages at deviantART.  For each page with the problem, it appears four times.  I don't notice any problems with the pages that generate this warning.

I can't figure out the best component to place this as I can't figure out how to extract the name of the XUL file being rendered, so layout/base/nsCSSFrameConstructor.cpp suggests putting it here.
In a reduced test-case it comes down to this bit of CSS:

div.supernav a:-moz-any-link { display:-moz-inline-box; }

Component: Layout → Style System (CSS)
Keywords: testcase, top100
QA Contact: layout → style-system
Attached file Reduced test case (obsolete) —
Attached file Reduced test case
Oops, uploaded the wrong file.
Attachment #298210 - Attachment is obsolete: true
Flags: blocking1.9?
It would be a lot better if pages didn't use this, though.  Authors used to use display:-moz-inline-box to work around lack of correct support for inline-block.  However, we now support inline-block; as long as their display:inline-block is after their display:-moz-inline-box the warning won't happen, and that's the way they should be writing it.

In cases where the warning shows in chrome (and in some cases where it shows in content), there are real problems.

I'm not sure what there is to fix here (unless you want to move this to tech. evang.)
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
s/correct support/support/  (In previous releases, we supported -moz-inline-block, and it often didn't work right.  In Fx3, we support inline-block, and it works correctly.)
Flags: blocking1.9?
Though I suppose we could extend the warning message with something like:

  (Did you use display:-moz-inline-box without using display:inline-block
  afterwards?)

perhaps only for cases where it shows up in content (rather than chrome).
Resolution: WONTFIX → FIXED
So if I were to open a bug report at deviantART, should I tell them to simply change -moz-inline-box to inline-box?
Oh, duh, FF3 is still in beta, so of course they still have to use -moz-inline-block.
They should be using either:

  display: inline-block;

or:

  display: -moz-inline-box;
  display: inline-block;
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I think enough pages do this that it's worth having a more explanatory error message here.  I'd like to try getting this in before the l10n freeze tomorrow.

Duplicating the text across the two strings in xul.properties seems the simplest solution here.
Assignee: nobody → dbaron
Status: REOPENED → ASSIGNED
Attachment #299060 - Flags: superreview?(bzbarsky)
Attachment #299060 - Flags: review?(bzbarsky)
Comment on attachment 299060 [details] [diff] [review]
improve error message in -moz-inline-box case

Looks good.
Attachment #299060 - Flags: superreview?(bzbarsky)
Attachment #299060 - Flags: superreview+
Attachment #299060 - Flags: review?(bzbarsky)
Attachment #299060 - Flags: review+
Comment on attachment 299060 [details] [diff] [review]
improve error message in -moz-inline-box case

a=beltzner for 1.9
Attachment #299060 - Flags: approval1.9? → approval1.9+
More informative warning checked in to trunk two minutes ago.

Not much else we can do here; marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: