Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html

Issue 2220333004: Set objects to need full paint invalidation after clearing their invalidation rects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html b/third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..faa4c0ae7ef498ba92b85cd958fc7609b0ea25b5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/update-visual-rects-after-compositing-change.html
@@ -0,0 +1,54 @@
+<!doctype HTML>
+<style>
+#child {
+ position: relative;
+}
+</style>
+<div style="backface-visibility: hidden;">
+ <div id="target">
+ <div id="child"></div>
+ <div style="position: relative;">
+ <span id="myspan">gone!</span>
+ </div>
+ </div>
+</div>
+<script src="../../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+
+function runTest() {
+ var content = document.createElement("span");
+ var div = document.createElement("div");
+ div.appendChild(content);
+ div.id = "child";
+ target.replaceChild(div, child);
+ requestAnimationFrame(checkResult);
+}
+
+function checkResult() {
+ if (window.internals) {
+ var clientRect = window.internals.visualRect(myspan.firstChild);
+ test(function() {
+ // Check that the visual rect for the child has been initialized
+ // to a non-zero (and hence presumably correct) size.
+ assert_true(clientRect.width > 0);
+ assert_true(clientRect.height > 0);
+ });
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+if (window.testRunner) {
+ window.testRunner.waitUntilDone();
+ window.testRunner.dumpAsText();
+}
+
+onload = function() {
+ requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ runTest();
+ });
+ });
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698