Backout e19d625511a0 for breaking WinXP M-o

This commit is contained in:
Matt Woodrow 2012-10-16 16:59:35 +13:00
parent 9e67dbd1cb
commit be844fab64
6 changed files with 5 additions and 116 deletions

View File

@ -13,7 +13,6 @@ include $(DEPTH)/config/autoconf.mk
PARALLEL_DIRS += \
chrome \
invalidation \
$(NULL)
TOOL_DIRS := \

View File

@ -6,7 +6,7 @@ DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = layout/base/tests/chrome
relativesrcdir = layout/base/test/chrome
include $(DEPTH)/config/autoconf.mk

View File

@ -1,9 +1,6 @@
var accumulatedRect = null;
var onpaint = function() {};
var debug = false;
var CI = Components.interfaces;
var utils = window.QueryInterface(CI.nsIInterfaceRequestor)
.getInterface(CI.nsIDOMWindowUtils);
function paintListener(event) {
if (event.target != window)
@ -30,6 +27,9 @@ function waitForAllPaintsFlushed(callback, subdoc) {
if (subdoc) {
subdoc.documentElement.getBoundingClientRect();
}
var CI = Components.interfaces;
var utils = window.QueryInterface(CI.nsIInterfaceRequestor)
.getInterface(CI.nsIDOMWindowUtils);
if (!utils.isMozAfterPaintPending) {
if (debug) {
dump("done...\n");
@ -48,36 +48,3 @@ function waitForAllPaintsFlushed(callback, subdoc) {
}
onpaint = function() { waitForAllPaintsFlushed(callback, subdoc); };
}
var notPaintedList = new Array();
var paintedList = new Array();
function ensureNotPainted(element)
{
utils.checkAndClearPaintedState(element);
notPaintedList.push(element);
}
function ensurePainted(element)
{
utils.checkAndClearPaintedState(element);
paintedList.push(element);
}
function checkInvalidation()
{
for (var i = 0; i < notPaintedList.length; i++) {
ok(!utils.checkAndClearPaintedState(notPaintedList[i]), "Should not have repainted element!");
}
notPaintedList = new Array();
for (var i = 0; i < paintedList.length; i++) {
ok(utils.checkAndClearPaintedState(notPaintedList[i]), "Should have repainted element!");
}
paintedList = new Array();
}
function testInvalidation(callback)
{
waitForAllPaintsFlushed(function() { checkInvalidation(); callback(); });
}

View File

@ -15,7 +15,7 @@
<input id="i3" onkeydown="gKeyDown3++; frames[0].document.getElementById('i4').focus();"
onkeypress="gKeyPress3++;" onkeyup="gKeyUp3++;"/>
<iframe id="iframe" src="http://example.org/chrome/layout/base/tests/chrome/bug551434_childframe.html"></iframe>
<iframe id="iframe" src="http://example.org/chrome/layout/base/test/chrome/bug551434_childframe.html"></iframe>
<script class="testbody" type="text/javascript">

View File

@ -1,17 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = layout/base/tests/invalidation
include $(DEPTH)/config/autoconf.mk
MOCHITEST_CHROME_FILES = \
test_form_controls.html \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -1,60 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Check if we're over invalidating form controls</title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="../chrome/paint_listener.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body onload="waitForAllPaintsFlushed(runTest)">
<!-- Make sure we can always scroll even on large monitors -->
<div style="position: absolute; z-index: -100; height: 5000px; width: 1px; background-color: white;"></div>
<div id="test" style="height: 100px; width: 1px; background-color: white;"></div>
<select id="combo"name="product">
</select>
<input value="Save Changes" id="button" type="submit">
<input type="checkbox" id="checkbox"/>
<select id="listbox" size="7">
</select>
<input type="radio" id="radio" value="radio">Radio
<input type="text" id="text"/>
<a id="link" href="#">Link</a>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
var NO_REPAINT_ITEMS = ["combo", "button", "checkbox", "listbox", "radio", "text", "link"];
var SCROLL_TO = 40;
var SCROLL_INC = 2;
var posY = 0;
function runTest() {
if (window.QueryInterface(CI.nsIInterfaceRequestor).getInterface(CI.nsIDOMWindowUtils).layerManagerType == "Basic") {
ok(true, "Skipping test on BasicLayers because it fails due to component alpha flattening.");
SimpleTest.finish();
return;
}
// Scroll
posY += SCROLL_INC;
if (posY >= SCROLL_TO) {
SimpleTest.finish();
return;
}
// Add all the items to the no-repaint list unless it's the first few
// paints
if (posY > (SCROLL_INC * 4)) {
for (var i = 0; i < NO_REPAINT_ITEMS.length; i++) {
ensureNotPainted(document.getElementById(NO_REPAINT_ITEMS[i]));
}
}
window.scrollTo(0, posY);
testInvalidation(runTest);
}
</script>
</body>
</html>