IceArmy
3581fae3c0
Revert most of commit c8f45c2d
2011-12-15 17:04:23 -08:00
IceArmy
c8f45c2d15
Replace more unused variables with _
2011-12-13 13:09:34 -08:00
IceArmy
8ade9f43a4
Fixed some small obscure bugs, clean up the code, and renamed unused variables to _
2011-12-11 21:37:33 -08:00
IceArmy
f94b87551d
Probably best to take the base of the UnicodeError exceptions...
2011-11-30 11:35:44 -08:00
IceArmy
424214361a
Further refactoring
...
Modified utils a bit to remove the problem of future circular imports
Cleaned up main pyphantomjs file
Cleaned up a little of the code
2011-11-27 10:56:12 -08: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
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
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
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
3204616b30
Fix bug where separate NetworkAccessManager's were causing program to not exit
2011-09-17 22:24:11 -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
fff0b73234
Alphebetize imports
2011-09-15 17:18:08 -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
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
5821a60db1
Rename option/config to localToRemoteUrlAccess(Enabled).
2011-09-07 20:52:22 -07:00
IceArmy
d4fe103a66
Whoops! self.parent != self.m_parent
2011-09-04 00:04:12 -07:00
IceArmy
87a580f36a
Add output-encoding and script-encoding options
2011-08-31 15:43:29 -07:00
IceArmy
5e069ee711
Misc improvements
...
Changed all if not's/if's for None's to if value is None/if value is not None
Fix bug in fs where split never used os.altsep because if not always evaluated to False since there's almost always something in the list returned
Fix the fixme on fs.isAbsolute where we needed to split the Windows drive letter off
2011-08-24 14:32:29 -07:00
IceArmy
3d8d7342ab
Rename self.parent to self.m_parent
2011-08-23 12:18:41 -07:00
IceArmy
fa285e0aca
page.release() now works without JS shim.
2011-08-23 12:18:25 -07:00
IceArmy
3caac5a5a3
Rename "XSSAuditing" to "XSSAuditingEnabled"
2011-08-21 14:08:14 -07:00
IceArmy
9057287171
Add callback for page initialization. #143
2011-08-20 18:50:56 -07:00
Ariya Hidayat
e79a51bdd8
Merge pull request #129 from Roejames12/QWebSettings
...
New page settings
2011-08-20 17:17:36 -07:00
IceArmy
8880edcf78
Remove settings: jsOpenWindows, jsAccessClipboard, siteSpecificQuirksMode
...
Renamed jsEnabled to javascriptEnabled
2011-08-20 16:49:36 -07:00
IceArmy
7418a84e60
Added functions to WebPage class to simulate mouse move, mouse up, and mouse down. Also added click() convenience function, which combines a move, mousedown, and mouseup.
2011-08-19 16:32:14 -07:00
IceArmy
9e4830d44c
Move pdf_dpi to better location
2011-08-19 16:32:14 -07:00
IceArmy
33005c3957
Add a few new QWebSettings for page settings.
...
Among the most useful, is the jsEnabled setting, which allows you to disable JavaScript.
2011-08-19 15:47:34 -07:00
IceArmy
7cbd75a400
Make the parents the first argument (since we will always supply the arg, and also for cleanliness and order)
2011-08-18 14:23:58 -07:00
IceArmy
12d36a195a
Don't require \ at the end of multiline imports
2011-08-01 19:13:19 -07:00
IceArmy
c9ad2c35a7
Correctly handle KeyError/ValueError exceptions on scrollPosition setter
2011-07-29 02:12:12 -07:00
IceArmy
56939bc153
Simplify clipRect code
2011-07-29 02:11:55 -07:00
IceArmy
4440397ef4
Remove useless .keys() method call in for loops
2011-07-29 01:59:50 -07:00
IceArmy
df5ac1d9c3
Rename m_webPage.scrollPosition to m_webPage.m_scrollPosition
...
Fix bug where m_scrollPosition is undefined if you read scrollPosition from JS without first setting it
2011-07-29 01:56:37 -07:00
IceArmy
403572b633
Stop using globals() on scrollPosition()
2011-07-29 01:52:53 -07:00
Kapil Reddy
7641e4e1a4
Renamed pageScroll to scrollPosition
2011-07-11 12:17:40 +05:30
Kapil Reddy
983518d913
Added pageScroll property to webPage for javascript and changed renderImage code to render webpage considering scroll
2011-07-08 14:29:10 +05:30
IceArmy
b7fb218473
Improve plugin system
...
Thanks to frame hacks, we can get rid of passing/modifying locals()
- Passing bunched locals() is no longer needed on the hook points
- You can access the parent namespace with get() instead
- You can change stuff in the parent namespace with set()
2011-07-04 02:48:10 -07:00
IceArmy
78c984d6bf
Stop messing with the global namespace on clipRect and viewportSize
2011-07-03 23:16:51 -07:00
IceArmy
346f238d7f
Enabled HTML5 Web App Cache.
2011-06-24 18:35:56 -07:00
IceArmy
64404a1902
Adding "--local-access-remote=[yes|no]".
...
* This will allow local content to access remote content, bypassing the same origin policy.
* It's controllable from the CLI and through the "page.settings" property
* This addresses Issue #28 but only partially: it's still not possible to make _remote content access other remote content on a different origin_.
2011-06-24 18:35:56 -07:00
IceArmy
d29c6732b5
Pass source and lineNumber for console redirection.
...
onConsoleMessage callback can handle two (optional) arguments, e.g.
page.onConsoleMessage = function (msg, lineNo, source) {
....
};
2011-06-19 22:34:29 -07:00
Ariya Hidayat
6e2b362850
Change scriptLookupDir to libraryPath.
2011-06-17 20:52:19 -07:00