Commit Graph

307 Commits

Author SHA1 Message Date
John Pavlicek
bbe9a64f87 Bug 1159725 - Links in markup-view attributes should open with middle-click; r=pbro 2015-07-07 13:40:00 +02:00
David Bryant
d986822259 Bug 1180314 - Screenshot parameter as single string. r=jryans
Developer Tools: Inspector -- screenshot command takes a CSS Selector as the target
object to be captured, but CSS Selectors can contain whitespace.  Added quotes
to make sure CSS Selector is treated as a single argument to the screenshot command.
2015-07-16 12:10:00 -04:00
Julian Descottes
eb82d20c8b Bug 968241 - Copy outerHTML using keyboard shortcut. r=pbrosset
Copy outerHTML of the currently selected node of the inspector.
Works for ELEMENT, DOCUMENT_TYPE and COMMENT node types.

- bound "copy" event in markup-view to copy outerHTML
- added doctypeString property to NodeFront in actors/inspector.js
- markup-view.js is also using this property now
- added mochitest with dedicated html
2015-07-02 22:43:19 +02:00
J. Ryan Stinnett
7e2158acc2 Bug 1178851 - Move testing flag to DevToolsUtils. r=ochameau 2015-07-02 04:56:57 -05:00
Patrick Brosset
f29a426396 Bug 1178555 - Fix up browser_inspector_highlighter-keybinding_04.j to stop permafailing on DevEdition. r=test-only 2015-07-01 14:53:16 +02:00
Avik Pal
16e5374381 Bug 1157789 - Add context menu items Expand All / Collapse to markup view. r=janx 2015-06-29 00:16:47 -07:00
Patrick Brosset
639c4ea0c9 Bug 938188 - Make highlighter capable of highlighting only one region, fading out others. r=bgrins
Introduced a new highlighter option that makes each region <path> element in the highlighter only
cover the actual area of the corresponding region, excluding the area of nested regions.
This is useful when used with the existing showOnly region because it lets users see exactly where
a given region is.
This patch makes the layout-view use this new option, so that when users hover over the various
regions in the layout-view, only the corresponding regions are highlighted.
2015-06-20 14:51:50 +02:00
Jeff Walden
eed5b7e229 Bug 1146136 - Fix most in-tree tests that parenthesize destructuring pattern assignment targets, as ES6 forbids such parenthesization. (The patch making SpiderMonkey reject this syntax will follow shortly.) r=efaust, r=testingonlychange 2015-05-30 00:55:35 -07:00
Léon McGregor
71bd380801 Bug 1163332 - Add a 'screenshot this node' button to the inspector popup menu. r=pbrosset 2015-06-09 03:58:00 -04:00
Patrick Brosset
b9ade60da9 Bug 1170477 - 3 - Test for the inspector breadcrumbs context menu; r=tromey 2015-06-03 16:31:23 +02:00
Patrick Brosset
9196a7965e Bug 1170477 - 2 - Fix undefined inspector.strings accessor in breadcrumbs; r=tromey
The only user of the l10s inspector strings bundle is a string that this
change removes.
The "Siblings" string is supposed to tell users that the section of the
menu that follows contains sibling nodes, but it's disabled (and looks like
an item you should normally be able to click on), and it's separated from
the list of siblings by a horizontal separator (making it look like even
less related to the next section).

Also fixed the fact that the inspector context menu was regenerated for
every sibling found on the current node.

Also fixed the fact that the inspector context menu would not appear when
right clicking on the documentElement breadcrumb node.
2015-06-02 11:49:11 +02:00
Patrick Brosset
a0fea1dcf4 Bug 1170477 - 1 - Quick code cleanup for better eslint compliancy; r=tromey 2015-06-02 11:26:24 +02:00
J. Ryan Stinnett
41327d2c68 Bug 1168689 - Allow highlighter to see XBL anonymous nodes. r=pbrosset 2015-06-01 16:52:13 -07:00
Patrick Brosset
b0fc02b334 Bug 1166189 - ESLint configuration files for devtools; r=tromey
Adds a global .eslintrc file for all source files in /browser/devtools.
This file defines a set of global variables that are commonly used in
/browser/devtools code.
The files that import modules with Cu.import will need to define their
own globals as /* globals ... */ comments.
This file also defines the configuration for all the rules we want to
use.

This also adds a set of .eslintrc files, one per test directory in
/browser/devtools. Each of these files extend from one of 2 parent config
files: .eslintrc.xpcshell or .eslintrc.mochitest.
The parent config define the set of globals these types of tests have
access to (test runner functions, assertion functions, etc.).

Finally, this also adds .eslintrc files in /toolkit/devtools for code and
tests, which just extend from their counterparts in /browser/devtools.
2015-05-28 09:30:03 +02:00
Patrick Brosset
923cdc222d Bug 1167617 - Remove SpiderMonkey specific JS syntax from inspector; r=jryans 2015-05-22 20:50:01 +02:00
Patrick Brosset
03753b11fd Bug 1122605 - Focus selected inspector node after user selection. r=bgrins 2015-05-21 15:41:53 +02:00
Patrick Brosset
1a28040232 Bug 1160972 - Minor code cleanup in inspector-panel.js for better consistency; r=miker 2015-05-04 14:11:26 +02:00
Patrick Brosset
0016a8a5bb Bug 1158822 - Link css url attributes to style-editor and js url attributes to debugger; r=jsantell
The node-attribute-parser now marks uris to css and js files as cssresource and jsresource.
Thanks to this, the inspector can open the corresponding files in the style-editor and
debugger rather than just opening a new tab with the source.
This makes use of 2 new toolbox methods: viewSourceInStyleEditor and viewSourceInDebugger.
2015-05-04 09:23:04 +02:00
Patrick Brosset
679fd5573c Bug 921102 - 4 - Tests for the open/copy links on markup-view attributes; r=bgrins 2015-05-02 23:00:13 +02:00
Patrick Brosset
42e723179f Bug 921102 - 3 - Open/copy markup-view attribute links; r=bgrins
This part adds contextual menu items that become enabled when
the user right clicks on an attribute that has a link.
Depending on the nature of the link, a new tab will be opened or a node
selected.
The user can also choose to copy the link in the clipboard.
2015-05-02 22:37:45 +02:00
Tooru Fujisawa
22a3f8a30f Bug 1102219 - Part 5: Replace more String.prototype.contains with String.prototype.includes in chrome code. r=till 2015-04-30 00:32:05 +09:00
Jordan Santell
d9a58344f8 Bug 1134778 - Consolidate usages of view sourcing in tools with a source-utils module. r=vp,jryans 2015-04-24 14:16:34 -07:00
Joe Walker
cb03960f98 Bug 1128988 - runAt support for commands/converters; r=bgrins 2015-04-23 10:24:49 +01:00
Patrick Brosset
8aa34dd66d Bug 1152279 - Give the inspector sidebar a default size so it can be collapsed; r=miker 2015-04-21 15:29:49 +02:00
John Kang
b6c86fe3ad Bug 1143074 - "Inspector search box can't find nodes with IDs/classes that include CSS reserved characters" [r=pbrosset] 2015-04-21 02:56:00 +02:00
Jennifer Fong
7e45320712 Bug 901250 - Add scroll into view menu item for the inspector. r=bgrins 2015-04-17 11:03:24 -07:00
Patrick Brosset
6db45a36e4 Bug 1121528 - Avoid the inspector going blank when quickly navigating; r=bgrins
This prevents the WalkerActor from failing at handling various requests when
those requests are about DeaedNodes. Indeed, the async nature of the devtools
protocol means that the client could be asking for information about a node that
doesn't exist anymore because it was part of a page that was navigated away from.
The WalkerActor should know how to deal with such cases, so the patch adds a
number of early returns and a new test for them.
This helps avoiding the inspector-panel from going blank in some edge cases.
2015-04-17 12:09:58 +02:00
Brian Grinstead
8216c7e38f Bug 1153903 - Get rid of logspam during devtools talos test runs;r=pbrosset 2015-04-16 09:54:04 -07:00
Carsten "Tomcat" Book
2c17bd658e Backed out changeset 145f6347bb11 (bug 1137285) depending on the backout of bug 1145049 2015-04-15 17:24:06 +02:00
Carsten "Tomcat" Book
44a0071a4a Backed out changeset 120d272971a6 (bug 1137285) 2015-04-15 17:23:18 +02:00
Carsten "Tomcat" Book
9d02f90fbe Backed out changeset 3570dbae06e2 (bug 1137285) 2015-04-15 17:23:10 +02:00
Patrick Brosset
f3c46e292f Bug 1149346 - First word in selector-search also matches classes and ids; r=harth 2015-04-15 08:15:20 -07:00
Alexandre Poirot
ab7555f43a Bug 1137285 - Convert inspector test to be remote friendly r=pbrosset 2015-04-15 13:55:30 +02:00
Alexandre Poirot
8dfcd305c2 Bug 1137285 - Replace content.location = ... by a navigateTo request r=pbrosset 2015-04-15 13:55:29 +02:00
Alexandre Poirot
75963c9faf Bug 1137285 - Convert addTab+openInspector to openInspectorForURL r=pbrosset 2015-04-15 13:55:29 +02:00
Patrick Brosset
1f55db6d1b Bug 988278 - Fixes ESCape keypress mess in the inspector to make sure the split console opens; r=miker
This fixes 2 problems related to the split console not opening when it should.
1 - After the inspector selection mode (pick mode) was canceled with ESC, pressing ESC once
again did not open the split console, because the toolbox did not have the focus.
2 - The markup-view tooltip (used to preview images) was eating the first ESC keypress when
the markup-view was focused, even though the tooltip was hidden. This was forcing users to
press ESC twice to open the split console.
2015-04-13 10:51:49 +02:00
Patrick Brosset
7c632b0f8d Bug 966787 - 2 - Skip inspector breadcrumb updates when the output doesn't change; r=bgrins
Whenever something changed on the selected element (pseudo, attribute), the
breadcrumbs widget used to loop over all breadcrumbs buttons and re-create the
markup for each.
Now, we cache a string version of the text displayed in a button and compare
the new value to that in the loop, to skip DOM updates.

Additionally, the breadcrumbs widget used to update itself after all markup mutations
in the DOM tree displayed in the inspector. The update method now looks at the mutations
array and early return if none of them actually impact the displayed breadcrumbs.
2015-04-13 10:22:05 +02:00
Patrick Brosset
ddd1789411 Bug 966787 - 1 - Code cleanup in breadcrumbs.js; r=bgrins
For a better consistency with the rest of the DevTools codebase.
2015-04-08 12:16:25 +02:00
Patrick Brosset
54998056d9 Bug 873443 - Make the inspector search suggest and select elements in frames; r=bgrins
This makes the inspector search input show suggestions for nodes in all documents in
the content page. Selecting a suggestion also now selects the corresponding nodes
even when they are inside nested frames.
2015-04-09 17:11:06 +02:00
Patrick Brosset
bc33336d7e Bug 994055 - Part 2: Add tests for the inspector sidebar toggle button. r=miker 2015-04-03 17:11:15 +02:00
Patrick Brosset
98cf1b0357 Bug 994055 - Part 1: Add a toggle sidebar panel button to the inspector. r=miker
This adds a new icon, next to the searchbox (like in the debugger) to expand
or collapse the sidebar panel in the inspector.
The state is *not* persisted yet when the toolbox is closed.
The button is hidden when the toolbox host switches to 'side'.
2015-04-03 16:39:33 +02:00
Matteo Ferretti
f339e2e3d6 Bug 1144163 - Add a rulers highlighter; added unit test. r=pbrosset
- Added unit test for Rulers Highlighter
 - Added `Test:ScrollWindow` function to doc_frame_script.js
2015-03-28 00:25:18 +01:00
Panos Astithas
a936ed870b Add a devtools tag to all devtools tests (bug 1149907). r=pbrosset 2015-04-01 14:09:33 +03:00
Sami Jaktholm
9309c86b4d Bug 1035124 - Move browser_inspector_update-on-navigation.js from inspector to markup view tests. r=pbrosset 2015-03-13 23:23:01 +02:00
Patrick Brosset
03227a8bb2 Bug 1139925 - Make the BoxModelHighlighter highlight all quads and draw guides around the outer-most rect
LayoutHelpers.getAdjustedBoxQuads now returns all quads that el.getBoxQuads returns.
The BoxModelHighlighter calculates an outer rect based on these to draw the guides.
And if the element has more than 1 quad (inline element that spans line breaks), then all quads are
highlighted.
Also all related tests were modified and a couple of new tests were added.
2015-03-13 15:54:10 +01:00
Sami Jaktholm
1a7bf533c3 Bug 1035140 - Split browser_inspector_menu-0?.js into multiple tests. r=pbrosset 2015-03-14 13:53:32 +02:00
Abhishek Bhattacharya
e24dc0673c Bug 1120111 - Tests for the highlighter pick mode key listeners; r=pbrosset 2015-03-10 07:04:00 +01:00
Patrick Brosset
473df235ac Bug 1123851 - 2 - Tests for the element geometry highlighter; r=bgrins 2015-03-09 17:33:24 +01:00
Patrick Brosset
bf93262b66 Bug 1074836 - 8 - Remove the gloal skip-if=e10s on browser/devtools/inspector tests; r=me 2015-02-09 10:03:07 +01:00
Patrick Brosset
25128370d2 Bug 1074836 - 7 - Fix the inspector node reselection test with e10s; r=jwalker 2015-02-09 10:03:06 +01:00