Image documents now have things other than the <img> in the <body>

RESOLVED FIXED in mozilla8

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: Joe Wilson, Assigned: Michael Ventnor)

Tracking

({regression})

Trunk
mozilla8
regression
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Try this userstyle: http://userstyles.org/styles/49276
It does nothing on Nightlies.
If you remove structural pseudo-class ":only-child" from the code - the style begins to work, so the style itself is valid.

Updated

6 years ago
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system

Comment 1

6 years ago
Thhis is no bug. DOM for image document has changed.
You should modify the style.

See Bug 528046 - Print / print-preview crops very tall images at page boundaries
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
Blocks: 528046
I'm going to reopen this.  The change in behavior here was unnecessary, and I think we should revert it.

And in particular, that behavior change violates http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#read-image

Requesting tracking for this regression.
Status: RESOLVED → REOPENED
tracking-firefox8: --- → ?
Component: Style System (CSS) → DOM
Ever confirmed: true
QA Contact: style-system → general
Resolution: INVALID → ---
Summary: CSS structural pseudo-class :only-child is broken → Image documents now have things other than the <img> in the <body>
Keywords: regression
I actually had no idea that this was specified.
Assignee: nobody → ventnor.bugzilla
I think we should back out bug 528046 and fix it another way.
I'm wrong, we don't need to back out the whole thing. See discussion in bug 528046.
(Assignee)

Comment 6

6 years ago
Created attachment 552025 [details] [diff] [review]
Patch

Very sorry for the big delay on this, I had tree problems and ended up re-cloning and rebuilding the world which is a lot of trouble in a VM...

Yeah, this just moves the style node back into the head.
Attachment #552025 - Flags: review?(roc)
Attachment #552025 - Flags: review?(roc) → review+
Would you mind adding some tests to check that this doesn't happen again? Load an image in an IFRAME and check that the <body> only has one child, the <img>, at least. Ditto for video.
(Assignee)

Comment 8

6 years ago
Sorry for the delay, I'm still having more tree troubles :/

http://hg.mozilla.org/integration/mozilla-inbound/rev/dae43481a41b
Merged:
http://hg.mozilla.org/mozilla-central/rev/dae43481a41b
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Roc, Michael, can I submit this test to the HTML test suite? (W3C test suite license <http://www.w3.org/Consortium/Legal/2008/04-testsuite-license.html> and 3-clause BSD <http://www.w3.org/Consortium/Legal/2008/03-bsd-license.html>.)
Yes!

We need some sort of blanket policy that permits all our tests to be modified and submitted to the W3C by anyone. Would you like to explain on mozilla.governance what is required?

Comment 12

6 years ago
why should release drivers be tracking this?
This is fixed; doesn't need tracking.
tracking-firefox8: ? → ---
You need to log in before you can comment on or make changes to this bug.