Commit Graph

50 Commits (b11c6de9abfcf373f985b2c6629f34ec28b81ea6)

Author SHA1 Message Date
Ariya Hidayat b11c6de9ab WIP: Get the PhantomJS+Qt build for MSVC working.
http://code.google.com/p/phantomjs/issues/detail?id=598
http://code.google.com/p/phantomjs/issues/detail?id=424
2012-07-27 20:58:15 -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
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
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
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
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
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 f7ecf6ccb9 Error.stack returns a string to match V8/Node.js
https://code.google.com/p/phantomjs/issues/detail?id=166
2012-06-10 21:28:46 +01:00
Jon Leighton 8f7ee0ecd8 Integrate Google Breakpad crash reporter. Linux only for now. 2012-06-05 23:08:16 +01:00
leeight 412c3f4246 FIX build issue with glib 2.31.0+.
Remove the `union GMutex` declaration.

https://bugs.webkit.org/show_bug.cgi?id=72085
http://code.google.com/p/phantomjs/issues/detail?id=559
2012-06-01 22:29:24 -07:00
Jon Leighton ad91d651a8 Pass an actual exception object to the error handler.
Note that for errors that occur within subpages, this object is not the
real error object, but a copy. This is because the real object exists
within the subpage, but the page.onError handler runs within the main
context, so we have to pass it through as data.

