Title: [211019] trunk/Source/WebKit/ios
- Revision
- 211019
- Author
- [email protected]
- Date
- 2017-01-21 17:52:04 -0800 (Sat, 21 Jan 2017)
Log Message
Remove the unused -[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]
https://bugs.webkit.org/show_bug.cgi?id=167273
Reviewed by Alex Christensen.
This function was added for an experiment, but is no longer used, so remove it.
* WebCoreSupport/WebFixedPositionContent.h:
* WebCoreSupport/WebFixedPositionContent.mm:
(anchorEdgeFlagsForAnchorEdge): Deleted.
(-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ios/ChangeLog (211018 => 211019)
--- trunk/Source/WebKit/ios/ChangeLog 2017-01-21 22:22:54 UTC (rev 211018)
+++ trunk/Source/WebKit/ios/ChangeLog 2017-01-22 01:52:04 UTC (rev 211019)
@@ -1,3 +1,17 @@
+2017-01-21 Simon Fraser <[email protected]>
+
+ Remove the unused -[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]
+ https://bugs.webkit.org/show_bug.cgi?id=167273
+
+ Reviewed by Alex Christensen.
+
+ This function was added for an experiment, but is no longer used, so remove it.
+
+ * WebCoreSupport/WebFixedPositionContent.h:
+ * WebCoreSupport/WebFixedPositionContent.mm:
+ (anchorEdgeFlagsForAnchorEdge): Deleted.
+ (-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]): Deleted.
+
2017-01-15 Darin Adler <[email protected]>
Remove PassRefPtr from "loader" directory of WebCore
Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.h (211018 => 211019)
--- trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.h 2017-01-21 22:22:54 UTC (rev 211018)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.h 2017-01-22 01:52:04 UTC (rev 211019)
@@ -49,7 +49,5 @@
- (void)overflowScrollPositionForLayer:(CALayer *)scrollLayer changedTo:(CGPoint)scrollPosition;
- (void)didFinishScrollingOrZooming;
- (BOOL)hasFixedOrStickyPositionLayers;
-// Returns CGFLOAT_MAX if there are no layers anchored to the given edge.
-- (CGFloat)minimumOffsetFromFixedPositionLayersToAnchorEdge:(WebFixedPositionAnchorEdge)anchorEdge ofRect:(CGRect)rect inLayer:(CALayer *)layer;
@end
Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.mm (211018 => 211019)
--- trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.mm 2017-01-21 22:22:54 UTC (rev 211018)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebFixedPositionContent.mm 2017-01-22 01:52:04 UTC (rev 211019)
@@ -195,60 +195,6 @@
return !_private->m_viewportConstrainedLayers.isEmpty();
}
-static ViewportConstraints::AnchorEdgeFlags anchorEdgeFlagsForAnchorEdge(WebFixedPositionAnchorEdge edge)
-{
- switch (edge) {
- case WebFixedPositionAnchorEdgeLeft:
- return ViewportConstraints::AnchorEdgeFlags::AnchorEdgeLeft;
- case WebFixedPositionAnchorEdgeRight:
- return ViewportConstraints::AnchorEdgeFlags::AnchorEdgeRight;
- case WebFixedPositionAnchorEdgeTop:
- return ViewportConstraints::AnchorEdgeFlags::AnchorEdgeTop;
- case WebFixedPositionAnchorEdgeBottom:
- return ViewportConstraints::AnchorEdgeFlags::AnchorEdgeBottom;
- }
-}
-
-- (CGFloat)minimumOffsetFromFixedPositionLayersToAnchorEdge:(WebFixedPositionAnchorEdge)anchorEdge ofRect:(CGRect)rect inLayer:(CALayer *)layer
-{
- LockHolder lock(WebFixedPositionContentDataLock());
- ViewportConstraints::AnchorEdgeFlags anchorEdgeFlags = anchorEdgeFlagsForAnchorEdge(anchorEdge);
- CGFloat minimumOffset = CGFLOAT_MAX;
- LayerInfoMap::const_iterator end = _private->m_viewportConstrainedLayers.end();
- for (LayerInfoMap::const_iterator it = _private->m_viewportConstrainedLayers.begin(); it != end; ++it) {
- CALayer *fixedLayer = it->key.get();
- ViewportConstrainedLayerData* constraintData = it->value.get();
- const ViewportConstraints& constraints = *(constraintData->m_viewportConstraints.get());
-
- if (!constraints.hasAnchorEdge(anchorEdgeFlags))
- continue;
- // According to Simon: It's possible that there are windows of time
- // where these CALayers are unparented (because we've flushed on the web
- // thread but haven't updated those layers yet).
- if (![fixedLayer superlayer])
- continue;
-
- CGRect fixedLayerExtent = [layer convertRect:[fixedLayer bounds] fromLayer:fixedLayer];
- CGFloat offset;
- switch (anchorEdge) {
- case WebFixedPositionAnchorEdgeLeft:
- offset = CGRectGetMinX(fixedLayerExtent) - CGRectGetMinX(rect);
- break;
- case WebFixedPositionAnchorEdgeRight:
- offset = CGRectGetMaxX(rect) - CGRectGetMaxX(fixedLayerExtent);
- break;
- case WebFixedPositionAnchorEdgeTop:
- offset = CGRectGetMinY(fixedLayerExtent) - CGRectGetMinY(rect);
- break;
- case WebFixedPositionAnchorEdgeBottom:
- offset = CGRectGetMaxY(rect) - CGRectGetMaxY(fixedLayerExtent);
- break;
- }
- minimumOffset = CGFloatMin(minimumOffset, offset);
- }
- return minimumOffset;
-}
-
@end
#endif // PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes