Open Bug 1248401 Opened 8 years ago Updated 2 years ago

Style is not properly applied on elements added by javascript after XSL transformation

Categories

(Core :: Layout: Block and Inline, defect)

44 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: simen.kjaras, Unassigned)

Details

Attachments

(1 file)

Attached file Test case files
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822

Steps to reproduce:

The attached file contains an xml file, an xsl file, a js file and a htm file. The htm file demonstrates expected behavior.

When opening the xml file, the xsl is properly applied, and the result is identical to the htm file.


Actual results:

When the xml file is opened, the javascript runs correctly, and adds 4 new <div>s to the document. These have a class that causes certain styles to be applied. In particular, they get a red background. However, the default styles for a div are not applied, and so they are treated as inline elements instead of block elements.


Expected results:

I would have expected divs to be block elements unless explicitly declared not in a stylesheet or style attribute, especially when the same DOM tree in a plain htm file demonstrates the expected behavior.
Product: Firefox → Core
Component: Untriaged → Layout: Block and Inline
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: