<STYLE> and <SCRIPT> elements do not render even with display:block

VERIFIED FIXED in M8

Status

()

Core
Layout
P3
normal
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: vidur (gone))

Tracking

Trunk
Other
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

19 years ago
The quoted page attempts to display the title as part of the main flow by
declaring:

   HEAD, TITLE { display: block; }

NGLayout correctly renders the HEAD element, but the TITLE element is nowhere
to be found! Why is the TITLE element not rendered?

Eventually, when the :before and :after pseudo-classes and CSS2 content
generaration are supported, one should be able to try and render META and LINK
elements too.

As in:

   LINK {
      display: block;
   }
   LINK[rel~="stylesheet"]:before {
      display: block;
      content: "Stylesheet: " attr(href);
   }

The SCRIPT and STYLE elements inside HEAD should also be styleable.

All this should be negligably easy to implement. After all, they are merely
nodes in the document tree, right?

Updated

19 years ago
Assignee: troy → vidur

Comment 1

19 years ago
Vidur, the TITLE content object doesn't have the text in it as a child content
object
(Reporter)

Comment 2

19 years ago
This is similar to bug #2778, involving the content of TEXTAREA.

Comment 3

19 years ago
Setting all current Open/Normal to M4.
(Reporter)

Updated

19 years ago
(Reporter)

Comment 4

19 years ago
TITLE is now fixed. However, the SCRIPT and STYLE elements are still not
displaying their contents, even with display:block.

I would assume this to be for the same reason as TITLE used to not work: the
relevant content objects don't have the text in them as child content objects.

STYLE test page:
http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlheadrendering2.html

SCRIPT test page:
http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlheadrendering3.html

Once "content" and :before are supported, I will check META and LINK elements.
Errors there will be filed under separate bugs.
(Reporter)

Updated

19 years ago
Summary: <TITLE> element does not render even with display:block → <STYLE> and <SCRIPT> elements do not render even with display:block

Comment 5

19 years ago
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M4 → M5
(Assignee)

Comment 6

19 years ago
*** Bug 4384 has been marked as a duplicate of this bug. ***
(Assignee)

Updated

19 years ago
Target Milestone: M5 → M6
(Assignee)

Comment 7

19 years ago
Currently, we don't create elements for SCRIPT and STYLE. This is, of course,
not DOM compliant. I plan to create elements for the two, but I'm a bit wary of
SCRIPT since it can appear in some pretty arbitrary places and I'm concerned
that some layout code (table layout, specifically) might not be too happy to see
SCRIPT elements within certain types of content. Pushing off till M6.
If SCRIPT is set to have display none, it shouldn't mess up the layout code at all.  If it does, that's a more general bug.  Perhaps this should be tested...
(Reporter)

Comment 9

19 years ago
This bug is one of many related to alternate text of images. All these bugs
have been marked. To find related bugs, search the description field for the
string "[ALT]".
(Assignee)

Updated

19 years ago
Target Milestone: M6 → M7
(Assignee)

Updated

19 years ago
Target Milestone: M7 → M8
(Assignee)

Comment 10

19 years ago
I'm sorry I have to do this, but I'm going to move this to M8, where I plan to
do a large HTMLContentSink code refactoring exercise. Some of that will force me
to create content for, at the very least, STYLE elements and possible SCRIPT
elements.

Updated

19 years ago
QA Contact: petersen → chrisd
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

19 years ago
DOM elements now exist for both SCRIPT and STYLE elements. Fixes checked in on
7/2/1999.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 12

19 years ago
Using 7/13 build, verified bug fixed. However, display shows a problem written
up as new bug #9894.
You need to log in before you can comment on or make changes to this bug.