Regression(183998): Disqus comments take a very long time to load
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Jul 2015 21:52:07 +0000 (21:52 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Jul 2015 21:52:07 +0000 (21:52 +0000)
commit9759286551e6a102d692486e45e0072639040be6
tree70febdfd0d617622c8ca767773e3c62253f6349e
parentcef67a245f84f977f0027848ab46ccd4c64a5da0
Regression(183998): Disqus comments take a very long time to load
https://bugs.webkit.org/show_bug.cgi?id=146522
<rdar://problem/21590601>

Reviewed by Simon Fraser.

Source/WebCore:

Stop throttling requestAnimationFrame() in iframes that are not visible
due to them being zero-sized or display:none. Those are usually utility
iframes and throttling them is risky.

Se still throttle requestAnimationFrame() in iframes that would be
visible in theory but are currently not noticeable because they are
outside the viewport.

Test:
- fast/animation/request-animation-frame-throttle-subframe.html
- fast/animation/request-animation-frame-throttle-subframe-display-none.html
- fast/animation/request-animation-frame-throttle-subframe-zero-size.html

* page/FrameView.cpp:
(WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):

LayoutTests:

* fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt:
* fast/animation/request-animation-frame-throttle-subframe-display-none.html:
Update layout test as we changed behavior here. We no longer throttle display:none
iframes.

* fast/animation/request-animation-frame-throttle-subframe-zero-size-expected.txt: Added.
* fast/animation/request-animation-frame-throttle-subframe-zero-size.html: Added.
Add layout test to check that we don't throttle RaF in iframes that are zero-sized.

* fast/animation/resources/requestAnimationFrame-frame-2.html:
* fast/animation/resources/requestAnimationFrame-frame.html:
Update use of requestAnimationFrame() to be more representative of real world usage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt
LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none.html
LayoutTests/fast/animation/request-animation-frame-throttle-subframe-zero-size-expected.txt [new file with mode: 0644]
LayoutTests/fast/animation/request-animation-frame-throttle-subframe-zero-size.html [new file with mode: 0644]
LayoutTests/fast/animation/resources/requestAnimationFrame-frame-2.html
LayoutTests/fast/animation/resources/requestAnimationFrame-frame.html
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp