<div dir="ltr">So I&#39;ve been led to believe that perhaps this shouldn&#39;t be a problem if clipping is working correctly.<br><br>Can anyone tell me if WebKit should be clipping updated pixels outside the clip rect or must any object that lies partially inside a clip rect be repainted in full?<br>
<br>Fady<br><br><div class="gmail_quote">On Tue, Jun 8, 2010 at 10:55 AM, Fady Samuel <span dir="ltr">&lt;<a href="mailto:fsamuel@google.com">fsamuel@google.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">So I was just about ready to post a potential patch for keeping track of all cells that lie on a given grid slot. It seems that information is insufficient for correct rendering. <br><br>Consider the attached test case:<br>

<br>1 R1C4 spans 4 rows, and should be drawn first.<br>2. R2C1 spans 4 columns and overlaps R1C4 (lies above it)<br>3. R4C1 spans 4 columsn and overlaps R1C4 (lies above it)<br><br>Consider the case where the paint rect is the lower right grid slot. Knowing that R4C1 and R1C4 overlap, we draw R1C4 first and then R4C1 (in that order as they both lie inside the single slot dirty rect). Now we&#39;ve drawn R1C4 ABOVE R2C1!!!! This results in a rendering artifact. I&#39;m currently working a solution that places cells in different layers and if a cell is dirty, we redraw it and all layers above it. How a layer is defined and formed and the data structures involved to do this efficiently will be discussed here shortly.<br>
<font color="#888888">
<br>Fady</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">
On Wed, Jun 2, 2010 at 4:40 PM, Fady Samuel <span dir="ltr">&lt;<a href="mailto:fsamuel@google.com" target="_blank">fsamuel@google.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">So I have completed all the following things locally:<div><br><br>
<div>* First fix the grid to record all the cells at a given position.  This fixes a repaint bug.</div></div><div><div>*
Then change the hit-testing to work just like painting.  This makes hit
testing more efficient and ensures hit testing and painting agree.</div>
</div><div>* Then optimize hit-testing to binary-search if there are no
overflowing cells.  (And optimize painting similarly)<br>* Fix a table layout bug<br>* created a bunch of additional simple table layout tests<br><br>I did all the pieces locally first to make sure I understand how all the parts of table rendering fit together. However, I intend to get the pieces of this work out in in smaller patches to simplify the review process for reviewers. <br>




<br>While I still have some more work to do testing, and splitting my work up into the suggested pieces, please expect bug reports and proposed patches to begin appearing shortly (within the next couple of days or so).<br>




<br>Thanks,<br><font color="#888888"><br>Fady Samuel<br></font></div><div><div></div><div><br><br><div class="gmail_quote">On Wed, Jun 2, 2010 at 7:34 AM, Fady Samuel <span dir="ltr">&lt;<a href="mailto:fsamuel@google.com" target="_blank">fsamuel@google.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Ohh, I see, thanks Roland. <div><br></div><div><font color="#888888">Fady</font><div><div></div><div><br><br><div class="gmail_quote">On Wed, Jun 2, 2010 at 3:25 AM, Roland Steiner <span dir="ltr">&lt;<a href="mailto:rolandsteiner@google.com" target="_blank">rolandsteiner@google.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">AFAICT you could have an arbitrary number up to the width or height of the table, whichever is smaller, by combining row- and colspans - e.g. with 3 ([v]aligns just to emphasize the overlapping):<div>





<br></div><div><div><div>

&lt;table border=1&gt;&lt;tbody&gt;</div><div>&lt;tr&gt;&lt;td&gt;R1C1&lt;/td&gt;&lt;td&gt;R1C2&lt;/td&gt;&lt;td rowspan=3 valign=bottom&gt;\\\\\\&lt;/td&gt;&lt;/tr&gt;</div><div>&lt;tr&gt;&lt;td&gt;R2C1&lt;/td&gt;&lt;td rowspan=2 colspan=2 align=right valign=bottom&gt;//////&lt;/td&gt;&lt;/tr&gt;</div>







<div>&lt;tr&gt;&lt;td colspan=3 align=right&gt;----&lt;/td&gt;&lt;/tr&gt;</div><div>&lt;/tbody&gt;&lt;/table&gt;</div></div><div><br></div><font color="#888888"><div>- Roland</div><br></font><div class="gmail_quote"><div>





<div></div><div>On Wed, Jun 2, 2010 at 8:58 AM, Fady Samuel <span dir="ltr">&lt;<a href="mailto:fsamuel@google.com" target="_blank">fsamuel@google.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div><div dir="ltr">Hi David,<br><br>Just so I&#39;m certain, there&#39;s no way for more than two cells to overlap in a single grid slot, is there? <br>







<br>Thanks,<br><font color="#888888"><br>Fady Samuel</font><div><br><br><div class="gmail_quote">On Thu, May 20, 2010 at 4:43 PM, David Hyatt <span dir="ltr">&lt;<a href="mailto:hyatt@apple.com" target="_blank">hyatt@apple.com</a>&gt;</span> wrote:<br>








<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On May 20, 2010, at 3:38 PM, Fady Samuel wrote:<br>
<br>
&gt; So what are the rules for stacking here? do the cells stack in the order in which they appear in the HTML?<br>
&gt;<br>
<br>
</div>Correct, although note that backgrounds paint behind foregrounds, and hit testing works the same way, so it&#39;s not as simple as saying that cell 7 is always above cell 5.  They&#39;re interleaved, so from bottom to top:<br>









<br>
Cell 5 background<br>
Cell 7 background<br>
Cell 5 foreground (the number &quot;5&quot; in this example)<br>
Cell 7 foreground (the number &quot;7&quot; in this example)<br>
<br>
That&#39;s why if you hover over the actual number 5 in that example it will light up, but if you&#39;re in the background area overlap, the number 7 will light up.<br>
<br>
<a href="http://www.w3.org/TR/CSS21/zindex.html" target="_blank">http://www.w3.org/TR/CSS21/zindex.html</a><br>
<br>
Therefore you do have to know about all the cells at the position, since when you&#39;re in the &quot;foreground&quot; phase of hit testing, cell 7 will say &quot;Nope, you&#39;re not inside my foreground&quot;, and so you then need to check cell 5, which will say &quot;Yes, you are inside my foreground.&quot;<br>









<br>
The grid structure just isn&#39;t expressive enough.  It needs to be patched to track all cells in a given row/column instead of just the first one.<br>
<br>
dave<br>
(<a href="mailto:hyatt@apple.com" target="_blank">hyatt@apple.com</a>)<br>
<br>
</blockquote></div><br></div></div>
<br></div></div><div>_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org" target="_blank">webkit-dev@lists.webkit.org</a><br>
<a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev</a><br>
<br></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>