Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHICS) or USE(TEXTUR...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Dec 2015 18:40:30 +0000 (18:40 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Dec 2015 18:40:30 +0000 (18:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152265

Reviewed by Tim Horton.

We neither make use of LayerTreeHost on Mac nor on iOS. We should guard code that makes
use of this class as applicable. This also fixes the iOS Simulator build when using
Apple Internal software.

* WebProcess/WebCoreSupport/WebChromeClient.cpp: Guard code that used LayerTreeHost.
* WebProcess/WebPage/LayerTreeHost.cpp: Guard contents of file with USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER).
* WebProcess/WebPage/LayerTreeHost.h: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage): Ditto.
(WebKit::WebPage::setDeviceScaleFactor): Ditto.
* WebProcess/WebPage/WebPage.h: Substitute header LayerTreeContext.h for LayerTreeHost.h since we make use
of the enum class LayerHostingMode.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Remove unnecessary code; DrawingArea::layerTreeHost() always
returns nullptr on iOS.

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

index d623bb9..d392b01 100644 (file)
@@ -1,3 +1,26 @@
+2015-12-15  Daniel Bates  <dabates@apple.com>
+
+        Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHICS) or USE(TEXTURE_MAPPER)
+        https://bugs.webkit.org/show_bug.cgi?id=152265
+
+        Reviewed by Tim Horton.
+
+        We neither make use of LayerTreeHost on Mac nor on iOS. We should guard code that makes
+        use of this class as applicable. This also fixes the iOS Simulator build when using
+        Apple Internal software.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp: Guard code that used LayerTreeHost.
+        * WebProcess/WebPage/LayerTreeHost.cpp: Guard contents of file with USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER).
+        * WebProcess/WebPage/LayerTreeHost.h: Ditto.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::scalePage): Ditto.
+        (WebKit::WebPage::setDeviceScaleFactor): Ditto.
+        * WebProcess/WebPage/WebPage.h: Substitute header LayerTreeContext.h for LayerTreeHost.h since we make use
+        of the enum class LayerHostingMode.
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects): Remove unnecessary code; DrawingArea::layerTreeHost() always
+        returns nullptr on iOS.
+
 2015-12-15  Zan Dobersek  <zdobersek@igalia.com>
 
         [TexMap] Operate with a reference to the TextureMapper wherever possible
index 1c6e695..8986f76 100644 (file)
@@ -33,7 +33,6 @@
 #include "HangDetectionDisabler.h"
 #include "InjectedBundleNavigationAction.h"
 #include "InjectedBundleNodeHandle.h"
-#include "LayerTreeHost.h"
 #include "NavigationActionData.h"
 #include "PageBanner.h"
 #include "UserData.h"
 #include "RemoteScrollingCoordinator.h"
 #endif
 
+#if USE(COORDINATED_GRAPHICS)
+#include "LayerTreeHost.h"
+#endif
+
 #if PLATFORM(GTK)
 #include "PrinterListGtk.h"
 #endif
index ec67160..e50b008 100644 (file)
@@ -24,6 +24,9 @@
  */
 
 #include "config.h"
+
+#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
+
 #include "LayerTreeHost.h"
 
 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
@@ -62,3 +65,5 @@ LayerTreeHost::~LayerTreeHost()
 }
 
 } // namespace WebKit
+
+#endif // USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
index 7126d83..4864540 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef LayerTreeHost_h
 #define LayerTreeHost_h
 
+#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
+
 #include "LayerTreeContext.h"
 #include <WebCore/Color.h>
 #include <wtf/PassRefPtr.h>
@@ -106,4 +108,6 @@ protected:
 
 } // namespace WebKit
 
+#endif // USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
+
 #endif // LayerTreeHost_h
index 152d8a9..e14275d 100644 (file)
@@ -40,7 +40,6 @@
 #include "EventDispatcher.h"
 #include "InjectedBundle.h"
 #include "InjectedBundleBackForwardList.h"
-#include "LayerTreeHost.h"
 #include "Logging.h"
 #include "NetscapePlugin.h"
 #include "NotificationPermissionRequestManager.h"
 #include <wtf/RefCountedLeakCounter.h>
 #endif
 
+#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
+#include "LayerTreeHost.h"
+#endif
+
 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
 #include "CoordinatedLayerTreeHostMessages.h"
 #endif
@@ -1459,8 +1462,10 @@ void WebPage::scalePage(double scale, const IntPoint& origin)
     for (auto* pluginView : m_pluginViews)
         pluginView->pageScaleFactorDidChange();
 
+#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
     if (m_drawingArea->layerTreeHost())
         m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
+#endif
 
     send(Messages::WebPageProxy::PageScaleFactorDidChange(scale));
 }
@@ -1535,8 +1540,10 @@ void WebPage::setDeviceScaleFactor(float scaleFactor)
         m_findController.deviceScaleFactorDidChange();
     }
 
+#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
     if (m_drawingArea->layerTreeHost())
         m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
+#endif
 }
 
 float WebPage::deviceScaleFactor() const
index 84ad724..546be47 100644 (file)
@@ -39,7 +39,7 @@
 #include "InjectedBundlePageLoaderClient.h"
 #include "InjectedBundlePagePolicyClient.h"
 #include "InjectedBundlePageResourceLoadClient.h"
-#include "LayerTreeHost.h"
+#include "LayerTreeContext.h"
 #include "MessageReceiver.h"
 #include "MessageSender.h"
 #include "Plugin.h"
index 67d6245..5cbf570 100644 (file)
@@ -2924,9 +2924,6 @@ void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visi
 
         m_page->setPageScaleFactor(floatBoundedScale, scrollPosition, m_isInStableState);
         hasSetPageScale = true;
-
-        if (LayerTreeHost* layerTreeHost = m_drawingArea->layerTreeHost())
-            layerTreeHost->deviceOrPageScaleFactorChanged();
         send(Messages::WebPageProxy::PageScaleFactorDidChange(floatBoundedScale));
     }