Title: [165211] trunk/Source/WebCore
Revision
165211
Author
[email protected]
Date
2014-03-06 13:51:19 -0800 (Thu, 06 Mar 2014)

Log Message

[iOS] Rename the actualVisibleXXXRect to unobscuredContentRect for consistency
https://bugs.webkit.org/show_bug.cgi?id=129773

Patch by Benjamin Poulain <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (165210 => 165211)


--- trunk/Source/WebCore/ChangeLog	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/ChangeLog	2014-03-06 21:51:19 UTC (rev 165211)
@@ -1,3 +1,24 @@
+2014-03-06  Benjamin Poulain  <[email protected]>
+
+        [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  <[email protected]>
 
         Support caching of custom setters

Modified: trunk/Source/WebCore/dom/TreeScope.cpp (165210 => 165211)


--- trunk/Source/WebCore/dom/TreeScope.cpp	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/dom/TreeScope.cpp	2014-03-06 21:51:19 UTC (rev 165211)
@@ -235,7 +235,7 @@
 #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);

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (165210 => 165211)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2014-03-06 21:51:19 UTC (rev 165211)
@@ -269,7 +269,7 @@
     }
     
     if (platformWidget())
-        return actualVisibleContentRect();
+        return unobscuredContentRect();
 #else
     UNUSED_PARAM(visibleContentRectBehavior);
 #endif

Modified: trunk/Source/WebCore/platform/ScrollView.h (165210 => 165211)


--- trunk/Source/WebCore/platform/ScrollView.h	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/platform/ScrollView.h	2014-03-06 21:51:19 UTC (rev 165211)
@@ -168,7 +168,7 @@
 
 #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&);

Modified: trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm (165210 => 165211)


--- trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm	2014-03-06 21:51:19 UTC (rev 165211)
@@ -96,12 +96,12 @@
     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);
 }

Modified: trunk/Source/WebCore/platform/ios/wak/WAKScrollView.h (165210 => 165211)


--- trunk/Source/WebCore/platform/ios/wak/WAKScrollView.h	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/platform/ios/wak/WAKScrollView.h	2014-03-06 21:51:19 UTC (rev 165211)
@@ -60,10 +60,10 @@
 - (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;

Modified: trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm (165210 => 165211)


--- trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm	2014-03-06 21:51:19 UTC (rev 165211)
@@ -358,9 +358,9 @@
         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 @@
     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;

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (165210 => 165211)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2014-03-06 21:33:11 UTC (rev 165210)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2014-03-06 21:51:19 UTC (rev 165211)
@@ -2428,8 +2428,7 @@
             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
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to