Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2016 19:22:57 +0000 (19:22 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2016 19:22:57 +0000 (19:22 +0000)
commit1cb0ef5e53a7b8aa779a66e29902b285d9693c04
treeffebb2e3edd6d9d2c44ce3105a930e6c0958a016
parent9690038679378297a4901f93be9c758fa29d6e6c
Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
https://bugs.webkit.org/show_bug.cgi?id=156274

Reviewed by NOBODY (OOPS!).

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.

Source/WebCore:

* 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):

Source/WebKit2:

* 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/PageOverlayController.cpp
Source/WebCore/page/PageOverlayController.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp
Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm