Closed Bug 298959 Opened 20 years ago Closed 15 years ago

Find a better way for RS tags to not override fonts and sizes

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Unassigned)

Details

(Whiteboard: [fixed by the HTML5 parser])

Currently, when faced with |<font size=10><h1>foo|, we perform residual style
handling as usual. The problem with this is that people expect the <h1> to take
precedence over the <font> and when the RS handling kicks in, we get a content
model of <h1><font size=10>foo</font></h1>, so the <font> takes precedence
causing pain and unhappiness.

In order to fix this, when we emit a residual style tag when a heading tag is on
the stack, we put a an attribute on the residual style tag (_moz-rs-heading) and
use a rule in quirk.css to inherit the font size.

While going through parser bugs, I noticed a lot of bugs reported on a similar
problem: |<font face=...><pre>foo| where the <font face> takes precedence over
the <pre>. I talked to jst about doing something similar to what we do for
headings and while he was okay for the general idea, he didn't like the idea of
having a real attribute in the DOM as a result of RS handling.

There are a couple of options we can use in place of this (such as using content
state and content properties). I'm opening this as a bug to:
a) Not use the attribute in the DOM for this purpose
b) Fix the <font><pre> case.
Note that matching on attributes is slow; if we can use a class that would be
better...
Assignee: mrbkap → nobody
QA Contact: mrbkap → parser
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.