Bug 766843 - Exempt inner table frames from optimized dynamic position change handling, as the required handling is performed for outer table frames; r=bzbarsky

This commit is contained in:
Ehsan Akhgari 2012-06-27 16:24:01 -04:00
parent b7237fc143
commit 78e6655072
6 changed files with 69 additions and 0 deletions

View File

@ -12234,6 +12234,13 @@ Iterator::DeleteItemsTo(const Iterator& aEnd)
bool
nsCSSFrameConstructor::RecomputePosition(nsIFrame* aFrame)
{
// Don't process position changes on table frames, since we already handle
// the dynamic position change on the outer table frame, and the reflow-based
// fallback code path also ignores positions on inner table frames.
if (aFrame->GetType() == nsGkAtoms::tableFrame) {
return true;
}
const nsStyleDisplay* display = aFrame->GetStyleDisplay();
// Changes to the offsets of a non-positioned element can safely be ignored.
if (display->mPosition == NS_STYLE_POSITION_STATIC) {

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="container">
<table id="rel" style="left: 200px; top: 100px;">
<tr><td>position&#10;relative</td></tr>
</table>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="animate.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<table id="rel" style="left: 0; top: 0;">
<tr><td>position&#10;relative</td></tr>
</table>
</div>
<script>
animate({top: 10, left: 20}, 100);
</script>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="container">
<table id="rel" style="right: -200px; bottom: -300px;">
<tr><td>position&#10;relative</td></tr>
</table>
</div>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="animate.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<table id="rel" style="right: -400px; bottom: -400px;">
<tr><td>position&#10;relative</td></tr>
</table>
</div>
<script>
animate({bottom: 10, right: 20}, 100);
</script>
</body>
</html>

View File

@ -1,2 +1,4 @@
fuzzy-if(d2d,85,20) == move-right-bottom.html move-right-bottom-ref.html # Bug 742176
random-if(cocoaWidget) fuzzy-if(d2d,85,20) == move-top-left.html move-top-left-ref.html # Bug 688545, bug 742176
fuzzy-if(d2d,85,20) == move-right-bottom-table.html move-right-bottom-table-ref.html # Bug 742176
random-if(cocoaWidget) fuzzy-if(d2d,85,20) == move-top-left-table.html move-top-left-table-ref.html # Bug 688545, bug 742176