Fix compositing chicken/egg bug in Frame::nodeImage.
Fix compositing chicken/egg bug in Frame::nodeImage.

Paint requires compositing information to be up to date,
so call updateLayoutAndStyleForPainting, which updates
compositing state.

Also, updating layout can run script, which can destroy the
Frame and the Node, so ref them.

BUG=343755

Review URL: https://codereview.chromium.org/173133002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@167492 bbb929c8-8fbe-4397-9dbb-9b2b20218538

smishenk/blink-crosswalk,jtg-gg/blink,modulexcite/blink,hgl888/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,nwjs/blink,kurli/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,ondra-novak/blink,hgl888/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,jtg-gg/blink,modulexcite/blink,nwjs/blink,kurli/blink-crosswalk,nwjs/blink,nwjs/blink,jtg-gg/blink,ondra-novak/blink,Bysmyyr/blink-crosswalk,modulexcite/blink,smishenk/blink-crosswalk,hgl888/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,jtg-gg/blink,jtg-gg/blink,hgl888/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,ondra-novak/blink,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,hgl888/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,modulexcite/blink,nwjs/blink,ondra-novak/blink,nwjs/blink,kurli/blink-crosswalk,smishenk/blink-crosswalk,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,ondra-novak/blink,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,jtg-gg/blink,PeterWangIntel/blink-crosswalk,modulexcite/blink,Pluto-tv/blink-crosswalk,modulexcite/blink,PeterWangIntel/blink-crosswalk,jtg-gg/blink,jtg-gg/blink,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,hgl888/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,kurli/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,modulexcite/blink,Bysmyyr/blink-crosswalk,ondra-novak/blink,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,Pluto-tv/blink-crosswalk,nwjs/blink,nwjs/blink,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,modulexcite/blink,jtg-gg/blink,nwjs/blink,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,nwjs/blink,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,ondra-novak/blink,Bysmyyr/blink-crosswalk,ondra-novak/blink