Commit Graph
48 Commits
Author SHA1 Message Date
Kris Maglione b3990a2d91 Bug 1456686: Part 1 - Fix unused and shadowed explicit imports. r=standard8
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.

MozReview-Commit-ID: DCChktTc5TW
2018-04-24 20:18:09 -07:00
Patrick Brosset 4f6f554ca0 Bug 1351081 - Always retrieve quads relatively to the top window, correctly; r=gl
Use the getBoxQuads's relativeTo option to avoid having to calculate the offset
due to frames.

Also reduce the precision of numbers used when checking if the highlighter is
correctly displayed.

Finally, for some strange reasons, this patch seems to cause a totally unrelated
events mutation event to be sent during the test. This polutes the mutations
received and made the test fail. So I filtered the list of mutations to only
preserve the ones we care about here.
I could not reproduce this extra mutation when running Firefox. Only during the
test. So I did not investigate further.

MozReview-Commit-ID: 1ZQ6FGULjHG
2018-03-30 11:24:45 +02:00
J. Ryan Stinnett a2c4e7b608 Bug 1430918 - Rotate grid outline for writing mode. r=gl
Adjust the grid outline in the Inspector's Layout panel as needed to match the
writing mode and text direction of the grid container.

MozReview-Commit-ID: Ggcp1e4ZipE
2018-02-10 22:03:12 -06:00
Julian Descottes 250b4cd667 Bug 1434543 - removed unused getElementFromPoint from devtools layout/utils;r=ochameau
MozReview-Commit-ID: FHy6Dv5Q5l3
2018-01-31 13:12:10 +01:00
J. Ryan Stinnett 9463608864 Bug 1303171 - Adjust highlighters to account for writing mode and text dir. r=gl
The `getCurrentMatrix` function is used by grid and other highlighters to
account for the element's position, transforms, etc.  Here we extend it with
extra logic to account for the element's writing mode and text direction.

MozReview-Commit-ID: AZT4cJySLwk
2017-12-08 22:18:21 -06:00
Mike Park bba14e3df5 Bug 1418066 - Add rotation to CSS shapes editor transform mode. r=pbro
MozReview-Commit-ID: HJmdhTg5QjL
2017-11-16 15:58:23 -05:00
Cosmin Sabou cba5c0bf72 Backed out changeset c3f707e1f455 (bug 1418066) for ESlint failure on devtools/client/inspector/test/browser_inspector_highlighter-cssshape_07.js:29:1 r=backout on a CLOSED TREE 2017-11-28 17:35:23 +02:00
Mike Park 65856c23ab Bug 1418066 - Add rotation to CSS shapes editor transform mode. r=pbro
MozReview-Commit-ID: HJmdhTg5QjL
2017-11-16 15:58:23 -05:00
shindli c23024821d Backed out 1 changesets (bug 1418066) for failing in /builds/worker/checkouts/gecko/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_06.js:63:1 r=backout on a CLOSED TREE
Backed out changeset 8e64f442e70d (bug 1418066)
2017-11-27 22:35:35 +02:00
Mike Park 01280e2e56 Bug 1418066 - Add rotation to CSS shapes editor transform mode. r=pbro
MozReview-Commit-ID: HJmdhTg5QjL
2017-11-16 15:58:23 -05:00
Kyle Machulis 90bec39eec Bug 1405792 - Remove nsIDOMHTMLIFrameElement r=bz
MozReview-Commit-ID: 1u9C66X8j59
2017-10-04 20:41:24 -07:00
Kyle Machulis ec8a7dce22 Bug 1404079 - Remove nsIDOMHTMLFrameElement; r=bz
MozReview-Commit-ID: GSvMwRpl7g4
2017-09-28 19:06:14 -07:00
Wes Kocher 7fcb6ce623 Backed out changeset 0d8711590ab0 (bug 1351081) for mac dt bustage in browser_inspector_highlighter-iframes_01.js a=backout
MozReview-Commit-ID: DLEjbTPrAD9
2017-09-26 11:39:58 -07:00
ZER0 faa559b7bd Bug 1351081 - added relativeTo to getBoxQuads; r=pbro
Now the quads are always relative to the boundary window.
I also reduce a bit the maths to check if the quads are different.

MozReview-Commit-ID: 93zXH0Um3Ck
2017-09-22 10:36:13 +02:00
ZER0 8c1a0a9d45 Bug 1391014 - take in account the ancestor's transformation too for the current matrix; r=gl
MozReview-Commit-ID: Dc4DU3wPzU8
2017-09-08 17:18:21 +02:00
Wes Kocher 178756c885 Backed out changeset 2a69de9c73c6 (bug 1351081) for dt failures in browser_inspector_highlighter-cssshape_03.js a=backout
MozReview-Commit-ID: FYdGE6c4LLh
2017-08-31 11:23:52 -07:00
ZER0 905f44cb5c Bug 1351081 - added relativeTo to getBoxQuads, improved scrolling with fixed nodes; r=pbro
Now the quads are always relative to the boundary window; I also forced the
update during the scrolling for the box-model, since for element with position
fixed this is still needed.
I also reduce a bit the maths to check if the quads are different.

MozReview-Commit-ID: 93zXH0Um3Ck
2017-08-29 14:45:15 +02:00
Matteo Ferretti c784030bd4 Bug 1370278 - used getTransformToAncestor in Grid Inspector highlighter; r=gl
Used the new chrome-only API to obtain the transformation matrix of the current
node, relative to the inspected window's root element.
That also includes all the transformations from the element's ancestor; plus
the method is more robust and we can simplify the current code, removing also
some hack.

Deleted also the test for dom_matrix_2d, since one of the method was testing
now doesn't exist anymore, and the second it's just a map to native method
that has its own tests on platform.

MozReview-Commit-ID: 35rs34RSMYA
2017-06-09 01:32:27 +02:00
Sebastian Hengst 5ca3d57888 Backed out changeset b61c6809644c (bug 1370278) for failing chrome test test_dom_matrix_2d.html with 'getNodeTransformOrigin is not a function'. r=backout 2017-06-08 20:58:32 +02:00
Matteo Ferretti faa910ca62 Bug 1370278 - used getTransformToAncestor in Grid Inspector highlighter; r=pbro
Used the new chrome-only API to obtain the transformation matrix of the current
node, relative to the inspected window's root element.
That also includes all the transformations from the element's ancestor; plus
the method is more robust and we can simplify the current code, removing also
some hack.

MozReview-Commit-ID: 35rs34RSMYA
2017-06-08 19:46:41 +02:00
Matteo Ferretti 0c8cdab39b Bug 1297072 - added support for matrices to handle CSS 2D transformation on grid inspector; r=pbro
- Fixed a bug on `getNodeBounds` that would makes the calculation wrong in case
  of nested frames.
- Centralized all the transformation in `updateCurrentMatrix` function,
  including the scaling due the zoom and display's pixel ratio, and the
  translation to the top left corner of the node inspected.
- Added the transformation from the inspected node to the `currentMatrix`.
- Added `drawLine` and `drawRect` functions, that takes a matrix as argument.
- Position the line's number to the grid itself even when we've infinite lines
  (it's not a regression, it is intended since if a grid is transformed, we
  could have weird results otherwise, so we decided to uniform the behaviors).

MozReview-Commit-ID: 7OUfb6u63Qj
2017-05-03 19:19:19 +02:00
Matteo Ferretti 5fd2c5022a Bug 1297072 - added 2d matrix utility functions; r=gregtatum
MozReview-Commit-ID: AugOrLOR2JP
2017-05-03 19:19:14 +02:00
Matteo Ferretti 199353dcee Bug 1359028 - added encodeURIComponent and fixed css class typo; r=pbro
The patch of bug 1353005 removed by mistake a leading dot in a css class, and
the `encodeURIComponent` calls (so the # in the color definition was considered
the hash part in the url).
Also, it appears autoland rejected the last commit from Bug 1353005, so this
patch includes those changes as well.

