Closed Bug 172058 Opened 22 years ago Closed 8 months ago

Split up nsIDocumentObserver

Categories

(Core :: DOM: Core & HTML, task, P5)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: john, Unassigned)

Details

(Whiteboard: [domcore-bugbash-triaged])

Most nsIDocumentObservers don't care about all the 20 notifications on that interface, yet we send the notifications for all of them to every observer (most of whom just return NS_OK; from nearly all the functions). We should fix that.
Two possibilities we have come up with: (a) pass a flag when you register as an observer saying what notifications you want to receive; (b) break it down into a few smaller, saner observer interfaces where people are more likely to listen to all or most of the events I prefer (b) breaking it down. Here is a VERY ROUGH START at this that should be sort of reasonable: nsIDocumentContentChangeObserver { BeginUpdate EndUpdate ContentChanged ContentStatesChanged AttributeChanged ContentAppended ContentInserted ContentRemoved ContentReplaced } nsIDocumentStyleObserver { StyleSheetAdded StyleSheetRemoved StyleSheetDisabledStateChanged StyleRuleChanged StyleRuleAdded StyleRuleRemoved } nsIDocumentObserver { BeginLoad EndLoad BeginReflow EndReflow DocumentWillBeDestroyed } The positioning of StyleSheetAdded/Removed/Disabled, and ContentStatesChanged, may be wrong--this is a rough sketch that seems to fit things pretty well without being totally horrible. BeginReflow/EndReflow, however, seem like they should be notifications from the PresShell, though, another possible change.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.4beta
Product: Browser → Seamonkey
Assignee: john → general
Status: ASSIGNED → NEW
Priority: P3 → --
QA Contact: asa → general
Target Milestone: mozilla1.4beta → ---
Assignee: general → nobody
Component: General → DOM
OS: Windows XP → All
Product: Mozilla Application Suite → Core
QA Contact: general → general
Hardware: PC → All
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
Type: defect → task
Whiteboard: [domcore-bugbash-triaged]

The code has changed a lot, and many parts have been moved to other .idl files.

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.