summaryrefslogtreecommitdiff
path: root/qtwebkit/qt5-webkit-trojita-1.patch
blob: b963d5ec4cc2b4dc94abe379be15503555070247 (plain)
    1 From 6faf11215e1af27d35e921ae669aa0251a01a1ab Mon Sep 17 00:00:00 2001
    2 From: =?UTF-8?q?Michael=20Br=C3=BCning?= <michael.bruning@digia.com>
    3 Date: Wed, 13 Nov 2013 18:13:36 +0100
    4 Subject: [PATCH] Trigger layout after resizing the FrameView.
    5 
    6 There are problems with QGLWidget based web plugins due to the fact
    7 that WebKit forces us to relayout during paint events, which in turn
    8 might resize widgets, causing the shared backing store's QImages to
    9 be corrupted and hence causing crashed.
   10 
   11 This patch triggers a layout upon resizing the FrameView, which reduces
   12 the likely hood of resizing plugins during a subsequent paintEvent.
   13 
   14 Task-number: QTBUG-34277
   15 Change-Id: Id35c72a3cc68ac6633a74fba0669c2d8fbfabc88
   16 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
   17 ---
   18  Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp | 3 +++
   19  1 file changed, 3 insertions(+)
   20 
   21 diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
   22 index e6145b6ffb82..941d8df603d9 100644
   23 --- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
   24 +++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
   25 @@ -962,6 +962,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& size)
   26      ASSERT(view);
   27      view->resize(size);
   28      view->adjustViewSize();
   29 +
   30 +    if (view->needsLayout())
   31 +        view->layout();
   32  }
   33  
   34  

Generated by cgit