Closed Bug 149203 Opened 23 years ago Closed 16 years ago

DidSetStyleContext is not called enough

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: dbaron, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

DidSetStyleContext is not called enough for the frames that implement it -- they use it as a "style data changed" callback. However, there are cases where we do ClearStyleData, etc., and don't call it. I think this is the cause of the dynamic-theme-switching bug where images weren't replaced (since nsImageBoxFrame uses a DidSetStyleContext callback). I fixed the simplest of the cases in the patch in bug 146831 comment 19, but there are other more complicated ones.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → Future
is it possible to privide a minimized testcase ?
(An alternative fix would be removing DidSetStyleContext.)
Attached file failed attempt at a testcase (obsolete) —
I need to go back and look at exactly what doesn't call DidSetStyleContext and how to trigger it. I suspect I may need to do a CSS rule change rather than a style attribute change.
Attached file testcase
Attachment #102827 - Attachment is obsolete: true
Comment on attachment 102831 [details] testcase In this testcase, the "Change Image and Border" button should take effect immediately. It does for the border, but the image change doesn't take effect until the user presses the "Reresolve style" button.
Thanks David ! Adding KW : testcase
Keywords: testcase
WFM ? Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051026 Firefox/1.6a1
Probably mostly fixed by making style contexts immutable, which isn't quite true, since we still have ClearStyleDataAndReflow, which violates the immutability.
Assignee: dbaron → nobody
Status: ASSIGNED → NEW
QA Contact: ian → style-system
Fixed by bug 188803 (as mentioned in comment 8) and bug 386640.
Status: NEW → RESOLVED
Closed: 16 years ago
Depends on: 188803, 386640
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: