WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Fix table cells' offsetTop
8085_r1.patch (text/plain), 4.09 KB, created by
mitz
on 2006-04-03 13:01:53 PDT
(
hide
)
Description:
Fix table cells' offsetTop
Filename:
MIME Type:
Creator:
mitz
Created:
2006-04-03 13:01:53 PDT
Size:
4.09 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 13653) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2006-04-## Mitz Pettel <opendarwin.org@mitzpettel.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8085 >+ REGRESSION: Main menu positioned incorrectly on eia.org and fedex.com/us >+ >+ * fast/dom/Element/offsetTop-table-cell-expected.txt: Added. >+ * fast/dom/Element/offsetTop-table-cell.html: Added. >+ > 2006-04-03 Alexey Proskuryakov <ap@nypop.com> > > Reviewed by Darin. >Index: LayoutTests/fast/dom/Element/offsetTop-table-cell-expected.txt >=================================================================== >--- LayoutTests/fast/dom/Element/offsetTop-table-cell-expected.txt (revision 0) >+++ LayoutTests/fast/dom/Element/offsetTop-table-cell-expected.txt (revision 0) >@@ -0,0 +1,6 @@ >+This is a regression test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8085 REGRESSION: Main menu positioned incorrectly on eia.org and fedex.com/us. >+ >+Row 2 top offset:50 >+Cell 2 top offset:90 >+Test result: PASS >+ >Index: LayoutTests/fast/dom/Element/offsetTop-table-cell.html >=================================================================== >--- LayoutTests/fast/dom/Element/offsetTop-table-cell.html (revision 0) >+++ LayoutTests/fast/dom/Element/offsetTop-table-cell.html (revision 0) >@@ -0,0 +1,38 @@ >+<html> >+<head> >+<style type="text/css"> >+tr#row1 td { height: 50px; } >+td { width: 50px; } >+td#cell1 { height: 100px; } >+td#cell2 div { height: 20px; } >+</style> >+<script type="text/javascript"> >+if (window.layoutTestController) >+ layoutTestController.dumpAsText(); >+ >+function test() >+{ >+ console = document.getElementById("console"); >+ rowOffset = document.getElementById("row2").offsetTop; >+ cellOffset = document.getElementById("cell2").offsetTop; >+ console.innerText += "Row 2 top offset:" + rowOffset; >+ console.innerText += "\n"; >+ console.innerText += "Cell 2 top offset:" + cellOffset; >+ console.innerText += "\n"; >+ console.innerText += "Test result: " >+ console.innerText += (rowOffset == 50 && cellOffset == 90 ? "PASS" : "FAIL"); >+} >+</script> >+</head> >+<body onload="test()"> >+<p>This is a regression test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=8085">http://bugzilla.opendarwin.org/show_bug.cgi?id=8085</a> >+REGRESSION: Main menu positioned incorrectly on eia.org and fedex.com/us</i>. >+</p> >+<pre id="console"> >+</pre> >+<table cellspacing="0" cellpadding="0"> >+<tr id="row1"><td colspan="2"></td></tr> >+<tr id="row2"><td id="cell1"></td><td id="cell2"><div></div></td></tr> >+</table> >+</body> >+</html> >Index: WebCore/ChangeLog >=================================================================== >--- WebCore/ChangeLog (revision 13653) >+++ WebCore/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2006-04-## Mitz Pettel <opendarwin.org@mitzpettel.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8085 >+ REGRESSION: Main menu positioned incorrectly on eia.org and fedex.com/us >+ >+ Test: fast/dom/Element/offsetTop-table-cell.html >+ >+ * rendering/RenderObject.cpp: >+ (WebCore::RenderObject::offsetTop): Skip table rows when adding up >+ the offsets, since a table cell's yPos() is relative to the table >+ section, not the row. >+ > 2006-04-03 Alexey Proskuryakov <ap@nypop.com> > > Fixed a comment (forgot to save the file before the previous commit). >Index: WebCore/rendering/RenderObject.cpp >=================================================================== >--- WebCore/rendering/RenderObject.cpp (revision 13648) >+++ WebCore/rendering/RenderObject.cpp (working copy) >@@ -580,7 +580,8 @@ int RenderObject::offsetTop() const > RenderObject* offsetPar = offsetParent(); > RenderObject* curr = parent(); > while (curr && curr != offsetPar) { >- y += curr->yPos(); >+ if (!curr->isTableRow()) >+ y += curr->yPos(); > curr = curr->parent(); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bdakin
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 8085
: 7489