:first-line and :first-letter pseudos not re-resolved on attribute change

RESOLVED DUPLICATE of bug 8253

Status

()

Core
CSS Parsing and Computation
P2
minor
RESOLVED DUPLICATE of bug 8253
16 years ago
15 years ago

People

(Reporter: Chris Waterson, Assigned: dbaron)

Tracking

Trunk
Future
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CSS1-2.3][CSS1-2.4])

(Reporter)

Description

16 years ago
See attached test case, which should force style to be re-resolved on a
paragraph, applying the :first-letter pseudo.

  <html>
  <head>
    <style type="text/css">
       body.styled p.firstletter:first-letter { color: blue; }
    </style>
  </head>
  <body onload="document.body.setAttribute('class', 'styled');">
    <p class="firstletter">
      The letter `T' should be blue.
    </p>
  </body>
  </html>

Expected: `T' is blue.
Actual: nothing happens.

N.B. that this works fine:

  <style type="text/css">
    p.firstletter:first-letter { color: blue; }
  </style>

Interesting bug, because fixing it may have an impact on the the proposed fix
for bug 79508.

Comment 1

16 years ago
The other interesting thing is that if there is any style on the first letter, 
then the attribute change on the body causes a style resolution.

    <style type="text/css">
       body.styled  { color: red; font-size:24px;}
       p.firstletter:first-letter { color: green;}
       body.styled p.firstletter:first-letter { color: blue; }
    </style>
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0.1
Bulk moving Mozilla1.01 bugs to future-P1
Priority: P3 → P1
Target Milestone: mozilla1.0.1 → Future
Whiteboard: [CSS1-2.3][CSS1-2.4]

Comment 3

15 years ago
cc'ing myself
(Assignee)

Comment 4

15 years ago
Assigning pierre's remaining Style System-related bugs to myself.
Assignee: pierre → dbaron
Status: ASSIGNED → NEW
Priority: P1 → P2

*** This bug has been marked as a duplicate of 8253 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.