Closed Bug 229915 Opened 21 years ago Closed 17 years ago

[SELECTORS-DYNAMIC] we don't restyle for + combinator and content tree changes

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: css3, testcase)

Attachments

(2 files, 2 obsolete files)

Our handling of content tree changes (removeChild, insertChild, appendChild,
replaceChild) doesn't cause the necessary restyling to handle the + combinator
in CSS selectors.

This is spun off of bug 15608 and is related to bug 73586 and bug 98997.  I'll
attach a testcase sometime...
Bug 73586, bug 98997, and bug 229915 would be fixed by what I described in step
3 of bug 15608 comment 28:

  When adding/removing content, just reresolve style on the parent (to handle
  empty, +, and all the new CSS3 variants).  (Perhaps there are good ways to
  optimize this, but it might just not be that bad.)
Attached file testcase (obsolete) (deleted) —
Attachment #139246 - Attachment is obsolete: true
Attached file testcase (deleted) —
Attachment #139252 - Attachment is obsolete: true
It's worth testing ~ as well -- some issues are similar, but some are a bit
different.
Keywords: css3, testcase
Summary: [SELECTORS-DYNAMIC] we don't restyle for + combinator and content tree changes → we don't restyle for + combinator and content tree changes
Summary: we don't restyle for + combinator and content tree changes → [SELECTORS-DYNAMIC] we don't restyle for + combinator and content tree changes
Blocks: 343652
*** Bug 343652 has been marked as a duplicate of this bug. ***
No longer blocks: 343652
*** Bug 344990 has been marked as a duplicate of this bug. ***
Blocks: 371061
QA Contact: ian → style-system
I just ran into this bug. I have:

h1 + p { text-indent: 0 }
p { text-indent: 2em }

The bug is triggered if I remove a paragraph directly following a header, as the following paragraph that gets moved up is stuck with the old indentation.

Is there a simple workaround for this bug?
Depends on: 401291
Attached file Additional testcase (deleted) —
Additional testcase
Fix by checkin of bug 401291 to trunk, 2008-02-18 22:17 -0800.

I included tests for this bug (based on attachment 139253 [details]) in that landing.  However, I think more tests are needed, as none of the tests currently in the tree test any cases where :empty and :-moz-only-whitespace differ, and those cases need to be exercised a good bit.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Blocks: 418463
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: