implement "page-break-inside: avoid" for non-floating block elements

This patch is taken from https://bugs.webkit.org/show_bug.cgi?id=5097#c17
The following test page will have green block starting at new page after fix.
 index.Html:
         <html>
           <head>
             <link rel="stylesheet" type="text/css" href="multi.css">
           </head>
           <body>
             <div>
               <div id='div1' class='div1'> This is first</div>
               <div id='div2' class = 'div2'> this is second</div>
               <div id='div3' class = 'div3'> third</div>
             </div>
           </body>
         </html>
       
multi.css:
 
          #div1 {
             width:900px;
             height:600px;
             background-color:red;
             -webkit-print-color-adjust: exact;
            }
          #div2 {
             width:800px;
             height:900px;
             background-color:green;
             page-break-inside: avoid;
             -webkit-print-color-adjust:exact;
           }
           #div3 {
             width:700px;
             height:800px;
             background-color:yellow;
             -webkit-print-color-adjust: exact;
           }