From c2e2c79b82936c1d2b1c51729333fbb9794feeec Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 13 Jan 2012 13:44:06 -0500 Subject: [PATCH] Bug 717819 - Remove the special casing of getting the offset parent for children of tables now that bug 10209 has been fixed; r=bzbarsky --- .../html/content/src/nsGenericHTMLElement.cpp | 3 +- content/html/content/test/Makefile.in | 1 + .../html/content/test/test_bug375003-1.html | 3 +- content/html/content/test/test_bug717819.html | 37 +++++++++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 content/html/content/test/test_bug717819.html diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index cb28a0c1465f..c6dfd5be2781 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -503,7 +503,8 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect, nsIContent** aOffsetParent) nsIFrame* parent = frame->GetParent(); nsPoint origin(0, 0); - if (parent && parent->GetType() == nsGkAtoms::tableOuterFrame) { + if (parent && parent->GetType() == nsGkAtoms::tableOuterFrame && + frame->GetType() == nsGkAtoms::tableFrame) { origin = parent->GetPositionIgnoringScrolling(); parent = parent->GetParent(); } diff --git a/content/html/content/test/Makefile.in b/content/html/content/test/Makefile.in index 826843d27541..10ab8a72a916 100644 --- a/content/html/content/test/Makefile.in +++ b/content/html/content/test/Makefile.in @@ -282,6 +282,7 @@ _TEST_FILES = \ test_bug677658.html \ test_bug677463.html \ test_bug682886.html \ + test_bug717819.html \ file_fullscreen-api.html \ file_fullscreen-api-keys.html \ test_fullscreen-api.html \ diff --git a/content/html/content/test/test_bug375003-1.html b/content/html/content/test/test_bug375003-1.html index af1b68267ed6..1d5560c460d4 100644 --- a/content/html/content/test/test_bug375003-1.html +++ b/content/html/content/test/test_bug375003-1.html @@ -76,8 +76,7 @@ function run_test() { t3('span9' ,[0,0,20,20],[1,1,20,20],[0,0,20,20],'td9'); t3('td9' ,[1,1,22,22],[15,15,24,24],[0,0,24,24],'table9'); t3('tr9' ,[0,0,24,24],[15,15,24,24],[0,0,24,22],'table9'); - // t3('span10' ,[0,0,20,20],[3,30,20,20],[0,0,20,20],'table9'); - t3('span10' ,[0,0,20,20],[27,450,20,20],[0,0,20,20],'body'); // bug: 'body' should be 'table9' + t3('span10' ,[0,0,20,20],[17,43,20,20],[0,0,20,20],'table9'); t3('table9',[13,13,28,34],[10,407,54,60],[0,0,54,50],'body'); t3('div9',[10,10,-1,0],[0,397,-1,20],[0,0,-1,70],'body'); diff --git a/content/html/content/test/test_bug717819.html b/content/html/content/test/test_bug717819.html new file mode 100644 index 000000000000..9c574dd68252 --- /dev/null +++ b/content/html/content/test/test_bug717819.html @@ -0,0 +1,37 @@ + + + + + Test for Bug 717819 + + + + + + +Mozilla Bug 717819 +

+
+ + + + +
+
+
+
+
+
+
+ +