Title: [233449] trunk/Source/WebKit
Revision
233449
Author
[email protected]
Date
2018-07-02 17:21:50 -0700 (Mon, 02 Jul 2018)

Log Message

Adjust now-incorrect animated resize logging after r232544
https://bugs.webkit.org/show_bug.cgi?id=187281
<rdar://problem/41645347>

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _didCompleteAnimatedResize]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
_beginAnimatedResizeWithUpdate: and _didCompleteAnimatedResize are
not strictly paired; we could instead track the SPI, but it's a bit
tricky since resizeWithContentHidden has an implicit endAnimatedResize.
Instead, just log if we still have a resizeAnimationView when we're
committing outside of an animated resize, which seems to be the original concern,
and point toward the possibility of unpaired begin/end.
Also fix logging that has the wrong method name.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (233448 => 233449)


--- trunk/Source/WebKit/ChangeLog	2018-07-03 00:17:54 UTC (rev 233448)
+++ trunk/Source/WebKit/ChangeLog	2018-07-03 00:21:50 UTC (rev 233449)
@@ -1,3 +1,23 @@
+2018-07-02  Tim Horton  <[email protected]>
+
+        Adjust now-incorrect animated resize logging after r232544
+        https://bugs.webkit.org/show_bug.cgi?id=187281
+        <rdar://problem/41645347>
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _didCommitLayerTree:]):
+        (-[WKWebView _didCompleteAnimatedResize]):
+        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
+        _beginAnimatedResizeWithUpdate: and _didCompleteAnimatedResize are
+        not strictly paired; we could instead track the SPI, but it's a bit
+        tricky since resizeWithContentHidden has an implicit endAnimatedResize.
+        Instead, just log if we still have a resizeAnimationView when we're
+        committing outside of an animated resize, which seems to be the original concern,
+        and point toward the possibility of unpaired begin/end.
+        Also fix logging that has the wrong method name.
+
 2018-07-02  Youenn Fablet  <[email protected]>
 
         Update com.apple.NPSafeInput.sb to make it functional

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (233448 => 233449)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-07-03 00:17:54 UTC (rev 233448)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-07-03 00:21:50 UTC (rev 233449)
@@ -343,7 +343,6 @@
     BOOL _delayUpdateVisibleContentRects;
     BOOL _hadDelayedUpdateVisibleContentRects;
 
-    int _activeAnimatedResizeCount;
     BOOL _waitingForEndAnimatedResize;
     BOOL _waitingForCommitAfterAnimatedResize;
 
@@ -1814,8 +1813,8 @@
         return;
     }
 
-    if (_activeAnimatedResizeCount)
-        RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didCommitLayerTree:] - %d animated resizes in flight", self, _activeAnimatedResizeCount);
+    if (_resizeAnimationView)
+        RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didCommitLayerTree:] - dynamicViewportUpdateMode is NotResizing, but still have a live resizeAnimationView (unpaired begin/endAnimatedResize?)", self);
 
     CGSize newContentSize = roundScrollViewContentSize(*_page, [_contentView frame].size);
     [_scrollView _setContentSizePreservingContentOffsetDuringRubberband:newContentSize];
@@ -2872,12 +2871,11 @@
 
     if (!_resizeAnimationView) {
         // Paranoia. If _resizeAnimationView is null we'll end up setting a zero scale on the content view.
-        RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _endAnimatedResize:] - _resizeAnimationView is nil", self);
+        RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didCompleteAnimatedResize:] - _resizeAnimationView is nil", self);
         _dynamicViewportUpdateMode = WebKit::DynamicViewportUpdateMode::NotResizing;
         return;
     }
 
-    --_activeAnimatedResizeCount;
     NSUInteger indexOfResizeAnimationView = [[_scrollView subviews] indexOfObject:_resizeAnimationView.get()];
     [_scrollView insertSubview:_contentView.get() atIndex:indexOfResizeAnimationView];
     [_scrollView insertSubview:[_contentView unscaledView] atIndex:indexOfResizeAnimationView + 1];
@@ -5287,7 +5285,6 @@
         return;
     }
 
-    ++_activeAnimatedResizeCount;
     _resizeAnimationTransformAdjustments = CATransform3DIdentity;
 
     if (!_resizeAnimationView) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to