CSS attribute selectors cause unnecessary style recalc when setting attribute to same value.
CSS attribute selectors cause unnecessary style recalc when setting attribute to same value.

The logic that dirties the style if there's a relevant attribute selector in the document
shouldn't run if the attribute is being overwritten with an identical value.
Move this into willModifyAttribute() instead, since we need access to both the old and the new value.

This reduces unnecessary style recalculation in Apple Store content.

Patch by Andreas Kling, WebKit r149047.

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

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

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