Commit Graph

1236 Commits (e2295f805c0deeabcec4e3b28ba555bc9f3d29fa)

Author SHA1 Message Date
Ariya Hidayat e2295f805c Lavender.
http://code.google.com/p/phantomjs/issues/detail?id=598
2012-06-20 23:28:04 -07:00
Ariya Hidayat ffc594e264 Fix Twitter-related examples to work with the new site.
http://code.google.com/p/phantomjs/issues/detail?id=609
2012-06-20 22:54:20 -07:00
Ariya Hidayat 78b1e271d6 Merge branch 'master' into 1.6 2012-06-20 21:30:30 -07:00
Ariya Hidayat 9c05341698 Changes for Lavender.
http://code.google.com/p/phantomjs/issues/detail?id=598
2012-06-20 21:24:46 -07:00
Ariya Hidayat 8c46d6db83 Only compress with UPX if it's available.
Also, make sure we use the maximum compression level.

http://code.google.com/p/phantomjs/issues/detail?id=599
2012-06-20 21:18:37 -07:00
Ariya Hidayat e524157c81 Merge branch 'master' into 1.6 2012-06-20 09:06:25 -07:00
Ariya Hidayat 06e424b614 Merge pull request #278 from jonleighton/deploy
fix lib paths for dump-symbols.sh
2012-06-20 07:48:08 -07:00
Jon Leighton eca983cdda fix lib paths for dump-symbols.sh 2012-06-20 09:15:03 +01:00
Ariya Hidayat 7944013141 Merge branch 'master' into 1.6 2012-06-19 17:26:04 -07:00
Ariya Hidayat 959f8ca323 Merge pull request #277 from jonleighton/deploy
A couple of packaging script tweaks
2012-06-19 17:23:44 -07:00
Jon Leighton 7ff61604e3 use upx to compress binary on OS X 2012-06-19 23:49:06 +01:00
Jon Leighton d0ee703529 tweak/fix provision-vm.sh 2012-06-19 23:19:49 +01:00
Ariya Hidayat 1f685ec241 Set version to 1.6.0.
http://code.google.com/p/phantomjs/issues/detail?id=598
2012-06-19 06:58:19 -07:00
Ariya Hidayat 78d23935a5 Update CoffeeScript compiler to version 1.3.3.
http://code.google.com/p/phantomjs/issues/detail?id=496
2012-06-18 22:40:51 -07:00
Ariya Hidayat c68082e3b1 Undocument the callback mechanism.
This is private for now, see issue 133 for details.

http://code.google.com/p/phantomjs/issues/detail?id=133
2012-06-18 22:35:53 -07:00
Ariya Hidayat 23469d6cde Merge pull request #276 from jonleighton/breakpad
Breakpad / deploy stuff
2012-06-18 20:59:35 -07:00
Ariya Hidayat e5f695a0b4 Merge pull request #275 from jonleighton/stacktraces
Fix segfault when using e.g. console.error
2012-06-18 20:59:12 -07:00
Jon Leighton fe784b45e6 PhantomJS itself also needs to be build in debug mode.
https://code.google.com/p/phantomjs/issues/detail?id=599
2012-06-19 00:30:17 +01:00
Jon Leighton aa533a5659 ignore deploy/brandelf 2012-06-19 00:29:18 +01:00
Tom Stuart & Jon Leighton 5fa0202f29 Add breakpad support for Mac
This provides support for compiling the breakpad client into PhantomJS,
and generifies that Linux packaging scripts so that they also apply to
OS X and automate the symbol generation.

Building the Breakpad tool programs seems to be less than
straightforward on OS X, and documentation is poor. We have managed to
produce tools/dump-syms-mac.pro which allows building the dump_syms
program for dumping the debugging symbols. This needed a couple of
modifications to breakpad in order to compile successfully.

We have run out of time to work on making the minidump_stackwalk program
build. However, this is solely a developer tool and so it can wait until
after the 1.6 release before we complete this work.

Testing is welcome!

https://code.google.com/p/phantomjs/issues/detail?id=576
2012-06-19 00:28:37 +01:00
Jon Leighton 439a58eaee Fix segfault when using e.g. console.error
When console.error was called, there was a segfault because it was
treated as an uncaught exception, but did not have the correct stack
trace information (I am not sure why, but still...)

Now that we are generating the stackTrace in WebCore::reportException,
the MessageType gets set correctly, so we can use this to differentiate
between uncaught exceptions and other messages.

https://code.google.com/p/phantomjs/issues/detail?id=47
2012-06-18 23:43:50 +01:00
Ariya Hidayat c3c65df12d Merge pull request #273 from ferama/master
fix wrong pdf margins using custom header/footer
2012-06-18 06:53:29 -07:00
Marco Ferragina 1a3be3bbce fix wrong pdf margins using custom header/footer
see issue http://code.google.com/p/phantomjs/issues/detail?id=588
2012-06-18 12:25:14 +02:00
Ariya Hidayat 37cfc05a9b Merge pull request #272 from detro/master
Minor adjustments before 1.6
2012-06-17 22:20:12 -07:00
Ivan De Marino b443b7add8 Changing the "working directory" to "/test" before running tests.
This fixes some issues with our tests, where we were erroneously failing.
2012-06-17 19:37:24 -07:00
Ivan De Marino bd6f1f2ffe Adding a Q_UNUSED to removing compilation annoyance. 2012-06-17 19:21:44 -07:00
Ivan De Marino 55efadc926 After discussing with @ariya on [Issue 547](http://code.google.com/p/phantomjs/issues/detail?id=547), I reduced the methods to 1: rendereBase64(format).
Available formats are the one supported by QImageWriter: http://qt-project.org/doc/qt-4.8/qimagewriter.html#supportedImageFormats.
Formats can be entered in lower or uppercase: it gets normalised internally.
2012-06-17 18:27:36 -07:00
Ariya Hidayat a272d660a6 Merge pull request #271 from jonleighton/deploy
Provide scripts and workflow for building Linux packages for release.
2012-06-17 16:37:28 -07:00
Jon Leighton 1b621e9f50 Provide scripts and workflow for building Linux packages for release. 2012-06-17 23:40:12 +01:00
Ariya Hidayat 804a7f3df4 Fix qscriptengine.h after Qt update to 4.8.2.
Our copy of Qt does not build QtScript, only uses the header file for an enum.

As reported by Jon Leighton.

http://code.google.com/p/phantomjs/issues/detail?id=495
2012-06-17 14:48:39 -07:00
Ariya Hidayat 70c09ba620 WebKit: Don't treat warnings as errors.
This was added in Qt 4.8.2. Revert it until we solve all compiler
warnings.

http://code.google.com/p/phantomjs/issues/detail?id=495
2012-06-17 09:59:16 -07:00
Ariya Hidayat 593f4a590b Update Qt to the latest version 4.8.2.
http://code.google.com/p/phantomjs/issues/detail?id=495
2012-06-17 08:27:14 -07:00
Ariya Hidayat ead8066c57 Merge remote-tracking branch 'neraliu/cookiesapi'
Conflicts:
	src/modules/webpage.js
	src/webpage.h
2012-06-17 07:56:25 -07:00
Jon Leighton c9cf14f221 Don't pass an error object to the onError callback.
On reflection, this approach seems like a bad idea and a source of bugs.
I think passing object references between pages seems inherently
problematic, and we are better off just passing data to the onError
handler. If users need the actual object reference, they are able to use
try ... catch within the page.

This change also means that we are no longer breaking backwards
compatibility with the page.onError function signature.

WebCore already has a bunch of plumbing to pass around stacks. This
exists for the inspector/console. However, we need to actually retrieve
the error stack in WebCore::reportException.

To achieve this, I am attaching a stackArray property to the error
object. This is not as clean as I'd like, but seems ok for now. (We
should not document stackArray though.)

https://code.google.com/p/phantomjs/issues/detail?id=166
2012-06-16 14:24:37 -07:00
Jon Leighton d2290a60a9 Localize variables.
This is to avoid adding a onError handler to the page that exists in the
outer scope.

https://code.google.com/p/phantomjs/issues/detail?id=166
2012-06-16 14:24:37 -07:00
Ariya Hidayat a61d5e5400 Build script: don't fail too early.
set -e causes the check for compile jobs environment variable to quit
the script too early. Avoid this by guarding the check properly.

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-06-16 14:21:28 -07:00
Anthony O 744df38071 Fixing a compilation problem on Ubuntu 10.04 64bits
Return type for 'window.callPhantom', in case no handler is set, has to be 'null', not '0'

http://code.google.com/p/phantomjs/issues/detail?id=133
2012-06-16 10:55:08 -07:00
Nera Liu 94a1fbecdb Fix an indentation problem in the file test/webpage-spec.js. 2012-06-16 08:13:05 -07:00
Nera Liu 77052e60a8 Simplify the cookies api as property setter and getter for issue 354.
Update the test case for the cookies api.

http://code.google.com/p/phantomjs/issues/detail?id=354
2012-06-16 07:58:11 -07:00
Ivan De Marino 1014efe26f Adding missing completions on the "WebPage" object
http://code.google.com/p/phantomjs/issues/detail?id=573
http://code.google.com/p/phantomjs/issues/detail?id=547
2012-06-15 00:23:51 -07:00
Ivan De Marino f40b7ab730 Adding property "os" to the "system" module.
Contains the properties:
- name
- architecture
- version

http://code.google.com/p/phantomjs/issues/detail?id=585
2012-06-15 00:12:08 -07:00
Ivan De Marino f386f7d484 Adding the ability to switch between frames.
1. Passing JavaScript eval and other related actions to the CurrentFrame, not the MainFrame.
2. Added different methods to navigate between frames
3. With a call to "window.frames[0].focus()", the "currentFrame" changes: commands after that are sent to the new frame under focus.
4. The navigation between frames allows to walk over the "tree of frames" contained in the page.

This commit also adds examples (both in JS and CoffeeScript) and Unit Test.

http://code.google.com/p/phantomjs/issues/detail?id=573
2012-06-15 00:07:53 -07:00
david 40fd210c99 Add navigation event hook to PhantomJS.
http://code.google.com/p/phantomjs/issues/detail?id=562
2012-06-14 23:54:17 -07:00
david c153a2816e Fix error handler when error is null.
http://code.google.com/p/phantomjs/issues/detail?id=589
2012-06-14 23:41:23 -07:00
Eivind Uggedal 38c3f862b3 Do not attempt to compile PhantomJS if the Qt compile failed.
http://code.google.com/p/phantomjs/issues/detail?id=226
2012-06-14 23:38:51 -07:00
Jon Leighton 28d507d24f Allow debug/warning messages to be enabled at runtime.
https://code.google.com/p/phantomjs/issues/detail?id=575
2012-06-14 23:34:40 -07:00
Ivan De Marino 51ab11c6d9 Render page as a base64 string.
Provided API for the Webpage object:
- renderBase64PNG()
- renderBase64JPG()
- renderBase64BMP()

Addresses [Issue #547](http://code.google.com/p/phantomjs/issues/detail?id=547).
2012-06-14 23:29:14 -07:00
Ivan De Marino ebc1855483 Another tweak for "evaluateAsync".
Making sure all the parameters are passed on correctly.

http://code.google.com/p/phantomjs/issues/detail?id=593
2012-06-14 23:29:14 -07:00
Ivan De Marino caf13651b7 Adding "window.phantomCallback()" within the page context.
The callback is harmless: if the user registers a "page.onCallback = [Function]",
that will receive any JS type passed via "phantomCallback()".
Also, if the handler for ".onCallback" returns a value, that is passed back as a
return value of "phantomCallback()".

Also, added "page.onConfirm" and "page.onPrompt".
This solves [Issue #133](http://code.google.com/p/phantomjs/issues/detail?id=133).
2012-06-14 23:29:13 -07:00
Ivan De Marino 945b845d35 Adding a new "evaluateAsync" on the "webpage" object.
This is useful in case:
* we don't care about the result of the evaluate
* we don't need to have the result of the evaluate on the spot
* we need the stack of execution to begin WITHIN the page

Also, linting code: everyone should use a linter when writing Javascript. Everyone.

http://code.google.com/p/phantomjs/issues/detail?id=593
2012-06-14 23:29:13 -07:00