Commit Graph

55 Commits (c616205620db13b9e7a4f189e655414fc9ecf788)

Author SHA1 Message Date
Ivan De Marino c616205620 Added a Qt Message Handler (finally). 2011-04-08 15:49:20 +01:00
Ivan De Marino a45b8e8401 Major refactoring of the CPP code into separate classes.
This doesn't add ANY new feature: it's aimed only at separating code into
more manageable pieces.

Maybe it's not perfect yet, but it's a start.
2011-04-08 14:30:50 +01:00
Ivan De Marino ce07e12c9e Merge remote branch 'upstream/master' 2011-04-07 10:19:12 +01:00
IceArmy 6888877aad In setClipRect, remove top and left positive only limits 2011-04-01 13:21:35 -07:00
Wouter de Bie 2a84536d95 Match coding style 2011-03-30 08:18:47 +02:00
Wouter de Bie affdd9b245 Don't copy buffers, but translate the QPainter instead when clipping 2011-03-29 21:01:40 +02:00
Wouter de Bie f96d113302 Renamed clipSize() to clipRect() 2011-03-29 20:09:45 +02:00
Wouter de Bie 7531b3311c Renamed renderSize() to clipSize() and fixed a bug 2011-03-29 20:06:12 +02:00
Wouter de Bie 2fe2e696ee Modified phantom.renderSize() to allow top and left parameters 2011-03-29 13:30:40 +02:00
Wouter de Bie 3e939febd4 Added phantom.renderSize() to be able to control the dimensions of the output 2011-03-29 08:39:58 +02:00
Ivan De Marino 8ac4a7962b Separated the "usage" instructions in a text file, embedded as "resource".
Also:
* I added a couple of "qFatal" where it makes sense.
* Usage now mentions the fact that the input files that finish by ".coffee" are also acceptable
2011-03-24 23:20:34 -07:00
Ivan De Marino f86bc38bc1 Separated the "usage" instructions in a text file, embedded as "resource".
Also:
* I added a couple of "qFatal" where it makes sense.
* Usage now mentions the fact that the input files that finish by ".coffee" are also acceptable
2011-03-24 22:43:49 +00:00
Ivan De Marino 23cfad71fa Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/phantomjs.cpp
2011-03-24 22:00:53 +00:00
Ariya Hidayat 2182d8e54b Add icon files for Windows and OS/2.
Issue: http://code.google.com/p/phantomjs/issues/detail?id=60

This improvement is provided by Salvador Parra Camacho.
2011-03-18 23:43:45 -07:00
Alessandro Portale fbb524e629 Issue 17: Make paper size for the PDF export specifiable
http://code.google.com/p/phantomjs/issues/detail?id=17

Adding a new phantom property called "paperSize". It takes one of
the two possible dictionary variants:
   { width: '200px', height: '300px', border: '0px' }
   { format: 'A4', orientation: 'portrait', border: '1cm' }
- If no paperSize is defined, the size is defined by the web page
- supported dimension units are: mm, cm, in, px. No unit means px.
- border is optional and defaults to 0.
- supported formats are: A3, A4, A5, Legal, Letter, Tabloid
- orientation (portrait|landscape) is optional and defaults to portrait

I'm considering implementing a short form like:
  phantom.paperSize = 'A4';
...needs further investigation.
2011-03-18 10:26:45 +01:00
Ivan De Marino 3b4163521f Merge remote-tracking branch 'upstream/master' 2011-03-14 22:53:27 +00:00
Ariya Hidayat a7a1322ea1 Fixed issue #19: option for setting the proxy.
Based on the original patch by Clint Berry.
2011-03-13 21:35:49 -07:00
Ivan De Marino 6ad3352519 Minor tweaks for qDebug messages 2011-03-04 10:13:32 +00:00
Ariya Hidayat 158362ed16 Start to implement support for CoffeeScript. 2011-03-02 00:59:07 -08:00
Ivan De Marino 25cf54784f Added "phantom.loadJs" and "phantom.includeJs", plus more "qDebug" usage
* "phantom.loadJs()" loads a JS file and executes it's content within the current Document Context. It's synchronous.
* "phantom.includeJs()" adds a <script> tag include. It's asynchronous and accepts as second parameter a "callback", fired when the js file has been loaded.
* Some more qDebug() calls
* qDebug() output disabled by default in the .pro file

NOTE: I'm adding qDebug() calls to make development of phantomjs easier and "debuggable"
2011-03-01 18:16:44 +00:00
Ivan De Marino ee1c5afc32 Merge branch 'master' of https://github.com/detro/phantomjs 2011-03-01 12:09:12 +00:00
Ivan De Marino 8951859a53 Added "phantom.simulateMouseClick" and other minors for debugging.
* 'phantom.simulateMouseClick' accepts a 'selector' and clicks on every element that matches the selector
* Added a couple of 'qDebug()' to help debugging PhantomJS
2011-03-01 12:09:03 +00:00
Ivan De Marino 9c74adeeca Enhanced the "usage" message and fixed misdocumented behaviour of "--load-plugins"
* Now the "usage" shows all the options that are currently supported by phantomjs from the command line
* The default behaviour for the option "--load-plugins" is now fixed (to "no")
2011-02-28 23:17:59 +00:00
Ariya Hidayat 378406b89d Support for rasterizing as GIF image. 2011-02-19 22:47:15 -08:00
Ariya Hidayat 84a594112e Allow plugins loading (by default, plugins are not loaded).
This is issue #14:
http://code.google.com/p/phantomjs/issues/detail?id=14
2011-02-13 22:44:43 -08:00
Ariya Hidayat f827d88818 Allow disabling the loading of images.
This is issue #35:
http://code.google.com/p/phantomjs/issues/detail?id=35
2011-02-13 21:29:58 -08:00
Ariya Hidayat 799fa0b210 Hide command-line options from the script.
For example, the argument to allow file upload now is part of
phantomjs invocation:

    phantomjs --upload-file tag=/path/to/file script.js A B C

which means script.js only "sees" A, B, C in phantom.args array.
2011-02-13 20:59:37 -08:00
Ariya Hidayat bc6792769b Coding style fixes. 2011-02-13 12:01:12 -08:00
Matthias 5a7f742c11 File Uploads
pass --upload-file fileTag=/path/to/file as an argument and set the file of <input type="file" id="foo"/> by calling phantom.setFormInputFile(document.getElementById('foo'), 'fileTag');
2011-02-06 19:55:04 +01:00
Matthias e4a374185b Comment out shebang 2011-02-06 13:53:30 +01:00
Ariya Hidayat 9eb2dfb505 Really make it compile with Qt 4.6. 2011-01-29 19:17:10 -08:00
Ariya Hidayat 4baf0269ba Make it compile with Qt 4.6. 2011-01-29 19:13:19 -08:00
Ariya Hidayat 6e4aeb1077 Bump version. 2011-01-29 19:07:35 -08:00
mattn ee54806abc load script as utf-8 encoding. 2011-01-28 20:04:00 +09:00
mattn c0398f3fd7 use setUseSystemConfiguration(true). 2011-01-28 20:02:54 +09:00
Ariya Hidayat 0faca2649e Fix coding style. 2011-01-27 16:51:43 -08:00
jdalton 6bb2f1b4a1 phantomjs: Allow PhantomJS to build with Qt 4.5 which is available for Cygwin. [jddalton] 2011-01-27 18:57:35 -05:00
Alessandro Portale d14be77e56 Issue 20: JPG transparent colour is black.
Filling QImage with transparent white instead of transparent
black. For an artifact free rendering of a transparent web
page into PNG, Format_ARGB32 is needed instead of
Format_ARGB32_Premultiplied.
2011-01-27 16:54:58 +01:00
Ariya Hidayat 7f9e03ffad Change phantom.arguments to phantom.args.
This is explained in
http://code.google.com/p/phantomjs/issues/detail?id=16:

'arguments' is reserved word.

Reported by: Nicolas Ferrero.
2011-01-14 22:24:47 -08:00
Alessandro Portale 32701e9bba Avoid crash with post-exit page loading.
If the javascript calls phantom.exit(), and afterwards
phantom.open(), if may happen that the open() triggers a
loadFinished() signal happens after Phantom was destroyed.
Result: Crash in Phantom::finish().

Workaround: Disconnect from loadFinished() when exit() is
called.
2011-01-09 22:16:28 +01:00
Ariya Hidayat 5b9d091585 Recognize PDF in phantom.render function. 2011-01-01 20:18:39 -08:00
Ariya Hidayat 3a0d0886b6 Provide an API to get PhantomJS version. 2011-01-01 08:29:03 -08:00
Ariya Hidayat 04cc4193ca Change phantom.storage to phantom.state. 2010-12-31 22:09:02 -08:00
Ariya Hidayat 6979a02837 JavaScript alert() prints the message to stdout. 2010-12-31 20:23:55 -08:00
Ariya Hidayat 24d433ea13 Remove phantom.log, just use the de-facto console.log for logging. 2010-12-31 20:10:34 -08:00
Ariya Hidayat 37d67f0395 Readd the render() function to render the web page to an image. 2010-12-31 17:07:25 -08:00
Ariya Hidayat ad252166d7 Flattened frame and invisible scroll bars are better in headless. 2010-12-31 09:20:19 -08:00
Ariya Hidayat 069cf546f6 New property 'viewportSize' to read and modify the viewport size. 2010-12-31 09:11:02 -08:00
Ariya Hidayat 570eee099e Remove unused declarations. 2010-12-31 08:50:55 -08:00
Ariya Hidayat a580dcfaa2 Remove unfinished (and thus, useless) support for Web Inspector. 2010-12-30 00:12:24 -08:00