Title: [277482] trunk/Source/WebCore
- Revision
- 277482
- Author
- [email protected]
- Date
- 2021-05-13 22:52:46 -0700 (Thu, 13 May 2021)
Log Message
[GTK] Wrong smooth animation sometimes with non-async scrolling
https://bugs.webkit.org/show_bug.cgi?id=225764
Reviewed by Adrian Perez de Castro.
This is happening because sometimes when the scrollbars are added to the scroll view, the contents size hasn't
been updated yet, so that values saved by ScrollAnimationSmooth::updateVisibleLengths() are 0x0. After that the
updateVisibleLengths() is not called again when the contents size is updated, so scroll happens with the wrong
visible lengths. This doesn't happen with async scrolling because updateVisibleLengths() is called every time
layers are repositioned. For non-async scrolling it should be enough to update visible lengths when he contents
size changes.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::contentsResized const):
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::contentsResized const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (277481 => 277482)
--- trunk/Source/WebCore/ChangeLog 2021-05-14 04:44:10 UTC (rev 277481)
+++ trunk/Source/WebCore/ChangeLog 2021-05-14 05:52:46 UTC (rev 277482)
@@ -1,3 +1,22 @@
+2021-05-13 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Wrong smooth animation sometimes with non-async scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=225764
+
+ Reviewed by Adrian Perez de Castro.
+
+ This is happening because sometimes when the scrollbars are added to the scroll view, the contents size hasn't
+ been updated yet, so that values saved by ScrollAnimationSmooth::updateVisibleLengths() are 0x0. After that the
+ updateVisibleLengths() is not called again when the contents size is updated, so scroll happens with the wrong
+ visible lengths. This doesn't happen with async scrolling because updateVisibleLengths() is called every time
+ layers are repositioned. For non-async scrolling it should be enough to update visible lengths when he contents
+ size changes.
+
+ * platform/ScrollAnimator.cpp:
+ (WebCore::ScrollAnimator::contentsResized const):
+ * platform/ScrollAnimator.h:
+ (WebCore::ScrollAnimator::ScrollAnimator::contentsResized const):
+
2021-05-13 Devin Rousso <[email protected]>
[Modern Media Controls] REGRESSION(r268308) AirPlay briefly disappears and then reappears when hovering over controls
Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (277481 => 277482)
--- trunk/Source/WebCore/platform/ScrollAnimator.cpp 2021-05-14 04:44:10 UTC (rev 277481)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp 2021-05-14 05:52:46 UTC (rev 277482)
@@ -379,6 +379,11 @@
#endif
}
+void ScrollAnimator::contentsResized() const
+{
+ m_scrollAnimation->updateVisibleLengths();
+}
+
void ScrollAnimator::willEndLiveResize()
{
m_scrollAnimation->updateVisibleLengths();
Modified: trunk/Source/WebCore/platform/ScrollAnimator.h (277481 => 277482)
--- trunk/Source/WebCore/platform/ScrollAnimator.h 2021-05-14 04:44:10 UTC (rev 277481)
+++ trunk/Source/WebCore/platform/ScrollAnimator.h 2021-05-14 05:52:46 UTC (rev 277482)
@@ -111,7 +111,7 @@
virtual void mouseExitedScrollbar(Scrollbar*) const { }
virtual void mouseIsDownInScrollbar(Scrollbar*, bool) const { }
virtual void willStartLiveResize() { }
- virtual void contentsResized() const { }
+ virtual void contentsResized() const;
virtual void willEndLiveResize();
virtual void contentAreaDidShow() { }
virtual void contentAreaDidHide() { }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes