Open Bug 1612466 Opened 5 years ago Updated 2 years ago

Text content in SVG with xml:space=preserve is shown with normalized whitespace in the DOM inspector

Categories

(DevTools :: Inspector, defect, P3)

72 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: bugzilla, Unassigned)

Details

(Keywords: parity-chrome, testcase, Whiteboard: [dt-q])

Attachments

(2 files)

Attached image Screenshot

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

Have either

  • a HTML document with embedded SVG or
  • an SVG image
    where certain nodes have text content and an xml:space="preserve" attribute.

I'd guess the same would happen for arbitrary XML documents as well.

Actual results:

While rendering honors the attribute, the DOM inspector in the developer tools always shows the text content as if xml:space="preserved" was not specified.

Expected results:

At least those nodes that have xml:space="preserve" should show the actual text content, not the normalized one. But even in the general case the normalization is dubious, as CSS could enforce white-space rendering differences via its white-space property.

Attached file Test document

Probably a duplicate of bug 878514 which has an overly specific summary.

Has STR: --- → yes
Component: Untriaged → Inspector
Product: Firefox → DevTools
Priority: -- → P3
Whiteboard: [dt-q]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: