Diff
Modified: trunk/Source/WebCore/ChangeLog (199110 => 199111)
--- trunk/Source/WebCore/ChangeLog 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/ChangeLog 2016-04-06 19:22:57 UTC (rev 199111)
@@ -1,3 +1,37 @@
+2016-04-05 Simon Fraser <[email protected]>
+
+ Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
+ https://bugs.webkit.org/show_bug.cgi?id=156274
+
+ Reviewed by Tim Horton.
+
+ DrawingArea and FrameView have an "exposedRect" property that is used by applications
+ on Mac, like Mail, that embed web views inside scroll views. However, this name is very
+ similar to the "exposedContentRect" that is used on iOS to denote the part of the view
+ whose pixels are visible, including through blurring overlaid UI.
+
+ To disambiguate these two, rename the Mac "exposedRect" to "viewExposedRect" to
+ emphasize that it's a rect that takes into account clipping in the native view
+ hierarchy.
+
+ Also make this rect Optional<> through the DrawingArea, removing comparisons against
+ FloatRect::infiniteRect().
+
+ Do some other minor renaming in VisibleContentRectUpdateInfo.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setViewExposedRect): This now takes an Optional<> because WebViewImpl::updateViewExposedRect()
+ can clear it.
+ * page/FrameView.h:
+ * page/PageOverlayController.cpp:
+ (WebCore::PageOverlayController::didChangeViewExposedRect):
+ (WebCore::PageOverlayController::didChangeExposedRect): Deleted.
+ * page/PageOverlayController.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::computeTileCoverage):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+
2016-04-06 Joanmarie Diggs <[email protected]>
REGRESSION(r195463): [GTK] accessibility/roles-computedRoleString.html and accessibility/roles-exposed.html failing
Modified: trunk/Source/WebCore/page/FrameView.cpp (199110 => 199111)
--- trunk/Source/WebCore/page/FrameView.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/FrameView.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -4907,25 +4907,25 @@
widget->notifyWidget(notification);
}
-void FrameView::setExposedRect(FloatRect exposedRect)
+void FrameView::setViewExposedRect(Optional<FloatRect> viewExposedRect)
{
- if (m_exposedRect && m_exposedRect.value() == exposedRect)
+ if (m_viewExposedRect == viewExposedRect)
return;
- m_exposedRect = exposedRect;
+ m_viewExposedRect = viewExposedRect;
// FIXME: We should support clipping to the exposed rect for subframes as well.
if (!frame().isMainFrame())
return;
if (TiledBacking* tiledBacking = this->tiledBacking()) {
adjustTiledBackingCoverage();
- tiledBacking->setTiledScrollingIndicatorPosition(exposedRect.location());
+ tiledBacking->setTiledScrollingIndicatorPosition(m_viewExposedRect.value().location());
}
if (auto* view = renderView())
view->compositor().scheduleLayerFlush(false /* canThrottle */);
- frame().mainFrame().pageOverlayController().didChangeExposedRect();
+ frame().mainFrame().pageOverlayController().didChangeViewExposedRect();
}
void FrameView::setViewportSizeForCSSViewportUnits(IntSize size)
Modified: trunk/Source/WebCore/page/FrameView.h (199110 => 199111)
--- trunk/Source/WebCore/page/FrameView.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/FrameView.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -542,8 +542,8 @@
// of the view is actually exposed on screen (taking into account
// clipping by other UI elements), whereas visibleContentRect is
// internal to WebCore and doesn't respect those things.
- WEBCORE_EXPORT void setExposedRect(FloatRect);
- Optional<FloatRect> exposedRect() const { return m_exposedRect; }
+ WEBCORE_EXPORT void setViewExposedRect(Optional<FloatRect>);
+ Optional<FloatRect> viewExposedRect() const { return m_viewExposedRect; }
#if ENABLE(CSS_SCROLL_SNAP)
void updateSnapOffsets() override;
@@ -754,7 +754,7 @@
bool m_shouldUpdateWhileOffscreen;
- Optional<FloatRect> m_exposedRect;
+ Optional<FloatRect> m_viewExposedRect;
unsigned m_deferSetNeedsLayoutCount;
bool m_setNeedsLayoutWasDeferred;
Modified: trunk/Source/WebCore/page/PageOverlayController.cpp (199110 => 199111)
--- trunk/Source/WebCore/page/PageOverlayController.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/PageOverlayController.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -243,7 +243,7 @@
graphicsLayer->setNeedsDisplay();
}
-void PageOverlayController::didChangeExposedRect()
+void PageOverlayController::didChangeViewExposedRect()
{
m_mainFrame.page()->chrome().client().scheduleCompositingLayerFlush();
}
Modified: trunk/Source/WebCore/page/PageOverlayController.h (199110 => 199111)
--- trunk/Source/WebCore/page/PageOverlayController.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/PageOverlayController.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -65,7 +65,7 @@
void didChangeDocumentSize();
void didChangeSettings();
void didChangeDeviceScaleFactor();
- void didChangeExposedRect();
+ void didChangeViewExposedRect();
void didScrollFrame(Frame&);
void didChangeOverlayFrame(PageOverlay&);
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (199110 => 199111)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -226,7 +226,7 @@
TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea;
bool useMinimalTilesDuringLiveResize = frameView.inLiveResize();
if (frameView.speculativeTilingEnabled() && !useMinimalTilesDuringLiveResize) {
- bool clipsToExposedRect = static_cast<bool>(frameView.exposedRect());
+ bool clipsToExposedRect = static_cast<bool>(frameView.viewExposedRect());
if (frameView.horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
tileCoverage |= TiledBacking::CoverageForHorizontalScrolling;
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (199110 => 199111)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -461,8 +461,8 @@
// Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers.
FloatRect visibleRect = m_clipLayer ? FloatRect({ 0, 0 }, frameView.unscaledVisibleContentSizeIncludingObscuredArea()) : frameView.visibleContentRect();
- if (frameView.exposedRect())
- visibleRect.intersect(frameView.exposedRect().value());
+ if (frameView.viewExposedRect())
+ visibleRect.intersect(frameView.viewExposedRect().value());
LOG_WITH_STREAM(Compositing, stream << "RenderLayerCompositor " << this << " flushPendingLayerChanges(" << isFlushRoot << ") " << visibleRect << " (stable viewport " << frameView.viewportIsStable() << ")");
rootLayer->flushCompositingState(visibleRect, frameView.viewportIsStable());
Modified: trunk/Source/WebKit2/ChangeLog (199110 => 199111)
--- trunk/Source/WebKit2/ChangeLog 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/ChangeLog 2016-04-06 19:22:57 UTC (rev 199111)
@@ -1,3 +1,79 @@
+2016-04-05 Simon Fraser <[email protected]>
+
+ Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
+ https://bugs.webkit.org/show_bug.cgi?id=156274
+
+ Reviewed by Tim Horton.
+
+ DrawingArea and FrameView have an "exposedRect" property that is used by applications
+ on Mac, like Mail, that embed web views inside scroll views. However, this name is very
+ similar to the "exposedContentRect" that is used on iOS to denote the part of the view
+ whose pixels are visible, including through blurring overlaid UI.
+
+ To disambiguate these two, rename the Mac "exposedRect" to "viewExposedRect" to
+ emphasize that it's a rect that takes into account clipping in the native view
+ hierarchy.
+
+ Also make this rect Optional<> through the DrawingArea, removing comparisons against
+ FloatRect::infiniteRect().
+
+ Do some other minor renaming in VisibleContentRectUpdateInfo.
+
+ * Shared/VisibleContentRectUpdateInfo.cpp: Rename "exposedRect" and "unobscuredRect" to
+ have "Content" in the names.
+ (WebKit::VisibleContentRectUpdateInfo::encode):
+ (WebKit::VisibleContentRectUpdateInfo::decode):
+ * Shared/VisibleContentRectUpdateInfo.h:
+ (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+ (WebKit::VisibleContentRectUpdateInfo::exposedContentRect):
+ (WebKit::VisibleContentRectUpdateInfo::unobscuredContentRect):
+ (WebKit::operator==):
+ (WebKit::VisibleContentRectUpdateInfo::exposedRect): Deleted.
+ (WebKit::VisibleContentRectUpdateInfo::unobscuredRect): Deleted.
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (WebKit::WebViewImpl::updateViewExposedRect):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::setViewExposedRect):
+ (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
+ (WebKit::DrawingAreaProxy::setExposedRect): Deleted.
+ (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired): Deleted.
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit::DrawingAreaProxy::viewExposedRect):
+ (WebKit::DrawingAreaProxy::exposedRect): Deleted.
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::exposedContentRect):
+ (WebKit::WebPageProxy::unobscuredContentRect):
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect): Deleted.
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::setExposedRect): Deleted. This was only used
+ to position the indicator, and confusingly used either exposedContentRect() or viewExposedRect()
+ depending on platform.
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * 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:
+ (WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+ (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): Deleted.
+ (WebKit::RemoteLayerTreeDrawingArea::setExposedRect): Deleted.
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+ (WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Deleted.
+ (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Deleted.
+
2016-04-05 Alex Christensen <[email protected]>
Make CMake-generated binaries on Mac able to run
Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (199110 => 199111)
--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -32,8 +32,8 @@
void VisibleContentRectUpdateInfo::encode(IPC::ArgumentEncoder& encoder) const
{
- encoder << m_exposedRect;
- encoder << m_unobscuredRect;
+ encoder << m_exposedContentRect;
+ encoder << m_unobscuredContentRect;
encoder << m_unobscuredRectInScrollViewCoordinates;
encoder << m_customFixedPositionRect;
encoder << m_lastLayerTreeTransactionID;
@@ -49,9 +49,9 @@
bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder& decoder, VisibleContentRectUpdateInfo& result)
{
- if (!decoder.decode(result.m_exposedRect))
+ if (!decoder.decode(result.m_exposedContentRect))
return false;
- if (!decoder.decode(result.m_unobscuredRect))
+ if (!decoder.decode(result.m_unobscuredContentRect))
return false;
if (!decoder.decode(result.m_unobscuredRectInScrollViewCoordinates))
return false;
Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (199110 => 199111)
--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -39,9 +39,9 @@
public:
VisibleContentRectUpdateInfo() = default;
- VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
- : m_exposedRect(exposedRect)
- , m_unobscuredRect(unobscuredRect)
+ VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
+ : m_exposedContentRect(exposedContentRect)
+ , m_unobscuredContentRect(unobscuredContentRect)
, m_unobscuredRectInScrollViewCoordinates(unobscuredRectInScrollViewCoordinates)
, m_customFixedPositionRect(customFixedPositionRect)
, m_lastLayerTreeTransactionID(lastLayerTreeTransactionId)
@@ -56,8 +56,8 @@
{
}
- const WebCore::FloatRect& exposedRect() const { return m_exposedRect; }
- const WebCore::FloatRect& unobscuredRect() const { return m_unobscuredRect; }
+ const WebCore::FloatRect& exposedContentRect() const { return m_exposedContentRect; }
+ const WebCore::FloatRect& unobscuredContentRect() const { return m_unobscuredContentRect; }
const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates() const { return m_unobscuredRectInScrollViewCoordinates; }
const WebCore::FloatRect& customFixedPositionRect() const { return m_customFixedPositionRect; }
double scale() const { return m_scale; }
@@ -76,8 +76,8 @@
static bool decode(IPC::ArgumentDecoder&, VisibleContentRectUpdateInfo&);
private:
- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_unobscuredRect;
+ WebCore::FloatRect m_exposedContentRect;
+ WebCore::FloatRect m_unobscuredContentRect;
WebCore::FloatRect m_unobscuredRectInScrollViewCoordinates;
WebCore::FloatRect m_customFixedPositionRect;
uint64_t m_lastLayerTreeTransactionID { 0 };
@@ -95,8 +95,8 @@
{
// Note: the comparison doesn't include timestamp and velocity since we care about equality based on the other data.
return a.scale() == b.scale()
- && a.exposedRect() == b.exposedRect()
- && a.unobscuredRect() == b.unobscuredRect()
+ && a.exposedContentRect() == b.exposedContentRect()
+ && a.unobscuredContentRect() == b.unobscuredContentRect()
&& a.customFixedPositionRect() == b.customFixedPositionRect()
&& a.horizontalVelocity() == b.horizontalVelocity()
&& a.verticalVelocity() == b.verticalVelocity()
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (199110 => 199111)
--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm 2016-04-06 19:22:57 UTC (rev 199111)
@@ -871,7 +871,7 @@
exposedRect = CGRectUnion(m_contentPreparationRect, exposedRect);
if (auto drawingArea = m_page->drawingArea())
- drawingArea->setExposedRect(m_clipsToVisibleRect ? WebCore::FloatRect(exposedRect) : WebCore::FloatRect::infiniteRect());
+ drawingArea->setViewExposedRect(m_clipsToVisibleRect ? Optional<WebCore::FloatRect>(exposedRect) : Nullopt);
}
void WebViewImpl::setClipsToVisibleRect(bool clipsToVisibleRect)
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (199110 => 199111)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -40,7 +40,7 @@
, m_webPageProxy(webPageProxy)
, m_size(webPageProxy.viewSize())
#if PLATFORM(MAC)
- , m_exposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::exposedRectChangedTimerFired)
+ , m_viewExposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::viewExposedRectChangedTimerFired)
#endif
{
m_webPageProxy.process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
@@ -63,27 +63,27 @@
}
#if PLATFORM(MAC)
-void DrawingAreaProxy::setExposedRect(const FloatRect& exposedRect)
+void DrawingAreaProxy::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
{
if (!m_webPageProxy.isValid())
return;
- m_exposedRect = exposedRect;
+ m_viewExposedRect = viewExposedRect;
- if (!m_exposedRectChangedTimer.isActive())
- m_exposedRectChangedTimer.startOneShot(0);
+ if (!m_viewExposedRectChangedTimer.isActive())
+ m_viewExposedRectChangedTimer.startOneShot(0);
}
-void DrawingAreaProxy::exposedRectChangedTimerFired()
+void DrawingAreaProxy::viewExposedRectChangedTimerFired()
{
if (!m_webPageProxy.isValid())
return;
- if (m_exposedRect == m_lastSentExposedRect)
+ if (m_viewExposedRect == m_lastSentViewExposedRect)
return;
- m_webPageProxy.process().send(Messages::DrawingArea::SetExposedRect(m_exposedRect), m_webPageProxy.pageID());
- m_lastSentExposedRect = m_exposedRect;
+ m_webPageProxy.process().send(Messages::DrawingArea::SetViewExposedRect(m_viewExposedRect), m_webPageProxy.pageID());
+ m_lastSentViewExposedRect = m_viewExposedRect;
}
#endif // PLATFORM(MAC)
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (199110 => 199111)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -76,12 +76,10 @@
virtual void commitTransientZoom(double, WebCore::FloatPoint) { }
#if PLATFORM(MAC)
- virtual void setExposedRect(const WebCore::FloatRect&);
- WebCore::FloatRect exposedRect() const { return m_exposedRect; }
+ virtual void setViewExposedRect(Optional<WebCore::FloatRect>);
+ Optional<WebCore::FloatRect> viewExposedRect() const { return m_viewExposedRect; }
+ void viewExposedRectChangedTimerFired();
#endif
-#if PLATFORM(COCOA)
- void exposedRectChangedTimerFired();
-#endif
virtual void updateDebugIndicator() { }
@@ -128,9 +126,9 @@
virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&) { }
#if PLATFORM(MAC)
- RunLoop::Timer<DrawingAreaProxy> m_exposedRectChangedTimer;
- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_lastSentExposedRect;
+ RunLoop::Timer<DrawingAreaProxy> m_viewExposedRectChangedTimer;
+ Optional<WebCore::FloatRect> m_viewExposedRect;
+ Optional<WebCore::FloatRect> m_lastSentViewExposedRect;
#endif // PLATFORM(MAC)
#endif
};
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (199110 => 199111)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -449,8 +449,8 @@
#if PLATFORM(IOS)
void executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)>);
double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
- const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
- const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
+ const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
+ const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); }
void updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
void resendLastVisibleContentRects();
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (199110 => 199111)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -63,10 +63,8 @@
// Once we have other callbacks, it may make sense to have a before-commit/after-commit option.
void dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)>) override;
- WebCore::FloatRect scaledExposedRect() const;
-
#if PLATFORM(MAC)
- void setExposedRect(const WebCore::FloatRect&) override;
+ void setViewExposedRect(Optional<WebCore::FloatRect>) override;
#endif
float indicatorScale(WebCore::IntSize contentsSize) const;
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (199110 => 199111)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm 2016-04-06 19:22:57 UTC (rev 199111)
@@ -157,18 +157,6 @@
sendUpdateGeometry();
}
-FloatRect RemoteLayerTreeDrawingAreaProxy::scaledExposedRect() const
-{
-#if PLATFORM(IOS)
- return m_webPageProxy.exposedContentRect();
-#else
- FloatRect scaledExposedRect = exposedRect();
- float scale = 1 / m_webPageProxy.pageScaleFactor();
- scaledExposedRect.scale(scale, scale);
- return scaledExposedRect;
-#endif
-}
-
void RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry()
{
m_lastSentSize = m_size;
@@ -259,9 +247,9 @@
static const float indicatorInset = 10;
#if PLATFORM(MAC)
-void RemoteLayerTreeDrawingAreaProxy::setExposedRect(const WebCore::FloatRect& r)
+void RemoteLayerTreeDrawingAreaProxy::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
{
- DrawingAreaProxy::setExposedRect(r);
+ DrawingAreaProxy::setViewExposedRect(viewExposedRect);
updateDebugIndicatorPosition();
}
#endif
@@ -274,7 +262,10 @@
float absoluteInset = indicatorInset / m_webPageProxy.displayedContentScale();
tiledMapLocation += FloatSize(absoluteInset, absoluteInset);
#else
- FloatPoint tiledMapLocation = exposedRect().location();
+ FloatPoint tiledMapLocation;
+ if (viewExposedRect())
+ tiledMapLocation = viewExposedRect().value().location();
+
tiledMapLocation += FloatSize(indicatorInset, indicatorInset);
float scale = 1 / m_webPageProxy.pageScaleFactor();
tiledMapLocation.scale(scale, scale);
@@ -339,7 +330,15 @@
[m_exposedRectIndicatorLayer setBorderWidth:counterScaledBorder];
if (m_webPageProxy.delegatesScrolling()) {
- FloatRect scaledExposedRect = this->scaledExposedRect();
+ FloatRect scaledExposedRect;
+#if PLATFORM(IOS)
+ scaledExposedRect = m_webPageProxy.exposedContentRect();
+#else
+ if (viewExposedRect())
+ scaledExposedRect = viewExposedRect().value();
+ float scale = 1 / m_webPageProxy.pageScaleFactor();
+ scaledExposedRect.scale(scale, scale);
+#endif
[m_exposedRectIndicatorLayer setPosition:scaledExposedRect.location()];
[m_exposedRectIndicatorLayer setBounds:FloatRect(FloatPoint(), scaledExposedRect.size())];
} else {
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2016-04-06 19:22:57 UTC (rev 199111)
@@ -1343,7 +1343,7 @@
m_frame->coreFrame()->view()->setProhibitsScrolling(shouldDisableScrolling);
m_frame->coreFrame()->view()->setVisualUpdatesAllowedByClient(!webPage->shouldExtendIncrementalRenderingSuppression());
#if PLATFORM(COCOA)
- m_frame->coreFrame()->view()->setExposedRect(webPage->drawingArea()->exposedRect());
+ m_frame->coreFrame()->view()->setViewExposedRect(webPage->drawingArea()->viewExposedRect());
#endif
#if PLATFORM(IOS)
m_frame->coreFrame()->view()->setDelegatesScrolling(true);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -88,8 +88,9 @@
virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) { }
#if PLATFORM(COCOA)
- virtual void setExposedRect(const WebCore::FloatRect&) = 0;
- virtual WebCore::FloatRect exposedRect() const = 0;
+ virtual void setViewExposedRect(Optional<WebCore::FloatRect>) = 0;
+ virtual Optional<WebCore::FloatRect> viewExposedRect() const = 0;
+
virtual void acceleratedAnimationDidStart(uint64_t /*layerID*/, const String& /*key*/, double /*startTime*/) { }
virtual void acceleratedAnimationDidEnd(uint64_t /*layerID*/, const String& /*key*/) { }
virtual void addFence(const WebCore::MachSendRight&) { }
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in 2016-04-06 19:22:57 UTC (rev 199111)
@@ -29,7 +29,7 @@
UpdateGeometry(WebCore::IntSize viewSize, WebCore::IntSize layerPosition, bool flushSynchronously, WebCore::MachSendRight fencePort)
SetDeviceScaleFactor(float deviceScaleFactor)
SetColorSpace(struct WebKit::ColorSpaceData colorSpace)
- SetExposedRect(WebCore::FloatRect exposedRect)
+ SetViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
AdjustTransientZoom(double scale, WebCore::FloatPoint origin)
CommitTransientZoom(double scale, WebCore::FloatPoint origin)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-04-06 19:22:57 UTC (rev 199111)
@@ -2932,11 +2932,11 @@
m_oldestNonStableUpdateVisibleContentRectsTimestamp = std::chrono::milliseconds(static_cast<std::chrono::milliseconds::rep>(oldestTimestamp * 1000));
}
- FloatRect exposedRect = visibleContentRectUpdateInfo.exposedRect();
- FloatRect adjustedExposedRect = adjustExposedRectForBoundedScale(exposedRect, visibleContentRectUpdateInfo.scale(), boundedScale);
- m_drawingArea->setExposedContentRect(adjustedExposedRect);
+ FloatRect exposedContentRect = visibleContentRectUpdateInfo.exposedContentRect();
+ FloatRect adjustedExposedContentRect = adjustExposedRectForBoundedScale(exposedContentRect, visibleContentRectUpdateInfo.scale(), boundedScale);
+ m_drawingArea->setExposedContentRect(adjustedExposedContentRect);
- IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredRect().location());
+ IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredContentRect().location());
float floatBoundedScale = boundedScale;
bool hasSetPageScale = false;
@@ -2963,7 +2963,7 @@
if (m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints && visibleContentRectUpdateInfo.allowShrinkToFit()))
viewportConfigurationChanged();
- frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredRect().size());
+ frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredContentRect().size());
double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
double verticalVelocity = visibleContentRectUpdateInfo.verticalVelocity();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -88,8 +88,8 @@
void forceRepaint() override;
bool forceRepaintAsync(uint64_t) override { return false; }
- void setExposedRect(const WebCore::FloatRect&) override;
- WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
+ void setViewExposedRect(Optional<WebCore::FloatRect>) override;
+ Optional<WebCore::FloatRect> viewExposedRect() const override { return m_scrolledViewExposedRect; }
void acceleratedAnimationDidStart(uint64_t layerID, const String& key, double startTime) override;
void acceleratedAnimationDidEnd(uint64_t layerID, const String& key) override;
@@ -146,8 +146,8 @@
WebCore::IntSize m_viewSize;
- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_scrolledExposedRect;
+ Optional<WebCore::FloatRect> m_viewExposedRect;
+ Optional<WebCore::FloatRect> m_scrolledViewExposedRect;
WebCore::Timer m_layerFlushTimer;
bool m_isFlushingSuspended;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2016-04-06 19:22:57 UTC (rev 199111)
@@ -58,8 +58,6 @@
: DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
, m_remoteLayerTreeContext(std::make_unique<RemoteLayerTreeContext>(webPage))
, m_rootLayer(GraphicsLayer::create(graphicsLayerFactory(), *this))
- , m_exposedRect(FloatRect::infiniteRect())
- , m_scrolledExposedRect(FloatRect::infiniteRect())
, m_layerFlushTimer(*this, &RemoteLayerTreeDrawingArea::flushLayers)
, m_isFlushingSuspended(false)
, m_hasDeferredFlush(false)
@@ -231,9 +229,9 @@
m_remoteLayerTreeContext->animationDidEnd(layerID, key);
}
-void RemoteLayerTreeDrawingArea::setExposedRect(const FloatRect& exposedRect)
+void RemoteLayerTreeDrawingArea::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
{
- m_exposedRect = exposedRect;
+ m_viewExposedRect = viewExposedRect;
updateScrolledExposedRect();
}
@@ -266,16 +264,16 @@
if (!frameView)
return;
- m_scrolledExposedRect = m_exposedRect;
+ m_scrolledViewExposedRect = m_viewExposedRect;
#if !PLATFORM(IOS)
- if (!m_exposedRect.isInfinite()) {
+ if (m_viewExposedRect) {
ScrollOffset scrollOffset = frameView->scrollOffsetFromPosition(frameView->scrollPosition());
- m_scrolledExposedRect.moveBy(scrollOffset);
+ m_scrolledViewExposedRect.value().moveBy(scrollOffset);
}
#endif
- frameView->setExposedRect(m_scrolledExposedRect);
+ frameView->setViewExposedRect(m_scrolledViewExposedRect);
}
TiledBacking* RemoteLayerTreeDrawingArea::mainFrameTiledBacking() const
@@ -355,9 +353,10 @@
m_webPage.layoutIfNeeded();
FloatRect visibleRect(FloatPoint(), m_viewSize);
- visibleRect.intersect(m_scrolledExposedRect);
+ if (m_scrolledViewExposedRect)
+ visibleRect.intersect(m_scrolledViewExposedRect.value());
-#if TARGET_OS_IPHONE || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
RefPtr<WebPage> retainedPage = &m_webPage;
[CATransaction addCommitHandler:[retainedPage] {
if (Page* corePage = retainedPage->corePage()) {
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2016-04-06 19:22:57 UTC (rev 199111)
@@ -72,8 +72,8 @@
void updatePreferences(const WebPreferencesStore&) override;
void mainFrameContentSizeChanged(const WebCore::IntSize&) override;
- void setExposedRect(const WebCore::FloatRect&) override;
- WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
+ void setViewExposedRect(Optional<WebCore::FloatRect>) override;
+ Optional<WebCore::FloatRect> viewExposedRect() const override { return m_scrolledViewExposedRect; }
bool supportsAsyncScrolling() override { return true; }
@@ -133,8 +133,8 @@
bool m_isPaintingSuspended;
- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_scrolledExposedRect;
+ Optional<WebCore::FloatRect> m_viewExposedRect;
+ Optional<WebCore::FloatRect> m_scrolledViewExposedRect;
WebCore::IntSize m_lastSentIntrinsicContentSize;
bool m_inUpdateGeometry;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (199110 => 199111)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2016-04-06 19:22:57 UTC (rev 199111)
@@ -78,8 +78,6 @@
, m_layerTreeStateIsFrozen(false)
, m_layerFlushScheduler(this)
, m_isPaintingSuspended(!(parameters.viewState & ViewState::IsVisible))
- , m_exposedRect(FloatRect::infiniteRect())
- , m_scrolledExposedRect(FloatRect::infiniteRect())
, m_transientZoomScale(1)
, m_sendDidUpdateViewStateTimer(RunLoop::main(), this, &TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired)
, m_wantsDidUpdateViewState(false)
@@ -413,7 +411,8 @@
}
FloatRect visibleRect = [m_hostingLayer frame];
- visibleRect.intersect(m_scrolledExposedRect);
+ if (m_scrolledViewExposedRect)
+ visibleRect.intersect(m_scrolledViewExposedRect.value());
// Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
if (m_viewOverlayRootLayer)
@@ -496,9 +495,9 @@
[[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_hostingLayer.get() forKey:@"layer"]];
}
-void TiledCoreAnimationDrawingArea::setExposedRect(const FloatRect& exposedRect)
+void TiledCoreAnimationDrawingArea::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
{
- m_exposedRect = exposedRect;
+ m_viewExposedRect = viewExposedRect;
updateScrolledExposedRect();
}
@@ -508,16 +507,16 @@
if (!frameView)
return;
- m_scrolledExposedRect = m_exposedRect;
+ m_scrolledViewExposedRect = m_viewExposedRect;
#if !PLATFORM(IOS)
- if (!m_exposedRect.isInfinite()) {
+ if (m_viewExposedRect) {
ScrollOffset scrollOffset = frameView->scrollOffsetFromPosition(frameView->scrollPosition());
- m_scrolledExposedRect.moveBy(scrollOffset);
+ m_scrolledViewExposedRect.value().moveBy(scrollOffset);
}
#endif
- frameView->setExposedRect(m_scrolledExposedRect);
+ frameView->setViewExposedRect(m_scrolledViewExposedRect);
}
void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition, bool flushSynchronously, const WebCore::MachSendRight& fencePort)