Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Henrik Skupin d6c05078f8 Bug 1559592 - [marionette] Make use of the new Fission compatible screen capture API. r=webdriver-reviewers,ato,automatedtester
To allow Marionette to capture the content of OOP iframes, the
new Fission compatible screenshot API has to be used.

For callers requesting a read-back of the pixel data as
currently in the compositor/window, the 'drawWindow()'
method still has to be called.

Differential Revision: https://phabricator.services.mozilla.com/D40654

--HG--
extra : moz-landing-system : lando
2019-08-27 13:01:01 +00:00
Henrik Skupin a4b63bd323 Bug 1559592 - [marionette] Take screenshots for content in parent process. r=webdriver-reviewers,ato,automatedtester
This moves all the screenshot related code from the framescript to
the parent process, so that canvas.js is no longer called from
within a content process.

The remaining code in the framescript is only needed to compute
the dimensions of the screenshot, and from all the to highlight
elements.

This move is necessary to allow switching to the new drawSnapshot
API which only works from within the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D40209

--HG--
extra : moz-landing-system : lando
2019-08-27 13:08:24 +00:00
Henrik Skupin c9b01104ed Bug 1575511 - [marionette] Remove feature to highlight elements in screenshots. r=webdriver-reviewers,ato
The feature was used in the past to highlight broken elements for l10n
specific tests. Given that those tests don't exist anymore (for already
a long time) the highlight feature doesn't have to be kept alive.

Also it isn't covered by the WebDriver spec, and as such a custom feature
which is not worth keeping its code working. Especially with the Fission
work upcoming.

Differential Revision: https://phabricator.services.mozilla.com/D42823

--HG--
extra : moz-landing-system : lando
2019-08-21 12:42:25 +00:00
Henrik Skupin 9cd23a9635 Bug 1571659 - [marionette] Explain why certain flags for drawWindow() cannot be used right now. r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D40819

--HG--
extra : moz-landing-system : lando
2019-08-07 21:00:58 +00:00
Coroiu Cristina d087a820d0 Backed out changeset 4dab6e3dc6ed (bug 1377335) on request by whimboo 2019-08-06 16:43:25 +03:00
Henrik Skupin 6773494087 Bug 1377335 - [marionette] Re-enable DRAWWINDOW_DRAW_VIEW and DRAWWINDOW_USE_WIDGET_LAYERS flags for screen captures. r=webdriver-reviewers,ato
All dependencies are fixed, or no longer reproducible. As such both
flags can be re-enabled. Also reftests won't have to specify the
exactly same flags on its own anymore.

Differential Revision: https://phabricator.services.mozilla.com/D40395

--HG--
extra : moz-landing-system : lando
2019-08-02 11:09:02 +00:00
Victor Porof 2b036e45c5 Bug 1561435 - Format testing/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35962

--HG--
extra : source : c0948f31e520ca087279cf429ca5f1db5a8341b8
2019-07-05 11:01:24 +02:00
Lee Salzman 73f0b9de6d Bug 1531417 - limit DrawWindow surfaces with PersisentBufferProviderShared to visible size r=nical
Differential Revision: https://phabricator.services.mozilla.com/D22027

--HG--
extra : moz-landing-system : lando
2019-03-05 14:19:37 +00:00
Lee Salzman 7f0bdd5469 Bug 1531417 - fix marionette test. r=me CLOSED TREE 2019-03-01 16:40:58 -05:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Kristian Klausen b21f9d63a7 bug 1385706: marionette: fix WebDriver:TakeScreenshot to use viewport bounds; r=ato
The WebDriver:TakeScreenshot command relied on the document element's
clientWidth/clientHeight, but should according to the WebDriver
specification use the viewport's dimensions.

Thanks-to: JinaJita <jitajina@gmail.com>
2019-01-09 15:06:50 +00:00
Noemi Erli 94a824b783 Backed out changeset 76be2a9fde9e (bug 1385706) per developer's request CLOSED TREE 2019-01-09 17:00:32 +02:00
Andreas Tolfsen e490d97127 bug 1385706: marionette: fix WebDriver:TakeScreenshot to use viewport bounds; r=ato
The WebDriver:TakeScreenshot command relied on the document element's
clientWidth/clientHeight, but should according to the WebDriver
specification use the viewport's dimensions.

Thanks-to: JinaJita <jitajina@gmail.com>
2019-01-09 14:49:38 +00:00
Henrik Skupin 65c9584a67 Bug 1485730 - [marionette] Limit width and height of created canvas to 32767 pixels. r=ato
The Skia GFX backend limits the dimension of canvases to a maximum
of 32767 for the width and height.

--HG--
extra : rebase_source : b0e1f60cc2f0c1b83e7cb7551216323983cb3407
2018-08-28 13:40:11 +02:00
Andreas Tolfsen 0be64b42c5 Bug 1467744 - Lazily import globals in Marionette. r=whimboo
Calling Cu.importGlobalProperties immediately defines the import
properties and any prototypes that they require.  Aside from CPU
overhead, this also tends to consume a lot of memory, especially
for objects with complex prototypes.  And it does this once for
every global you call it in.  This is especially a problem for
content processes, since we get this memory overhead in each and
every content process.

This patch moves Marionette to use the new
XPCOMUtils.defineLazyGlobalGetters so that symbols are constructed
only when actually needed.

MozReview-Commit-ID: 3RYWTcdO7FM

--HG--
extra : rebase_source : 0c450c8900e5de5446796b34ae4ab6bdf0fe9118
2018-06-08 13:16:29 +01:00
Andreas Tolfsen bb83c96d6e Bug 1441228 - Correct error returned for invalid input to capture.highlight_. r=whimboo
The WebDriver:TakeScreenshot command should return an invalid
argument error when the input is malformed.

MozReview-Commit-ID: HZFkq6QkWze

--HG--
extra : rebase_source : c44f42938df1e818926f38a608f13c94a3f7e2fc
2018-02-26 17:42:56 +00:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Andreas Tolfsen dd7a57fd22 Bug 1384517 - Fix testing/marionette API docs; r=automatedtester
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.

MozReview-Commit-ID: F9duuQoOYBt

--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
2017-07-26 13:11:53 +01:00
Andreas Tolfsen de001d80b7 Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN

--HG--
extra : rebase_source : d4e25369418cc72a6ee9f78d44b050a87403391d
2017-06-29 16:40:24 -07:00
James Graham bbadf01cb5 Bug 1363428 - Skip element highlighting if there are no highlights, r=ato
MozReview-Commit-ID: 3rc4XnykV1S
2017-06-24 12:03:10 +01:00
James Graham 887aa1f450 Bug 1363428 - Allow passing flags when drawing to a canavs, r=ato
MozReview-Commit-ID: 8QAFiWcsKNE
2017-06-24 12:03:09 +01:00
James Graham f4cf348d7b Bug 1363428 - Allow passing in an existing canvas to capture.canvas, r=ato
MozReview-Commit-ID: EGvEr7XfHH9
2017-06-24 12:03:09 +01:00
Wes Kocher ea40157e54 Backed out 16 changesets (bug 1363428) for Wr failures a=backout CLOSED TREE
Backed out changeset e86d6d5c2a25 (bug 1363428)
Backed out changeset a0687a63e7b9 (bug 1363428)
Backed out changeset 858dc97498c7 (bug 1363428)
Backed out changeset 582a8dce7932 (bug 1363428)
Backed out changeset 26ae2fd48587 (bug 1363428)
Backed out changeset 7fa8e20fe001 (bug 1363428)
Backed out changeset 829c13a75667 (bug 1363428)
Backed out changeset a94d2c400b04 (bug 1363428)
Backed out changeset ec4a6b343b37 (bug 1363428)
Backed out changeset c27b94038e71 (bug 1363428)
Backed out changeset d1c03b96d270 (bug 1363428)
Backed out changeset 60c1c95b46ca (bug 1363428)
Backed out changeset b0604d88973f (bug 1363428)
Backed out changeset f0b218979773 (bug 1363428)
Backed out changeset 1d359561373c (bug 1363428)
Backed out changeset 956d6c0a646e (bug 1363428)

MozReview-Commit-ID: K8EBA8ACZLC
2017-06-23 14:13:27 -07:00
James Graham d090e05ce4 Bug 1363428 - Skip element highlighting if there are no highlights, r=ato
MozReview-Commit-ID: 3rc4XnykV1S

--HG--
extra : rebase_source : a4b4f7a54b4f92ebbc00dd76127e2db7782e755a
2017-05-09 17:26:45 +01:00
James Graham 3d82db9e19 Bug 1363428 - Allow passing flags when drawing to a canavs, r=ato
MozReview-Commit-ID: 8QAFiWcsKNE

--HG--
extra : rebase_source : 1ed9d27f877b61c4c935063dfa75d7035bd174d8
2017-05-09 17:26:08 +01:00
James Graham 42f93b4c79 Bug 1363428 - Allow passing in an existing canvas to capture.canvas, r=ato
MozReview-Commit-ID: EGvEr7XfHH9

--HG--
extra : rebase_source : ad906ada5a238ec174edacb0db859127404a063f
2017-05-09 17:23:47 +01:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Andreas Tolfsen 2d255984aa Bug 1213875 - Add ability to not scroll into view element on screen capture; r=whimboo
Implements a `scroll` argument for choosing the scroll into view behaviour
when taking screen captures of elements.

https://w3c.github.io/webdriver/webdriver-spec.html#take-element-screenshot

MozReview-Commit-ID: BOKBrKqQ916

--HG--
extra : rebase_source : 290f9a6a7c64c0f2932128679a84044138d96b6c
2016-12-20 14:30:48 +00:00
Andreas Tolfsen c48ea8d3bb Bug 1213875 - Lint arguments in capture module; r=whimboo
MozReview-Commit-ID: EowxaYVwMxm

--HG--
extra : rebase_source : e99562b1cc84b302b52eb66b6f8fe45649b19d4c
2016-12-20 14:26:58 +00:00
Henrik Skupin 260407fb18 Bug 1243415 - Make use of capture.js in chrome scope. r=automatedtester
The screenshot code in chrome scope is updated to use the generic capture module,
which is already used for content scope. By that change the code which captures
the canvas makes use of devicePixelRatio now. It means the screenshot will be
scaled depending on the screen configuration, eg. on Andoid this mostly 2.

MozReview-Commit-ID: EBKmJEKVXPQ

--HG--
extra : rebase_source : cd399eb3ee012516b218b9d1a5fd26422ebc9be0
2016-12-28 14:13:31 +01:00
Henrik Skupin 03cbd80428 Bug 1243415 - Capture methods should use the window as parameter. r=automatedtester
MozReview-Commit-ID: FfuCSPZtiex

--HG--
extra : rebase_source : fdbba7f7651ec650a5648211544a22480eb0eb3c
2016-12-05 18:27:15 +01:00
Carsten "Tomcat" Book ef7bd543e4 Backed out changeset e6091803e801 (bug 1243415) for wr test bustage 2016-12-16 12:32:47 +01:00
Carsten "Tomcat" Book 1c5c762785 Backed out changeset 1a07b3fcb30b (bug 1243415) 2016-12-16 12:32:23 +01:00
Henrik Skupin 685e8274c6 Bug 1243415 - Make use of capture.js in chrome scope. r=automatedtester
The screenshot code in chrome scope is updated to use the generic capture module,
which is already used for content scope. By that change the code which captures
the canvas makes use of devicePixelRatio now. It means the screenshot will be
scaled depending on the screen configuration, eg. on Andoid this mostly 2.

MozReview-Commit-ID: EBKmJEKVXPQ

--HG--
extra : rebase_source : 3d177eeac4935660f43727a20445a39fe78a2c45
2016-12-09 20:47:21 +01:00
Henrik Skupin df594e4cb3 Bug 1243415 - Capture methods should use the window as parameter. r=automatedtester
MozReview-Commit-ID: FfuCSPZtiex

--HG--
extra : rebase_source : 667966b1f728f2eb7e7b1a6a647c2c402f21a0c0
2016-12-05 18:27:15 +01:00
Thomas Charles acf2f9d4dd Bug 1316975 - Correct function definition style in Marionette components; r=ato
No functional changes.

MozReview-Commit-ID: 25cWAnpRB9H

--HG--
extra : rebase_source : c8b14bf47a476488568f54d3640b51bbeed5b04b
2016-12-04 12:42:52 +01:00
Kim Brown 3d3fc8c2d4 Bug 905650 - Added ability to get the hash of a screenshot; r=ato
MozReview-Commit-ID: 3NL7nkqpG6I

--HG--
extra : rebase_source : 1126849b99aaa622c402d350bc6d67ac192e4b7a
2016-04-17 21:37:14 -04:00
Andreas Tolfsen 30ee512caa Bug 1213797: Refactor screen capture and SVG document support
Errors thrown by takeScreenshot used to be silently ignored.  When the
command started using the new dispatching technique in bug 1202663,
it was surfaced we do not support taking screen captures of SVG documents.

Since this is a requirement for Web Platform Tests, this patch corrects
the wrong assumptions about document body and document element.

This patch also significantly refactors the screen capture code, but
only uses the new implementation in contnent space, since some further
modifications are required to use it in chrome.

r=dburns
r=jgriffin

--HG--
extra : commitid : DdCIEpd5PEJ
extra : rebase_source : 7357010f992d7f995765c685000892cc59d9ec9a
2015-10-13 16:52:26 +01:00