If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Handle DocumentFragment in Reps

RESOLVED FIXED in Firefox 52

Status

()

Firefox
Developer Tools: Shared Components
P2
normal
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Tracking

(Blocks: 1 bug)

49 Branch
Firefox 52
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

11 months ago
STR:
1. Open the console
2. Enter ```
var docfrag = document.createDocumentFragment();
var browserList = ["Internet Explorer", "Firefox", "Safari",
    "Chrome", "Opera"];
browserList.forEach(function(e, i) {
  var li = document.createElement("li");
  li.textContent = e;
  li.id = "li-" + i;
  li.classList.add("list-element");
  docfrag.appendChild(li);
});
console.log(docfrag);```

Expected result : 
DocumentFragment is displayed like an array, i.e. `DocumentFragment [<li>, <li>, ...]`

Actual result : 
It looks like it is rendered by the Grip rep, and displays `DocumentFragment {}`
There doesn't seem to be a rep made specifically for DocumentFragment... Which rep should handle this?
Flags: needinfo?(chevobbe.nicolas)
(Assignee)

Comment 2

11 months ago
It should be handled by GripArray (http://searchfox.org/mozilla-central/source/devtools/client/shared/components/reps/grip-array.js).
BTW, I already made the change, I'm waiting on Bug  1307938 to land (which should be soon, since there's a patch waiting for review), so I can write meaningful tests ( without 1307938 , nodes are displayed as object, e.g.  HTMLBodyElement instead of <body> ).
Flags: needinfo?(chevobbe.nicolas)
Comment hidden (mozreview-request)

Updated

11 months ago
Blocks: 1308219
Status: NEW → ASSIGNED

Comment 4

11 months ago
mozreview-review
Comment on attachment 8807754 [details]
Bug 1311168 - Handle document fragment in grip array rep;

https://reviewboard.mozilla.org/r/90796/#review91164

Thanks for the patch, looks great to me!


Just one nit: the commit message is like follows:
Bug 1311168 - Handle document fragment in grip array rep. r=Honza;

While it should be rather like so (not the semicolon position):
Bug 1311168 - Handle document fragment in grip array rep; r=Honza


Honza
Attachment #8807754 - Flags: review?(odvarko) → review+
(Assignee)

Comment 5

11 months ago
(In reply to Jan Honza Odvarko [:Honza] from comment #4)
> Comment on attachment 8807754 [details]
> Bug 1311168 - Handle document fragment in grip array rep. ;
> 
> https://reviewboard.mozilla.org/r/90796/#review91164
> 
> Thanks for the patch, looks great to me!
> 
> 
> Just one nit: the commit message is like follows:
> Bug 1311168 - Handle document fragment in grip array rep. r=Honza;
> 
> While it should be rather like so (not the semicolon position):
> Bug 1311168 - Handle document fragment in grip array rep; r=Honza
> 
> 
> Honza

I'll amend the commit message, thanks for the review :)
Comment hidden (mozreview-request)
(Assignee)

Comment 7

11 months ago
TRY has some oranges https://treeherder.mozilla.org/#/jobs?repo=try&revision=cd653b5497584b794efa9b288ae0cb1cae1fdc58 , but none seems related to my patch.

Comment 8

11 months ago
Pushed by chevobbe.nicolas@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e852aef463a6
Handle document fragment in grip array rep; r=Honza

Comment 9

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e852aef463a6
Status: ASSIGNED → RESOLVED
Last Resolved: 11 months ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
You need to log in before you can comment on or make changes to this bug.