Closed
Bug 793713
Opened 12 years ago
Closed 12 years ago
[inspector] Right click on a doctype node in the markup panel throws errors and causes weird things to happen
Categories
(DevTools :: Inspector, defect, P2)
DevTools
Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: rcampbell, Assigned: miker)
Details
Attachments
(1 file, 1 obsolete file)
8.14 KB,
patch
|
jwalker
:
review+
|
Details | Diff | Splinter Review |
STR: Open the Inspector, open the Markup panel. Right click on a doctype and select Delete Node from the context menu. Weird things happen, including two errors on the Error Console. E.g., Timestamp: 2012-09-24 3:54:40 PM Error: TypeError: this.node.classList is undefined Source File: resource:///modules/highlighter.jsm Line: 611
Comment 1•12 years ago
|
||
After inspector refactoring, I now see: Error: NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0 [inIDOMUtils.hasPseudoClassLock] Source File: resource://gre/modules/devtools/InspectorPanel.jsm Line: 342
Priority: -- → P2
Summary: Right click on a doctype node in the markup panel throws errors and causes weird things to happen → [inspector] Right click on a doctype node in the markup panel throws errors and causes weird things to happen
Updated•12 years ago
|
Blocks: DevToolsPaperCuts
Assignee | ||
Updated•12 years ago
|
OS: Mac OS X → All
QA Contact: mratcliffe
Hardware: x86 → All
Assignee | ||
Comment 2•12 years ago
|
||
This patch adds a little context menu intelligence: 1. Pseudo classes can only be set on element nodes as they are the only nodes that contain styles. 2. Deleting doctype nodes is forbidden as the spec does not allow them to be edited. 3. Copy unique selector is not valid for doctype nodes as they cannot be accessed using selectors.
Attachment #716510 -
Flags: review?(fayearthur)
Assignee | ||
Updated•12 years ago
|
Whiteboard: [has-patch]
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mratcliffe
Comment 3•12 years ago
|
||
Comment on attachment 716510 [details] [diff] [review] Patch >+ // Disable "Copy Unique Selector" if needed >+ let unique = this.panelDoc.getElementById("node-menu-copyuniqueselector"); >+ if (this.selection.isDocumentTypeNode()) { >+ unique.setAttribute("disabled", "true"); >+ } else { >+ unique.removeAttribute("disabled"); >+ } Shouldn't we enable "copy unique selector" only if this.select.isElementNode()? This needs tests.
Attachment #716510 -
Flags: review?(fayearthur) → review-
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #3) > Comment on attachment 716510 [details] [diff] [review] > Patch > > >+ // Disable "Copy Unique Selector" if needed > >+ let unique = this.panelDoc.getElementById("node-menu-copyuniqueselector"); > >+ if (this.selection.isDocumentTypeNode()) { > >+ unique.setAttribute("disabled", "true"); > >+ } else { > >+ unique.removeAttribute("disabled"); > >+ } > > Shouldn't we enable "copy unique selector" only if > this.select.isElementNode()? > Yes, we should also only show "copy inner/outerhtml" entries for elements. Both fixed. > This needs tests. Done.
Attachment #716510 -
Attachment is obsolete: true
Attachment #718453 -
Flags: review?(paul)
Updated•12 years ago
|
Attachment #718453 -
Flags: review?(paul) → review?(jwalker)
Comment 5•12 years ago
|
||
Comment on attachment 718453 [details] [diff] [review] Patch v2 Review of attachment 718453 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me.
Attachment #718453 -
Flags: review?(jwalker) → review+
Assignee | ||
Updated•12 years ago
|
Whiteboard: [has-patch] → [land-in-fx-team]
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b7f366cbd4e2
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b7f366cbd4e2
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 22
Updated•11 years ago
|
No longer blocks: DevToolsPaperCuts
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•