File: fix_trojita_plaintext.diff

package info (click to toggle)
qtwebkit-opensource-src 5.212.0~alpha2-21
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 126,448 kB
  • sloc: cpp: 1,398,101; ansic: 32,876; perl: 19,440; python: 12,790; ruby: 10,299; xml: 8,371; asm: 5,078; yacc: 2,166; lex: 906; sh: 414; makefile: 43
file content (25 lines) | stat: -rw-r--r-- 979 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: trigger layout after resizing the FrameView
 There are problems with QGLWidget based web plugins due to the fact
 that WebKit forces us to relayout during paint events, which in turn
 might resize widgets, causing the shared backing store's QImages to
 be corrupted and hence causing crashes.
 .
 This patch triggers a layout upon resizing the FrameView, which reduces
 the likelihood of resizing plugins during a subsequent paintEvent.
Origin: upstream, commits:
 https://github.com/annulen/webkit/commit/6faf11215e1af27d
 https://github.com/annulen/webkit/commit/76420459a13d9440
Bug: https://github.com/annulen/webkit/issues/511
Last-Update: 2019-01-19

--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
@@ -961,6 +961,8 @@
     FrameView* view = frame->view();
     ASSERT(view);
     view->resize(size);
+    if (view->needsLayout())
+        view->layout();
     view->adjustViewSize();
 }