This patch refactors SVGPatternElement::collectPatternAttributes() by extracting the setPatternAttributes logic into a new function. This patch also changes the while loop to be easier to understand and similar to collectGradientAttributes.
This patch refactors SVGPatternElement::collectPatternAttributes() by extracting
the setPatternAttributes logic into a new function. This patch also changes the
while loop to be easier to understand and similar to collectGradientAttributes.

A similar refactoring was done to collectGradientAttributes in r165358 [1].

[1] https://src.chromium.org/viewvc/blink?view=rev&revision=165358

BUG=N/A

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

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

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