Commit Graph

673 Commits (1.9)

Author SHA1 Message Date
Vitaly Slobodin 016ae98b2b Don't change the URL of the main execution context on exit.
We shouldn't change the URL of the main execution context.
Because this will change security policy of our main frame which leads to the following message: `Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file://bla.js. Domains, protocols and ports must match.`

We can fix it by isolating main frame of PhantomJS execution context. We can destroy it separately.

https://github.com/ariya/phantomjs/issues/12697
2014-11-16 08:37:37 -08:00
Ariya Hidayat a61db6ba55 Fix building on OS X 10.10 (Yosemite).
Related upstream bugs:
https://bugreports.qt-project.org/browse/QTBUG-39644
https://bugreports.qt-project.org/browse/QTBUG-40612
https://bugreports.qt-project.org/browse/QTBUG-29373

Related upstream commits:
https://qt.gitorious.org/qt/qt/commit/997d6261
https://qt.gitorious.org/qt/qt/commit/b82b8bfa
https://qt.gitorious.org/qt/qt/commit/ea0ab2cd
https://qt.gitorious.org/qt/qt/commit/df35604f

https://github.com/ariya/phantomjs/issues/12622
2014-10-22 11:23:56 -07:00
Ariya Hidayat 8eb3e40c5b System#os.version should know OS 10.10 Yosemite.
https://github.com/ariya/phantomjs/issues/12579
2014-10-21 22:41:35 -07:00
Ariya Hidayat 319ef5762c System#os.version should know OS 10.9 Mavericks.
https://github.com/ariya/phantomjs/issues/12579
2014-10-21 22:40:29 -07:00
Philip Jägenstedt 1eec21ed5c Backport crash fixes to Phantom::doExit from master
The relevant bits from these commits were applied:
cf12fc4a23
a9809996b1
1e7829db97

https://github.com/ariya/phantomjs/issues/11642

https://github.com/ariya/phantomjs/issues/12431
2014-10-21 22:29:31 -07:00
Mark Stosberg def023a45d Bump version to 1.9.8 and add ChangeLog entry for 1.9.8
https://github.com/ariya/phantomjs/issues/12670
2014-10-20 20:55:27 -07:00
Mark Stosberg f9e5c8e82a Fixes #12655 for the 1.9.x branch 2014-10-17 20:09:15 -04:00
Ariya Hidayat fc6f7baf6a Travis CI: Silent build.
https://github.com/ariya/phantomjs/issues/11880
2014-02-02 20:32:47 +00:00
Ariya Hidayat d247926d9c Getting ready for 1.9.7.
https://github.com/ariya/phantomjs/issues/11919
2014-01-24 20:22:38 -08:00
Ariya Hidayat 9e9bcd7763 Revert "Importing GhostDriver 1.1.1."
This reverts commit e9bb1ca7c6.

https://github.com/ariya/phantomjs/issues/11915
2014-01-24 20:21:17 -08:00
Mike McQuaid b1cfe1650b Fix userSpaceScaleFactor deprecation.
Port of a06a0e0ae6.

Issue #1162 https://github.com/ariya/phantomjs/issues/11612
2014-01-24 08:46:00 -08:00
Ariya Hidayat f4a23c96b6 Getting ready for 1.9.6.
https://github.com/ariya/phantomjs/issues/11905
2014-01-18 21:55:41 -08:00
Ivan De Marino e9bb1ca7c6 Importing GhostDriver 1.1.1.
Yes, 1.1.0 has just been imported.
But the key feature in 1.1.1 is Session Isolation in WebDriver: something that has been requested many times,
particularly when using GhostDriver with Selenium Grid.
2014-01-18 21:54:38 -08:00
Ivan De Marino 0947eb6324 Importing GhostDriver 1.1.0 in PhantomJS.
CHANGELOG for v1.1.0 (https://github.com/detro/ghostdriver/issues?labels=1.1.0&state=closed)

JavaScript Driver (Core)
* ENHANCEMENT: `/maximize` window will set the window size to 1336x768,
currently most common resolution online (see http://gs.statcounter.com/#resolution-ww-monthly-201307-201312)
* ENHANCEMENT #275: Implemented Browser and Network (HAR) Logging types
* FIXED #284: Attempt to wait for Page to Load if input causes form submit
* FIXED #291: Throw exception when attempting to set invalid timeout value
* FIXED #259: Fix issue regarding mouse clicks
* ENHANCEMENT #290: Enabled support for "Keep Alive" HTTP connections
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Driver part)
* ENHANCEMENT #293: Import Selenium 2.39.0 WebDriver Atoms

Java Binding
* MINOR #251: Minor compilation issues for Binding
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Java Binding part)

Tested using GhostDriver validation tests (https://github.com/detro/ghostdriver/tree/master/test).

https://github.com/ariya/phantomjs/pull/11877
2014-01-18 21:54:16 -08:00
Ariya Hidayat 77e53071dc Getting ready for 1.9.3.
https://github.com/ariya/phantomjs/issues/11904
2014-01-18 14:16:26 -08:00
Ariya Hidayat 6d06893128 Fix warning of obsolete userSpaceScaleFactor on OS X 10.9 (Mavericks).
Related upstream bug: https://bugreports.qt-project.org/browse/QTBUG-28574

Issue #1162 https://github.com/ariya/phantomjs/issues/11612
2014-01-03 18:42:23 -08:00
Ariya Hidayat bd436034cc Fix CoreText performance note on OS X 10.9 (Mavericks).
Upstream Qt bug: https://bugreports.qt-project.org/browse/QTBUG-32789
Upstream patch: https://codereview.qt-project.org/#patch,all,70097,4.
Upstream commit: https://qt.gitorious.org/qt/qt/commit/98352b964f

https://github.com/ariya/phantomjs/issues/11418
2014-01-03 18:38:33 -08:00
Oleg Plakhotniuk 7468e38db9 Select monospace font family properly.
CSS style "font-family: monospace" should select monospace font.

https://github.com/ariya/phantomjs/issues/11764
2013-12-13 07:36:00 -08:00
Vitaliy Slobodin 233a9d5c90 REPL returns empty object on enumerating properties on a simple JavaScript type (Number, String, Logical).
We should not to do that.

Issue:
https://github.com/ariya/phantomjs/issues/11622
2013-10-08 02:29:00 -07:00
Ariya Hidayat 3ff03acc2f Getting ready for 1.9.2.
Issue #11452: https://github.com/ariya/phantomjs/issues/11452
2013-09-05 23:36:03 -07:00
Vitaliy Slobodin 66f6496f2d Use Qt::transparent to resolve graphical artifacts with images with transparent background.
We need to use QImage::Format_ARGB32_Premultiplied on Windows to preserve a text hinting and antialiasing. Using the function `qRgba()` leads to wrong pixel values on a target image. Since, `QImage::fill(uint pixel)` doesn't handle the QImage::Format_ARGB32_Premultiplied format, so we need to use the another overload `QImage::fill(const QColor &color)`

Issues:
https://github.com/ariya/phantomjs/issues/11276
https://github.com/ariya/phantomjs/issues/11007
https://github.com/ariya/phantomjs/issues/11366
2013-08-28 22:31:21 -07:00
Ivan De Marino 492e7da959 Import GhostDriver v1.0.4
Issues in this release: https://github.com/detro/ghostdriver/issues?labels=1.0.4&state=closed
See GhostDriver Changelog for more details.

Issue #11452 https://github.com/ariya/phantomjs/issues/11452
2013-07-29 23:05:53 -07:00
Vitaliy Slobodin 0cdd1ecc7a Fix including http:// in the proxy URL:
The proxy host parsed incorrectly, when it was typed with a scheme (http or https).
Now proxy can be specified with the scheme.

Fix invalid type conversion:
m_proxyPort converts to its ASCII representation.
Use `QString::number` to include a proxy port properly.

Issues:
https://github.com/ariya/phantomjs/issues/11117
https://github.com/ariya/phantomjs/issues/10811
2013-06-01 09:21:38 -07:00
Ariya Hidayat f63815d4bc Issue #10939: Mark for the upcoming version 1.9.1.
https://github.com/ariya/phantomjs/issues/10939
2013-05-20 19:50:30 -07:00
Vitaliy Slobodin bfc41e6632 Make QNetworkReplyHandler deliver content asynchronously
when its load type is set to SynchronousLoad.

Issue #11338: https://github.com/ariya/phantomjs/issues/11338
Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=62808
2013-05-20 19:49:47 -07:00
Vitaliy Slobodin 77bb8d496a Fix crash when calling QObject::disconnect for QNetworkReplyWrapper
Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
instead. The QNetworkReply doesn't need to be aborted in this case anyway.

Issue #11252: https://github.com/ariya/phantomjs/issues/11252
Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=116035
2013-05-20 00:30:06 -07:00
execjosh be24776878 Link with text codec plugins on mac and linux
Fixes [#10249](https://github.com/ariya/phantomjs/issues/10249)
2013-04-29 07:13:34 -07:00
Andrew Galloni 3f2336e71a ChangeUrl to accept an encoded string
Issue #11243: https://github.com/ariya/phantomjs/issues/11243.
2013-04-29 07:11:30 -07:00
Vitaliy Slobodin 302b6bacb5 Fix command line option typo
Issue #11219: https://github.com/ariya/phantomjs/issues/11219
2013-04-14 06:57:13 -07:00
execjosh d90870aa26 Use UTF-8 encoding for std{in,out,err}
This fixes issue #11162.

`File` constructor takes a `QTextCodec *`, codec; but, if codec is
`NULL`, then it assumes "binary" mode, which causes non-ASCII
characters to be converted to NUL (`\0`) in `File::write`.

This change passes the codec for UTF-8 to the `File` constructor for
the `std{in,out,err}` instances, thus opening them in *text mode*.
2013-04-14 06:57:06 -07:00
execjosh 9a7fd20697 Flush in `File::write` when in unbuffered "text" mode
If the wrapped `QFile` was opened with `QIODevice::Unbuffered`, any
writes should be unbuffered.  However, as currently implemented,
using `QTextStream` when the `File` is in "text" mode causes all
reads/writes to be buffered.

This modification forces a flush in `File::write` if the wrapped
`QFile` was opened with `QIODevice::Unbuffered`.

Necessary to fix issue #11162 https://github.com/ariya/phantomjs/issues/11162.
2013-04-14 06:56:52 -07:00
Vitaliy Slobodin 1e6b9dfb6a Fire `onResourceReceived` callback when the resource error occured.
Issue #11163: https://github.com/ariya/phantomjs/issues/11163
2013-04-14 06:56:41 -07:00
Vitaliy Slobodin e5c456bb07 Fix loading modules from an absolute path on Windows.
Don't check the module path using Linux-style path checking.

Issue #11165: https://github.com/ariya/phantomjs/issues/11165
2013-04-14 06:56:25 -07:00
Ariya Hidayat bda3355060 Issue #10939: Get ready for version 1.9.0.
https://github.com/ariya/phantomjs/issues/10939
2013-03-20 22:23:51 -07:00
Jonathan Wilkins 9f9053ec44 Add support for specifying non-default CA certificate bundles.
This is done via SSL_CERT_DIR and --ssl-certstore.

Fixes issue #10916.

https://github.com/ariya/phantomjs/issues/10916
2013-03-20 08:27:54 -07:00
Tom Aizenberg 52883ced68 WebPage: network timeout setting.
Fixes issue #11129.

https://github.com/ariya/phantomjs/issues/11129
2013-03-19 22:57:26 -07:00
Laurent Jouanneau b16a5348a9 WebPage: new constants for modifiers keys
Declares in event.modifiers all constants needed for the fifth
parameter of sendEvent.

http://code.google.com/p/phantomjs/issues/detail?id=1056
https://github.com/ariya/phantomjs/issues/11056
2013-03-18 22:24:02 -07:00
Max Desyatov 357dbf46d2 Support for specifying request body encoding for WebPage::openUrl
doesn't break existing functionality and currently supports only
"utf-8" and "utf8" encodings

Fixes http://code.google.com/p/phantomjs/issues/detail?id=1043
2013-03-18 21:43:00 -07:00
Ivan De Marino 78d90641df Importing new GhostDriver 1.0.3.
See the https://github.com/detro/ghostdriver/ project for details.
2013-03-18 09:20:50 +00:00
Ivan De Marino 9740990990 New "page.loading" and "page.loadingProgress".
Now you can know about the Page Loading Progress
using 2 property:
- [bool] page.loading
- [int: 0-100] page.loadingProgress

Implements #1091: http://code.google.com/p/phantomjs/issues/detail?id=1091
2013-03-17 16:24:47 +00:00
Ariya Hidayat 9af1f09f58 Change issue tracker link to point to the new one.
From now on, it's https://github.com/ariya/phantomjs/issues.

For the details, check this mailing-list discussion:
https://groups.google.com/d/msg/phantomjs/It04OsP7csU/Vw2cmJkAILUJ
2013-03-16 09:19:25 -07:00
Vitaliy Slobodin fed209c546 Allocate JsNetworkRequest on the stack to avoid leaking it.
https://code.google.com/p/phantomjs/issues/detail?id=539
2013-02-24 09:00:49 -08:00
Vitaliy Slobodin 212e4b7cd9 Reworked api for canceling network requests. Added experimental API for changing the url of the network request.
Issue:
http://code.google.com/p/phantomjs/issues/detail?id=539

Stub
2013-02-24 09:00:07 -08:00
Ivan De Marino 04368c6af8 HOTFIX: @Vitalliumm discovered a typo in CookieJar
Original message: https://twitter.com/vitalliumm/status/301220038323613697
This was affecting date comparison/espiration in the
CookieJar.

Typical case of "I have no idea how it did work so far".

http://code.google.com/p/phantomjs/issues/detail?id=1068
2013-02-12 07:34:57 -08:00
Juliusz Gonera 2d42b52c67 Make require.stub() optionally accept a factory function
require.stub() can now accept a factory function instead of an object
so that stubbed modules are initialized lazily:

require.stub('zlib', function() {
    // initialized once, when zlib first required
    return {
        createGzip: function() { ... }
    };
});

http://code.google.com/p/phantomjs/issues/detail?id=1044
2013-02-05 00:04:17 -08:00
Julian Szulc 1e5638678d Fix ignoring ssl errors on synchronous xhrs
disabling peer verify in ssl configuration when ignore-ssl-errors is set

issue http://code.google.com/p/phantomjs/issues/detail?id=985
2013-02-05 00:01:50 -08:00
James M. Greene 1604b4d6c1 Updated help output to prefer true/false to yes/no
Similarly, I updated the API Reference too:
7cddd19676

This arguably makes more sense to PhantomJS's typical audience of web developers.
2013-02-04 23:58:10 -08:00
Ariya Hidayat 43ab20d4ae Prevent possible crash on pages with iframes.
In some cases, setupFrame() has not been invoked (due to the queued
signal-slot connection) after the frame is destroyed and thus leads
to the crash. We prevent this from happening by making sure it is a
direct connection instead and therefore setupFrame() will be executed
as soon as possible.

Investigation + patch by Vitaliy Slobodin <vitaliy.slobodin@gmail.com>.

http://code.google.com/p/phantomjs/issues/detail?id=947
2013-01-28 21:13:47 -08:00
Jeff Boulter ec6b242a9f Fixed the CreationDate value format when creating PDFs.
This was confusing Adobe Reader and not allowing it to save PDFs.

This bug appears to have been introduced in commit 08fc50d149 which was applying the patch from http://qt.gitorious.org/qt/qt/merge_requests/706 but missed two lines.

This should fix issue http://code.google.com/p/phantomjs/issues/detail?id=663 .
2013-01-25 00:12:06 -08:00
bongole 0734811514 Add rendering to stdout and stderr.
This feature renders PDF, GIF and other format supported by Qt to
stdout or stderr.

*NOTE*
"/dev/stdout" and "/dev/stderr" are converted to System::stdout and
System::stderr on Windows.

Issue: https://code.google.com/p/phantomjs/issues/detail?id=973
2013-01-21 21:44:18 -08:00