Closed
Bug 1461278
Opened 7 years ago
Closed 7 years ago
Print a note to the web console when a web site is using shadow DOM (v1), preffed off by default
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 file)
5.29 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
Just to ease finding whether a web site is actually using Shadow DOM.
(or need to ask devtools if they have some magic for this already)
Assignee | ||
Comment 1•7 years ago
|
||
To help to detect pages using shadow DOM, let's add this console message for now.
Disabled by default but can be enabled using
dom.webcomponents.shadowdom.report_usage = true
Perhaps you emilio could review this.
I explicitly wanted to have dom_webcomponents_shadowdom_report_usage() call in Element to avoid extra OwnerDoc() access when the pref isn't set.
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ab772bded08d62a9535447259709be6e52fc94f
remote: recorded changegroup in replication log in 0.072s
Attachment #8975632 -
Flags: review?(emilio)
Comment 2•7 years ago
|
||
Comment on attachment 8975632 [details] [diff] [review]
shadow_report_usage.diff
Review of attachment 8975632 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thanks. I guess it's not really worth it to add a test for this. r=me as long as you've tested it manually.
::: dom/base/nsDocument.cpp
@@ +13242,5 @@
> +
> + nsIDocument* topLevel = GetTopLevelContentDocument();
> + if (topLevel && !topLevel->mHasReportedShadowDOMUsage) {
> + topLevel->mHasReportedShadowDOMUsage = true;
> + nsString uri;
nit: Maybe nsAutoString?
Attachment #8975632 -
Flags: review?(emilio) → review+
Assignee | ||
Comment 3•7 years ago
|
||
GetDocumentURI explicitly takes nsString, not nsAString, so I used nsString.
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/887c21926833
Print a note to the web console when a web site is using shadow DOM (v1), preffed off by default, r=emilio
Updated•7 years ago
|
Priority: -- → P2
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•