Commit Graph

1429 Commits (98c3034b4bbeb9438d3e6b4d83436b150b0cb755)

Author SHA1 Message Date
Ariya Hidayat 5f1a636583 Changes for 1.6.1.
http://code.google.com/p/phantomjs/issues/detail?id=598
2012-07-27 18:16:26 -07:00
Ariya Hidayat 1602394efb detectsniff example: Fix usage text.
http://code.google.com/p/phantomjs/issues/detail?id=680
2012-07-25 01:37:25 -07:00
Ariya Hidayat 281d291cfb Use the new Twitter handle for the examples.
http://code.google.com/p/phantomjs/issues/detail?id=609
2012-07-15 02:13:35 -07:00
Ariya Hidayat 8d0a0b28ed Some more info on X11-less. 2012-07-15 02:11:50 -07:00
Ariya Hidayat b2af7929fb Use the new Twitter handle. 2012-07-15 02:05:08 -07:00
Jon Leighton 31157fbb98 Make static build work on Linux.
Previously, a static build would produce three separate files:
QtWebKit.a, libjscore.a and libwebcore.a. These seem to have
dependencies on each other and this caused the build errors on Linux.

This change means that the sources of jscore and webcore are both built
directly into the QtWebKit.a target. libjscore.a and libwebcore.a are no
longer built. It is then possible to create a static binary on Linux.

http://code.google.com/p/phantomjs/issues/detail?id=413
2012-07-14 23:32:31 -07:00
Ivan De Marino 0ce4dcd719 Provide more "JS-like" API for the current Frame-Switching API.
This addresses issue [#654](http://code.google.com/p/phantomjs/issues/detail?id=654).
2012-07-13 23:35:25 -07:00
Ivan De Marino 8d2384fd29 Tests for the "new" Frame-Switching API
http://code.google.com/p/phantomjs/issues/detail?id=654
2012-07-13 23:35:10 -07:00
Ariya Hidayat b54612bf68 Fix compile for the event handling.
http://code.google.com/p/phantomjs/issues/detail?id=492
2012-07-13 10:41:38 -07:00
Milian Wolff 1b2a84df9c Make Qt::Key accessible via phantom.keys.
We use the Qt Meta Object system to create an easily accessible QVariantMap
representation of the Key enumerator, such that we can now write something
like for example

page.sendEvent(keypress, phantom.keys.Backspace);

http://code.google.com/p/phantomjs/issues/detail?id=492
2012-07-13 10:32:03 -07:00
Milian Wolff bf6fd70c88 Properly handle strings, chars and umlauts in key[press,down,up] events.
http://code.google.com/p/phantomjs/issues/detail?id=492
2012-07-13 10:32:03 -07:00
Nicolas Perriault 11044a8fbd added tests for new keyboard events
http://code.google.com/p/phantomjs/issues/detail?id=492
2012-07-13 10:32:03 -07:00
Nicolas Perriault 25c48d2ed5 draft implementation of keyboard events
http://code.google.com/p/phantomjs/issues/detail?id=492
2012-07-13 10:31:33 -07:00
Ivan De Marino 5f0ed88a90 Handling "window opening" in PhantomJS.
This addresses [Issue #151](http://code.google.com/p/phantomjs/issues/detail?id=151).

Summary of the new API:
- page.pages[]
- page.pagesWindowName[]
- page.getPage(windowName)
- page.windowName
- page.onPageCreated = function(newPage) { ... }

The page object created by the user holds responsibility of the "child" pages it creates.
If a page closes (i.e. window.close()) or a call to "page.pages[i].release()" is done,
the array "page.pages[]" will automatically update to contain only the pages still open.
2012-07-13 09:56:47 -07:00
Ivan De Marino ea83351da3 Tests for the new "window opening" API
http://code.google.com/p/phantomjs/issues/detail?id=151
2012-07-13 09:56:10 -07:00
Ivan De Marino f869e8408d Sorting out the "web server" module.
Doesn't need a reference to the Config object (for now).
2012-07-13 09:55:52 -07:00
Ivan De Marino 0b04f0a672 Removing unnecessary casting from the "Env" class. 2012-07-13 09:55:45 -07:00
Ivan De Marino 008019ae10 Fixed an annoying FileSytem test that was wrongly designed (by me).
http://code.google.com/p/phantomjs/issues/detail?id=611
2012-07-13 09:52:35 -07:00
Ariya Hidayat 6ce27bbefa Version bump needs a unit test adjustment. 2012-07-13 09:38:57 -07:00
Ariya Hidayat 0632658afe Add a simple example to show how the module system works.
http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-13 07:58:05 -07:00
Juliusz Gonera 0ce2974ff7 Include the browser version of CoffeeScript too
This is still needed so that injectJs() methods work with CoffeeScript
and so that the main script file can be in CoffeeScript.

It causes duplication of code and some consideration is needed as to
how we could refactor the old inject code so that it uses modules
underneath. Lots of the module functionality written in JS could replace
the old C++ code (CSConverter, most functions in Utils).

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:53 -07:00
Juliusz Gonera a02cf63984 Add support for CoffeeScript modules
Instead of using a C++ wrapper, I used a Node version of CoffeeScript
with a small JS wrapper (src/modules/_coffee-script.js). This way, since
the module system is similar enough to the Node.js module system, I only
need to require CoffeeScript in bootstrap.js and all the support for
.coffee is added by CoffeeScript itself.

To include a newer version of CoffeeScript in the source tree, see
tools/import-coffee-script.sh.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:13 -07:00
Juliusz Gonera 2555cb448c Refactor loading of native PhantomJS modules
Now PhantomJS modules are loaded just like any other modules, which
means they should be able to require other native modules inside them if
needed.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:13 -07:00
Juliusz Gonera 15204cb8ae Run modules in an empty context
Previously `this` in modules was set to the global `window` object. Now it
is set to an empty object instead.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:13 -07:00
Juliusz Gonera 5015dbec2a Remove old module tests
New module tests contain all the tests from the old ones.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera 893108ad11 Fix stack trace when module is not found
The stack trace was missing when an error was thrown because of a
missing module. This should not be the case anymore.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera ba3eabb29e Refactor nativeRequire() and restructure bootstrap.js
nativeRequire() has been refactored so that native modules are also
wrapped in Module objects. Additionally, native modules are also
cached and included in stack traces if an error occures inside them.

Phantom::loadModuleSource() has been renamed to
Phantom::readNativeModule() so that it's clear that it's used only to
load native modules.

Finally, all the require() code has been move after setting error
handlers in bootstrap.js so that if an error occurs in the require()
code, the stack trace is printed.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera b22e995337 Fix indentation to 4 spaces in new require() tests
http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera fdd727e5da Add Phantom::loadModule
Instead of trying to use sourceId to determine what module threw an
error, we now load module's source code using modified
QWebFrame::evaluateJavaScript and leverage PhantomJS's stack traces.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera 70925a873b Add test for .stack in errors thrown in modules
We want to be sure that the stack contains module file path.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera 2cfffa029a Merge phantomjs-nodify's require() and fix tests
Most of the tests passed after merging almost unchanged phantomjs-nodify
code, some needed small changes. The one that is still failing is for
CoffeeScript modules.

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Juliusz Gonera 945a4c0f8c Add require() tests and comment buggy test in fs-spec-03.js
http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:12 -07:00
Jon Leighton 7892ff3b3e Deploy script improvements.
http://code.google.com/p/phantomjs/issues/detail?id=599

Squashed commit of the following:

commit 2cdcf8a47567f3c067958383843cccf858af531c
Author: Jon Leighton <j@jonathanleighton.com>
Date:   Sat Jul 7 19:37:38 2012 +0100

    Make lib-bundling/brandelf optional in deploy/package.sh

    This configuration has had some problems and we don't wish to use it in
    the official packages.

    Enable it with --bundle-libs.

commit 2a2155a4e1f5873aa8624859cead9d66750747f4
Author: Jon Leighton <j@jonathanleighton.com>
Date:   Sat Jul 7 19:24:40 2012 +0100

    notify user if upx is missing

commit 9656a99df0ff101150276dc88e0127f68041f617
Author: Jon Leighton <j@jonathanleighton.com>
Date:   Sat Jul 7 19:23:36 2012 +0100

    stripping symbols after upx probably doesn't work, reorder that

commit c5f425dc17069c89e7d2ff274309006c728ffab4
Author: Jon Leighton <j@jonathanleighton.com>
Date:   Sat Jul 7 19:17:07 2012 +0100

    fix logical fail
2012-07-08 17:42:58 -07:00
Jon Leighton 1bcacde12c Increase VM memory. Necessary for linking on 64-bit build.
http://code.google.com/p/phantomjs/issues/detail?id=599
2012-07-07 08:03:02 -07:00
Ariya Hidayat c0e8aa996f Merge branch 'master' of github.com:ariya/phantomjs 2012-07-07 08:00:30 -07:00
Ariya Hidayat 940e0089ba Merge pull request #291 from jonleighton/static_inspector
Fix remote inspector when building statically.
2012-07-07 08:00:07 -07:00
Jon Leighton 95186c653e Fix remote inspector when building statically.
For some reason, it seems that checking CONFIG(static) inside
src/phantomjs.pro is not reliable. That caused the STATIC_BUILD define
not to be set, and hence Q_INIT_RESOURCE would never get called in
main.cpp.

Instead of using Q_INIT_RESOURCE, let's just compile the resources
directly into the phantomjs binary. This means we don't need to detect
whether Qt is linked statically or dynamically.

https://code.google.com/p/phantomjs/issues/detail?id=430
2012-07-07 15:38:04 +01:00
Ariya Hidayat 13d929f3dc Merge branch 'master' of github.com:ariya/phantomjs 2012-07-05 09:21:04 -07:00
Ariya Hidayat 516c70b4fd Merge pull request #289 from detro/master
Version bump
2012-07-04 08:00:28 -07:00
Ivan De Marino 7409ec62d0 Bumping version to "1.7.0 (development)" 2012-07-03 22:50:11 +01:00
Ariya Hidayat df0f70f0b7 Merge pull request #284 from jonleighton/deploy2
Deploy fixes
2012-06-29 07:48:02 -07:00
Jon Leighton e05c887c96 Use zip for the OS X package
Requested by @ariya, who was concerned that .tar.bz2 might be confusing to
OS X users who are not well-versed in UNIX.
2012-06-29 14:54:39 +01:00
Jon Leighton 5f510967db Fix the top-level folder name in the packaged symbol tarball. 2012-06-29 14:44:10 +01:00
Jon Leighton a714bab04b Fix symbols generation on Linux
We are linking against e.g. libQtCore.so.4 rather than
libQtCore.so.4.8.2, and this affects symbol generation. (I am not sure
if this changed at some point, but this change should make it generate
the correct symbol files regardless.)

Also makes it less dependent on the Qt version.
2012-06-29 14:31:53 +01:00
Jon Leighton 13c1c164d9 Don't build the deploy in debug mode.
Debug mode turns off all optimisations. This make PhantomJS considerably
slower.

Instead, we build in 'release' mode, but generate debugging symbols at
the same time.

This may present some problems analysing crashes, if the optimisations
make that difficult. However, in my testing I was able to get useful
debug output even with optimisations enabled. So we should see how we go
- if it becomes a problem we can produce seperate debug binaries with no
optimisations.

https://code.google.com/p/phantomjs/issues/detail?id=599
2012-06-29 14:27:48 +01:00
Ariya Hidayat 59f6bb9496 ChangeLog fix: it's onPrompt and not onAlert.
Thanks to Ryuichi Okumura <okuryu@gmail.com> for the notice.

http://code.google.com/p/phantomjs/issues/detail?id=598
2012-06-26 08:20:00 -07:00
Ariya Hidayat ca7e8bb8f3 Merge pull request #281 from detro/master
Forgot to update completions for renderBase64
2012-06-25 01:47:40 -07:00
Ivan De Marino 5ad891c2f3 Forgot to update completions for renderBase64 2012-06-24 19:40:41 -07:00
Ariya Hidayat 3da512370e Lavender.
http://code.google.com/p/phantomjs/issues/detail?id=598
2012-06-20 23:28:26 -07:00
Ariya Hidayat 91d31ffe9e Fix Twitter-related examples to work with the new site.
http://code.google.com/p/phantomjs/issues/detail?id=609
2012-06-20 22:55:04 -07:00