GCLI has been handling the state of our buttons as well as managing shared highlighters.
Since the gcli removal, we no longer share the rulers and measure with any other UI, so a location
for shared state is no longer needed.
Differential Revision: https://phabricator.services.mozilla.com/D3506
--HG--
extra : moz-landing-system : lando
Also fixes existing code which fails the rule.
MozReview-Commit-ID: CkLFgsspGMU
--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
This commit introduces a new highlighter. This highlighter is specialized in
highlighting text-runs in a page that use a specified font.
The highlighter is based on a platform API that returns Range objects.
Therefore, the approach I chose was to simply feed these objects to the
window Selection object. This way, we get highlighting for free without
having to create any markup in the content page.
The drawback is that the highlighting looks different than in other places
of DevTools.
However it's most probably way better in terms of performance, and will
adapt natively to edge cases like APZ, scrolling, CSS transform, etc.
This commit also has a simple UI: on mouseover of a font name in the font
inspector panel, corresponding text runs are highlighted in the page.
This UI is hidden behind a pref for now, so we can test the feature with
some chosen users and gather feedback to improve the UI before shipping.
Finally, an integration test was added.
MozReview-Commit-ID: Fu3t0b5kbdy
--HG--
extra : rebase_source : 80493e64ad6fdb1ec1963021eb9bd7c3f5398201
This also removes any redundant Ci.nsISupports elements in the interface
lists.
This was done using the following script:
acecb401b7/processors/chromeutils-generateQI.jsm
MozReview-Commit-ID: AIx10P8GpZY
--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
This adds a new highlighter to our collection of highlighters.
This one is a simple overlay on top of the page and a message at the
top.
It will be used by the debugger to signal to users that script execution
is paused.
In later versions, the message at the top will also contain stepping and
resuming buttons.
MozReview-Commit-ID: JNGWrVjMzkm
--HG--
extra : rebase_source : 2006068b82f808c284aebe9f1f364970bda428c5
Some tests were failing since they navigate in the history of frames; and that
was triggering the `onPageHide` for the highlighter.
MozReview-Commit-ID: 7lGRTg4CerU
--HG--
extra : rebase_source : 730fe1515feb706ea15f2ab0a8f193acdcb99e40
This changes the behavior of the element picker so that when it is
cancelled the previously selected DOM node is re-scrolled into view.
Additionally the existing behavior of the keyboard shortcuts for the
element picker was broken when the devtools toolbox was docked. The main
content area was not being focused, so the keyboard shortcuts for the
element picker were not being used. When the toolbox is detached, the
focus event is still not fired, as it's not desirable to have the
content pop into view over the devtools.
Finally there is now an additional implementation of the Escape shortcut
when the devtools are focused. The console Escape shortcut is ignored
until the element picker has been disabled making disabling the element
picker consistent irrelevant of the context.
MozReview-Commit-ID: HxENmPBoTcD
--HG--
extra : rebase_source : 067b51d4c7324f2e59fc698dbd5bb01ad2b29205
The eyedropper code now bails out if the content window is XUL, since
highlighters cant be inserted into non-HTML documents.
And the inspector hides the eyedropper buttons in the toolbar and in the
color-picker if the document isn't HTML.
MozReview-Commit-ID: 7AgRV8Qu9gz
--HG--
extra : rebase_source : 04220a6057df9ced4b49c29e8b46557008e0d738
This adds a new highlighter in devtools/server/actors/highlighters.
For now this highlighter isn't used and can only display grid lines
as provided by node.getGridFragments().
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
--HG--
rename : devtools/client/shared/css-color-db.js => devtools/shared/css-color-db.js
rename : devtools/client/shared/css-color.js => devtools/shared/css-color.js
extra : rebase_source : 72431a9148d1c688987a5693a619769837c774c7