[iOS] Rename the actualVisibleXXXRect to unobscuredContentRect for consistency
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2014 21:51:19 +0000 (21:51 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2014 21:51:19 +0000 (21:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129773

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

* dom/TreeScope.cpp:
(WebCore::nodeFromPoint):
* platform/ScrollView.cpp:
(WebCore::ScrollView::visibleContentRectInternal):
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unoscuredContentRect):
* platform/ios/wak/WAKScrollView.h:
* platform/ios/wak/WAKScrollView.mm:
(-[WAKScrollView unoscuredContentRect]):
(-[WAKScrollView description]):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):

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

Source/WebCore/ChangeLog
Source/WebCore/dom/TreeScope.cpp
Source/WebCore/platform/ScrollView.cpp
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/RenderLayer.cpp

index 0fd6706..f7ba3ef 100644 (file)
@@ -1,3 +1,24 @@
+2014-03-06  Benjamin Poulain  <bpoulain@apple.com>
+
+        [iOS] Rename the actualVisibleXXXRect to unobscuredContentRect for consistency
+        https://bugs.webkit.org/show_bug.cgi?id=129773
+
+        Reviewed by Simon Fraser.
+
+        * dom/TreeScope.cpp:
+        (WebCore::nodeFromPoint):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::visibleContentRectInternal):
+        * platform/ScrollView.h:
+        * platform/ios/ScrollViewIOS.mm:
+        (WebCore::ScrollView::unoscuredContentRect):
+        * platform/ios/wak/WAKScrollView.h:
+        * platform/ios/wak/WAKScrollView.mm:
+        (-[WAKScrollView unoscuredContentRect]):
+        (-[WAKScrollView description]):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollRectToVisible):
+
 2014-03-05  Oliver Hunt  <oliver@apple.com>
 
         Support caching of custom setters
index 86d6696..cfeef20 100644 (file)
@@ -235,7 +235,7 @@ Node* nodeFromPoint(Document* document, int x, int y, LayoutPoint* localPoint)
 #else
     IntPoint point = roundedIntPoint(FloatPoint(x * scaleFactor  + frameView->actualScrollX(), y * scaleFactor + frameView->actualScrollY()));
 
-    if (!frameView->actualVisibleContentRect().contains(point))
+    if (!frameView->unobscuredContentRect().contains(point))
         return nullptr;
 #endif
     HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent);
index f40cd05..22bdc2b 100644 (file)
@@ -269,7 +269,7 @@ IntRect ScrollView::visibleContentRectInternal(VisibleContentRectIncludesScrollb
     }
     
     if (platformWidget())
-        return actualVisibleContentRect();
+        return unobscuredContentRect();
 #else
     UNUSED_PARAM(visibleContentRectBehavior);
 #endif
index a22be4f..1838629 100644 (file)
@@ -168,7 +168,7 @@ public:
 
 #if PLATFORM(IOS)
     // This is the area that is not covered by UI elements.
-    IntRect actualVisibleContentRect() const;
+    IntRect unobscuredContentRect() const;
     // This is the area that is partially or fully exposed, and may extend under overlapping UI elements.
     IntRect exposedContentRect() const;
     void setExposedContentRect(const IntRect&);
index e4e0209..d7a0131 100644 (file)
@@ -96,12 +96,12 @@ bool ScrollView::platformCanBlitOnScroll() const
     return [[scrollView() contentView] copiesOnScroll];
 }
 
-IntRect ScrollView::actualVisibleContentRect() const
+IntRect ScrollView::unobscuredContentRect() const
 {
     CGRect r = CGRectZero;
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
     WAKScrollView *view = static_cast<WAKScrollView *>(platformWidget());
-    r = [view actualDocumentVisibleRect];
+    r = [view unobscuredContentRect];
     END_BLOCK_OBJC_EXCEPTIONS;
     return enclosingIntRect(r);
 }
index 18a2d75..590a210 100644 (file)
 - (void)setDelegate:(id)delegate;
 - (id)delegate;
 
-- (CGRect)actualDocumentVisibleRect;
+- (CGRect)unobscuredContentRect;
 - (void)setActualScrollPosition:(CGPoint)point;
 
-// Like actualDocumentVisibleRect, but includes areas possibly covered by translucent UI.
+// Like unobscuredContentRect, but includes areas possibly covered by translucent UI.
 - (CGRect)exposedContentRect;
 
 - (BOOL)inProgrammaticScroll;
index d424289..132f3a1 100644 (file)
@@ -358,9 +358,9 @@ static BOOL scrollViewToPoint(WAKScrollView *scrollView, CGPoint point)
         return [[self nextResponder] scrollWheel:anEvent];
 }
 
-- (CGRect)actualDocumentVisibleRect
+- (CGRect)unobscuredContentRect
 {
-    // Only called by WebCore::ScrollView::actualVisibleContentRect
+    // Only called by WebCore::ScrollView::unobscuredContentRect
     WAKView* view = self;
     while ((view = [view superview])) {
         if ([view isKindOfClass:[WAKScrollView class]])
@@ -420,7 +420,7 @@ static BOOL scrollViewToPoint(WAKScrollView *scrollView, CGPoint point)
     CGRect frame = [self documentVisibleRect];
     [description appendFormat:@"documentVisible = (%g %g; %g %g); ", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height];
 
-    frame = [self actualDocumentVisibleRect];
+    frame = [self unobscuredContentRect];
     [description appendFormat:@"actualDocumentVisible = (%g %g; %g %g)>", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height];
 
     return description;
index 3102ac0..6f25e0f 100644 (file)
@@ -2428,8 +2428,7 @@ void RenderLayer::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignm
             IntSize scrollOffsetRelativeToDocument = frameView.scrollOffsetRelativeToDocument();
             visibleRectRelativeToDocument.setLocation(IntPoint(scrollOffsetRelativeToDocument.width(), scrollOffsetRelativeToDocument.height()));
 #else
-            // FIXME: is this equivalent to the code above?
-            LayoutRect viewRect = frameView.actualVisibleContentRect();
+            LayoutRect viewRect = frameView.unobscuredContentRect();
             LayoutRect visibleRectRelativeToDocument = viewRect;
 #endif