[iOS] Rename the various VisibleExtent variations to exposedContentRect
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Mar 2014 21:30:08 +0000 (21:30 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Mar 2014 21:30:08 +0000 (21:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129728

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-05
Reviewed by Simon Fraser.

Source/WebCore:

Rename DocumentVisibleExtent and VisibleExtentContentRect to ExposedContentRect in a desperate
attempt to make things a tiny little bit less confusing.

The name is ExposedContentRect and not ExposedRect as that rect is exposed on ScrollView, while the
rect is in document coordinates (which does not make any difference on WebKit1...).

* WebCore.exp.in:
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::exposedContentRect):
(WebCore::ScrollView::setExposedContentRect):
* platform/ios/wak/WAKScrollView.h:
* platform/ios/wak/WAKScrollView.mm:
(-[WAKScrollView exposedContentRect]):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::didChangeVisibleRect):

Source/WebKit2:

* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/ScrollView.h
Source/WebCore/platform/ios/ScrollViewIOS.mm
Source/WebCore/platform/ios/wak/WAKScrollView.h
Source/WebCore/platform/ios/wak/WAKScrollView.mm
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm

index b6125d9..098c97e 100644 (file)
@@ -1,3 +1,28 @@
+2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
+
+        [iOS] Rename the various VisibleExtent variations to exposedContentRect
+        https://bugs.webkit.org/show_bug.cgi?id=129728
+
+        Reviewed by Simon Fraser.
+
+        Rename DocumentVisibleExtent and VisibleExtentContentRect to ExposedContentRect in a desperate
+        attempt to make things a tiny little bit less confusing.
+
+        The name is ExposedContentRect and not ExposedRect as that rect is exposed on ScrollView, while the
+        rect is in document coordinates (which does not make any difference on WebKit1...).
+
+        * WebCore.exp.in:
+        * platform/ScrollView.h:
+        * platform/ios/ScrollViewIOS.mm:
+        (WebCore::ScrollView::exposedContentRect):
+        (WebCore::ScrollView::setExposedContentRect):
+        * platform/ios/wak/WAKScrollView.h:
+        * platform/ios/wak/WAKScrollView.mm:
+        (-[WAKScrollView exposedContentRect]):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+        (WebCore::RenderLayerCompositor::didChangeVisibleRect):
+
 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
 
         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
index 6cec8b0..922b0d7 100644 (file)
@@ -2391,7 +2391,7 @@ _WebUIApplicationWillEnterForegroundNotification
 _WebUIApplicationWillResignActiveNotification
 __ZN7WebCore10FloatPointC1ERK7CGPoint
 __ZN7WebCore10ScrollView15setScrollOffsetERKNS_8IntPointE
-__ZN7WebCore10ScrollView27setVisibleExtentContentRectERKNS_7IntRectE
+__ZN7WebCore10ScrollView21setExposedContentRectERKNS_7IntRectE
 __ZN7WebCore10XLinkNames4initEv
 __ZN7WebCore10inSameLineERKNS_15VisiblePositionES2_
 __ZN7WebCore11BidiContext41copyStackRemovingUnicodeEmbeddingContextsEv
index f2ec71f..a22be4f 100644 (file)
@@ -170,8 +170,8 @@ public:
     // This is the area that is not covered by UI elements.
     IntRect actualVisibleContentRect() const;
     // This is the area that is partially or fully exposed, and may extend under overlapping UI elements.
-    IntRect visibleExtentContentRect() const;
-    void setVisibleExtentContentRect(const IntRect&);
+    IntRect exposedContentRect() const;
+    void setExposedContentRect(const IntRect&);
 
     void setActualScrollPosition(const IntPoint&);
     TileCache* tileCache();
@@ -393,10 +393,10 @@ private:
     // whether it is safe to blit on scroll.
     bool m_canBlitOnScroll;
 
-    // FIXME: visibleExtentContentRect is a very similar concept to fixedVisibleContentRect except it does not differentiate
+    // FIXME: exposedContentRect is a very similar concept to fixedVisibleContentRect except it does not differentiate
     // between exposed rect and unobscuredRects. The two attributes should eventually be merged.
 #if PLATFORM(IOS)
-    IntRect m_visibleExtentContentRect;
+    IntRect m_exposedContentRect;
 #else
     IntRect m_fixedVisibleContentRect;
 #endif
index 858d85b..e4e0209 100644 (file)
@@ -106,13 +106,13 @@ IntRect ScrollView::actualVisibleContentRect() const
     return enclosingIntRect(r);
 }
 
-IntRect ScrollView::visibleExtentContentRect() const
+IntRect ScrollView::exposedContentRect() const
 {
     if (NSScrollView *view = static_cast<NSScrollView *>(platformWidget())) {
         CGRect r = CGRectZero;
         BEGIN_BLOCK_OBJC_EXCEPTIONS;
         if ([view isKindOfClass:[NSScrollView class]])
-            r = [view documentVisibleExtent];
+            r = [view exposedContentRect];
         else {
             r.origin = [view visibleRect].origin;
             r.size = [view bounds].size;
@@ -124,18 +124,18 @@ IntRect ScrollView::visibleExtentContentRect() const
 
     const ScrollView* parent = this->parent();
     if (!parent)
-        return m_visibleExtentContentRect;
+        return m_exposedContentRect;
 
-    IntRect parentViewExtentContentRect = parent->visibleExtentContentRect();
+    IntRect parentViewExtentContentRect = parent->exposedContentRect();
     IntRect selfExtentContentRect = rootViewToContents(parentViewExtentContentRect);
     selfExtentContentRect.intersect(boundsRect());
     return selfExtentContentRect;
 }
 
-void ScrollView::setVisibleExtentContentRect(const IntRect& rect)
+void ScrollView::setExposedContentRect(const IntRect& rect)
 {
     ASSERT(!platformWidget());
-    m_visibleExtentContentRect = rect;
+    m_exposedContentRect = rect;
 }
 
 void ScrollView::setActualScrollPosition(const IntPoint& position)
index 0b40697..18a2d75 100644 (file)
@@ -63,7 +63,8 @@
 - (CGRect)actualDocumentVisibleRect;
 - (void)setActualScrollPosition:(CGPoint)point;
 
-- (CGRect)documentVisibleExtent; // Like actualDocumentVisibleRect, but includes areas possibly covered by translucent UI.
+// Like actualDocumentVisibleRect, but includes areas possibly covered by translucent UI.
+- (CGRect)exposedContentRect;
 
 - (BOOL)inProgrammaticScroll;
 @end
index 2d12b5d..d424289 100644 (file)
@@ -376,9 +376,9 @@ static BOOL scrollViewToPoint(WAKScrollView *scrollView, CGPoint point)
     return [_documentView convertRect:windowVisibleRect fromView:nil];
 }
 
-- (CGRect)documentVisibleExtent
+- (CGRect)exposedContentRect
 {
-    // Only called by WebCore::ScrollView::visibleExtentContentRect
+    // Only called by WebCore::ScrollView::exposedContentRect
     WAKView* view = self;
     while ((view = [view superview])) {
         if ([view isKindOfClass:[WAKScrollView class]])
index c81a6a7..2149b0e 100644 (file)
@@ -420,7 +420,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
 
     if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
 #if PLATFORM(IOS)
-        rootLayer->flushCompositingState(frameView.visibleExtentContentRect());
+        rootLayer->flushCompositingState(frameView.exposedContentRect());
 #else
         // Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers.
         IntRect visibleRect = m_clipLayer ? IntRect(IntPoint(), frameView.contentsSize()) : frameView.visibleContentRect();
@@ -518,7 +518,7 @@ void RenderLayerCompositor::didChangeVisibleRect()
     const FrameView& frameView = m_renderView.frameView();
 
 #if PLATFORM(IOS)
-    IntRect visibleRect = frameView.visibleExtentContentRect();
+    IntRect visibleRect = frameView.exposedContentRect();
 #else
     IntRect visibleRect = m_clipLayer ? IntRect(IntPoint(), frameView.contentsSize()) : frameView.visibleContentRect();
 #endif
index e3af861..94129c1 100644 (file)
@@ -1,3 +1,17 @@
+2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
+
+        [iOS] Rename the various VisibleExtent variations to exposedContentRect
+        https://bugs.webkit.org/show_bug.cgi?id=129728
+
+        Reviewed by Simon Fraser.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
+
 2014-03-05  Dean Jackson  <dino@apple.com>
 
         Unreviewed. Fix the Apple-internal builds.
index e3fefb0..1f4f579 100644 (file)
@@ -94,7 +94,7 @@ public:
     virtual void setCustomFixedPositionRect(const WebCore::FloatRect&) = 0;
 #endif
 #if PLATFORM(IOS)
-    virtual void setVisibleExtentContentRect(const WebCore::FloatRect&) = 0;
+    virtual void setExposedContentRect(const WebCore::FloatRect&) = 0;
 #endif
     virtual void mainFrameScrollabilityChanged(bool) { }
 
index 5be5d51..cce0ad8 100644 (file)
@@ -1730,7 +1730,7 @@ void WebPage::applicationDidBecomeActive()
 void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visibleContentRectUpdateInfo)
 {
     FloatRect exposedRect = visibleContentRectUpdateInfo.exposedRect();
-    m_drawingArea->setVisibleExtentContentRect(enclosingIntRect(exposedRect));
+    m_drawingArea->setExposedContentRect(enclosingIntRect(exposedRect));
 
     IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredRect().location());
 
index 949712a..2650e84 100644 (file)
@@ -76,7 +76,7 @@ private:
     virtual WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
 
 #if PLATFORM(IOS)
-    virtual void setVisibleExtentContentRect(const WebCore::FloatRect&) override;
+    virtual void setExposedContentRect(const WebCore::FloatRect&) override;
 #endif
 
     virtual void setCustomFixedPositionRect(const WebCore::FloatRect&) override;
index 0670c88..30e4a8b 100644 (file)
@@ -247,13 +247,13 @@ void RemoteLayerTreeDrawingArea::setExposedRect(const FloatRect& exposedRect)
 }
 
 #if PLATFORM(IOS)
-void RemoteLayerTreeDrawingArea::setVisibleExtentContentRect(const FloatRect& visibleExtentContentRect)
+void RemoteLayerTreeDrawingArea::setExposedContentRect(const FloatRect& exposedContentRect)
 {
     FrameView* frameView = m_webPage->corePage()->mainFrame().view();
     if (!frameView)
         return;
 
-    frameView->setVisibleExtentContentRect(enclosingIntRect(visibleExtentContentRect));
+    frameView->setExposedContentRect(enclosingIntRect(exposedContentRect));
     scheduleCompositingLayerFlush();
 }
 #endif