Do not notifyFinished on resources never loaded

If autoload images is disabled, the CachedImage element never starts
loading but still needs loading. We therefore need to check both
isLoading() and stillNeedsLoad() to determine if loading is complete.

This fixes a serious memory leak when autoload images is disabled.

Task-number: QTBUG-34494
Change-Id: I36811179d95e23651fabe484fbde08e2881d822b
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Forward devicePixelRatio to WebCore Page

The device pixel ratio must be set on Page for CSS image set and CSS
media queries to work correctly.

Task-number: QTBUG-36190
Change-Id: I76694c1375194f35df7f62e942bc8565f065a3bc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Apply device pixel ratio to transparency layers

The transparency layers are currently created with taking hiDPI into
account. This means that any CSS opacity causes a shift in rendering
quality.

This patch forwards the device pixelratio for any QPaintDevice to
transparency layers created for that device.

Change-Id: Ie65f76771a4cc59bc714a9b89511cab1f7617abc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Don't pollute .prl & .pc files with private dependencies

Also change the creating_module check in needToLink to make sure that
only the main module will try to link directly with the WebCore and
JavaScriptCore static libraries.

Task-number: QTBUG-35774
Initial-patch-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Change-Id: Ib5992e112803679837249400e98cb8c22636096d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Fix RenderGeometryMap.cpp ASSERT on Google Plus

The assert roundedIntPoint(result) == roundedIntPoint(rendererMappedResult)
is triggered on Google Plus. The cause appears to be premature rounding
leading a wrong result.

The fix is a to remove the early rounding. This follows a similar fix
in upstream WebKit r142638 where the same problem was fixed for the
other mapToContainer method.

Change-Id: Ifae91c204f2043b3f07682dc7bed711a6cb38c91
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix assert in BitmapTextureImageBuffer::applyFilters()

While WebCore should not give a BitmapTextureImageBuffer any filters
applyFilters() will still be called with an empty list of filters.

We should therefore not assert that applyFilters is never called by
that is only ever called with an empty list of filters to apply.

Change-Id: Ic24b735f1fc92e2a57c7ef068a8c7d712f0fc31f
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Fix assert in m_stack.isEmpty() in GraphicsContext::~GraphicsContext()

Save and restore is not balanced in GraphicsContext. This causes
the log error "ERROR void GraphicsContext::restore() stack is empty"
and assert in the GraphicsContext destructor.

The cause is a mismatch of GraphicsContexts being saved and restored by
TextureMapperImageBuffer beginClip and endClip. This patch fixes endClip
to restore the currentContext beginClip saved.

Change-Id: Ief0100dd26c7eded04734167e86712a81f1a7674
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix transform of accelerated layers on hiDPI painters

A mismatch of reading combinedTransform but setting worldTransform
means that the pattern of only storing and restoring the transform
when temporarily overriding it, causes the hiDPI transform that
combinedTransform contains to be applied multiple times.

Task-number: QTBUG-36508
Change-Id: I512f0752016f55935595ef259913660b4ee78ae7
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
TextureMapperGL must take hiDPI transform into account

Since TextureMapperGL does its own native rendering it must itself
apply the all transforms QPainter would normally do behind the scenes.

Task-number: QTBUG-36508
Change-Id: Id4a0ee64ff7ac5c5cb51e45ffd2e4e25ed7fce74
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>