3 years agoAdd changes file v5.4.1
Allan Sandfeld Jensen [Tue, 3 Feb 2015 10:40:38 +0000 (11:40 +0100)]
Add changes file

Change-Id: I3c4a11c22bbc451d27701e7c6321eb5a66fb3b23
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
3 years agoFix memory leak in ImageDocument
Allan Sandfeld Jensen [Wed, 21 Jan 2015 11:04:45 +0000 (12:04 +0100)]
Fix memory leak in ImageDocument

An ImageLoader may hold a reference to its image element, and any
element holds a guard on the document. To make the ImageLoader release
the reference it needs to receive the notifyFinished() call, but that
doesn't happen if the CachedResource is in the wrong state.

The solution is to ensure we set the finish state on the resource before
calling the method signifying loading is finished.

Task-number: QTBUG-44023
Change-Id: I694483f6201b7ea4656016731e431f2806c3ab1c
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
3 years agoCheck if OpenGL context is supported
Allan Sandfeld Jensen [Wed, 14 Jan 2015 13:26:46 +0000 (14:26 +0100)]
Check if OpenGL context is supported

Before the support for dynamic GL builds, the WebCore initialize OpenGL
shims would check if the OpenGL version had all the necessary methods.
After we removed this we now risk continuing with an OpenGL version that
is not supported by WebCore and can cause crashes.

Task-number: QTBUG-43831
Change-Id: I19caffc645ea5dede8b98408cbe0cae5fae8c22f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoAllow 3D transforms without composited layers
Allan Sandfeld Jensen [Mon, 12 Jan 2015 11:25:14 +0000 (12:25 +0100)]
Allow 3D transforms without composited layers

Qt has no problems doing static 3D transforms without composited layers,
since the performance is not optimal we want to still trigger composited
layers when available, but allowing this without can fix the rendering
in the screenshot and printing API.

Task-number: QTBUG-43106
Change-Id: I30869d0f86704b84369273d7c2b875ee22badf22
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
3 years agoOptimize HTML5 video painting on Linux
Allan Sandfeld Jensen [Tue, 6 Jan 2015 12:45:57 +0000 (13:45 +0100)]
Optimize HTML5 video painting on Linux

We were doing a needless inversion of image data, that gstreamer somehow
detected and corrected for. The inversion can be safely removed and we
can also avoid copying the image data by releasing the gstreamer buffer
later like the cairo implementation does.

Task-number: QTBUG-43520
Change-Id: I5910d5358d049abe3570dd5468e9e0bb56517639
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix build without OpenGL
Allan Sandfeld Jensen [Tue, 6 Jan 2015 15:31:27 +0000 (16:31 +0100)]
Fix build without OpenGL

The accelerated 2D canvas feature broke building without OpenGL due to
missing feature checks.

Task-number: QTBUG-43549
Change-Id: I7e62751d5237e1c600bc784539c70db50bccfa22
Reviewed-by: Ashish Kulkarni <kulkarni.ashish@gmail.com>
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
3 years agoenable static compilation for Windows
Ashish Kulkarni [Wed, 17 Dec 2014 10:42:52 +0000 (16:12 +0530)]
enable static compilation for Windows

This is enabled only for MinGW and MSVC 2013, which have been
tested for both 32 and 64-bit builds.

Change-Id: Idced2887b4608bed4c086a4f8912251384eef5be
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agofix linker errors for the static Windows build
Milian Wolff [Fri, 22 Aug 2014 16:39:16 +0000 (18:39 +0200)]
fix linker errors for the static Windows build

When creating a static QtWebKit on Windows, the define for
STATICALLY_LINKED_WITH_$$library should always be set as otherwise
there will be an attempt to import symbols, which should never be
done and result in errors when linking the final output.

Change-Id: I734e749f5da82de47a1d4b16563978496a0e72ee
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agofix build on MSVC with system libraries for zlib, libpng and libjpeg
Ashish Kulkarni [Thu, 18 Dec 2014 17:46:21 +0000 (23:16 +0530)]
fix build on MSVC with system libraries for zlib, libpng and libjpeg

The definitions in qtbase were used as a source.

zlib    => qtbase/src/3rdparty/zlib_dependency.pri
libpng  => qtbase/src/gui/image/qpnghandler.pri
libjpeg => qtbase/src/gui/image/qjpeghandler.pri

Change-Id: I41529493d382d693311f3a2c1a2590bf1406baff
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agofix build on MSVC with --system-libpng or --system-libjpeg
Ashish Kulkarni [Thu, 18 Dec 2014 15:28:23 +0000 (20:58 +0530)]
fix build on MSVC with --system-libpng or --system-libjpeg

This was introduced in WebKit r108792, as in the related bug

it was confirmed as broken for Windows MSVC (for Chromium). The final
merge made it conditional for PLATFORM(QT) but did not fix the
underlying issue, which was the wrong placement of NO_RETURN as MSVC
does not allow __declspec(noreturn) to be put after the declaration
but GCC allows __attribute((__noreturn__)) at either location. This
is similar with the usage of NO_RETURN in other places.

Change-Id: I95ae3727553093b84b3645eb6dad63779f08e09d
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoWTF: fix build on Windows for static ICU
Ashish Kulkarni [Wed, 17 Dec 2014 12:43:20 +0000 (18:13 +0530)]
WTF: fix build on Windows for static ICU

The logic used was changed to be in sync with that used
for the configuration tests.

Change-Id: I8ba654c85487c19144431a94c2337caebac60447
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agofix detection of ICU when configuring for Windows
Ashish Kulkarni [Wed, 17 Dec 2014 10:36:42 +0000 (16:06 +0530)]
fix detection of ICU when configuring for Windows

When linking to the static ICU libraries, you need to link
to advapi32.lib. This is not required in qtbase because the
library is automatically added to QMAKE_LIBS_CORE, so we do
the same here.

Change-Id: I6d548790de4feae4b1d05ff27fb814e933f71839
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agofix detection of zlib when configuring for Windows
Ashish Kulkarni [Wed, 17 Dec 2014 10:28:50 +0000 (15:58 +0530)]
fix detection of zlib when configuring for Windows

This was synced with qtbase/src/3rdparty/zlib_dependency.pri
which uses correct library name on Windows and allows it to
be overridden via ZLIB_LIBS.

Change-Id: Iec86caf202a0da51f9bb5a5e3d0c62eaed4050b7
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoCalling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
Ada Chan [Mon, 5 Jan 2015 15:04:47 +0000 (16:04 +0100)]
Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.


Reviewed by Darin Adler.

This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
m_volumeInitialized is true.

* html/HTMLMediaElement.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Task-number: QTBUG-43479
Change-Id: I7f40dfc2535e2874d8c396051c488b7d92046919
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
3 years ago[GStreamer] Video player sets system volume to 100%
Xabier Rodriguez Calvar [Mon, 5 Jan 2015 15:01:59 +0000 (16:01 +0100)]
[GStreamer] Video player sets system volume to 100%


Reviewed by Philippe Normand.

In order to preserve the system volume we need to keep track of
the volume being initialized in the HTMLMediaElement and then just
setting the volume to the sink when initializing the pipeline if
that volume was changed before.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
attribute to false.
(WebCore::HTMLMediaElement::setVolume): Set the attribute to true
when volume is changed.
(WebCore::HTMLMediaElement::updateVolume): Set the volume only if
volume was initialized.
Platform volume configuration is required only if volume was not
initialized before.
* html/HTMLMediaElement.h: Added attribute and interface method.
* platform/graphics/MediaPlayer.h:
Declared and added default implementation for the interface method.
Asked the client, meaning the HTMLMediaElement if the platform
volume configuration is required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
Set the volume only if not platform volume is required and added log.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Task-number: QTBUG-43479
Task-number: QTBUG-34896
Change-Id: I4031b33e52e2299b03a5844770dc17c69822059c
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
3 years agoSupport MSIE compatible pasteboard types
Allan Sandfeld Jensen [Mon, 8 Dec 2014 13:27:10 +0000 (14:27 +0100)]
Support MSIE compatible pasteboard types

Treat 'Text' pasteboard type as 'text/plain' matching Apple and GTK
webkit ports and the whatwg spec.

Task-number: QTBUG-43149
Change-Id: Iac491fd15f1e9e8539daabf30a61e64921c82222
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
3 years agoMerge remote-tracking branch 'origin/5.4.0' into 5.4
Frederik Gladhorn [Wed, 17 Dec 2014 11:59:15 +0000 (12:59 +0100)]
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: I59ea5b32871dba99276a7e3d9fe5ae8c8487a0d3

3 years agoBump version
Oswald Buddenhagen [Fri, 12 Dec 2014 12:49:06 +0000 (13:49 +0100)]
Bump version

Change-Id: I211ab7d1aa8361bc225c010c515a65607e1dfd8c

3 years agoRemove double quotation from $preprocessor
Stephan Binner [Tue, 9 Dec 2014 11:52:29 +0000 (12:52 +0100)]
Remove double quotation from $preprocessor

Change-Id: I975dda0df62b61ae82d0a0f58f8446c7513b507e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoDo not set the mainframe graphicslayer to being opaque when it isn't
Allan Sandfeld Jensen [Fri, 28 Nov 2014 14:07:54 +0000 (15:07 +0100)]
Do not set the mainframe graphicslayer to being opaque when it isn't

If the frameview has a transparent background we need to tell the
GraphicsLayer that it is not opaque otherwise the TextureMapperGL might
choose not to use blend.

Task-number: QTBUG-40063
Change-Id: If129305fed8620cd3c28cec5357625d8892ad063
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoRemove unnecessary \inqmlmodule parameter
Alejandro Exojo [Sat, 6 Dec 2014 13:27:22 +0000 (14:27 +0100)]
Remove unnecessary \inqmlmodule parameter

Change-Id: Ib63865b4205ffc6bb8dbfb1f8c8e607cc29c1364
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
3 years agoMake QtWebKit configure report the right configuration
Allan Sandfeld Jensen [Fri, 21 Nov 2014 12:38:53 +0000 (13:38 +0100)]
Make QtWebKit configure report the right configuration

Debug and release configurations are mutually exclusive, so only the
last one defines the configuration. QtWebKit was however reporting
both if both were set producing confusion output.

Change-Id: If26e4ee02c922fbb880197379c6967c85746b482
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoDisable the animation so the style renders buttons correctly
Andy Shaw [Wed, 3 Dec 2014 08:43:05 +0000 (09:43 +0100)]
Disable the animation so the style renders buttons correctly

Previously just the style was checked to see if it was one that supported
animations on buttons. However when a stylesheet is used then it would not
correctly be picked up. Therefore the animations are disabled directly
using the property available on the styleObject.

Task-number: QTBUG-39400
Change-Id: I99c205bf61d98f9bfefc8c9c6f9806d3d068abc4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoDo not use gold linker with stabs debug format
Allan Sandfeld Jensen [Wed, 3 Dec 2014 11:24:14 +0000 (12:24 +0100)]
Do not use gold linker with stabs debug format

The gold linker and stabs format interact badly, negating not only
the memory pressure savings intended with stabs but producing much
larger debug binaries.

Change-Id: Ic2af8dbcc274ae84e4d5fbe474138e4dc5f96f56
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix documentation for QWebPage::scrollRequested signal.
Florian Bruhin [Tue, 2 Dec 2014 13:43:42 +0000 (14:43 +0100)]
Fix documentation for QWebPage::scrollRequested signal.

The documentation says the scrollRequested signal will be emitted if no
view was set, however the signal gets emitted unconditionally.

This behavior was changed in

Change-Id: I3d6df9935fc5d6efb14bc956c43c03b655f9a2ad
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoAdded changes file v5.4.0
Allan Sandfeld Jensen [Fri, 28 Nov 2014 10:11:32 +0000 (11:11 +0100)]
Added changes file

Change-Id: Ia8e0ad300b4651746a7741d0482587cbcd2f891c
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
3 years agoFix disabling of aliasing for all gcc alike compilers
Simon Hausmann [Sat, 29 Nov 2014 10:52:28 +0000 (11:52 +0100)]
Fix disabling of aliasing for all gcc alike compilers

Don't rely on the makespec to contain g++ in its name, instead use
QMAKE_COMPILER, which gets added to CONFIG.

Fixes crashes on QNX.

Change-Id: If8d2a6a7aa9998b311b2ca137af2fa236adecb00
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoFix build failure with python3
Samuel Martin [Thu, 13 Nov 2014 14:29:38 +0000 (15:29 +0100)]
Fix build failure with python3

Task-number: QTBUG-33692
Change-Id: I9f0bd6411e42b7ca06710dd47e3bcae4d2605c81
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years ago100% cpu usage for "transition: opacity" animation
Luciano Wolf [Wed, 26 Nov 2014 13:35:58 +0000 (14:35 +0100)]
100% cpu usage for "transition: opacity" animation


Reviewed by Noam Rosenthal.

Schedule animation timer after scheduling a layer flush. This way it
won't overwrite animation timer with "0", thus avoiding 100% cpu usage.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

Change-Id: Ia423bb1a8cb5da8f29aaa489c8023744d43119f2
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoMerge remote-tracking branch 'origin/5.4.0' into 5.4
Frederik Gladhorn [Fri, 21 Nov 2014 12:45:25 +0000 (13:45 +0100)]
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: I3df74c8b47ff6e3d668f8b2126e6145670327d73

3 years agoAvoid crashing when applying CSS to disconnected scrollbars
Allan Sandfeld Jensen [Tue, 18 Nov 2014 16:47:06 +0000 (17:47 +0100)]
Avoid crashing when applying CSS to disconnected scrollbars

Assume the scrollbar has no scroll corner if it isn't attached to
any scrollable area.

Task-number: QTBUG-37679
Change-Id: Ib1bd2a4b1aa504885d52932b6c0fbd76daa356a5
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoSupport DELETE requests with a body
Allan Sandfeld Jensen [Wed, 12 Nov 2014 16:02:12 +0000 (17:02 +0100)]
Support DELETE requests with a body

While non-standard, other browsers allow DELETE requests to send a body
in the HTTP request. Since there is no specific API for delete requests
with a body in QNetworkAccessManager, we use custom HTTP request for

Task-number: QTBUG-42456
Change-Id: I01a055ea173b5a65086f97d0c6ef14a9e01141b3
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix build of WebKitTestRunner with Qt 5.4
Allan Sandfeld Jensen [Mon, 17 Nov 2014 11:51:27 +0000 (12:51 +0100)]
Fix build of WebKitTestRunner with Qt 5.4

We don't need the include prefix and its inclusion doesn't work with
our build model, it is unclear how this ever worked.

Change-Id: Ia56715254761e2c86a167cee70e42e076b128674
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix race-condition crash on leaving pages using Indexed DB
Allan Sandfeld Jensen [Thu, 13 Nov 2014 16:39:13 +0000 (17:39 +0100)]
Fix race-condition crash on leaving pages using Indexed DB

ScriptExecutionContext does not allow the list of active DOM objects
to change while it is iterating over it. Since the IDB transaction
backend implementations holds several active DOM objects it should
not delete itself while aborting.

Change-Id: Icd2f5b5a3f1957461b9a253d1005896bb2461466
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoDon't fill with invalid fill color
Allan Sandfeld Jensen [Mon, 17 Nov 2014 13:57:39 +0000 (14:57 +0100)]
Don't fill with invalid fill color

WebInspector may set a default invalid fill color to disable fill, we
shouldn't fill with black in this case.

Change-Id: Ida1eaf187aca7fbca27449a9829c452f99634558
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
3 years agoAvoid using a separate QOpenGLContext for 2D canvas if possible
Samuel Rødal [Fri, 31 Oct 2014 16:02:36 +0000 (17:02 +0100)]
Avoid using a separate QOpenGLContext for 2D canvas if possible

When using a QGLWidget or QOpenGLWidget as a QGraphicsView viewport, we
can share the context used there. The OpenGL paint engines already keep
track of which engine is currently active on a context, and if necessary
do a state sync to give control to a different paint engine.

The TextureMapperGL does not interfere with the canvas rendering, as
canvas rendering happens entirely separate from the compositing step.
TextureMapperGL's compositing code is also wrapped inside a
QPainter::beginNativePainting() and QPainter::endNativePainting() block,
which means that the paint engine gets a chance to ensure the correct
paint device is the active target, if there have been framebuffer
objects bound for canvas rendering since the last frame.

This can result in significant performance improvements on graphics
drivers where context switching is expensive.

Change-Id: I00ac4e26c026e10549b18bef1fdf4322dd17eeee
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoClear a stray ref on layers when purging GL resources v5.4.0-rc1
Jocelyn Turcotte [Thu, 13 Nov 2014 16:37:02 +0000 (17:37 +0100)]
Clear a stray ref on layers when purging GL resources

Fix a regression of 3df57f7e550a19cb4450ed3896aa51ddb38c2ed2 where
a reference to TextureMapperBackingStore would be kept in the
TextureMapperLayers after purgeGLResources(). This would crash later
on if the window would get destroyed before the
CoordinatedGraphicsScene that own those layers.

Task-number: QTBUG-40734
Change-Id: Id1a596c0f0ba9afd1e163f83c38dda939f521314
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoDo not force a direction before we know it
Allan Sandfeld Jensen [Wed, 12 Nov 2014 13:37:42 +0000 (14:37 +0100)]
Do not force a direction before we know it

WebCore does not calculate the text direction when calculating widths
the best we can do here is let the shaper guess the direction. Forcing
it to the default LTR breaks HarfbuzzNG on Arabic scripts.

Since the default HarfBuzz engine changed in 5.4, this was a regression
from 5.3.

See also https://bugs.webkit.org/show_bug.cgi?id=101440

Task-number: QTBUG-41450
Change-Id: Ia324c8e5ebd1744ce2dfaea94d5046ef1f77b483
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
3 years agoUse fixed executable allocator on x64
Allan Sandfeld Jensen [Fri, 7 Nov 2014 11:26:57 +0000 (12:26 +0100)]
Use fixed executable allocator on x64

Since the x86-64 assembler generator depends on jumps being expressable
as 32bit offsets we need to use the fixed size executable allocator and
not the on demand allocator. This patch removes its exclusion from being
used on Windows.

Task-number: QTBUG-42417
Change-Id: Ie6b127e9b4291869566fd99cc7efe05b566c8e66
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix selections after leave event
Allan Sandfeld Jensen [Tue, 4 Nov 2014 15:09:47 +0000 (16:09 +0100)]
Fix selections after leave event

We were sending a bad fake mouse event on leave events that caused
WebCore to stop tracking mousepresses correctly. Since we continue
to receive mouse-events after leave if a mouse button is down, we
don't need the fake mouse event to unset hover states and can skip, and
can skip sending it.

Task-number: QTBUG-41419
Change-Id: I8d50c440f7556f7e34bb0c05248577583c2550b4
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFixed upside down drawing of accelerated 2d canvas
Samuel Rødal [Thu, 30 Oct 2014 11:38:49 +0000 (12:38 +0100)]
Fixed upside down drawing of accelerated 2d canvas

The convention used by the Qt OpenGL paint engine's internal
drawTexture() function didn't match the texture layout of the
accelerated 2D canvas. We need to adjust the coordinates according to
whether flipped painting is in effect.

Task-number: QTBUG-42376
Change-Id: I787a2deb5f26df532f2e7c475754f0fd2189132c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoFixed self-drawing of 2D canvas with accelerated 2D canvas enabled.
Samuel Rødal [Wed, 29 Oct 2014 13:03:44 +0000 (14:03 +0100)]
Fixed self-drawing of 2D canvas with accelerated 2D canvas enabled.

The canvas 2D API allows drawing the canvas onto itself, however with
accelerated 2D canvas enabled the canvas is implemented in terms of
rendering to a texture using framebuffer objects. OpenGL does not allow
having the same texture be both a source and a destination in the same
rendering operation, so the results are undefined.

Instead, we need to blit the texture into a temporary framebuffer
object, before using that as the source of the final drawing operation.

Task-number: QTBUG-42275
Change-Id: I8114814dab2c8c6ca90b8d35a37b383b79923cb3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoFixed crash in QGraphicsWebView when clicking on links
Samuel Rødal [Fri, 31 Oct 2014 17:56:48 +0000 (18:56 +0100)]
Fixed crash in QGraphicsWebView when clicking on links

The mouse event passed to this function is allocated on the stack, so
we can't delete it. Also, it doesn't make sense to allocate a new one
which immediately gets leaked. The intent must have been to use the ev
parameter as a return parameter - that's what it looks like on the
caller side.

Change-Id: I023cd7895a278eada4ad4acd233741aff837fed6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoFix build of leveldb with old Qt versions
Allan Sandfeld Jensen [Mon, 3 Nov 2014 10:18:50 +0000 (11:18 +0100)]
Fix build of leveldb with old Qt versions

Applies a missing patch to leveldb that fixed building with older Qt

Change-Id: Ie894127d265140cbb8524e271e5779c92ab8e393
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix merge error
Allan Sandfeld Jensen [Mon, 3 Nov 2014 09:45:00 +0000 (10:45 +0100)]
Fix merge error

The change 4a39158368f6184c8d56e1d65866ba99f83297e0 merged a part of
the diff for prepend to append. This patch moves the wrongly merged line.

Task-number: QTBUG-40284
Change-Id: I32d1b2f8e730aca38964d3675d3dec94512e0026
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Allan Sandfeld Jensen [Fri, 31 Oct 2014 14:13:53 +0000 (15:13 +0100)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

3 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Oswald Buddenhagen [Fri, 31 Oct 2014 14:06:52 +0000 (15:06 +0100)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Change-Id: I11f35f205d2ded597d54650a948bec3e1e52b419

3 years agoavoid creation of empty qmltypes for qtquick1
Fawzi Mohamed [Mon, 6 Oct 2014 16:42:53 +0000 (18:42 +0200)]
avoid creation of empty qmltypes for qtquick1

Change-Id: Ic28043a94151d3878219e5808075ce6ae663c316
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
3 years agoAdd mappings from new Qt key values to key identifiers
Allan Sandfeld Jensen [Fri, 31 Oct 2014 11:13:52 +0000 (12:13 +0100)]
Add mappings from new Qt key values to key identifiers

Change-Id: Iab57bbe15c6fd4d33dfe6e36cd0bd01ca6644841
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix assert after makerope boundary check 5.3
Lucas Forschler [Wed, 22 Oct 2014 13:05:00 +0000 (15:05 +0200)]
Fix assert after makerope boundary check

The browser demo asserts on qt-project.org after the makerope security

Port of http://trac.webkit.org/changeset/169397

Change-Id: I19c98737735d9b17133742752928d4ce6349de13
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoDo not send focus event to missing plugins on OS X
Allan Sandfeld Jensen [Thu, 30 Oct 2014 13:18:18 +0000 (14:18 +0100)]
Do not send focus event to missing plugins on OS X

Fix a crash when trying to focus a pluginview that doesn't have a loaded

Task-number: QTBUG-40273
Change-Id: I0875cab81a3484094fc705d59df80b87ca83a9ff
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoDo not use unaligned access when disabled
Allan Sandfeld Jensen [Tue, 28 Oct 2014 09:04:13 +0000 (10:04 +0100)]
Do not use unaligned access when disabled

Use the GCC feature defines to check for support for ARMv6 style
unaligned access support. This fixes configurations where it was
disabled and the ARMv6-M processors where it is not supported.

Change-Id: I00c9bb19ba582b64ecb9eaa6da9887ba0df8fd3c
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix preloading of video when using QtMultimedia backend.
Michael Brüning [Mon, 20 Oct 2014 09:40:13 +0000 (11:40 +0200)]
Fix preloading of video when using QtMultimedia backend.

Based on a patch by Yoann Lopes (yoann.lopes@theqtcompany.com).

Task-number: QTBUG-37381
Change-Id: I8647c578399a592f8feef0d4028187afd3726b2d
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
3 years agoLLInt is not built with ARM softfp ABI
Allan Sandfeld Jensen [Thu, 23 Oct 2014 17:04:53 +0000 (19:04 +0200)]
LLInt is not built with ARM softfp ABI

In fixing QTBUG-35681 we disabled LLInt when hard fp is not set. This
is however too strong a condition as we only need to be allowed to use
floating point instructions, not use the hard floating point ABI.

LLInt is also disabled on Android because it currently doesn't build.

Task-number: QTBUG-35681
Change-Id: Ibe109b0f8fe6acaec90d42305c6151a440141ea9
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Allan Sandfeld Jensen [Fri, 24 Oct 2014 09:10:13 +0000 (11:10 +0200)]

We can get rid of an ifdef in LowLevelInterpreter by reusing logic
from InlineAsm.h. This also fixes ARM_TRADITIONAL when forced on when
thumb2 is available to the compiler.

Change-Id: Iac5ad22a4a41757fa03c3cbc2e8f68e44d085bae
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoDo not use floating point instructions in float-abi=soft
Allan Sandfeld Jensen [Thu, 23 Oct 2014 16:08:52 +0000 (18:08 +0200)]
Do not use floating point instructions in float-abi=soft

Pretend VFP doesn't exist when the ABI forbids floating
point instructions.

Task-number: QTBUG-38371
Change-Id: Id0552201e6bf98812198c0028e2c85107e967a81
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoDo not enumerate plugins when plugins are disabled
Jan Kundrát [Mon, 20 Oct 2014 22:07:07 +0000 (00:07 +0200)]
Do not enumerate plugins when plugins are disabled

Even if plugins were disabled through QWebSettings::PluginsEnabled, WebKit would
still enumerate the on-disk NPAPI plugins and attempt to load them. This caused
all sorts of havoc especially when loading plugins linked to Qt4. Even if that
wasn't the case, plugins should *not* be loaded unless there's a compelling
reason to do so. Loading plugins needlessly takes time and it might even have
security implications -- it sounds like a good practice to not execute random
code, even though it comes from trusted locations, when that code is not needed.

After this change, the code still passes the tst_qwebpage tests which are
related to plugin loading. As it turns out, the "QtWebKit application plugins"
(application/x-qt-plugin and application/x-qt-styled-widget) do not use this
code path at all, they instead go through a path like this one:

  #0  PluginPage::createPlugin ...
  #1  QWebPagePrivate::createPlugin ...
  #2  WebCore::FrameLoaderClientQt::createPlugin ...
  #3  WebCore::SubframeLoader::loadPlugin ...
  #4  WebCore::SubframeLoader::requestPlugin ...
  #5  WebCore::SubframeLoader::requestObject ...
  #6  WebCore::HTMLObjectElement::updateWidget ...
  #7  WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary ...
  #8  WebCore::HTMLPlugInImageElement::updateWidgetCallback ...
  #9  WebCore::ContainerNode::dispatchPostAttachCallbacks ...
  #10 WebCore::ContainerNode::resumePostAttachCallbacks ...
  #11 WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler ...
  #12 WebCore::Document::recalcStyle ...
  #13 WebCore::Document::updateStyleIfNeeded ...
  #14 WebCore::Document::finishedParsing ...
  #15 WebCore::HTMLConstructionSite::finishedParsing ...
  #16 WebCore::HTMLTreeBuilder::finished ...
  #17 WebCore::HTMLDocumentParser::end ...
  #18 WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd ...
  #19 WebCore::HTMLDocumentParser::prepareToStopParsing ...
  #20 WebCore::HTMLDocumentParser::attemptToEnd ...
  #21 WebCore::HTMLDocumentParser::finish ...
  #22 WebCore::DocumentWriter::end ...
  #23 WebCore::DocumentLoader::finishedLoading ...

Task-number: QTBUG-36349
Change-Id: Id8f37fb16bb295781c22f439fd54a65486deef8e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 years agoDisable the build on Windows RT / Windows Phone
Simon Hausmann [Mon, 20 Oct 2014 11:24:23 +0000 (13:24 +0200)]
Disable the build on Windows RT / Windows Phone

Change-Id: I594737c60ed2d4c08de662b8ca534e5abbbffd60
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoDo not schedule navigation to invalid URL
Allan Sandfeld Jensen [Wed, 22 Oct 2014 09:30:30 +0000 (11:30 +0200)]
Do not schedule navigation to invalid URL

Fix an assert triggered by navigation to a fragment URL of an unset
URL. The code was assuming the string given was a valid encoded
URL, so we shouldn't continue if the completed URL is invalid.

Task-number: QTBUG-38546
Change-Id: I377b09814150ae9926de95efe3f3e2e750145c4a
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years ago[Windows] Also check for QApplication::style when animating buttons.
Michael Brüning [Tue, 21 Oct 2014 15:23:20 +0000 (17:23 +0200)]
[Windows] Also check for QApplication::style when animating buttons.

The fallback style for a custom style sheet is QApplication::style(),
which defaults to QWindowsVistaStyle on most (if not all)  windows

Task-number: QTBUG-39400
Change-Id: Ib05571033730ed26a39f89d8e9fe948c4b280e64
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 years agoPop pack pragma on x86 QNX
Allan Sandfeld Jensen [Wed, 15 Oct 2014 11:18:49 +0000 (13:18 +0200)]
Pop pack pragma on x86 QNX

A recent patch fixing QNX on x86 forgot to also pop the pragma it set.

Change-Id: I9834c0b57a4409e8e80c29899e6f3989607fe22f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoRemove QtScript includes
Allan Sandfeld Jensen [Thu, 16 Oct 2014 09:39:47 +0000 (11:39 +0200)]
Remove QtScript includes

Remove QtScript includes that haven't been usedin years.

Change-Id: Iea2b61a6ad2ea187055daff783ce9f0280477767
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix Qt 5.3 backward compatible build
Allan Sandfeld Jensen [Thu, 16 Oct 2014 12:01:47 +0000 (14:01 +0200)]
Fix Qt 5.3 backward compatible build

The accelerated canvas and dynamic GL support used Qt 5.4 specific
features. These can be avoided by disabling one webgl extension and
being less efficient in accelerated canvas, thereby making it possible
to still build QtWebKit with Qt 5.3.

Change-Id: Ic64f7f5ac6b836b314331c4d509e4d64cb0dcb7c
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoBlacklist libkpartsplugin
Sune Vuorela [Mon, 13 Oct 2014 18:39:26 +0000 (20:39 +0200)]
Blacklist libkpartsplugin

KPartsPlugin is built using qt4, and loading that into a Qt5 QtWebkit
makes stuff crash.

Change-Id: I47d01dfe3b215192b012911013b352ea5b5b1530
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 years agoStylePendingImage needs to correctly manage the CSSValue pointer lifetime
Darin Adler [Tue, 14 Oct 2014 13:49:17 +0000 (15:49 +0200)]
StylePendingImage needs to correctly manage the CSSValue pointer lifetime


Reviewed by Andreas Kling.


Test: fast/css/pending-image-crash.xhtml

Disconnect the reference counted StylePendingImage from the CSSValue that owns
it when it's not needed any more, otherwise we could end up using a pointer
that might no longer be valid.

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue
on the current image if it is a StylePendingImage.
(WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage.
(WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing
m_image to a new value.
(WebCore::CSSCursorImageValue::clearCachedImage): Ditto.
* css/CSSCursorImageValue.h: Added detachPendingImage.

* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue
on the current image set if it is a StylePendingImage.
(WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage.
(WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing
m_imageSet to a new value.
* css/CSSImageSetValue.h: Added detachPendingImage.

* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the
current image if it is a StylePendingImage.
(WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage.
(WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image
to a new value.
* css/CSSImageValue.h: Added detachPendingImage.

* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssImageValue): Added a null check.
(WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check.
(WebCore::StylePendingImage::cssCursorImageValue): Added a null check.
(WebCore::StylePendingImage::cssImageSetValue): Added a null check.
(WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since
the style is no longer using this StylePendingImage.
(WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we
need is some arbitrary pointer uniquely identifying the image. Before loading the image,
we have no suitable weak identifier, so it suffices to use the unique pointer to each
StylePendingImage object. This function is used only in a limited way; it would be nice
to find a way to make the code less strange long term.

Change-Id: Iab8a5d033c5cdf9a488ac18d8f233dee48c5f3e7
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix android compile.
BogDan Vatra [Fri, 3 Oct 2014 15:17:47 +0000 (18:17 +0300)]
Fix android compile.

Change-Id: I9848c2b384e6fa85a5224ce0691456105d2fe8a1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 years agoFix LLInt vector offsets on Windows 64
Allan Sandfeld Jensen [Tue, 14 Oct 2014 14:33:13 +0000 (16:33 +0200)]
Fix LLInt vector offsets on Windows 64

Derived classes on Windows x64 are 64bit aligned placing the m_size
property of Vector slightly differently than on other platforms.

Change-Id: I186de5ea200abfbdd3bdf7502f3f427cb6890f3c
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoCrash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidi...
Ryosuke Niwa [Tue, 14 Oct 2014 13:00:11 +0000 (15:00 +0200)]
Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine


Reviewed by Darin Adler.

Merge https://chromium.googlesource.com/chromium/blink/+/aca89bc4d984705a1f94b623dae0ab03e239a248

Fix modification of whitespace endpoints to not assume it's operating on RenderTexts

During line layout, we use midpoints to identify RenderObjects, or parts of
RenderObjects, that don't need InlineBoxes, usually because of collapsed whitespace.

Prior to actually creating BidiRuns (the precursor to InlineBoxes), we use
checkMidpoints to fix up our lineMidpointState to handle the case where we start
ignoring spaces in our line, but don't stop until somewhere on the following line.
Previously, this function assumed that the final midpoint (called an endpoint)
was a RenderText, but this assumption is wrong if we have a beginning midpoint
created by shouldSkipWhitespaceAfterStartObject (which handles inlines and list
markers) and no endpoint on that line. In that case, we'd instead adjust the
position backwards on the beginning midpoint, which would cause us to fail to
create an InlineBox for the inline or list marker. In the new test added, this
would actually trigger a crash due to an assumption when visually re-ordering
BidiRuns that a non-empty line would actually contain at least one such run.

Test: fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html

* rendering/RenderBlockLineLayout.cpp:

Change-Id: I894bd9da4250dc2c79a55a8014e54df7dcbec719
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Allan Sandfeld Jensen [Tue, 14 Oct 2014 15:18:28 +0000 (17:18 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

3 years agoCrash in HTMLMediaElement::contextDestroyed
Ryosuke Niwa [Tue, 14 Oct 2014 13:31:53 +0000 (15:31 +0200)]
Crash in HTMLMediaElement::contextDestroyed


Reviewed by Eric Carlson.

Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278

* html/HTMLMediaElement.cpp:

Change-Id: If730e758410f18ae86aca5a92cb7c48b12b8c7ae
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Frederik Gladhorn [Tue, 14 Oct 2014 12:08:44 +0000 (14:08 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Change-Id: I509f0440296df39aece8133382aacc43a4e05f99

3 years agoGet rid of old harmattan workaround hurting Qt on ARM
Allan Sandfeld Jensen [Mon, 13 Oct 2014 15:05:07 +0000 (17:05 +0200)]
Get rid of old harmattan workaround hurting Qt on ARM

Change-Id: Ieecee7c05e78117e8c9fc335f60970e2144ede81
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoCheck for ICU at configure time the same way we add it later
Allan Sandfeld Jensen [Mon, 6 Oct 2014 12:35:04 +0000 (14:35 +0200)]
Check for ICU at configure time the same way we add it later

Use pkg-config to get the right ICU library when searching for it at
config time. This matches how it is build with later.

Task-number: QTBUG-41750
Change-Id: I134ecdeb523eab225ef66f4dcc14ae4e25ea4eca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
3 years agoDo not use JIT on big endian architectures
Allan Sandfeld Jensen [Fri, 10 Oct 2014 12:50:18 +0000 (14:50 +0200)]
Do not use JIT on big endian architectures

All the JIT implementations targets the little-endian versions of ARM,
MIPS and SH4 respectively. So in case anyone builds on those platforms
we should not enable JIT.

Task-number: QTBUG-41896
Change-Id: I5be167511e2c3eac6c63e603b82da84fb6b29eaa
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix CLoop on big-endian machines
Allan Sandfeld Jensen [Thu, 9 Oct 2014 15:40:37 +0000 (17:40 +0200)]
Fix CLoop on big-endian machines

Callee and ScopeChain are JSObject pointers and saved in the 64bit
structure for JS registers. On a 32bit big-endian machine the actual
pointer is offset by the PayloadOffset of 4 bytes, but on little-endian
and 64bit architectures there is no offset.

This patch fixes four places the payloadOffset was not correctly added
on 32bit big-endian, and six places it was added on 64big big-endian
when it shouldn't.

Task-number: QTBUG-41896
Change-Id: I46b474bee9822b8040d1b7b2e8f31ce42e0adefe
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoFix crash when a network-request is aborted while forwarding data
Allan Sandfeld Jensen [Mon, 13 Oct 2014 13:32:14 +0000 (15:32 +0200)]
Fix crash when a network-request is aborted while forwarding data

Since we forward data block-wise a network request may be aborted while
we are still forwarding received data. In that case we should stop the

Task-number: QTBUG-41877
Change-Id: Ia34bbdcacdc4eb70a2e814d3b4bada9844abbb83
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoLoad flags used by Qt modules when compile testing for a module
Allan Sandfeld Jensen [Tue, 7 Oct 2014 15:02:56 +0000 (17:02 +0200)]
Load flags used by Qt modules when compile testing for a module

In order to pick-up the include path and library path passed
to Qt configure, the configure tests needs to load the Qt
build config.

Change-Id: I881d5e87a08bf8dab5058802dc80ca58d0eed5b1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
3 years agoDo not let TexureMapper create backing stores that are too large
Allan Sandfeld Jensen [Wed, 8 Oct 2014 11:38:33 +0000 (13:38 +0200)]
Do not let TexureMapper create backing stores that are too large

TextureMapper without Coordinated Graphics will preallocate all tiles
for a backing store. This makes it impossible to handle very large
backing stores as they will cause memory exhaution.

This patch disables composited layers with more pixels than 8192
squared, unless the ChromeClient has allowed large accelerated

Task-number: QTBUG-41404
Change-Id: Id71628da139f886aceb00732ae59dac2600ef863
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoSupport building QtTestBrowser without QtTestSupport v5.4.0-beta1
Allan Sandfeld Jensen [Mon, 6 Oct 2014 11:29:43 +0000 (13:29 +0200)]
Support building QtTestBrowser without QtTestSupport

Use the same flags for QtTestBrowser that MiniBrowser uses to build
without webkit's QtTestSupport.

Change-Id: I0b31b1253b5014393a472286ffc6674efc64e753
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix uninitialized access
Allan Sandfeld Jensen [Tue, 7 Oct 2014 09:13:25 +0000 (11:13 +0200)]
Fix uninitialized access

When an identifier is made from an empty string, the constructor still
tries accessing the first character to populate a cache. This leads to
access of uninitialized data, and wrong data in the cache. This causes
no wrong behavior though except unuseful data in the cache.

Change-Id: Ice9f10b08306799b160f8b95b76bd056f29d228d
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix uninitialized access in RenderTable
Allan Sandfeld Jensen [Wed, 8 Oct 2014 09:31:34 +0000 (11:31 +0200)]
Fix uninitialized access in RenderTable

WTF::Vector's do not initialize primitive types, so we need to do so,
especially for the last columnpos which needs be the highest.

Change-Id: Iec68e12352b76d304faa59d3233cbbb38691d78d
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix assertion in PerformanceTiming
Allan Sandfeld Jensen [Mon, 6 Oct 2014 15:07:26 +0000 (17:07 +0200)]
Fix assertion in PerformanceTiming

We get negative values in monotonic increasing time because we forget
to initialize the start time.

Change-Id: I292792f8f996025e7f0254bb90391b7af6873877
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix valgrind warning about uninitialized access
Allan Sandfeld Jensen [Mon, 6 Oct 2014 15:12:05 +0000 (17:12 +0200)]
Fix valgrind warning about uninitialized access

A default cache-entry has a null String and an uninitialized key. We
should therefore only try to use the key if the String is not null.

Change-Id: Icd6819b96b9b650305cf0611b6b2978c07dc9196
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix noicu build of GLX graphics surface
Allan Sandfeld Jensen [Mon, 6 Oct 2014 11:47:01 +0000 (13:47 +0200)]
Fix noicu build of GLX graphics surface

We were incorrectly using the ICU define 'TRUE' instead of the OpenGL
define 'GL_TRUE'.

Task-number: QTBUG-41771
Change-Id: I4902d44f830cf702a53bc470f07f4f6b4542cc55
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoFix rare build regression in WebKit2
Allan Sandfeld Jensen [Mon, 6 Oct 2014 11:31:39 +0000 (13:31 +0200)]
Fix rare build regression in WebKit2

We must ensure derived sources are build before any normal sources are
since they depend on headers generated.

This was accidently removed when fixing non production-build builds.

Task-number: QTBUG-41693
Change-Id: I33788b508545eb14acbbee08c2579673f5b6adc5
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoSupport DynamicGL builds
Allan Sandfeld Jensen [Tue, 30 Sep 2014 14:00:40 +0000 (16:00 +0200)]
Support DynamicGL builds

Move the choice of OpenGL ES/2 vs OpenGL codepath to runtime. To fully
support this the WebCore OpenGL shims are also replaced with Qt's

GraphicsContext3DOpenGL.cpp and Extensions3DOpenGL.cpp have been
modified to now also be able to handle OpenGL ES/2 on Qt.

Note: GraphicsContext3DOpenGL.cpp and GraphicsContext3DOpenGLCommon.cpp
are now Qt port only, but since this is not meant for upstreaming this
should not cause any significant issues.

Change-Id: I9f205d2a7bc5704496232085d7f0811aeec2434a
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
3 years ago(un)shiftCountWithAnyIndexingType will start over in the middle of copying if it...
Mark Hahnenberg [Mon, 29 Sep 2014 16:13:42 +0000 (18:13 +0200)]
(un)shiftCountWithAnyIndexingType will start over in the middle of copying if it sees a hole


Reviewed by Oliver Hunt.


This bug caused the array to become corrupted. We now check for holes before we start moving things,
and start moving things only once we've determined that there are none.

* runtime/JSArray.cpp:

Change-Id: I9948bfa2c9b4a345076f7f2b4e50a566f521b6fe
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoAdd missing branchAdd32 implementations to fix sh4 and mips builds
Julien Brianceau [Tue, 30 Sep 2014 07:48:50 +0000 (09:48 +0200)]
Add missing branchAdd32 implementations to fix sh4 and mips builds

sh4 implementation has been taken from WebKit r173222.

Change-Id: I1c188e88e9fd8772f97cac94d7ee31945b538b71
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 years agoDFG 32Bit: Crash loading "Classic" site @ translate.google.com
Michael Saboff [Mon, 29 Sep 2014 14:56:20 +0000 (16:56 +0200)]
DFG 32Bit: Crash loading "Classic" site @ translate.google.com


Reviewed by Sam Weinig.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateCell): Added checks for spillFormat being
DataFormatInteger or DataFormatDouble similar to what is in the 64 bit code and in
all versions of fillSpeculateBoolean().

Change-Id: I4de21707f00c1538b82b9bee6b2acc2903611983
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoImplement ICU availability check in qtwebkit
Kai Koehne [Mon, 29 Sep 2014 11:56:56 +0000 (13:56 +0200)]
Implement ICU availability check in qtwebkit

Since commit bded052aad125 in qtbase configure.exe do not check for
ICU anymore by default: ICU is not strictly needed for most of Qt,
and can be replaced by native Windows API.

Anyhow, this effectively also disabled compilation of qtwebkit, that
relies on the configure.exe check for ICU. Instead qtwebkit now
explicitly checks for ICU on it's own, ignoring the logic in

Task-number: QTBUG-41579
Change-Id: Ic09658a0bd8acb06ad3e0ed5f9dbe4cdcbfc6d56
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 years ago[ARM] Unreviewed build fix after r167336.
Csaba Osztrogonác [Thu, 25 Sep 2014 09:31:46 +0000 (11:31 +0200)]
[ARM] Unreviewed build fix after r167336.

* assembler/MacroAssemblerARM.h:

Change-Id: I919df8301e69cca630f475afcc0c4311d713f10e
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoUnreviewed, ARMv7 build fix after r167336.
Filip Pizlo [Thu, 25 Sep 2014 09:31:00 +0000 (11:31 +0200)]
Unreviewed, ARMv7 build fix after r167336.

* assembler/MacroAssemblerARMv7.h:

Change-Id: Ia16f8dce00ce660cf5f7b9eb1c3496e08cbdb603
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agocompileMakeRope does not emit necessary bounds checks
Filip Pizlo [Thu, 25 Sep 2014 09:29:50 +0000 (11:29 +0200)]
compileMakeRope does not emit necessary bounds checks


Reviewed by Oliver Hunt.

Add string length bounds checks in a bunch of places. We should never allow a string
to have a length greater than 2^31-1 because it's not clear that the language has
semantics for it and because there is code that assumes that this cannot happen.

Also add a bunch of tests to that effect to cover the various ways in which this was
previously allowed to happen.

* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:
* runtime/JSString.cpp:
* runtime/JSString.h:
* runtime/Operations.h:
* runtime/StringPrototype.cpp:
* tests/stress/make-large-string-jit-strcat.js: Added.
* tests/stress/make-large-string-jit.js: Added.
* tests/stress/make-large-string-strcat.js: Added.
* tests/stress/make-large-string.js: Added.

Change-Id: If01dd2a2d2daa3d209eddf0213d2b391e94f54a0
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years ago<https://webkit.org/b/120079> Flattening a dictionary can cause CopiedSpace corruption
Mark Hahnenberg [Thu, 25 Sep 2014 09:46:15 +0000 (11:46 +0200)]
<https://webkit.org/b/120079> Flattening a dictionary can cause CopiedSpace corruption

Reviewed by Oliver Hunt.

When we flatten an object in dictionary mode, we compact its properties. If the object
had out-of-line storage in the form of a Butterfly prior to this compaction, and after
compaction its properties fit inline, the object's Structure "forgets" that the object
has a non-zero Butterfly pointer. During GC, we check the Butterfly and reportLiveBytes
with bytes = 0, which causes all sorts of badness in CopiedSpace.

Instead, after we flatten a dictionary, if properties fit inline we should clear the
Butterfly pointer so that the GC doesn't get confused later.

This patch does this clearing, and it also adds JSObject::checkStructure, which overrides
JSCell::checkStructure to add an ASSERT that makes sure that the Structure being assigned
agrees with the whether or not the object has a Butterfly. Also added an ASSERT to check
that the number of bytes reported to SlotVisitor::copyLater is non-zero.

* heap/SlotVisitorInlines.h:
* runtime/JSObject.cpp:
* runtime/JSObject.h:
* runtime/Structure.cpp:

Change-Id: Idfd8c22555f4373c1104316ff1ee28f5f84ef083
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoDetect PowerPC little-endian architecture
Allan Sandfeld Jensen [Thu, 25 Sep 2014 14:55:12 +0000 (16:55 +0200)]
Detect PowerPC little-endian architecture

Change-Id: I868224d189fc34af2517bfbb8931591e30dcbaa0
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoREGRESSION: `if (false === (true && undefined)) console.log("wrong!");` logs "wrong...
Geoffrey Garen [Thu, 25 Sep 2014 11:58:36 +0000 (13:58 +0200)]
REGRESSION: `if (false === (true && undefined)) console.log("wrong!");` logs "wrong!", shouldn't!


Reviewed by Mark Hahnenberg.


* parser/NodeConstructors.h:
* parser/ResultType.h:
(JSC::ResultType::forLogicalOp): Don't assume that && produces a boolean.
This is JavaScript (aka Sparta).


* js/dom/branch-fold-correctness.html: Added a test for this case.

Change-Id: I72f81f31d88dee306428dd5eab9d40fcec009042
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoREGRESSION: Crash when opening Facebook.com
Oliver Hunt [Wed, 24 Sep 2014 16:46:55 +0000 (18:46 +0200)]
REGRESSION: Crash when opening Facebook.com


Reviewed by Andreas Kling.

Scope nodes are always objects, so we should be using SpecObjectOther
rather than SpecCellOther.  Marking Scopes as CellOther leads to a
contradiction in the CFA, resulting in bogus codegen.

* dfg/DFGAbstractInterpreterInlines.h:
* dfg/DFGPredictionPropagationPhase.cpp:

Change-Id: Ic083c04b9351c904ea4b5ee41bcc98c7d66d757d
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoIncorrect behavior on emscripten-compiled cube2hash
Filip Pizlo [Wed, 24 Sep 2014 16:43:29 +0000 (18:43 +0200)]
Incorrect behavior on emscripten-compiled cube2hash



Reviewed by Mark Hahnenberg.

If PutClosureVar is may-aliased to another PutClosureVar or GetClosureVar
then we should bail attempts to CSE.

* dfg/DFGCSEPhase.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154344 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Task-number: QTBUG-41500
Change-Id: Ia6bd7b09b20a99d5f4b5a14bf58737bc4b8c6a2b
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
3 years agoAvoid crashing when QtQuick destroys our SG node and GL context
Jocelyn Turcotte [Mon, 22 Sep 2014 16:03:13 +0000 (18:03 +0200)]
Avoid crashing when QtQuick destroys our SG node and GL context

Keep the layers on the UI process but make sure that the backing
stores are destroyed both on the UI and Web processes.

Add a check for m_isPurging in CoordinatedGraphicsLayer::removeTile
to make sure that we don't tell the UI process to remove tiles that
it purged itself, in a similar way to what we do in

Also make sure that we wait for the next m_isWaitingForRenderer
after we've purged the backing stores in CoordinatedLayerTreeHost
to wait for a QtWebPageSGNode to be available like we do right after
a page's construction and avoid sending update that would be
ignored by an unactive CoordinatedGraphicsScene.

Task-number: QTBUG-40734
Change-Id: I059f1de2ce2a8d9d70ab2cd8c3252a469ebf036e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
3 years agoPrevent display of infinite media slider track.
Yohan Chuzeville [Mon, 22 Sep 2014 16:32:04 +0000 (18:32 +0200)]
Prevent display of infinite media slider track.

When the duration received is zero but buffering already started,
the computed size for the rendering is infinite.

Change-Id: I9b9d8f42b6dbff792f89ac7d7e28991187762a1c
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>