Title: [194108] trunk/Source/WebKit2
Revision
194108
Author
[email protected]
Date
2015-12-15 10:40:30 -0800 (Tue, 15 Dec 2015)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (194107 => 194108)


--- trunk/Source/WebKit2/ChangeLog	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/ChangeLog	2015-12-15 18:40:30 UTC (rev 194108)
@@ -1,3 +1,26 @@
+2015-12-15  Daniel Bates  <[email protected]>
+
+        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  <[email protected]>
 
         [TexMap] Operate with a reference to the TextureMapper wherever possible

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (194107 => 194108)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2015-12-15 18:40:30 UTC (rev 194108)
@@ -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"
@@ -84,6 +83,10 @@
 #include "RemoteScrollingCoordinator.h"
 #endif
 
+#if USE(COORDINATED_GRAPHICS)
+#include "LayerTreeHost.h"
+#endif
+
 #if PLATFORM(GTK)
 #include "PrinterListGtk.h"
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp (194107 => 194108)


--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp	2015-12-15 18:40:30 UTC (rev 194108)
@@ -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 @@
 }
 
 } // namespace WebKit
+
+#endif // USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h (194107 => 194108)


--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h	2015-12-15 18:40:30 UTC (rev 194108)
@@ -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 @@
 
 } // namespace WebKit
 
+#endif // USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
+
 #endif // LayerTreeHost_h

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (194107 => 194108)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-12-15 18:40:30 UTC (rev 194108)
@@ -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"
@@ -212,6 +211,10 @@
 #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 @@
     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 @@
         m_findController.deviceScaleFactorDidChange();
     }
 
+#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
     if (m_drawingArea->layerTreeHost())
         m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
+#endif
 }
 
 float WebPage::deviceScaleFactor() const

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (194107 => 194108)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2015-12-15 18:40:30 UTC (rev 194108)
@@ -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"

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (194107 => 194108)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2015-12-15 17:58:04 UTC (rev 194107)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2015-12-15 18:40:30 UTC (rev 194108)
@@ -2924,9 +2924,6 @@
 
         m_page->setPageScaleFactor(floatBoundedScale, scrollPosition, m_isInStableState);
         hasSetPageScale = true;
-
-        if (LayerTreeHost* layerTreeHost = m_drawingArea->layerTreeHost())
-            layerTreeHost->deviceOrPageScaleFactorChanged();
         send(Messages::WebPageProxy::PageScaleFactorDidChange(floatBoundedScale));
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to