Bug 729143. Don't treat table rows as containing blocks. r=dbaron
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 23 Feb 2012 23:35:19 -0500
changeset 87610 ca7abbb11f4a893264e9ca89bfcd630a3a6fc62c
parent 87609 66a56113abeb9f5ebc43a029b087be95f7770899
child 87611 ad54332581f88f3be7de09ec5e9ef113186a06d0
push id22133
push usermak77@bonardo.net
push dateFri, 24 Feb 2012 10:23:30 +0000
treeherdermozilla-central@fbcdc2c87df8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs729143
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 729143. Don't treat table rows as containing blocks. r=dbaron
layout/generic/nsFrame.cpp
layout/reftests/bugs/729143-1-ref.html
layout/reftests/bugs/729143-1.html
layout/reftests/bugs/reftest.list
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5112,17 +5112,19 @@ GetNearestBlockContainer(nsIFrame* frame
 {
   // The block wrappers we use to wrap blocks inside inlines aren't
   // described in the CSS spec.  We need to make them not be containing
   // blocks.
   // Since the parent of such a block is either a normal block or
   // another such pseudo, this shouldn't cause anything bad to happen.
   // Also the anonymous blocks inside table cells are not containing blocks.
   while (frame->IsFrameOfType(nsIFrame::eLineParticipant) ||
-         frame->IsBlockWrapper()) {
+         frame->IsBlockWrapper() ||
+         // Table rows are not containing blocks either
+         frame->GetType() == nsGkAtoms::tableRowFrame) {
     frame = frame->GetParent();
     NS_ASSERTION(frame, "How come we got to the root frame without seeing a containing block?");
   }
   return frame;
 }
 
 nsIFrame*
 nsIFrame::GetContainingBlock() const
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/729143-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <table style="width: 100px; height: 100px;">
+  <tbody style="height: 100%;">
+   <tr style="height: 100%">
+    <td style="height: 100%;">
+     <div style="height: 100%; width: 100%;overflow:scroll;">
+      <div style="height: 200px">
+      </div>
+      Some text
+     </div>
+    </td>
+   </tr>
+  </tbody>
+ </table>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/729143-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <table style="width: 100px; height: 100px;">
+  <tbody style="height: 100%;"> <!-- required for older ffox versions -->
+   <tr>
+    <td style="height: 100%;">
+     <div style="height: 100%; width: 100%;overflow:scroll;">
+      <div style="height: 200px">
+      </div>
+      Some text
+     </div>
+    </td>
+   </tr>
+  </tbody>
+ </table>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1688,8 +1688,9 @@ needs-focus != 703186-1.html 703186-2.ht
 == 713856-dynamic.html 713856-ref.html
 == 714519-1-as.html 714519-1-ref.html
 == 714519-1-q.html 714519-1-ref.html
 == 714519-2-as.html 714519-2-ref.html
 == 714519-2-q.html 714519-2-ref.html
 fuzzy-if(d2d,1,19) fuzzy-if(cocoaWidget,1,170) == 718521.html 718521-ref.html
 == 720987.html 720987-ref.html
 == 722923-1.html 722923-1-ref.html
+== 729143-1.html 729143-1-ref.html