Closed Bug 2742 Opened 26 years ago Closed 25 years ago

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

Categories

(Core :: Layout, defect, P3)

Other
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ian, Assigned: vidur)

References

()

Details

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?
Assignee: troy → vidur
Vidur, the TITLE content object doesn't have the text in it as a child content
object
This is similar to bug #2778, involving the content of TEXTAREA.
Setting all current Open/Normal to M4.
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.
Summary: <TITLE> element does not render even with display:block → <STYLE> and <SCRIPT> elements do not render even with display:block
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Status: NEW → ASSIGNED
Target Milestone: M4 → M5
*** Bug 4384 has been marked as a duplicate of this bug. ***
Target Milestone: M5 → M6
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...
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]".
Target Milestone: M6 → M7
Target Milestone: M7 → M8
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.
QA Contact: petersen → chrisd
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
DOM elements now exist for both SCRIPT and STYLE elements. Fixes checked in on
7/2/1999.
Status: RESOLVED → VERIFIED
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.