Closed Bug 1428784 Opened 6 years ago Closed 6 years ago

Consider using nsIMutationObserver and its AttributeWillChange callback for CE attribute change notifications

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: edgar, Assigned: edgar)

References

Details

+++ This bug was initially created as a follow-up of Bug #1428244 comment #9 +++

Consider using nsIMutationObserver and its AttributeWillChange callback for CE attribute change notifications.
So my idea here is that if code isn't using CE, it would get the fastest possible code paths, since there wouldn't be any CE checks.
But I'm not sure if this would then slow down CE implementation.
And it could probably also fix bug 1428246, since the additional SetAttrAndNotify() call called with aNotify=false.
(In reply to Edgar Chen [:edgar] from comment #2)
> And it could probably also fix bug 1428246, since the additional
> SetAttrAndNotify() call called with aNotify=false.
  ^^^^^^^^^^^^^^^^^^
  I meant to say SetInlineStyleDeclaration().
It will be good if we could have tests for parser case first.
Depends on: 1425079
Assignee: nobody → echen
this wouldn't really solve the style attribute issue, since if we do this, then attribute changes coming from the parser aren't triggered.
This is actually hard because of how we handle attributes in parser.
And the fix for bug 1428246 is to make style attribute handling sane.
Closing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.