auto merge of #1971 : Constellation/servo/quick-fail-selector-matching, r=SimonSapin
auto merge of #1971 : Constellation/servo/quick-fail-selector-matching, r=SimonSapin

Restart selector matching from an appropriate selector

Introducing 3 matching failure statuses,

+ NotMatchedGlobally
+ NotMatchedAndRestartFromClosestDescendant
+ NotMatchedAndRestartFromClosestLaterSibling

When NotMatchedGlobally appears, stop selector matching completely since
the succeeding selector never matches.
It is raised when
+ Child selector cannot find the candidate element
+ Descendant selector cannot find the candidate element

When NotMatchedAndRestartFromClosestDescendant appears, the selector
matching does backtracking and restarts from the closest Descendant
selector.
It is raised when
+ NextSibling selector cannot find the candidate element.
+ LaterSibling selector cannot find the candidate element.
+ Child selector doesn't match on the found element.

When NotMatchedAndRestartFromClosestLaterSibling appears, the selector
matching does backtracking and restarts from the closest LaterSibling
selector.
It is raised when
+ NextSibling selector doesn't match on the found element.

For example, when the selector "d1 d2 a" is provided and we cannot *find*
an appropriate ancestor node for "d1", this selector matching raises
NotMatchedGlobally since even if "d2" is moved to more upper node, the
candidates for "d1" becomes less than before and d1 .

The next example is siblings. When the selector "b1 + b2 ~ d1 a" is
providied and we cannot *find* an appropriate brother node for b1,
the selector matching raises NotMatchedAndRestartFromClosestDescendant.
The selectors ("b1 + b2 ~") doesn't match and matching restart from "d1".

The additional example is child and sibling. When the selector
"b1 + c1 > b2 ~ d1 a" is provided and the selector "b1" doesn't match on
the element, this "b1" raises NotMatchedAndRestartFromClosestLaterSibling.
However since the selector "c1" raises
NotMatchedAndRestartFromClosestDescendant. So the selector
"b1 + c1 > b2 ~ " doesn't match and restart matching from "d1".

GyrosOfWar/servo,ConnorGBrewster/servo,thiagopnts/servo,CJ8664/servo,shrenikgala/servo,zhangjunlei26/servo,j3parker/servo,jdramani/servo,evilpie/servo,anthgur/servo,zentner-kyle/servo,g-k/servo,szeged/servo,zhangjunlei26/servo,AnthonyBroadCrawford/servo,jgraham/servo,bjwbell/servo,notriddle/servo,paulrouget/servo,fiji-flo/servo,mt2d2/servo,froydnj/servo,jlegendary/servo,larsbergstrom/servo,notriddle/servo,wpgallih/servo,indykish/servo,thiagopnts/servo,aidanhs/servo,rixrix/servo,dmarcos/servo,youprofit/servo,mukilan/servo,nerith/servo,steveklabnik/servo,jgraham/servo,pgonda/servo,vks/servo,akosel/servo,meh/servo,boghison/servo,runarberg/servo,peterjoel/servo,DominoTree/servo,notriddle/servo,kindersung/servo,steveklabnik/servo,bfrohs/servo,cbrewster/servo,A-deLuna/servo,walac/servo,mbrubeck/servo,GyrosOfWar/servo,codemac/servo,GyrosOfWar/servo,mdibaiee/servo,GyrosOfWar/servo,snf/servo,DominoTree/servo,eddyb/servo,seanmonstar/servo,aweinstock314/servo,KiChjang/servo,bfrohs/servo,evilpie/servo,karlito40/servo,mbrubeck/servo,rentongzhang/servo,GreenRecycleBin/servo,bjwbell/servo,codemac/servo,jgraham/servo,chotchki/servo,A-deLuna/servo,akosel/servo,s142857/servo,emilio/servo,sadmansk/servo,ruud-v-a/servo,Shraddha512/servo,zentner-kyle/servo,wartman4404/servo,chotchki/servo,dati91/servo,pyecs/servo,dmarcos/servo,nerith/servo,A-deLuna/servo,nnethercote/servo,srbhklkrn/SERVOENGINE,paulrouget/servo,meh/servo,canaltinova/servo,runarberg/servo,jimberlage/servo,mattnenterprise/servo,brendandahl/servo,emilio/servo,kindersung/servo,j3parker/servo,ryancanhelpyou/servo,juzer10/servo,dagnir/servo,snf/servo,chotchki/servo,echochamber/servo,dati91/servo,karlito40/servo,luniv/servo,aidanhs/servo,codemac/servo,GreenRecycleBin/servo,pyfisch/servo,tschneidereit/servo,tafia/servo,seanmonstar/servo,nick-thompson/servo,g-k/servo,tafia/servo,pyecs/servo,snf/servo,nrc/servo,tschneidereit/servo,larsbergstrom/servo,nnethercote/servo,eddyb/servo,aidanhs/servo,GreenRecycleBin/servo,KiChjang/servo,GreenRecycleBin/servo,pyecs/servo,eddyb/servo,indykish/servo,rixrix/servo,AnthonyBroadCrawford/servo,emilio/servo,peterjoel/servo,brendandahl/servo,rnestler/servo,KiChjang/servo,splav/servo,nick-thompson/servo,akosel/servo,dsandeephegde/servo,larsbergstrom/servo,mukilan/servo,ConnorGBrewster/servo,shrenikgala/servo,s142857/servo,boghison/servo,saratang/servo,g-k/servo,fiji-flo/servo,avadacatavra/servo,indykish/servo,mattnenterprise/servo,mukilan/servo,CJ8664/servo,akosel/servo,brendandahl/servo,pgonda/servo,dati91/servo,chotchki/servo,jimberlage/servo,szeged/servo,AnthonyBroadCrawford/servo,samfoo/servo,RenaudParis/servo,dati91/servo,youprofit/servo,paulrouget/servo,nick-thompson/servo,shrenikgala/servo,vks/servo,s142857/servo,cbrewster/servo,nrc/servo,ConnorGBrewster/servo,meh/servo,g-k/servo,canaltinova/servo,GreenRecycleBin/servo,saratang/servo,steveklabnik/servo,srbhklkrn/SERVOENGINE,walac/servo,vks/servo,ConnorGBrewster/servo,nerith/servo,splav/servo,SimonSapin/servo,nnethercote/servo,vks/servo,rixrix/servo,saneyuki/servo,emilio/servo,snf/servo,ruud-v-a/servo,SimonSapin/servo,youprofit/servo,thiagopnts/servo,dagnir/servo,mattnenterprise/servo,nnethercote/servo,caldwell/servo,nrc/servo,mbrubeck/servo,zhangjunlei26/servo,canaltinova/servo,dvberkel/servo,canaltinova/servo,sadmansk/servo,DominoTree/servo,boghison/servo,michaelwu/servo,michaelwu/servo,runarberg/servo,hyowon/servo,vks/servo,notriddle/servo,jdramani/servo,wartman4404/servo,shrenikgala/servo,splav/servo,nerith/servo,walac/servo,bfrohs/servo,saneyuki/servo,avadacatavra/servo,Adenilson/prototype-viewing-distance,mattnenterprise/servo,A-deLuna/servo,dhananjay92/servo,dati91/servo,anthgur/servo,mdibaiee/servo,mt2d2/servo,upsuper/servo,eddyb/servo,tschneidereit/servo,mattnenterprise/servo,larsbergstrom/servo,nerith/servo,notriddle/servo,wartman4404/servo,juzer10/servo,Shraddha512/servo,paulrouget/servo,karlito40/servo,pyecs/servo,dmarcos/servo,nnethercote/servo,akosel/servo,saneyuki/servo,walac/servo,jlegendary/servo,mukilan/servo,pyfisch/servo,peterjoel/servo,bfrohs/servo,Adenilson/prototype-viewing-distance,ryancanhelpyou/servo,rnestler/servo,saneyuki/servo,seanmonstar/servo,indykish/servo,caldwell/servo,CJ8664/servo,notriddle/servo,wartman4404/servo,s142857/servo,dsandeephegde/servo,emilio/servo,AnthonyBroadCrawford/servo,avadacatavra/servo,jimberlage/servo,aidanhs/servo,codemac/servo,nnethercote/servo,pyfisch/servo,tafia/servo,canaltinova/servo,aweinstock314/servo,bjwbell/servo,DominoTree/servo,kindersung/servo,jimberlage/servo,DominoTree/servo,j3parker/servo,fiji-flo/servo,sadmansk/servo,dati91/servo,ruud-v-a/servo,boghison/servo,WriterOfAlicrow/servo,mbrubeck/servo,walac/servo,GyrosOfWar/servo,deokjinkim/servo,ConnorGBrewster/servo,michaelwu/servo,DominoTree/servo,cbrewster/servo,ConnorGBrewster/servo,pyfisch/servo,dmarcos/servo,samfoo/servo,meh/servo,rentongzhang/servo,youprofit/servo,shrenikgala/servo,saratang/servo,youprofit/servo,zhangjunlei26/servo,avadacatavra/servo,karlito40/servo,ruud-v-a/servo,deokjinkim/servo,snf/servo,Shraddha512/servo,zentner-kyle/servo,rnestler/servo,pgonda/servo,indykish/servo,runarberg/servo,zhangjunlei26/servo,jlegendary/servo,youprofit/servo,brendandahl/servo,seanmonstar/servo,RenaudParis/servo,tafia/servo,rixrix/servo,upsuper/servo,thiagopnts/servo,saratang/servo,nnethercote/servo,runarberg/servo,tempbottle/servo,froydnj/servo,notriddle/servo,KiChjang/servo,CJ8664/servo,zhangjunlei26/servo,nick-thompson/servo,bfrohs/servo,SimonSapin/servo,pyfisch/servo,splav/servo,dhananjay92/servo,emilio/servo,peterjoel/servo,dagnir/servo,rnestler/servo,akosel/servo,pgonda/servo,avadacatavra/servo,thiagopnts/servo,dsandeephegde/servo,nrc/servo,snf/servo,CJ8664/servo,ruud-v-a/servo,huonw/servo,pyfisch/servo,KiChjang/servo,SimonSapin/servo,kindersung/servo,tafia/servo,jgraham/servo,juzer10/servo,wpgallih/servo,dati91/servo,zentner-kyle/servo,splav/servo,mbrubeck/servo,fiji-flo/servo,upsuper/servo,DominoTree/servo,dagnir/servo,aweinstock314/servo,huonw/servo,anthgur/servo,mt2d2/servo,dvberkel/servo,pyfisch/servo,DominoTree/servo,codemac/servo,nick-thompson/servo,evilpie/servo,splav/servo,zhangjunlei26/servo,samfoo/servo,rnestler/servo,avadacatavra/servo,nerith/servo,pyecs/servo,luniv/servo,mdibaiee/servo,dagnir/servo,larsbergstrom/servo,seanmonstar/servo,avadacatavra/servo,zhangjunlei26/servo,boghison/servo,anthgur/servo,szeged/servo,aweinstock314/servo,dmarcos/servo,caldwell/servo,dhananjay92/servo,dsandeephegde/servo,larsbergstrom/servo,g-k/servo,canaltinova/servo,tschneidereit/servo,huonw/servo,tempbottle/servo,RenaudParis/servo,szeged/servo,aweinstock314/servo,tschneidereit/servo,AnthonyBroadCrawford/servo,wpgallih/servo,mattnenterprise/servo,tempbottle/servo,fiji-flo/servo,jgraham/servo,evilpie/servo,pyfisch/servo,fiji-flo/servo,pyfisch/servo,saratang/servo,peterjoel/servo,srbhklkrn/SERVOENGINE,kindersung/servo,ryancanhelpyou/servo,froydnj/servo,evilpie/servo,saneyuki/servo,shrenikgala/servo,jlegendary/servo,mt2d2/servo,chotchki/servo,ConnorGBrewster/servo,dagnir/servo,mattnenterprise/servo,szeged/servo,juzer10/servo,luniv/servo,indykish/servo,rentongzhang/servo,indykish/servo,s142857/servo,sadmansk/servo,caldwell/servo,snf/servo,luniv/servo,dvberkel/servo,jgraham/servo,nnethercote/servo,mt2d2/servo,dmarcos/servo,zhangjunlei26/servo,sadmansk/servo,dsandeephegde/servo,WriterOfAlicrow/servo,szeged/servo,saratang/servo,echochamber/servo,pyecs/servo,ruud-v-a/servo,evilpie/servo,karlito40/servo,juzer10/servo,szeged/servo,jdramani/servo,peterjoel/servo,AnthonyBroadCrawford/servo,rixrix/servo,rentongzhang/servo,aidanhs/servo,wartman4404/servo,huonw/servo,WriterOfAlicrow/servo,indykish/servo,ryancanhelpyou/servo,mbrubeck/servo,j3parker/servo,kindersung/servo,jdramani/servo,evilpie/servo,froydnj/servo,deokjinkim/servo,meh/servo,larsbergstrom/servo,zentner-kyle/servo,anthgur/servo,echochamber/servo,rixrix/servo,saneyuki/servo,mt2d2/servo,tafia/servo,mbrubeck/servo,nick-thompson/servo,tempbottle/servo,upsuper/servo,fiji-flo/servo,Shraddha512/servo,WriterOfAlicrow/servo,aidanhs/servo,cbrewster/servo,A-deLuna/servo,A-deLuna/servo,CJ8664/servo,eddyb/servo,mukilan/servo,echochamber/servo,mbrubeck/servo,tschneidereit/servo,notriddle/servo,paulrouget/servo,jlegendary/servo,CJ8664/servo,samfoo/servo,splav/servo,Adenilson/prototype-viewing-distance,tempbottle/servo,pgonda/servo,mukilan/servo,KiChjang/servo,rnestler/servo,cbrewster/servo,hyowon/servo,luniv/servo,g-k/servo,steveklabnik/servo,sadmansk/servo,notriddle/servo,wpgallih/servo,walac/servo,CJ8664/servo,SimonSapin/servo,upsuper/servo,jimberlage/servo,dvberkel/servo,KiChjang/servo,jimberlage/servo,emilio/servo,WriterOfAlicrow/servo,cbrewster/servo,wpgallih/servo,pgonda/servo,GreenRecycleBin/servo,splav/servo,A-deLuna/servo,Adenilson/prototype-viewing-distance,seanmonstar/servo,emilio/servo,avadacatavra/servo,rixrix/servo,j3parker/servo,mdibaiee/servo,RenaudParis/servo,runarberg/servo,jlegendary/servo,meh/servo,echochamber/servo,bjwbell/servo,jlegendary/servo,kindersung/servo,splav/servo,chotchki/servo,SimonSapin/servo,larsbergstrom/servo,dsandeephegde/servo,mdibaiee/servo,nnethercote/servo,echochamber/servo,GyrosOfWar/servo,dmarcos/servo,mattnenterprise/servo,wartman4404/servo,huonw/servo,nnethercote/servo,GreenRecycleBin/servo,hyowon/servo,tempbottle/servo,dagnir/servo,deokjinkim/servo,KiChjang/servo,cbrewster/servo,boghison/servo,brendandahl/servo,huonw/servo,srbhklkrn/SERVOENGINE,youprofit/servo,GyrosOfWar/servo,brendandahl/servo,dvberkel/servo,anthgur/servo,srbhklkrn/SERVOENGINE,dsandeephegde/servo,peterjoel/servo,pyecs/servo,peterjoel/servo,wartman4404/servo,brendandahl/servo,nrc/servo,rentongzhang/servo,boghison/servo,bjwbell/servo,wpgallih/servo,jdramani/servo,thiagopnts/servo,nrc/servo,g-k/servo,indykish/servo,deokjinkim/servo,luniv/servo,ryancanhelpyou/servo,j3parker/servo,szeged/servo,nick-thompson/servo,deokjinkim/servo,s142857/servo,canaltinova/servo,dati91/servo,mdibaiee/servo,paulrouget/servo,karlito40/servo,sadmansk/servo,emilio/servo,s142857/servo,anthgur/servo,walac/servo,cbrewster/servo,juzer10/servo,aweinstock314/servo,dhananjay92/servo,jimberlage/servo,j3parker/servo,hyowon/servo,samfoo/servo,wpgallih/servo,Shraddha512/servo,steveklabnik/servo,paulrouget/servo,jdramani/servo,peterjoel/servo,pgonda/servo,hyowon/servo,sadmansk/servo,srbhklkrn/SERVOENGINE,evilpie/servo,paulrouget/servo,vks/servo,akosel/servo,samfoo/servo,aweinstock314/servo,froydnj/servo,rixrix/servo,DominoTree/servo,upsuper/servo,nerith/servo,wpgallih/servo,karlito40/servo,thiagopnts/servo,codemac/servo,rnestler/servo,jimberlage/servo,michaelwu/servo,mdibaiee/servo,Adenilson/prototype-viewing-distance,nrc/servo,luniv/servo,RenaudParis/servo,dvberkel/servo,meh/servo,peterjoel/servo,SimonSapin/servo,caldwell/servo,Adenilson/prototype-viewing-distance,srbhklkrn/SERVOENGINE,RenaudParis/servo,szeged/servo,anthgur/servo,GreenRecycleBin/servo,thiagopnts/servo,dvberkel/servo,jdramani/servo,AnthonyBroadCrawford/servo,rentongzhang/servo,eddyb/servo,upsuper/servo,ConnorGBrewster/servo,saneyuki/servo,samfoo/servo,RenaudParis/servo,caldwell/servo,michaelwu/servo,larsbergstrom/servo,aidanhs/servo,eddyb/servo,eddyb/servo,ryancanhelpyou/servo,zentner-kyle/servo,juzer10/servo,hyowon/servo,paulrouget/servo,saneyuki/servo,notriddle/servo,rnestler/servo,dsandeephegde/servo,pyfisch/servo,tempbottle/servo,froydnj/servo,bfrohs/servo,szeged/servo,evilpie/servo,splav/servo,fiji-flo/servo,KiChjang/servo,tafia/servo,dhananjay92/servo,SimonSapin/servo,dhananjay92/servo,paulrouget/servo,caldwell/servo,jgraham/servo,larsbergstrom/servo,bjwbell/servo,mt2d2/servo,echochamber/servo,saneyuki/servo,runarberg/servo,zentner-kyle/servo,rixrix/servo,WriterOfAlicrow/servo,canaltinova/servo,ryancanhelpyou/servo,tschneidereit/servo,huonw/servo,jimberlage/servo,Shraddha512/servo,hyowon/servo,DominoTree/servo,codemac/servo,vks/servo,KiChjang/servo,saratang/servo,wpgallih/servo,steveklabnik/servo,rentongzhang/servo,upsuper/servo,WriterOfAlicrow/servo,steveklabnik/servo,deokjinkim/servo,michaelwu/servo,Adenilson/prototype-viewing-distance,saneyuki/servo,shrenikgala/servo,GreenRecycleBin/servo,emilio/servo,bjwbell/servo,dhananjay92/servo,Shraddha512/servo