cell width / offsetTop incorrect
https://bugs.webkit.org/show_bug.cgi?id=11582

Reviewed by David Hyatt.

Source/WebCore:

The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
a lot of tests.

Test: fast/table/offset-top-includes-border.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):

LayoutTests:

* fast/dom/Element/offsetTop-table-cell-expected.txt:
* fast/dom/Element/offsetTop-table-cell.html:
* fast/table/offset-top-includes-border-expected.txt: Added.
* fast/table/offset-top-includes-border.html: Added.
* platform/mac/editing/selection/5057506-2-expected.txt:
* platform/mac/editing/selection/5057506-expected.txt:
* platform/qt/editing/selection/5057506-2-expected.txt:
* platform/qt/editing/selection/5057506-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 57ed0b0..c56365a 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -524,6 +524,8 @@
     for (unsigned r = 0; r < totalRows; r++) {
         // Set the row's x/y position and width/height.
         if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) {
+            // FIXME: the x() position of the row should be table()->hBorderSpacing() so that it can 
+            // report the correct offsetLeft. However, that will require a lot of rebaselining of test results.
             rowRenderer->setLocation(LayoutPoint(0, m_rowPos[r]));
             rowRenderer->setLogicalWidth(logicalWidth());
             rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspacing);