Permalink
Browse files

Bug 750293 - Don't include a block's margins in its scrollable overfl…

…ow for now. r=roc a=akeybl
  • Loading branch information...
1 parent 219d1dd commit 1f2400cde2277db7dfecfbb8536ff1c3d00803e3 @MatsPalmgren MatsPalmgren committed May 22, 2012
@@ -6695,26 +6695,6 @@ nsIFrame::FinishAndStoreOverflow(nsOverflowAreas& aOverflowAreas,
nsRect& o = aOverflowAreas.Overflow(otype);
o.UnionRectEdges(o, bounds);
}
-
- if (!nsLayoutUtils::IsPopup(this)) {
- // Include margin in scrollable overflow.
- // XXX In theory this should consider margin collapsing
- nsRect marginBounds(bounds);
- nsMargin margin = GetUsedMargin();
-
- // Bug 724352 - vertical scrollable overflow only matters for
- // scroll frames which are block margin roots and has already
- // accumulated child vertical margins during reflow. We need
- // to revisit this when using UpdateOverflow for non-transform
- // style changes (bug 719177).
- margin.top = 0;
- margin.bottom = 0;
-
- ApplySkipSides(margin);
- marginBounds.SaturatingInflate(margin);
- nsRect& so = aOverflowAreas.ScrollableOverflow();
- so.SaturatingUnionRectEdges(so, marginBounds);
- }
}
// Note that NS_STYLE_OVERFLOW_CLIP doesn't clip the frame background,
@@ -11,14 +11,14 @@
x1,x2,x3,x4,x5,x6 { display:block; }
x2 { overflow:auto; width:100px; background:grey; }
x4 { width: 70px; }
-x3 { width: 70px; padding: 0 20px; }
+x3 { width: 70px; padding-left: 20px; padding-right: 10px; }
</style>
</head>
<body>
<x1><x2 style="height:50px;">
<x3><x4 style="height:20px; background:lime; "></x4></x3>
-</x2>
+</x2></x1>
</body>
@@ -17,7 +17,7 @@
<x1><x2 style="height:50px;">
<x4 style="height:20px; background:lime; "></x4>
-</x2>
+</x2></x1>
</body>

0 comments on commit 1f2400c

Please sign in to comment.