Closed Bug 1308442 Opened 8 years ago Closed 7 years ago

Embed SourceEditor without iframe

Categories

(DevTools :: Netmonitor, defect)

defect
Not set
normal

Tracking

(firefox52 wontfix)

RESOLVED DUPLICATE of bug 1350226
Tracking Status
firefox52 --- wontfix

People

(Reporter: rickychien, Unassigned)

References

Details

Use SourceEditor.appendToLocal to embed codemirror without iframe and so far there are two modules used SourceEditor.

Todo:
- NetMonitor should uses SourceEditor.appendToLocal to launch SourceEditor.
- NetworkDetails should uses SourceEditor.appendToLocal to launch SourceEditor.
Whiteboard: [devtools-html]
Whiteboard: [devtools-html]
Just a note: anything that loads the source editor in a XUL doc should continue to use the iframe so we can load CM in an HTML doc
Whiteboard: [netmonitor]
Flags: qe-verify+
QA Contact: ciprian.georgiu
Priority: -- → P2
netmonitor/shared/components/editor.js is using 

this.deferEditor = this.editor.appendTo(...)

to append source editor with an extra iframe. So we use a deferEditor workaround to tackle iframe editor instance. This workaround can be removed by using appendToLocalElement() instead of appendTo().

The problems with appendToLocalElement are caused by XUL, because document.createElement() call always create XUL on top of netmontor.xul. As a result, here is a followup bug to fix this issue after we eliminate netmonitor.xul
Priority: P2 → P1
Depends on: 1309826
Priority: P1 → P3
Whiteboard: [netmonitor] → [netmonitor-reserve]
Priority: P3 → P2
Whiteboard: [netmonitor-reserve] → [netmonitor]
Assignee: nobody → rchien
Status: NEW → ASSIGNED
Iteration: --- → 54.2 - Feb 20
Priority: P2 → P1
I'd like to postpone this work since there exists a better solution in debugger.html [1] which is using newer CodeMirror version and provides a set of useful APIs. This task is able to resume as soon as we move Netmonitor.html to Github.

On the other hand, CodeMirror layout is broken after using appendToLocalElement() even if netmontor.xul has converted to HTML. It might be some existing problems in our source editor wrapper "devtools/client/sourceeditor/editor". As a result, I'd prefer to tackle this issue by using newer source-editor.js in debugger.html.

Marco, could you help me to put this issue to P3. thanks! 

[1] https://github.com/devtools-html/debugger.html/blob/9a4addbcd4c5642d3d9a36ff9713d378cbff0666/src/utils/editor/source-editor.js
Flags: needinfo?(mmucci)
Assignee: rchien → nobody
Status: ASSIGNED → NEW
(In reply to Ricky Chien [:rickychien] from comment #4)
> I'd like to postpone this work since there exists a better solution in
> debugger.html [1] which is using newer CodeMirror version and provides a set
> of useful APIs. This task is able to resume as soon as we move
> Netmonitor.html to Github.
> 
> On the other hand, CodeMirror layout is broken after using
> appendToLocalElement() even if netmontor.xul has converted to HTML. It might
> be some existing problems in our source editor wrapper
> "devtools/client/sourceeditor/editor". As a result, I'd prefer to tackle
> this issue by using newer source-editor.js in debugger.html.
> 
> Marco, could you help me to put this issue to P3. thanks! 
> 
> [1]
> https://github.com/devtools-html/debugger.html/blob/
> 9a4addbcd4c5642d3d9a36ff9713d378cbff0666/src/utils/editor/source-editor.js

Will do, thanks Ricky.
Iteration: 54.2 - Feb 20 → ---
Flags: needinfo?(mmucci)
Priority: P1 → P3
Whiteboard: [netmonitor] → [netmonitor-reserve]
Blocks: netmonitor-phaseII
No longer blocks: netmonitor-html
Priority: P3 → P2
Whiteboard: [netmonitor-reserve] → [netmonitor]
I'd like to revisit our editor when I back from the vacation
Assignee: nobody → gasolin
Status: NEW → ASSIGNED
Iteration: --- → 55.2 - Apr 3
Priority: P2 → P1
Mass wontfix for bugs affecting firefox 52.
Iteration: 55.2 - Apr 3 → 55.3 - Apr 17
This fix will cover in bug 1350226. iframe mechanism has removed in latest patch. Please see bug 1350226 for details.
Assignee: gasolin → nobody
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
No longer blocks: netmonitor-phaseII
Iteration: 55.3 - Apr 17 → ---
Flags: qe-verify+
Priority: P1 → --
QA Contact: ciprian.georgiu
Whiteboard: [netmonitor]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.