[FIX][RR]Changing attributes does not reframe :before/:after generated content [GC]

VERIFIED FIXED in mozilla1.1beta

Status

()

Core
CSS Parsing and Computation
P1
normal
VERIFIED FIXED
18 years ago
4 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: bz)

Tracking

({css2, testcase})

Trunk
mozilla1.1beta
x86
Windows 2000
css2, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Hixie-P3], URL)

Attachments

(4 attachments)

(Reporter)

Description

18 years ago
STEPS TO REPRODUCE
   Change the content of an element's attribute, thus causing style contexts
   to be reresolved and thus causing :before or :after 'content' to change.

ACTUAL RESULTS
   The contents don't change.

EXPECTED RESULTS
   Well duh.

See attachement for a simple case. During loading, the attribute of one of the
elements is changed. If the test passes, the generated content should be changed
from 'FAILED' to 'PASSED'.
(Reporter)

Comment 1

18 years ago
Created attachment 17502 [details]
Simple and self explanatory testcase. Output should say "Result: PASSED".
(Reporter)

Updated

18 years ago
Keywords: correctness, css2, testcase
QA Contact: chrisd → py8ieh=bugzilla

Comment 2

18 years ago
Interesting problem with an interesting workaround: if you attempt to change the 
after-content, it doesn't work. However, you can remove the after-content (with a 
before-content for instance) and once it is removed, you can add the after-
content you wanted.  A bit confusing eh?   Look at the attached testcase and it 
will be all clear.
Status: NEW → ASSIGNED
Target Milestone: --- → Future

Comment 3

18 years ago
Created attachment 18104 [details]
testcase with workaround

Comment 4

18 years ago
I forgot to add that:
- the style is indeed re-resolved, it even applies to the after-content, the only 
problem is that the after-content itself doesn't change.
- the after-content doesn't appear in when dumping the content in Viewer.
(Reporter)

Comment 5

17 years ago
See also http://www.hixie.ch/tests/adhoc/dom/css/rematching/004.xml
Summary: Changing attributes does not reframe :before/:after generated content → Changing attributes does not reframe :before/:after generated content [GC]
Whiteboard: [Hixie-P3]
Summary: Changing attributes does not reframe :before/:after generated content [GC] → [RR]Changing attributes does not reframe :before/:after generated content [GC]
for me :before got added

http://mozilla.linuxfaqs.de/

..set style to "false frame" - the the red ">" before the links IS a :before,
and gets added. The external links should get an :after{content:" (extern)";},
but THAT doesn't work

Comment 7

16 years ago
What I'm seeing is bug 126072, :before and :after psuedo classes are not
rendered when using alternate style sheets.
I'm going to mark this bug as *depending on* bug 126072 because this bug may
also have issues with AttributeAffectsStyle (and I've been wondering whether
AttributeAffectsStyle should have worked a little more like
HasStateDependentStyle...).
Depends on: 126072
Assigning pierre's remaining Style System-related bugs to myself.
Assignee: pierre → dbaron
Status: ASSIGNED → NEW
Created attachment 88553 [details]
This testcase is basically the same bug.
Created attachment 88554 [details] [diff] [review]
Proposed fix

Since the generated content is generated during frame construction, any change
to generated content requires creating the new frames....
Comment on attachment 88554 [details] [diff] [review]
Proposed fix

r=dbaron.  Seems like the right fix.  Perhaps the "XXX" could go?
Attachment #88554 - Flags: review+
Yeah, true.  I'll remove the XXX before checking in.
Assignee: dbaron → bzbarsky
Priority: P3 → P1
Target Milestone: Future → mozilla1.1beta
Summary: [RR]Changing attributes does not reframe :before/:after generated content [GC] → [FIX][RR]Changing attributes does not reframe :before/:after generated content [GC]

Comment 14

16 years ago
Comment on attachment 88554 [details] [diff] [review]
Proposed fix

sr=kin@netscape.com
Attachment #88554 - Flags: superreview+
fixed on trunk
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 16

16 years ago
all testcases working as desired .. tested on win2k and linux 7.2 --
2002-11-05trunk builds

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.