https://code.google.com/p/phantomjs/issues/detail?id=166
2012-05-30 20:20:30 +01:00
Jon Leighton 54c41ae77a Support retrieving the stack of an error
https://code.google.com/p/phantomjs/issues/detail?id=166
2012-05-07 23:29:36 +01:00
Jon Leighton 479b827b66 Enable rich source info for errors.
https://code.google.com/p/phantomjs/issues/detail?id=510
2012-05-07 17:34:07 +01:00
Milian Wolff 4669c16e64 Fix application font loading in basic font db
ISSUE: 460 (http://code.google.com/p/phantomjs/issues/detail?id=460)

this is a backport from qtbase:

commit 89cfe9eb01ad75c14121dbd6038b7c791226acf1
Author: Jiang Jiang <jiang.jiang@nokia.com>
Date:   Thu Nov 10 18:01:56 2011 +0100

    We need to reregister fonts in initializeDb because basic font db
    doesn't have an internal record like fontconfig does, so just
    repopulating the font database won't work. db->reregisterAppFonts
    is now used properly as intended (reregister application fonts
    after the system font database has been cleared).

    Also, static variable 'initialized' in initializeDb() is removed
    since we check privateDb()->count to see if it needs to be populated
    again.

    Task-number: QTBUG-22063

    Change-Id: Ifc66392b56b72acbe08b99256c61421c204be5d7
    Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-05-03 18:16:14 +02:00
Milian Wolff 24a9665c4d Make it possible to print pages with user-defined headers/footers.
Usage:

page.paperSize = {
  margin: "1cm",
  header: {
    height: "1cm",
    contents: phantom.callback(function(pageNum, numPages) {
      return "<h1>" + pageNum + " / " + numPages + "</h1>";
    })
  },
  footer: {
    height: "0.5cm",
    contents: phantom.callback(function(pageNum, numPages) {
      return "<h2>" + pageNum + " / " + numPages + "</h1>";
    })
  }
};

Note: The contents can return arbitrary HTML but since we cannot
re-layout the whole website for every page, the header/footers
must have the static height defined in the height property.

Note: The new example printheaderfooter.js shows the usage. It
also shows how one could delegate the above to a JavaScript
function on the loaded website, which allows one to print pages
and let the actually printed page decide how the header/footer
should look like.

Note: The page-counter can be reset by adding the class "phantomjs_reset_pagination"
to HTML block-elements that should reset the counter.

ISSUE: 410 (http://code.google.com/p/phantomjs/issues/detail?id=410)
2012-04-14 22:04:34 -07:00
Milian Wolff 67d2e8c2f7 Fix crash on close due to an uninitialized pointer in QEventDispatcherQPAPrivate.
ISSUE: 497 (http://code.google.com/p/phantomjs/issues/detail?id=497)
2012-04-11 19:18:20 -07:00
Jon Leighton 35e8c94925 Fix try ... catch exception handling.
The hasHandler flag passed to JSC::Debugger::exception only applies to
the current stack frame. It does not indicate if there are exception
handlers in earlier stack frames.

Therefore, we are saving the frame when an exception occurs, but only
reporting the exception if it is still present once the stack has been
fully unwound.

http://code.google.com/p/phantomjs/issues/detail?id=166
2012-03-18 21:44:23 -07:00
Jon Leighton afe570484f support for backtraces (part 1).
Mostly plumbing in WebKit and Qt bridge.

http://code.google.com/p/phantomjs/issues/detail?id=166
2012-03-17 18:40:41 -07:00
Ariya Hidayat c2c80c0e96 Fix broken GIF support in QPA (Lighthouse).
This is the same issue like the previous broken JPEG.  In non-static
build, GIF is built as plugin. We force to have GIF support built-in by
explicitly change a variable in the configure script (unfortunately this
can't be done via command-line options).

http://code.google.com/p/phantomjs/issues/detail?id=163
http://code.google.com/p/phantomjs/issues/detail?id=432
2012-03-16 07:24:11 -07:00
Ariya Hidayat 8c7b586f03 Remove support for Flash and other plugins.
http://code.google.com/p/phantomjs/issues/detail?id=418
2012-03-15 20:54:35 -07:00
Ariya Hidayat a59f11b7cc Fix broken JPEG support in QPA (Lighthouse).
In non-static build, JPEG is built as plugin. We force to have JPEG
support built-in by explicitly change a variable in the configure
script (unfortunately this can't be done via command-line options).

http://code.google.com/p/phantomjs/issues/detail?id=163
2012-03-15 19:31:04 -07:00
Jon Leighton 6e929f5fe2 add a bunch of gitignores for Qt build artifacts
http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-14 17:57:28 -07:00
Ariya Hidayat 6c8a1c2dc1 No X11 requirement on Linux.
This is achieved by using QPA (aka Qt Lighthouse).

http://code.google.com/p/phantomjs/issues/detail?id=163
2012-03-13 22:07:10 -07:00
Ariya Hidayat c78ae190a9 Implement a custom platform integration for Unix QPA operation.
These classes are from the official Qt 4.8.0 platform plugins with some
tweaks:

* By default, use Fontconfig font database.
* No need to save the captured screen on every flush.
* Enlarge the screen to make it more like a typical desktop size.

http://code.google.com/p/phantomjs/issues/detail?id=163
2012-03-13 22:04:05 -07:00
Ariya Hidayat 83af966d94 Modify QPA application to use the custom minimal integration.
http://code.google.com/p/phantomjs/issues/detail?id=163
2012-03-13 21:57:52 -07:00
Ariya Hidayat 6de3e7fdb9 Allow non-X11 to use Freetype font engine.
http://code.google.com/p/phantomjs/issues/detail?id=163
2012-03-13 21:31:11 -07:00
Ariya Hidayat 4c3897fece Make it possible to test QPA (Lighthouse) on Mac.
Do not use CoreText if QPA is specified.
Warning: this is only for testing purposes and it has no practical
use right now.

http://code.google.com/p/phantomjs/issues/detail?id=163
2012-03-13 19:36:10 -07:00
Ariya Hidayat f7ec1533d6 Qt build: Really disable PulseAudio support.
In order to avoid configuration-time detection of PulseAudio,
Qt configure script is slightly modified so that no attempt to
carry out the detection would be made.

http://code.google.com/p/phantomjs/issues/detail?id=226
http://code.google.com/p/phantomjs/issues/detail?id=414
2012-03-13 19:35:01 -07:00
Ariya Hidayat 4656988209 Qt build: Ignore PulseAudio for the time being.
http://code.google.com/p/phantomjs/issues/detail?id=226
http://code.google.com/p/phantomjs/issues/detail?id=414
2012-03-13 00:32:39 -07:00
Ariya Hidayat 35afa8fc99 Qt build: Disable ICU, system zlib, and PulseAudio.
http://code.google.com/p/phantomjs/issues/detail?id=226
http://code.google.com/p/phantomjs/issues/detail?id=414
2012-03-13 00:09:39 -07:00
Ariya Hidayat 21106b4289 WebKit: Add an API to enable and disable Web Security setting.
Patch by Danny Wang <wangyang0123@gmail.com>.
Originally from https://github.com/ariya/phantomjs/pull/212.

http://code.google.com/p/phantomjs/issues/detail?id=28
2012-03-12 22:44:13 -07:00
Ariya Hidayat ac699a4d90 WebKit: Support multiple console.log arguments.
http://code.google.com/p/phantomjs/issues/detail?id=36
2012-03-08 22:10:42 -08:00
Ariya Hidayat 8c01f46e4d Qt build: More configuration flags for Mac OS X.
This is just adopting the settings from deploy/build-mac.sh.

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-08 21:56:02 -08:00
Ariya Hidayat de13c551fb Qt Gui: Disable Graphics View.
Graphics View is not needed for PhantomJS.

http://code.google.com/p/phantomjs/issues/detail?id=414
2012-03-08 07:23:54 -08:00
Ariya Hidayat 1faf94de11 WebKit: Turn off accelerated compositing.
Compositing depends on Graphics View and/or GL-based texture mapper.
Since we don't plan to support either of them, at least for the near
future, we might as well disable compositing.

http://code.google.com/p/phantomjs/issues/detail?id=414
2012-03-08 07:23:22 -08:00
Ariya Hidayat cbe64f0f0f Fix file upload on Qt 4.8.
This is just applying enable_file_input_click.patch.

See the previous commit 00a8e72fb3.

http://code.google.com/p/phantomjs/issues/detail?id=307&q=upload
2012-03-06 23:11:24 -08:00
Ariya Hidayat 08fc50d149 Headless and PDF printing fixes.
This is just applying headless_and_pdf_fixes.patch.
See also https://github.com/ariya/phantomjs/pull/173..
2012-03-06 23:11:23 -08:00
Ariya Hidayat 6299e14641 Fix remote inspection to work.
This is applying fix_inspector.patch.
See also https://github.com/ariya/phantomjs/pull/173.

http://code.google.com/p/phantomjs/issues/detail?id=6
2012-03-06 23:11:23 -08:00
Ariya Hidayat b7a69df6ec Enable remote debugging.
This is just applying enable_debugger.patch.
See also https://github.com/ariya/phantomjs/pull/173.

http://code.google.com/p/phantomjs/issues/detail?id=6
2012-03-06 23:11:23 -08:00
Ariya Hidayat 714642c66c Qt workaround to prevent WebCoreMovieObserver confusion.
See the previous commit 30134bab5d.
This is just applying disable-quicktime-video.patch.

http://code.google.com/p/phantomjs/issues/detail?id=321
2012-03-06 23:11:08 -08:00
Ariya Hidayat 33f436d703 Qt import: use static build on Linux only.
http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-06 18:49:04 -08:00
Ariya Hidayat 36cd85a475 Qt import: Sync with the steps in deploy/build-helper.
http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-06 18:23:10 -08:00
Ariya Hidayat df93134703 Qt import: Use a customized src.pro.
We need to exclude building SQL, TestLib, and plugins.

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-06 18:22:54 -08:00
Ariya Hidayat cbdd80e98e Qt import: Do not force the use HarfBuzz on Mac.
Configure option -harfbuzz breaks Linux build.

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-06 17:53:44 -08:00
Ariya Hidayat 0d77f588ec Qt Mac: workaround qt_menu.nib problem.
This is applying qapplication_skip_qtmenu.patch.

See also the upstream bug:
https://bugreports.qt.nokia.com/browse/QTBUG-5952

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-02 07:25:31 -08:00
Ariya Hidayat ee4cc1125f Qt: allow static build of WebKit.
This is applying allow-static-qtwebkit.patch already used for the
deploy script.

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-02 07:25:10 -08:00
Ariya Hidayat 61c4e4b261 Add Qt 4.8.0 source tree.
This is done via the tools/import-qt.sh script. Note that the script
also removes some unnecesary stuff. In practice, src/qt is not as
big as the plain vanilla Qt source tree.

http://code.google.com/p/phantomjs/issues/detail?id=226
2012-03-02 07:23:58 -08:00