MozReview-Commit-ID: 2aVW3hYHhSr
2017-04-25 16:35:08 +02:00
Matteo Ferretti e36bf2991f Bug 1353005 - removed sdk/content/mod and replaced with DOMWindowUtils calls; r=pbro pbro
MozReview-Commit-ID: 7aj8C0zYr6C
2017-04-10 21:47:39 +02:00
Matteo Ferretti c75591f4c5 Bug 1345434 - Implementation of a virtual canvas technique for grid highlighter; r=pbro
A virtual canvas is basically a canvas that seems bigger than is actually is.
The technique consists in moving a fixed sized canvas during the scrolling, when
is needed, to give the illusion that it always covers the entire document.

MozReview-Commit-ID: Hp4cUZaBdm8
2017-04-04 15:11:04 +02:00
Matteo Ferretti 4a6c9485d3 Bug 1349275 - refactored moveInfobar function; r=pbro
- Added `getViewportDimensions`
- Added `getComputedStylePropertyValue` to `CanvasFrameAnonymousContentHelper`
- Refactored totally `moveInfobar` to works with both APZ enabled and new
  positioned absolutely highlighters
- Updated `AutoRefreshHighlighter` for having a `scrollUpdate` method.
- Updated tests

MozReview-Commit-ID: 5m31ZzRzLXr
2017-03-28 12:40:22 +02:00
Iris Hsiao fc280a6213 Backed out changeset 448adfbcfda1 (bug 1349275) for eslint failure 2017-03-29 10:29:13 +08:00
Matteo Ferretti 7484fd202f Bug 1349275 - refactored moveInfobar function; r=pbro
- Added `getViewportDimensions`
- Added `getComputedStylePropertyValue` to `CanvasFrameAnonymousContentHelper`
- Refactored totally `moveInfobar` to works with both APZ enabled and new
  positioned absolutely highlighters
- Updated `AutoRefreshHighlighter` for having a `scrollUpdate` method.
- Updated tests

MozReview-Commit-ID: 5m31ZzRzLXr
2017-03-28 12:40:22 +02:00
Matteo Ferretti 4364825159 Bug 1348267 - used display density pixel ratio to scale the font size; r=pbro
Added also a `getDisplayPixelRatio` method, since we're probably going to use it
more often, instead of doing this math all the time in the code, it will be more
clear.

MozReview-Commit-ID: HLtbwDBvbF6
2017-03-17 12:07:11 +01:00
Matteo Ferretti 3831752b0d Bug 1343217 - Cut the CssGridHighlighter canvas size to its maximum size; r=pbro
This is a temporary fix to prevent the CssGridHighlighter from crashing on very
big pages.
This way, at least some parts of the highlighter are visible.
See bug 1345434 for the real fix.

MozReview-Commit-ID: DIw7RXi0SEz
2017-03-02 10:52:15 +01:00
Matteo Ferretti fd8cc97d66 Bug 1312103 - Avoid scrolling latency on highlighters given by APZ; r=pbro
- Used `position: absolute` instead of `position: fixed` whenever was possible.
- Updated utility functions and auto-refresh base class to consider the scrolled
  values in root document and scrollable elements.

MozReview-Commit-ID: 6evdOrfj74z
2017-01-02 11:43:37 +01:00
Florian Quèze 0a4ee94a29 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Ehsan Akhgari 917a5e63fc Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-16 09:13:38 -05:00
Carsten "Tomcat" Book 84568d0bc2 Backed out changeset 7d1f7dd996f7 (bug 1310845) 2016-11-16 14:50:44 +01:00
Ehsan Akhgari 2d792bd2ad Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-15 18:31:46 -05:00
Gabriel Luong b8da371ddc Bug 1308257 - Part 1: Move ReflowActor to reflow.js r=pbro 2016-11-01 11:51:58 +09:00
Brian Grinstead c2d2c30c3e Bug 1304513 - Get rid of sdk use in devtools/shared/layout/utils.js;r=tromey
MozReview-Commit-ID: FXV7XhbuZmw
2016-09-22 07:59:35 -07:00
Ryan VanderMeulen 724c163f1c Merge fx-team to m-c. a=merge 2016-08-19 09:54:25 -04:00
Patrick Brosset 98f15741fe Bug 1289553 - Move the eyedropper label so it's always visible; r=jdescottes
This adds a few new CSS selectors that are used to move the label to the
top and/or left/right of the eyedropper canvas.
The CSS rules use transform and a quick transition.
The eyedropper highlighter then just makes use of this by adding top, left,
right attributes to the DOM depending on its position.

This also adds a test for this, and while testing, I discovered a bug in
shared/layout/utils.js that I fixed here too. Sometimes, the node passed is
actually a DOCUMENT_NODE and so we must account for this in a couple of places
in this file to avoid JS errors.

MozReview-Commit-ID: H969k3mEDJE


MozReview-Commit-ID: 9qOCYVp4mld
2016-08-18 15:17:47 +02:00
Tom Tromey 850dac53cb Bug 1292242 - move scrollIntoViewIfNeeded to its own module; r=bgrins
MozReview-Commit-ID: 8diNiffQmDB
2016-08-17 11:13:54 -06:00
Patrick Brosset e19007d87a Bug 1262439 - 1 - Introduce a new eye-dropper highlighter; r=zer0
This is mostly porting code from the XUL eye-dropper over to a new
highlighter file.
While I have tested this locally, this highlighter isn't yet used
in devtools.
This will come in later patches.

MozReview-Commit-ID: IF0puLu5Yc7
2016-07-21 14:35:14 +02:00
Tom Tromey 1b5a2bdb96 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx
2016-07-14 10:16:42 -06:00
Joseph Yeh 1341d9ee45 Bug 1274609 - Replace uses of Ci.nsIDOMNodeFilter constants. r=jlongster
MozReview-Commit-ID: 1OeiMaVZ7tm
2016-07-11 20:28:00 +02:00
Patrick Brosset b52f1b4c32 Bug 1246088 - ESLint cleanups of devtools/shared/layout/utils.js; r=bgrins
MozReview-Commit-ID: gUB8kFMQVF
2016-03-09 12:09:48 +01:00
Patrick Brosset 90dee9ddfa Bug 1246088 - Safely access contentWindow in iframe and embed; r=bgrins
MozReview-Commit-ID: 6GRsMsJPn5x
2016-03-09 11:54:12 +01:00
J. Ryan Stinnett d0e4c235aa Bug 1238160 - Set docshell isolation mode. r=smaug
Renames nsDocShell isBrowser* attributes to add a "Moz" prefix for clarity.

Adds nsDocShell::GetIsIsolatedMozBrowserElement, which parallels
GetIsInIsolatedMozBrowserElement, but only checks the immediate docshell.

Adds nsDocShell::SetIsInIsolatedMozBrowserElement for the frame loader and tab
child to set the isolation state.

nsDocShell methods related to mozbrowser elements (and their callers) are
updated to use GetIs(In)?IsolatedMozBrowserElement when checking isolation /
origins and GetIsMozBrowserElement when checking frame types.

MozReview-Commit-ID: 6pGD5fF47ZN
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett 2dada8f365 Bug 912121 - Rewrite require / import to match source tree. rs=devtools
In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location.  Here we rewrite all require and import calls to match the new
location that these files are installed to.
2015-09-21 12:04:18 -05:00
J. Ryan Stinnett a3073e0420 Bug 912121 - Migrate major DevTools directories. rs=devtools
Move major DevTools files to new directories using the following steps:

hg mv browser/devtools devtools/client
hg mv toolkit/devtools/server devtools/server
hg mv toolkit/devtools devtools/shared

No other changes are made.
2015-09-21 12:02:24 -05:00