Regression(PSON): Deal with the drawing area potentially being null under WebChromeCl...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 17:25:18 +0000 (17:25 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 17:25:18 +0000 (17:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190474

Reviewed by Geoffrey Garen.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp

index c4f3822..325c93b 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-11  Chris Dumez  <cdumez@apple.com>
+
+        Regression(PSON): Deal with the drawing area potentially being null under WebChromeClient::contentsSizeChanged()
+        https://bugs.webkit.org/show_bug.cgi?id=190474
+
+        Reviewed by Geoffrey Garen.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::contentsSizeChanged const):
+
 2018-10-11  Alejandro G. Castro  <alex@igalia.com>
 
         [GTK][WPE] Add mediaDevices.enumerateDevices support
index f93667a..f8f030c 100644 (file)
@@ -597,7 +597,8 @@ void WebChromeClient::contentsSizeChanged(Frame& frame, const IntSize& size) con
 
     m_page.send(Messages::WebPageProxy::DidChangeContentSize(size));
 
-    m_page.drawingArea()->mainFrameContentSizeChanged(size);
+    if (auto* drawingArea = m_page.drawingArea())
+        drawingArea->mainFrameContentSizeChanged(size);
 
     if (frameView && !frameView->delegatesScrolling())  {
         bool hasHorizontalScrollbar = frameView->horizontalScrollbar();