From 2ac19ee6bb5732a3a585b8d9378bc65107748a36 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 21 Apr 2015 10:53:27 +0200 Subject: Fix crash when loading new doc after a single image doc Added a couple of nullpointer checks in image document cleanup. Task-number: QTBUG-42890 Change-Id: I533a517ed7402428afc3ae470398a64ed0b6a2a8 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/html/ImageDocument.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/html/ImageDocument.cpp b/Source/WebCore/html/ImageDocument.cpp index 7d9bcc589..594ccad90 100644 --- a/Source/WebCore/html/ImageDocument.cpp +++ b/Source/WebCore/html/ImageDocument.cpp @@ -135,6 +135,8 @@ void ImageDocumentParser::appendBytes(DocumentWriter*, const char*, size_t) return; CachedImage* cachedImage = document()->cachedImage(); + if (!cachedImage) + return; RefPtr resourceData = frame->loader()->documentLoader()->mainResourceData(); cachedImage->addDataBuffer(resourceData.get()); @@ -143,8 +145,8 @@ void ImageDocumentParser::appendBytes(DocumentWriter*, const char*, size_t) void ImageDocumentParser::finish() { - if (!isStopped() && document()->imageElement()) { - CachedImage* cachedImage = document()->cachedImage(); + CachedImage* cachedImage = 0; + if (!isStopped() && document()->imageElement() && (cachedImage = document()->cachedImage())) { RefPtr data = document()->frame()->loader()->documentLoader()->mainResourceData(); // If this is a multipart image, make a copy of the current part, since the resource data -- cgit v1.2.3 From d51886bb805fdf3c2e320acd9ba3b9e72b7f8713 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 24 Apr 2015 11:07:20 +0200 Subject: Fix assertion on qt.io MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our webkit examples all assert on resize due to qt.io trying to do an animation from an undefined value. Change-Id: I95aaee7834b2caba37e55f2cc09160af638a8d39 Reviewed-by: Michael Brüning --- Source/WebCore/platform/Length.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/WebCore/platform/Length.h b/Source/WebCore/platform/Length.h index 2f91550da..72263b045 100644 --- a/Source/WebCore/platform/Length.h +++ b/Source/WebCore/platform/Length.h @@ -233,6 +233,11 @@ public: Length blend(const Length& from, double progress) const { // Blend two lengths to produce a new length that is in between them. Used for animation. + if (from.isUndefined()) + return *this; + if (isUndefined()) + return from; + if (from.type() == Calculated || type() == Calculated) return blendMixedTypes(from, progress); -- cgit v1.2.3 From 586bdc38324dfaeec65389bf7646c82cb35db017 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 24 Apr 2015 10:46:33 +0200 Subject: Changes file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic049b5a411c151b316f20e5528a8b46f82ba83e2 Reviewed-by: Florian Bruhin Reviewed-by: Michael Brüning --- dist/changes-5.4.2 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 dist/changes-5.4.2 diff --git a/dist/changes-5.4.2 b/dist/changes-5.4.2 new file mode 100644 index 000000000..913001e3e --- /dev/null +++ b/dist/changes-5.4.2 @@ -0,0 +1,54 @@ +Qt 5.4.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.4.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://doc.qt.io/qt-5.4 + +The Qt version 5.4 series is binary compatible with the 5.3.x series. +Applications compiled for 5.3 will continue to run with 5.4. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +QtWebkit +-------- + - Fixed privacy breaking icon database usage in private browsing mode. + - Fixed possible OpenGL crashes on exit. + - [QTBUG-44475] Improved performance of initializing large JSON objects. + - [QTBUG-44829] Fixed g++5 builds. + - [QTBUG-44912] Fixed crash on loading svg.js + - [QTBUG-44524] Fixed possible out-of-memory crash and performance issues + on some pages caused by very large accelerated layers. + - [QTBUG-45299] Fixed segmentation fault in JSC::DFG::prepareOSREntry. + + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Windows +------- + - [QTBUG-44401,QTBUG-42588,QTBUG-43024] Forwarding show and hide events so + videos in non-visible widgets are hidden. + +ARM +------- + - [QTBUG-44700] Fixed JavaScript crash caused by misbehaving gold linker. + - [QTBUG-44740] Fixed alignment issue in WebKit2 IPC. + +Linux +------- + - [QTBUG-44245] Fixed crash on some HTML5 videos caused by invalid + frame-data from GStreamer. + - [QTBUG-44714] Fixed linking with glib 2.43 and newer. -- cgit v1.2.3 From 8b2647154aa08a498624fa144d55fdefbeebe320 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 21 May 2015 13:08:12 +0200 Subject: Fix drawing of oversized accelerated layers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a special content layer that can used when we drop the backing store due to size, but still need to draw the content that would have been in the backing store. This fixes a regression introduced with the recent patch to prevent large backing stores. Change-Id: I9a61b3cc978bccdaa423c0d076e3aeaa7d9ebc99 Task-number: QTBUG-46178 Reviewed-by: Michael Brüning --- .../graphics/texmap/GraphicsLayerTextureMapper.cpp | 40 ++++++++++++++++++++-- .../graphics/texmap/GraphicsLayerTextureMapper.h | 1 + 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp index e390792a3..73a6afc02 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp @@ -48,6 +48,31 @@ PassOwnPtr GraphicsLayer::create(GraphicsLayerClient* client) return adoptPtr(new GraphicsLayerTextureMapper(client)); } +// A fallback layer to handle painting when we decide dynamically to avoid compositing due to layer size. +class DirectPaintLayer : public TextureMapperPlatformLayer { +public: + DirectPaintLayer(GraphicsLayer* sourceLayer) : m_sourceLayer(sourceLayer) + { } + void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix& modelViewMatrix, float opacity) OVERRIDE; + +private: + GraphicsLayer* m_sourceLayer; +}; + +void DirectPaintLayer::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity) +{ + GraphicsContext* context = textureMapper->graphicsContext(); + context->save(); + context->setAlpha(opacity); +#if ENABLE(3D_RENDERING) + context->concat3DTransform(matrix); +#else + context->concatCTM(matrix.toAffineTransform()); +#endif + m_sourceLayer->paintGraphicsLayerContents(*context, enclosingIntRect(targetRect)); + context->restore(); +} + GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* client) : GraphicsLayer(client) , m_layer(adoptPtr(new TextureMapperLayer())) @@ -57,6 +82,7 @@ GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* clie , m_fixedToViewport(false) , m_debugBorderWidth(0) , m_contentsLayer(0) + , m_directLayer(0) , m_animationStartTime(0) , m_isScrollable(false) { @@ -79,7 +105,8 @@ GraphicsLayerTextureMapper::~GraphicsLayerTextureMapper() { if (m_contentsLayer) m_contentsLayer->setClient(0); - + delete m_directLayer; + m_directLayer = 0; willBeDestroyed(); } @@ -233,6 +260,15 @@ void GraphicsLayerTextureMapper::setSize(const FloatSize& value) if (maskLayer()) maskLayer()->setSize(value); notifyChange(SizeChange); + + if (m_size.width() * m_size.height() <= 8192*8192) { + if (m_contentsLayer == m_directLayer) + setContentsToMedia(0); + } else if (!m_contentsLayer) { + if (!m_directLayer) + m_directLayer = new DirectPaintLayer(this); + setContentsToMedia(m_directLayer); + } } /* \reimp (GraphicsLayer.h) @@ -627,7 +663,7 @@ void GraphicsLayerTextureMapper::updateBackingStoreIfNeeded() bool GraphicsLayerTextureMapper::shouldHaveBackingStore() const { - return drawsContent() && contentsAreVisible() && !m_size.isEmpty() && (m_size.width() * m_size.height() <= 8192*8192); + return drawsContent() && contentsAreVisible() && !m_size.isEmpty() && !m_contentsLayer; } bool GraphicsLayerTextureMapper::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset) diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h index 16e4ebad0..548a95c29 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h @@ -176,6 +176,7 @@ private: float m_debugBorderWidth; TextureMapperPlatformLayer* m_contentsLayer; + TextureMapperPlatformLayer* m_directLayer; FloatRect m_needsDisplayRect; GraphicsLayerAnimations m_animations; double m_animationStartTime; -- cgit v1.2.3