Diff
Modified: trunk/Source/WebKit2/ChangeLog (165234 => 165235)
--- trunk/Source/WebKit2/ChangeLog 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-07 02:01:39 UTC (rev 165235)
@@ -1,5 +1,37 @@
2014-03-06 Simon Fraser <[email protected]>
+ Send the fixed position rect to the WebProcess along with the other rects
+ https://bugs.webkit.org/show_bug.cgi?id=129856
+
+ Reviewed by Benjamin Poulain.
+
+ Remove the functions that pass the custom fixed position rect through
+ the DrawingArea, and replace them by adding this rect to the
+ VisibleContentRectUpdateInfo, along with the "is stable" flag. We
+ then set the custom fixed position rect in the web process for
+ stable updates.
+
+ * Shared/VisibleContentRectUpdateInfo.cpp:
+ (WebKit::VisibleContentRectUpdateInfo::encode):
+ (WebKit::VisibleContentRectUpdateInfo::decode):
+ * Shared/VisibleContentRectUpdateInfo.h:
+ (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+ (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
+ (WebKit::VisibleContentRectUpdateInfo::inStableState):
+ (WebKit::operator==):
+ * UIProcess/DrawingAreaProxy.cpp:
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
+ * WebProcess/WebPage/DrawingArea.h:
+ * WebProcess/WebPage/DrawingArea.messages.in:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::updateVisibleContentRects):
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+
+2014-03-06 Simon Fraser <[email protected]>
+
Remove empty class extension in WKContentViewInteraction
https://bugs.webkit.org/show_bug.cgi?id=129849
Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (165234 => 165235)
--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp 2014-03-07 02:01:39 UTC (rev 165235)
@@ -34,7 +34,9 @@
{
encoder << m_exposedRect;
encoder << m_unobscuredRect;
+ encoder << m_customFixedPositionRect;
encoder << m_scale;
+ encoder << m_inStableState;
}
bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder& decoder, VisibleContentRectUpdateInfo& result)
@@ -43,8 +45,12 @@
return false;
if (!decoder.decode(result.m_unobscuredRect))
return false;
+ if (!decoder.decode(result.m_customFixedPositionRect))
+ return false;
if (!decoder.decode(result.m_scale))
return false;
+ if (!decoder.decode(result.m_inStableState))
+ return false;
return true;
}
Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (165234 => 165235)
--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h 2014-03-07 02:01:39 UTC (rev 165235)
@@ -42,16 +42,20 @@
{
}
- VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, double scale)
+ VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState)
: m_exposedRect(exposedRect)
, m_unobscuredRect(unobscuredRect)
+ , m_customFixedPositionRect(customFixedPositionRect)
, m_scale(scale)
+ , m_inStableState(inStableState)
{
}
const WebCore::FloatRect& exposedRect() const { return m_exposedRect; }
const WebCore::FloatRect& unobscuredRect() const { return m_unobscuredRect; }
+ const WebCore::FloatRect& customFixedPositionRect() const { return m_customFixedPositionRect; }
double scale() const { return m_scale; }
+ bool inStableState() const { return m_inStableState; }
void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, VisibleContentRectUpdateInfo&);
@@ -59,12 +63,18 @@
private:
WebCore::FloatRect m_exposedRect;
WebCore::FloatRect m_unobscuredRect;
+ WebCore::FloatRect m_customFixedPositionRect;
double m_scale;
+ bool m_inStableState;
};
inline bool operator==(const VisibleContentRectUpdateInfo& a, const VisibleContentRectUpdateInfo& b)
{
- return a.scale() == b.scale() && a.exposedRect() == b.exposedRect() && a.unobscuredRect() == b.unobscuredRect();
+ return a.scale() == b.scale()
+ && a.exposedRect() == b.exposedRect()
+ && a.unobscuredRect() == b.unobscuredRect()
+ && a.customFixedPositionRect() == b.customFixedPositionRect()
+ && a.inStableState() == b.inStableState();
}
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (165234 => 165235)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2014-03-07 02:01:39 UTC (rev 165235)
@@ -87,14 +87,4 @@
}
#endif // PLATFORM(MAC)
-#if PLATFORM(COCOA)
-void DrawingAreaProxy::setCustomFixedPositionRect(const FloatRect& fixedPositionRect)
-{
- if (!m_webPageProxy->isValid())
- return;
-
- m_webPageProxy->process().send(Messages::DrawingArea::SetCustomFixedPositionRect(fixedPositionRect), m_webPageProxy->pageID());
-}
-#endif
-
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (165234 => 165235)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm 2014-03-07 02:01:39 UTC (rev 165235)
@@ -171,19 +171,15 @@
// visual noise. We filter those useless updates.
scale = _page->displayedContentScale();
}
-
- _page->updateVisibleContentRects(VisibleContentRectUpdateInfo(visibleRect, unobscuredRect, scale));
+ FloatRect fixedPosRect = [self fixedPositionRectFromExposedRect:unobscuredRect scale:scale];
+ _page->updateVisibleContentRects(VisibleContentRectUpdateInfo(visibleRect, unobscuredRect, fixedPosRect, scale, isStableState));
+
RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy();
scrollingCoordinator->scrollPositionChangedViaDelegatedScrolling(scrollingCoordinator->rootScrollingNodeID(), unobscuredRect.origin);
- if (auto drawingArea = _page->drawingArea()) {
- if (isStableState) {
- FloatRect fixedPosRect = [self fixedPositionRectFromExposedRect:unobscuredRect scale:scale];
- drawingArea->setCustomFixedPositionRect(fixedPosRect);
- }
+ if (auto drawingArea = _page->drawingArea())
drawingArea->updateDebugIndicator();
- }
}
- (void)setMinimumSize:(CGSize)size
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (165234 => 165235)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2014-03-07 02:01:39 UTC (rev 165235)
@@ -91,7 +91,6 @@
#if PLATFORM(COCOA)
virtual void setExposedRect(const WebCore::FloatRect&) = 0;
virtual WebCore::FloatRect exposedRect() const = 0;
- virtual void setCustomFixedPositionRect(const WebCore::FloatRect&) = 0;
#endif
#if PLATFORM(IOS)
virtual void setExposedContentRect(const WebCore::FloatRect&) = 0;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (165234 => 165235)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in 2014-03-07 02:01:39 UTC (rev 165235)
@@ -30,7 +30,6 @@
SetDeviceScaleFactor(float deviceScaleFactor)
SetColorSpace(WebKit::ColorSpaceData colorSpace)
SetExposedRect(WebCore::FloatRect exposedRect)
- SetCustomFixedPositionRect(WebCore::FloatRect fixedPositionRect)
AdjustTransientZoom(double scale, WebCore::FloatPoint origin)
CommitTransientZoom(double scale, WebCore::FloatPoint origin)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (165234 => 165235)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-03-07 02:01:39 UTC (rev 165235)
@@ -1746,6 +1746,10 @@
}
m_page->mainFrame().view()->setScrollOffset(scrollPosition);
+
+ if (visibleContentRectUpdateInfo.inStableState())
+ m_page->mainFrame().view()->setCustomFixedPositionLayoutRect(enclosingIntRect(visibleContentRectUpdateInfo.customFixedPositionRect()));
+
// FIXME: we should also update the frame view from unobscured rect. Altenatively, we can have it pull the values from ScrollView.
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (165234 => 165235)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h 2014-03-07 02:01:39 UTC (rev 165235)
@@ -79,8 +79,6 @@
virtual void setExposedContentRect(const WebCore::FloatRect&) override;
#endif
- virtual void setCustomFixedPositionRect(const WebCore::FloatRect&) override;
-
// WebCore::GraphicsLayerClient
virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) override { }
virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) override { }
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (165234 => 165235)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2014-03-07 02:01:39 UTC (rev 165235)
@@ -283,17 +283,6 @@
frameView->adjustTiledBackingCoverage();
}
-void RemoteLayerTreeDrawingArea::setCustomFixedPositionRect(const FloatRect& fixedPositionRect)
-{
-#if PLATFORM(IOS)
- FrameView* frameView = m_webPage->corePage()->mainFrame().view();
- if (!frameView)
- return;
-
- frameView->setCustomFixedPositionLayoutRect(enclosingIntRect(fixedPositionRect));
-#endif
-}
-
TiledBacking* RemoteLayerTreeDrawingArea::mainFrameTiledBacking() const
{
FrameView* frameView = m_webPage->corePage()->mainFrame().view();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (165234 => 165235)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2014-03-07 01:31:54 UTC (rev 165234)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2014-03-07 02:01:39 UTC (rev 165235)
@@ -82,8 +82,6 @@
virtual void setExposedRect(const WebCore::FloatRect&) override;
virtual WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
- virtual void setCustomFixedPositionRect(const WebCore::FloatRect&) override { }
-
virtual bool supportsAsyncScrolling() override { return true; }
virtual void didChangeScrollOffsetForAnyFrame() override;