Commit Graph

302 Commits (fa4391d514ee5abb375d9726449122ef4ee334b3)

Author SHA1 Message Date
Milian Wolff 73705e484b first work towards a WebServer
this is the minimal server that gets properly embedded into
the phantomjs space but the .listen api is missing actually
useful options (incoming request and ability to write to client)
2011-11-15 13:44:47 +01:00
Ariya Hidayat f1b03e84d9 Bump the unstable version to 1.4. 2011-10-29 11:18:50 -05:00
IceArmy be8eece175 Refactor hook creation and hook existence checks in plugincontroller 2011-10-28 01:03:44 -07:00
IceArmy 5bcd3897a3 Refactored some redundant code from load_plugins() 2011-10-28 00:26:22 -07:00
IceArmy ec55ebdc00 Merge branch 'master' of git://github.com/ariya/phantomjs 2011-10-26 11:48:04 -07:00
Ariya Hidayat f18fd5372f Fix regression of onInitialized.
As suggested by Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>,
there is no need to use queued connection for initialized() slot.

http://code.google.com/p/phantomjs/issues/detail?id=264
2011-10-25 09:48:27 -05:00
IceArmy ee9646c5e7 Revert "cookie.value() didn't really need to be a string, since QSettings will take a QVariant anyways."
This reverts commit 5ffeef450c.

Apparently, this actually does cause a problem, as further cookies are saved in the cookies.txt file, and if the value isn't a string, then we get QByteArray() stuff polluted everywhere in the file. Oops!
2011-10-18 18:52:47 -07:00
IceArmy 5ffeef450c cookie.value() didn't really need to be a string, since QSettings will take a QVariant anyways. 2011-10-17 23:32:55 -07:00
IceArmy 3ea50c443f Minimize down the with statements that use QPyFile 2011-10-17 22:44:19 -07:00
IceArmy 34b595d01d Remove unused javascript files 2011-10-17 21:01:17 -07:00
IceArmy 13118b35bf Avoid deleting a QWebPage inside its own signal emission.
If Phantom.exit() is called inside the handler for loadFinished(), we
end up in a situation that QWebPage is deleting itself during a signal
emission. This used to be OK in QtWebKit 2.0 (Qt 4.7) but is not OK for
QtWebKit 2.2 (upcoming Qt 4.8).

http://code.google.com/p/phantomjs/issues/detail?id=251

Patch by Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>.
2011-10-06 08:28:23 -07:00
IceArmy af88a37ed8 Fix bug in CookieJar where QSettings expected str, but got QByteArray instead (#10) 2011-10-04 11:16:44 -07:00
IceArmy 1505c9a486 Add an actual version in the INSTALL for python-argparse 2011-09-28 12:29:56 -07:00
IceArmy c513f6430f Allow render() to save gif files. Requires PIL. 2011-09-27 14:17:35 -07:00
IceArmy 2accc8a724 Reorder methods to be alphabetical 2011-09-24 23:11:42 -07:00
IceArmy 470aaf5143 Reorder signals alphabetically 2011-09-23 06:38:41 -07:00
IceArmy 698c2619a8 Remove extra spaces in license 2011-09-23 04:40:56 -07:00
IceArmy 58ea69dd7f Simplify process where auth username and password gets set 2011-09-22 04:26:58 -07:00
IceArmy 77d213f3ec Merge branch 'master' of git://github.com/ariya/phantomjs 2011-09-21 00:13:42 -07:00
Ariya Hidayat eb255817c5 Revert support for getting body of requests or responses.
This is causing a serious regression. For details, check out the
following issues:

http://code.google.com/p/phantomjs/issues/detail?id=158
http://code.google.com/p/phantomjs/issues/detail?id=238
2011-09-20 23:05:34 -07:00
IceArmy 796343a8f2 Revert "Add plugin hook to __init__"
This reverts commit c039a34068.
2011-09-18 21:22:27 -07:00
IceArmy 06e8a6dd3b Improve QPyFile implementation
- Now supports Python style open mode flags
- Wrappers have been placed around methods which require/return foreign data types
2011-09-18 15:52:29 -07:00
IceArmy 2e44f1abd6 Make HTTP authentication as page settings.
http://code.google.com/p/phantomjs/issues/detail?id=45
2011-09-18 04:35:40 -07:00
IceArmy 4b882c25bd Improve the API for mouse events.
It now looks like in this example:

  page.sendEvent('mousedown', 42, 217);

Other available events are 'mouseup', 'mousemove', and 'click'. They modelled
after the DOM events.

Unit tests are included.

http://code.google.com/p/phantomjs/issues/detail?id=234
2011-09-18 04:35:26 -07:00
IceArmy 26bbd765d4 Make it possible for plugin directory to be changed by setting PYPHANTOMJS_PLUGIN_PATH environment variable 2011-09-18 03:00:37 -07:00
IceArmy f9a281ef2a Refactor plugin implementation
Also, LookupError gets raised on some methods if the hook doesn't exist.
Reason is, that not raising would be silently passing off a potential error.
2011-09-18 02:58:43 -07:00
IceArmy f39c3d4be8 Move debug setter down so it can be changed in ParseArgs hook
Reload verbose flag if ParseArgs hook changed the flag
Added args as an arg to ParseArgs hook
2011-09-17 23:14:13 -07:00
IceArmy 04909e30e4 Add hooks to Config() 2011-09-17 22:43:27 -07:00
IceArmy c039a34068 Add plugin hook to __init__
This paves the way for a plugin providing a Python API
2011-09-17 22:35:19 -07:00
IceArmy 3204616b30 Fix bug where separate NetworkAccessManager's were causing program to not exit 2011-09-17 22:24:11 -07:00
IceArmy e72274deb2 Re-order arguments into groups
Added --debug option which starts debugger automatically when an exception is encountered
2011-09-17 22:24:03 -07:00
IceArmy 6a5f3901a3 Created yes/no argument action handler to simplify conversion process
Also added type=int to max-disk-cache-size
2011-09-16 16:11:34 -07:00
IceArmy c90407b615 Merge branch 'master' of git://github.com/ariya/phantomjs 2011-09-16 13:44:16 -07:00
Ariya Hidayat df93935d52 about:blank also needs document.head.
This makes it similar to what a typical web browser does.

http://code.google.com/p/phantomjs/issues/detail?id=235
2011-09-16 07:14:38 -07:00
IceArmy bdaa4a5899 Rename plugincontroller set() to set_() to avoid clashes with built-in set() 2011-09-15 22:06:52 -07:00
IceArmy 3b2fa1f162 Fix resource building script to work in any directory
Also fixed problem where script failed on spaces in file path
2011-09-15 21:38:29 -07:00
IceArmy c0644958cd Change IOError Exceptions returned string for QPyFile() 2011-09-15 17:41:44 -07:00
IceArmy c506f3efe4 Fix bug where resource text didn't actually return the text.
Converted all the .data() back into str()
Made NetworkReplyProxy body() return str()
2011-09-15 17:39:02 -07:00
IceArmy fff0b73234 Alphebetize imports 2011-09-15 17:18:08 -07:00
IceArmy 134eec2fbf Unify the name to 'cookiesFile' everywhere
http://code.google.com/p/phantomjs/issues/detail?id=91
http://code.google.com/p/phantomjs/issues/detail?id=180
2011-09-15 16:48:50 -07:00
IceArmy 04f5165714 Special handling for about:blank
http://code.google.com/p/phantomjs/issues/detail?id=235
2011-09-15 16:19:35 -07:00
IceArmy 0f6c59cc6e Every web page gets its own network access manager.
Network-related activites should not be shared between web page
instances. Otherwise, it is extremely confusing when there are two (or
more) web pages are active at the same time.

http://code.google.com/p/phantomjs/issues/detail?id=190
2011-09-15 16:13:57 -07:00
IceArmy 3eb16093c0 We shall just pass the args instance, that's cleaner and less messy.
This is a preparation step for
http://code.google.com/p/phantomjs/issues/detail?id=190
2011-09-15 15:18:35 -07:00
IceArmy 26e49cc4c1 Fix bug on FileSystem() where super() in __new__() was calling the CSConverter class, instead of FileSystem. Whoops!! 2011-09-13 14:59:59 -07:00
IceArmy 373f28da17 Regenerate resources 2011-09-13 14:48:41 -07:00
IceArmy 826ab347e4 Refactoring on the module implementation.
Also implemented a new QPyFile class which is a wrapper
over QFile, supporting context managers. It greatly
improves code readability and reusability.

http://code.google.com/p/phantomjs/issues/detail?id=47
2011-09-13 14:45:28 -07:00
IceArmy febf9a14f6 Use super() for all class initializers instead 2011-09-12 22:27:04 -07:00
IceArmy c7dafc8dcb Fix wrong viewport size due to commits 983518d9 and 7641e4e1.
http://code.google.com/p/phantomjs/issues/detail?id=217
2011-09-10 18:24:54 -07:00
IceArmy 7bb97fb0da Create FileSystem instance only when needed.
Also made FileSystem a singleton.
2011-09-09 01:05:33 -07:00
IceArmy 6bba1715df Regenerate resources 2011-09-09 01:05:33 -07:00