https://bugs.webkit.org/show_bug.cgi?id=74111
Patch by Ion Rosca <rosca@adobe.com> on 2012-06-08
Reviewed by Simon Fraser.
.:
* ManualTests/scrollbar-crash-on-hide-scrolled-area.html: Added.
Source/WebCore:
Added zero-delay timer for AppKit scroll notification that can be called during layout.
Manual test: ManualTests/scrollbar-crash-on-hide-scrolled-area.html
This assertion does not fire when running layout tests. It can be easly reproduced using a debug build by loading the manual test page.
* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon):
(WebCore):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119834
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-06-08 Ion Rosca <rosca@adobe.com>
+
+ Some overlay scrollbar API calls in ScrollAnimatorMac can lead to an assertion in RenderBox::mapAbsoluteToLocalPoint
+ https://bugs.webkit.org/show_bug.cgi?id=74111
+
+ Reviewed by Simon Fraser.
+
+ * ManualTests/scrollbar-crash-on-hide-scrolled-area.html: Added.
+
2012-06-07 Kentaro Hara <haraken@chromium.org>
Reduce Node object size from 72 byte to 64 byte
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8"/>
+ <title>QuickStart</title>
+ <style>
+ .lessonChapters {
+ position:absolute;
+ top:26px;
+ bottom:22px;
+ overflow:auto;
+ }
+ #hint {
+ height:9000px;
+ }
+</style>
+<script>
+ function runTest()
+ {
+ document.getElementById('lessons').scrollTop = 10000;
+ document.getElementById('toHide').style.display='none';
+ }
+</script>
+</head>
+
+<body onload="runTest();">
+
+<div class="lessonChapters" id="lessons">
+<div class="lessonChapter" id="toHide">
+ <br />
+ Manual repro: scroll down and click on <b>Next step</b>
+ <div id="hint"> </div>
+ <a href="#" class="nextStepButton" onclick="document.getElementById('toHide').style.display='none'">Next step</a>
+</div>
+<p>Bug #74111: This test is to make sure that a scrolled element does not crash the browser when it goes hidden. The test passes if it does not crash.</p>
+PASSED
+</div>
+
+</body>
+</html>
+2012-06-08 Ion Rosca <rosca@adobe.com>
+
+ Some overlay scrollbar API calls in ScrollAnimatorMac can lead to an assertion in RenderBox::mapAbsoluteToLocalPoint
+ https://bugs.webkit.org/show_bug.cgi?id=74111
+
+ Reviewed by Simon Fraser.
+
+ Added zero-delay timer for AppKit scroll notification that can be called during layout.
+ Manual test: ManualTests/scrollbar-crash-on-hide-scrolled-area.html
+ This assertion does not fire when running layout tests. It can be easly reproduced using a debug build by loading the manual test page.
+
+ * platform/mac/ScrollAnimatorMac.h:
+ (ScrollAnimatorMac):
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
+ (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
+ (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon):
+ (WebCore):
+ (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
+
2012-06-08 Renata Hodovan <reni@webkit.org>
Adding few already supported features to the FeatureSet in DOMImplementation
void startScrollbarPaintTimer();
void stopScrollbarPaintTimer();
+ void sendContentAreaScrolledSoon();
+
void setVisibleScrollerThumbRect(const IntRect&);
private:
void initialScrollbarPaintTimerFired(Timer<ScrollAnimatorMac>*);
Timer<ScrollAnimatorMac> m_initialScrollbarPaintTimer;
+ void sendContentAreaScrolledTimerFired(Timer<ScrollAnimatorMac>*);
+ Timer<ScrollAnimatorMac> m_sendContentAreaScrolledTimer;
+
virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea)
: ScrollAnimator(scrollableArea)
, m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPaintTimerFired)
+ , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaScrolledTimerFired)
#if ENABLE(RUBBER_BANDING)
, m_scrollElasticityController(this)
, m_snapRubberBandTimer(this, &ScrollAnimatorMac::snapRubberBandTimerFired)
// isn't really scrolling in that case. We should only pass the message on to the
// ScrollbarPainterController when we're really scrolling on an active page.
if (scrollableArea()->isOnActivePage())
- [m_scrollbarPainterController.get() contentAreaScrolled];
+ sendContentAreaScrolledSoon();
}
void ScrollAnimatorMac::cancelAnimations()
}
}
+void ScrollAnimatorMac::sendContentAreaScrolledSoon()
+{
+ if (!m_sendContentAreaScrolledTimer.isActive())
+ m_sendContentAreaScrolledTimer.startOneShot(0);
+}
+
+void ScrollAnimatorMac::sendContentAreaScrolledTimerFired(Timer<ScrollAnimatorMac>*)
+{
+ [m_scrollbarPainterController.get() contentAreaScrolled];
+}
+
void ScrollAnimatorMac::setVisibleScrollerThumbRect(const IntRect& scrollerThumb)
{
IntRect rectInViewCoordinates = scrollerThumb;