summaryrefslogtreecommitdiff
path: root/qtwebkit/qt5-webkit-trojita-2.patch
blob: 51fb78b78ec08899e381cc4f8230e07fcb03042f (plain)
    1 From 76420459a13d9440b41864c93cb4ebb404bdab55 Mon Sep 17 00:00:00 2001
    2 From: Konstantin Tokarev <annulen@yandex.ru>
    3 Date: Thu, 12 Oct 2017 20:15:15 +0300
    4 Subject: [PATCH] Fix for 451c5a10: run adjustViewSize() after relayout
    5 
    6 Additional note for 451c5a10 + this:
    7 
    8 Since r162515 resize of FrameView that does not have scrollbars (or use
    9 overlay scrollbars) does not lead to automatic re-layout. In Trojita
   10 contentsSize() is called immediately after QWebPage::setViewportSize(),
   11 returning wrong result.
   12 
   13 Change-Id: I543b22d7bbe1514333007e5f99b97a7c12c19c1a
   14 ---
   15  Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp | 3 +--
   16  1 file changed, 1 insertion(+), 2 deletions(-)
   17 
   18 diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
   19 index 941d8df603d9..df28e9f21f2c 100644
   20 --- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
   21 +++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
   22 @@ -961,10 +961,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& size)
   23      FrameView* view = frame->view();
   24      ASSERT(view);
   25      view->resize(size);
   26 -    view->adjustViewSize();
   27 -
   28      if (view->needsLayout())
   29          view->layout();
   30 +    view->adjustViewSize();
   31  }
   32  
   33  

Generated by cgit