Diff
Modified: trunk/Source/WTF/ChangeLog (254310 => 254311)
--- trunk/Source/WTF/ChangeLog 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WTF/ChangeLog 2020-01-09 23:48:18 UTC (rev 254311)
@@ -1,3 +1,15 @@
+2020-01-09 Simon Fraser <[email protected]>
+
+ Add ENABLE_UI_SIDE_COMPOSITING and use it in a few places
+ https://bugs.webkit.org/show_bug.cgi?id=205982
+
+ Reviewed by Jon Lee.
+
+ Add a #define ENABLE_UI_SIDE_COMPOSITING for Cocoa platforms. Minor comment cleanup, and
+ move the duplicate ENABLE_ASYNC_SCROLLING from iOS and macOS sections into the Cocoa section.
+
+ * wtf/FeatureDefines.h:
+
2020-01-08 Yusuke Suzuki <[email protected]>
Reduce binary size by purging C++ type information in Objective-C fields and parameters
Modified: trunk/Source/WTF/wtf/FeatureDefines.h (254310 => 254311)
--- trunk/Source/WTF/wtf/FeatureDefines.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WTF/wtf/FeatureDefines.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -50,7 +50,7 @@
/* FIXME: Move out the PLATFORM specific rules into platform specific files. */
-/* --------- Apple IOS (but not MAC) port --------- */
+/* --------- Apple iOS (but not macOS) port --------- */
#if PLATFORM(IOS_FAMILY)
#if !defined(ENABLE_AIRPLAY_PICKER)
@@ -65,10 +65,6 @@
#endif
#endif
-#if !defined(ENABLE_ASYNC_SCROLLING)
-#define ENABLE_ASYNC_SCROLLING 1
-#endif
-
#if !defined(ENABLE_CONTENT_EXTENSIONS)
#define ENABLE_CONTENT_EXTENSIONS 1
#endif
@@ -233,12 +229,12 @@
#endif /* PLATFORM(IOS_FAMILY) */
-/* --------- Apple WATCHOS port --------- */
+/* --------- Apple watchOS port --------- */
#if PLATFORM(WATCHOS)
#endif /* PLATFORM(WATCHOS) */
-/* --------- Apple MAC port (not IOS) --------- */
+/* --------- Apple macOS port (not iOS) --------- */
#if PLATFORM(MAC)
#if !defined(ENABLE_CONTENT_EXTENSIONS)
@@ -265,10 +261,6 @@
#define ENABLE_SMOOTH_SCROLLING 1
#endif
-#if !defined(ENABLE_ASYNC_SCROLLING)
-#define ENABLE_ASYNC_SCROLLING 1
-#endif
-
#if ENABLE(VIDEO)
#if !defined(ENABLE_VIDEO_TRACK)
#define ENABLE_VIDEO_TRACK 1
@@ -323,6 +315,8 @@
#endif /* PLATFORM(MAC) */
+/* --------- Apple Cocoa platforms --------- */
+
#if PLATFORM(COCOA)
#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA)
@@ -341,6 +335,14 @@
#define ENABLE_PAYMENT_REQUEST 1
#endif
+#if !defined(ENABLE_ASYNC_SCROLLING)
+#define ENABLE_ASYNC_SCROLLING 1
+#endif
+
+#if !defined(ENABLE_UI_SIDE_COMPOSITING)
+#define ENABLE_UI_SIDE_COMPOSITING 1
+#endif
+
#endif /* PLATFORM(COCOA) */
#if !PLATFORM(COCOA)
Modified: trunk/Source/WebKit/ChangeLog (254310 => 254311)
--- trunk/Source/WebKit/ChangeLog 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/ChangeLog 2020-01-09 23:48:18 UTC (rev 254311)
@@ -36,6 +36,32 @@
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+2020-01-09 Simon Fraser <[email protected]>
+
+ Add ENABLE_UI_SIDE_COMPOSITING and use it in a few places
+ https://bugs.webkit.org/show_bug.cgi?id=205982
+
+ Reviewed by Jon Lee.
+
+ All Remote* things should get wrapped in ENABLE(UI_SIDE_COMPOSITING)
+ if other platforms build the files, so do some of that. VisibleContentRect*
+ and ViewUpdateDispatcher* stuff is also UI-side compositing only.
+
+ * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
+ * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h:
+ (WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
+ * Shared/VisibleContentRectUpdateInfo.cpp:
+ * Shared/VisibleContentRectUpdateInfo.h:
+ * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
+ * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
+ * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
+ (WebKit::RemoteScrollingTree::handleMouseEvent):
+ * UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
+ * UIProcess/WebPageProxy.h:
+ * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
+ * WebProcess/WebPage/ViewUpdateDispatcher.h:
+ * WebProcess/WebPage/WebPage.h:
+
2020-01-09 Tim Horton <[email protected]>
Fix a tiny logging mistake in launchProcess
Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp (254310 => 254311)
--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp 2020-01-09 23:48:18 UTC (rev 254311)
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(UI_SIDE_COMPOSITING)
+
#include "RemoteScrollingCoordinatorTransaction.h"
#include "ArgumentCoders.h"
@@ -41,8 +44,6 @@
#include <wtf/text/CString.h>
#include <wtf/text/TextStream.h>
-#if ENABLE(ASYNC_SCROLLING)
-
namespace IPC {
using namespace WebCore;
@@ -796,19 +797,4 @@
} // namespace WebKit
-#else // !ENABLE(ASYNC_SCROLLING)
-
-namespace WebKit {
-
-void RemoteScrollingCoordinatorTransaction::encode(IPC::Encoder&) const
-{
-}
-
-bool RemoteScrollingCoordinatorTransaction::decode(IPC::Decoder& decoder, RemoteScrollingCoordinatorTransaction& transaction)
-{
- return true;
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(ASYNC_SCROLLING)
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h (254310 => 254311)
--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -25,6 +25,8 @@
#pragma once
+#if ENABLE(UI_SIDE_COMPOSITING)
+
#include <WebCore/ScrollingStateTree.h>
namespace IPC {
@@ -36,10 +38,8 @@
class RemoteScrollingCoordinatorTransaction {
public:
-#if ENABLE(ASYNC_SCROLLING)
void setStateTreeToEncode(std::unique_ptr<WebCore::ScrollingStateTree> stateTree) { m_scrollingStateTree = WTFMove(stateTree); }
std::unique_ptr<WebCore::ScrollingStateTree>& scrollingStateTree() { return m_scrollingStateTree; }
-#endif // ENABLE(ASYNC_SCROLLING)
void encode(IPC::Encoder&) const;
static bool decode(IPC::Decoder&, RemoteScrollingCoordinatorTransaction&);
@@ -50,11 +50,11 @@
#endif
private:
-#if ENABLE(ASYNC_SCROLLING)
bool decode(IPC::Decoder&);
std::unique_ptr<WebCore::ScrollingStateTree> m_scrollingStateTree;
-#endif // ENABLE(ASYNC_SCROLLING)
};
} // namespace WebKit
+
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.cpp (254310 => 254311)
--- trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.cpp 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.cpp 2020-01-09 23:48:18 UTC (rev 254311)
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(UI_SIDE_COMPOSITING)
+
#include "VisibleContentRectUpdateInfo.h"
#include "WebCoreArgumentCoders.h"
@@ -130,3 +133,5 @@
}
} // namespace WebKit
+
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h (254310 => 254311)
--- trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -25,6 +25,8 @@
#pragma once
+#if ENABLE(UI_SIDE_COMPOSITING)
+
#include "TransactionID.h"
#include <WebCore/FloatRect.h>
#include <WebCore/LengthBox.h>
@@ -132,3 +134,5 @@
WTF::TextStream& operator<<(WTF::TextStream&, const VisibleContentRectUpdateInfo&);
} // namespace WebKit
+
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp (254310 => 254311)
--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp 2020-01-09 23:48:18 UTC (rev 254311)
@@ -24,10 +24,10 @@
*/
#include "config.h"
+
+#if ENABLE(UI_SIDE_COMPOSITING)
#include "RemoteScrollingCoordinatorProxy.h"
-#if ENABLE(ASYNC_SCROLLING)
-
#include "ArgumentCoders.h"
#include "RemoteLayerTreeDrawingAreaProxy.h"
#include "RemoteScrollingCoordinator.h"
@@ -282,4 +282,4 @@
} // namespace WebKit
-#endif // ENABLE(ASYNC_SCROLLING)
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h (254310 => 254311)
--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(ASYNC_SCROLLING)
+#if ENABLE(UI_SIDE_COMPOSITING)
#include "MessageReceiver.h"
#include "RemoteScrollingCoordinator.h"
@@ -137,4 +137,4 @@
} // namespace WebKit
-#endif // ENABLE(ASYNC_SCROLLING)
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp (254310 => 254311)
--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp 2020-01-09 23:48:18 UTC (rev 254311)
@@ -26,7 +26,7 @@
#include "config.h"
#include "RemoteScrollingTree.h"
-#if ENABLE(ASYNC_SCROLLING)
+#if ENABLE(UI_SIDE_COMPOSITING)
#include "RemoteLayerTreeHost.h"
#include "RemoteScrollingCoordinatorProxy.h"
@@ -150,7 +150,7 @@
void RemoteScrollingTree::handleMouseEvent(const WebCore::PlatformMouseEvent& event)
{
-#if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)
+#if PLATFORM(MAC)
if (!rootNode())
return;
static_cast<ScrollingTreeFrameScrollingNodeRemoteMac&>(*rootNode()).handleMouseEvent(event);
@@ -161,4 +161,4 @@
} // namespace WebKit
-#endif // ENABLE(ASYNC_SCROLLING)
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h (254310 => 254311)
--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -25,7 +25,7 @@
#pragma once
-#if ENABLE(ASYNC_SCROLLING)
+#if ENABLE(UI_SIDE_COMPOSITING)
#include "RemoteScrollingCoordinator.h"
#include <WebCore/ScrollingConstraints.h>
@@ -78,4 +78,4 @@
SPECIALIZE_TYPE_TRAITS_SCROLLING_TREE(WebKit::RemoteScrollingTree, isRemoteScrollingTree());
-#endif // ENABLE(ASYNC_SCROLLING)
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (254310 => 254311)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -679,6 +679,10 @@
void textInputContextsInRect(WebCore::FloatRect, CompletionHandler<void(const Vector<WebCore::ElementContext>&)>&&);
void focusTextInputContext(const WebCore::ElementContext&, CompletionHandler<void(bool)>&&);
+#if ENABLE(UI_SIDE_COMPOSITING)
+ void updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
+#endif
+
#if PLATFORM(IOS_FAMILY)
double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
@@ -688,7 +692,6 @@
// When visual viewports are enabled, this is the layout viewport rect.
const WebCore::FloatRect& layoutViewportRect() const { return m_lastVisibleContentRectUpdate.layoutViewportRect(); }
- void updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
void resendLastVisibleContentRects();
WebCore::FloatRect computeLayoutViewportRect(const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatRect& unobscuredContentRectRespectingInputViewBounds, const WebCore::FloatRect& currentLayoutViewportRect, double displayedContentScale, WebCore::FrameView::LayoutViewportConstraint = WebCore::FrameView::LayoutViewportConstraint::Unconstrained) const;
@@ -2269,7 +2272,6 @@
#if PLATFORM(IOS_FAMILY)
Optional<WebCore::InputMode> m_pendingInputModeChange;
Optional<WebCore::ViewportArguments> m_overrideViewportArguments;
- VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
TransactionID m_firstLayerTreeTransactionIdAfterDidCommitLoad;
int32_t m_deviceOrientation { 0 };
bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad { true };
@@ -2277,7 +2279,11 @@
bool m_isKeyboardAnimatingIn { false };
bool m_isScrollingOrZooming { false };
#endif
-
+
+#if ENABLE(UI_SIDE_COMPOSITING)
+ VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
+#endif
+
#if PLATFORM(MAC)
bool m_useSystemAppearance { false };
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/ViewUpdateDispatcher.cpp (254310 => 254311)
--- trunk/Source/WebKit/WebProcess/WebPage/ViewUpdateDispatcher.cpp 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/WebProcess/WebPage/ViewUpdateDispatcher.cpp 2020-01-09 23:48:18 UTC (rev 254311)
@@ -26,7 +26,7 @@
#include "config.h"
#include "ViewUpdateDispatcher.h"
-#if PLATFORM(IOS_FAMILY)
+#if ENABLE(UI_SIDE_COMPOSITING)
#include "ViewUpdateDispatcherMessages.h"
#include "WebPage.h"
@@ -90,4 +90,4 @@
} // namespace WebKit
-#endif // PLATFORM(IOS_FAMILY)
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/WebProcess/WebPage/ViewUpdateDispatcher.h (254310 => 254311)
--- trunk/Source/WebKit/WebProcess/WebPage/ViewUpdateDispatcher.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/WebProcess/WebPage/ViewUpdateDispatcher.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -23,9 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ViewUpdateDispatcher_h
-#define ViewUpdateDispatcher_h
+#pragma once
+#if ENABLE(UI_SIDE_COMPOSITING)
+
#include "Connection.h"
#include "VisibleContentRectUpdateInfo.h"
@@ -64,4 +65,4 @@
} // namespace WebKit
-#endif // ViewportUpdateDispatcher_h
+#endif // ENABLE(UI_SIDE_COMPOSITING)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (254310 => 254311)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-01-09 23:47:34 UTC (rev 254310)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-01-09 23:48:18 UTC (rev 254311)
@@ -228,7 +228,6 @@
class TextCheckingControllerProxy;
class UserMediaPermissionRequestManager;
class ViewGestureGeometryCollector;
-class VisibleContentRectUpdateInfo;
class WebColorChooser;
class WebContextMenu;
class WebContextMenuItemData;
@@ -286,6 +285,10 @@
struct WebSelectionData;
struct WebsitePoliciesData;
+#if ENABLE(UI_SIDE_COMPOSITING)
+class VisibleContentRectUpdateInfo;
+#endif
+
using SnapshotOptions = uint32_t;
using WKEventModifiers = uint32_t;
@@ -969,8 +972,6 @@
void setDeviceOrientation(int32_t);
void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
void dynamicViewportSizeUpdate(const WebCore::FloatSize& viewLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, const WebCore::FloatBoxExtent& targetUnobscuredSafeAreaInsets, double scale, int32_t deviceOrientation, DynamicViewportSizeUpdateID);
- Optional<float> scaleFromUIProcess(const VisibleContentRectUpdateInfo&) const;
- void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
void applicationWillResignActive();
@@ -990,6 +991,11 @@
bool canShowWhileLocked() const { return m_canShowWhileLocked; }
#endif
+#if ENABLE(UI_SIDE_COMPOSITING)
+ Optional<float> scaleFromUIProcess(const VisibleContentRectUpdateInfo&) const;
+ void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
+#endif
+
#if ENABLE(IOS_TOUCH_EVENTS)
void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
#endif