Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html b/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html |
| index 3324515a453456a0c2648cce43c58f7226ac0b4f..bfb48f37c4fae814c7bb81b78f7a8cda77d5b718 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html |
| +++ b/third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html |
| @@ -61,7 +61,10 @@ function handleMessage(event) { |
| } |
| window.addEventListener("message", handleMessage); |
| + |
| iframe.onload = function() { |
| - iframe.contentWindow.postMessage("", "*") |
| -}; |
| + requestAnimationFrame(() => { |
| + requestAnimationFrame(() => { iframe.contentWindow.postMessage("", "*") }) |
|
ojan
2016/03/08 01:37:11
Why do you need 2 rafs here?
Sami
2016/03/08 17:32:41
Right, this pattern seems to be repeated in a bunc
szager1
2016/03/08 18:51:32
In general, the double-RAF pattern is necessary be
Sami
2016/03/09 18:29:55
I thought IO runs after layout, so the notificatio
szager1
2016/03/09 20:45:25
Actually, my explanation was totally wrong. I add
|
| + }); |
| +} |
| </script> |