Closed Bug 1694548 Opened 3 years ago Closed 3 years ago

Break on > Attribute Modification doesn't work for style attribute mutations or Shadow DOM

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 4 open bugs)

Details

Attachments

(4 files)

Attached file Self-descriptive testcase (deleted) —

What were you doing?

Trying to debug something by breaking when its style attribute changed.

What happened?

Didn't break.

What should have happened?

Break.

Ah, hmm... This works with dom.mutation-events.cssom.disabled=false. Does devtools use mutation events for this? :/

So it seems... And that's problematic, because those events don't fire in e.g. shadow trees. We need to find a way for this not to depend on mutation listeners...

Summary: Break on > Attribute Modification doesn't work for style attribute mutations → Break on > Attribute Modification doesn't work for style attribute mutations or Shadow DOM
Attached file Test-case for Shadow DOM. (deleted) —

Yep, also broken on Shadow DOM...

Blocks: 1694627
Assignee: nobody → emilio
Blocks: dbg-dom-bps
Severity: -- → S3
Priority: -- → P3

Use internal events which get fired for CSSOM changes, and in Shadow
DOM. This will also allow us to remove mutation events in the future.

Depends on D106273

Honza, do you know where to best add a test for this? I only saw devtools/client/inspector/markup/test/browser_markup_dom_mutation_breakpoints.js...

Flags: needinfo?(odvarko)
Blocks: 1694637

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

Honza, do you know where to best add a test for this? I only saw devtools/client/inspector/markup/test/browser_markup_dom_mutation_breakpoints.js...

Replying in Phab
https://phabricator.services.mozilla.com/D106274

Honza

Flags: needinfo?(odvarko)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3faa9b27e4a5
Rename Document.dontWarnAboutMutationEventsAndAllowSlowDOMMutations and other misc cleanup in Document. r=smaug
https://hg.mozilla.org/integration/autoland/rev/c87745c8f28b
Move devtools breakpoints out of mutation events. r=smaug,jdescottes
Backout by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53407f6a9c27
Backed out 2 changesets on suspicion of causing dt crashes in nsINode::LastRelease.
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31483e46e546
Rename Document.dontWarnAboutMutationEventsAndAllowSlowDOMMutations and other misc cleanup in Document. r=smaug
https://hg.mozilla.org/integration/autoland/rev/8c202f711dbd
Move devtools breakpoints out of mutation events. r=smaug,jdescottes
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Thanks a lot for figuring this out and fixing it without regressing anything in the current DOM breakpoints Emilio!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: