Closed Bug 347370 Opened 19 years ago Closed 19 years ago

normalize() combining text nodes can change MathML rendering

Categories

(Core :: MathML, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Assigned: rbs)

Details

(Keywords: testcase)

Attachments

(1 file)

488 bytes, application/xhtml+xml
Details
This testcase demonstrates that you can have a fraction whose arguments (children) are just two adjacent text nodes. If normalize() is called, the two text nodes are combined, and the fraction code decides the DOM is suddenly invalid. This seems wrong to me, although I can't find something in the DOM spec specifically saying that languages must be designed so that normalize() will not affect rendering. Is this a fundamental conflict between the MathML and DOM specs? A bug in Gecko, where text nodes should not be accepted as arguments to <mfrac>? I think it's the latter; section 2.3.5 of the MathML spec seems to be telling me that non-whitespace characters are not allowed outside of token elements.
Attached file testcase
> A bug in Gecko, where text nodes should not be accepted as arguments to <mfrac>? A more compatible fix would be to treat multiple adjacent text nodes (where at least one includes non-whitespace) as a single text node for the purpose of determining the argument-to-mfrac index.
>section 2.3.5 of the MathML spec seems to be telling me >that non-whitespace characters are not allowed outside of token elements. That's right. So the first markup in the testcase is invalid to begin with. It is only a coincidence that it is even rendered. Since Gecko is non-validating, we don't claim (nor attempt) to detect/report all possible invalid cases that breach the spec. Let's resolve this one therefore as INVALID.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
This is now WFM. Which makes me happier than INVALID :)
Resolution: INVALID → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: