Apart from being undesirable that debugging messages are always
written to stdout, the information is redundant as a similar message
is logged at debug level.
https://github.com/ariya/phantomjs/issues/12681
The default is 'true'. When set 'false', file: and qrc: URLs are
treated as invalid (unknown scheme) rather than opening local files,
as requested in issue #12752.
In order to test this, I added a mechanism to test/run-tests.py
allowing individual tests to be annotated with command-line
options to pass to phantomjs or the script.
Unfortunately, due to Qt and WebKit limitation, this is technically
clearing all the cache used by every web page instance. It is the
best we can have right now.
https://github.com/ariya/phantomjs/issues/10357
This is available via the new property called `release`. A very simple
example to demonstrate it:
var system = require('system');
console.log('Kernel release', system.os.release);
which will print (on OS X 10.7.5 Lion):
Kernel release 11.4.2
https://github.com/ariya/phantomjs/issues/12587
The use of phantom.scriptName has been deprecated since System#args was
introduce (version 1.5, March 2012). Any old scripts need to migrate to
System#args.
https://github.com/ariya/phantomjs/issues/12529
The use of phantom.args has been deprecated (see commit 545a3f7)
since a long time ago (version 1.5, March 2012). Any old scripts
need to switch to use System#args instead.
https://github.com/ariya/phantomjs/issues/12527
New option --ssl-ciphers takes a colon-separated list of OpenSSL
cipher names and sets the client cipher list to exactly that list.
The default for this option is arranged to match Chromium 35, which
has had its cipher selection optimized for the modern Web
(see https://briansmith.org/browser-ciphersuites-01.html for
rationales). (Newer versions are the same except that they also add
ChaCha20-based ciphersuites, which OpenSSL 1.0.1 hasn't yet picked up.)
* --ssl-protocol= option now accepts 'tlsv1.2', 'tlsv1.1', 'tlsv1.0'
and 'default' as well as the existing 'tlsv1', 'sslv3', and 'any'.
* The default is now none of the above, but rather QSsl::SecureProtocols,
which means "whatever subset of ANY is still considered secure and also
supported by the OpenSSL library in use". (As of this writing, Qt's idea
of "still considered secure" includes everything from SSLv3 on up, which
is technically wrong -- SSLv3 has known breaks -- but we can live with.
Qt currently doesn't have a way to select "TLSv1.0 and up".)
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
* If the environment variable PHANTOMJS_DISABLE_CRASH_DUMPS
is set to any value, do not initialize Breakpad.
* On Mac and Linux, if the environment variable TMPDIR is set,
put the crash dumps there instead of in /tmp.
* On Windows, %TEMP% was already being honored, but streamline
the code for that.
* Move the code that initializes Breakpad, and the code to print
the crash messages, to their own module (src/crashdump.{h,cpp})
and RAII class (CrashHandler).
* Better wording of the crash message, particularly in the case where
Breakpad failed to write a minidump file; update URL of crash-reporting
guide.
* Generally less repetitive code. (Still way too many #ifdefs.)
By implementing a dummy platform native interface (for now, it may be
extended in the near future), QPlatformPrinterSupportPlugin will avoid
the path of loading the printer support plugin
(QCocoaPrinterSupportPlugin on OS X).
Related upstream bug (QCocoaPrinterSupportPlugin problem with static build):
https://bugreports.qt-project.org/browse/QTBUG-33109https://github.com/ariya/phantomjs/issues/12500
This is to reduce maintenance burden. A GIF representation of a web
page can be produced by converting its PNG capture. There are numerous
third-party tools which can do the job better (optimized palette,
minimized loss, etc).
https://github.com/ariya/phantomjs/issues/12480
To prevent unintended macro expansion, don't use the name
stdout/stdin/stderr in the native System object. Those properties are
achieved by shadowing it in the module interface (JavaScript side).
https://github.com/ariya/phantomjs/issues/12496
It cannot, nor should it, be selected on windows machines. There, we
stick to the Windows QPA which is required to get a lot of things up
and running, like an eventloop, socket integration etc. pp.
There was code in the phantom QPA to make it compile, but it never
actually worked since a lot of things where missing (such as
instantiating QWindowsContext among others).
https://github.com/ariya/phantomjs/issues/12494
Regression from #12431: the loop to clear all surviving pages
neglects to check for entries in `m_pages` which have already
been closed, fully destructed, and therefore replaced by NULL
pointers.
This code:
console.log("Hello World!");
phantom.exit();
console.log("Meh, noone should see me!");
currently produces this unexpected output:
Hello World!
Meh, noone should see me!
This patch fixes it to only output the first line, by loading a blank
page on phantom.exit(). Direct deletion of the web page can trigger
crashes, so this is a safe workaround.
https://github.com/ariya/phantomjs/issues/12431
The PhantomJS QPA hardcoded usage of QFontconfigDatabase on
Unix-not-OSX, causing build failures in "bundle all the libraries" mode.
Use QGenericUnixFontDatabase instead, which is QFontconfigDatabase if
fontconfig is enabled, and QBasicFontDatabase if it isn't. This means
that the bundled-qtdeps build will use only the fonts bundled with Qt,
and won't be able to find them on a machine that doesn't have the source
tree, which is suboptimal, but at least this makes the bundled-qtdeps
build complete successfully again.
Part of issue #12467.
In this mode, system-provided libraries will be used for all of
Qt's dependencies, but Qt and QtWebkit themselves are still the
bundled copies. This mode actually works.
Now that this mode exists, disable fontconfig in the "everything
bundled" mode, because it drags in the system freetype and several
other system libraries. (There is no bundled fontconfig.)
Part of issue #12467.
* build.sh now handles building qt and qtwebkit.
* preconfig.sh is now only responsible for accumulating arguments
to pass to qt's configure script.
* preconfig.sh doesn't have command line arguments of its own;
anything on its command line will be passed directly to qt's
configure script.
* first pass of adjustments to the qt configure parameters
to try to get a more static build - unfortunately, system
sqlite, libz, libpng, and libexpat are still getting pulled
in somehow (mostly via fontconfig, I think).
Part of issue #12467.
* Allow any patchlevel of Qt 5.3.x.
* Do it in the master .pro file instead of main.cpp; this makes the build
fail immediately rather than after compiling a bunch of stuff.
Part of issue #12467.
window.callPhantom formerly used Array.prototype.splice for cloning
its arguments to the internal _phantom.call. This relied on
non-standard behaviour of the splice method when only a single
argument was passed to it (it requires 2 arguments).
The correct method for cloning the arguments array is to use
Array.prototype.slice, which accepts a single argument (index) and
returns a new array from the specified index.
https://github.com/ariya/phantomjs/issues/12306
PDFs are not rendered like PNG or other image formats by phantomjs because it
uses the printer functionality of Qt+Webkit. But Webkit uses some printer
"optimization" to save paper by shrinking the output. Such shrinking results in
too small content on a page.
https://github.com/ariya/phantomjs/issues/11590 ("page.paperSize is not
accurate for .pdf")