WebCore:
authorpewtermoose <pewtermoose@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2007 01:37:59 +0000 (01:37 +0000)
committerpewtermoose <pewtermoose@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2007 01:37:59 +0000 (01:37 +0000)
2007-08-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15023
          REGRESSION (r21113-r21143): JavaScript tooltip rendering bug

        Test: fast/repaint/layer-visibility.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setHasVisibleContent): Cache the layer's
        rects when it changes to visible.

LayoutTests:
2007-08-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - repaint test for http://bugs.webkit.org/show_bug.cgi?id=15023
          REGRESSION (r21113-r21143): JavaScript tooltip rendering bug

        * fast/repaint/layer-visibility.html: Added.
        * platform/mac/fast: Added.
        * platform/mac/fast/repaint: Added.
        * platform/mac/fast/repaint/layer-visibility-expected.checksum: Added.
        * platform/mac/fast/repaint/layer-visibility-expected.png: Added.
        * platform/mac/fast/repaint/layer-visibility-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25168 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/repaint/layer-visibility.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderLayer.cpp

index 3aca72dafca05e929cda27e32e347f0464bc54dd..d6f61ea220b9ec9987b25d94a3b497ec6efc9599 100644 (file)
@@ -1,3 +1,17 @@
+2007-08-20  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Dave Hyatt.
+
+        - repaint test for http://bugs.webkit.org/show_bug.cgi?id=15023
+          REGRESSION (r21113-r21143): JavaScript tooltip rendering bug
+
+        * fast/repaint/layer-visibility.html: Added.
+        * platform/mac/fast: Added.
+        * platform/mac/fast/repaint: Added.
+        * platform/mac/fast/repaint/layer-visibility-expected.checksum: Added.
+        * platform/mac/fast/repaint/layer-visibility-expected.png: Added.
+        * platform/mac/fast/repaint/layer-visibility-expected.txt: Added.
+
 2007-08-20  Adam Roben  <aroben@apple.com>
 
         Removed a now-working test from the Windows Skipped file
diff --git a/LayoutTests/fast/repaint/layer-visibility.html b/LayoutTests/fast/repaint/layer-visibility.html
new file mode 100644 (file)
index 0000000..bf9b543
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+<head>
+<script>
+    function test()
+    {
+        document.body.offsetTop;
+        var target = document.getElementById("target");
+        target.style.visibility = "visible";
+        document.body.offsetTop;
+        
+        if (window.layoutTestController) {
+            layoutTestController.display();
+            finish();
+        } else
+            setTimeout(finish, 0);
+    }
+
+    function finish()
+    {
+        var target = document.getElementById("target");
+        target.style.left = "0";
+        target.style.backgroundColor = "green";
+    }
+</script>
+</head>
+<body onload="test()">
+    <div id="target" style="position: absolute; top: 0; left: 100px; width: 100px; height: 100px; background-color: red; visibility: hidden;"></div>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.checksum b/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.checksum
new file mode 100644 (file)
index 0000000..706ad21
--- /dev/null
@@ -0,0 +1 @@
+3f3def34a62325f11e64f16fd55e7f28
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.png b/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.png
new file mode 100644 (file)
index 0000000..db1445e
Binary files /dev/null and b/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.txt b/LayoutTests/platform/mac/fast/repaint/layer-visibility-expected.txt
new file mode 100644 (file)
index 0000000..09927d8
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (0,0) size 100x100
+  RenderBlock (positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
index 9a13524cc2e8a397c82db647c193e1408d61a072..8d0bf40bc6e917fabf2b2753272b5a35c4446696 100644 (file)
@@ -1,3 +1,16 @@
+2007-08-20  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Dave Hyatt.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=15023
+          REGRESSION (r21113-r21143): JavaScript tooltip rendering bug
+
+        Test: fast/repaint/layer-visibility.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::setHasVisibleContent): Cache the layer's
+        rects when it changes to visible.
+
 2007-08-20  Kevin Decker <kdecker@apple.com>
 
         Reviewed by Anders.
index d43e75612fd4704f8eb4553cb5effcc98d292535..2cd909d9b4da2977211f268bb1a5e99b8e6db040 100644 (file)
@@ -231,6 +231,10 @@ void RenderLayer::setHasVisibleContent(bool b)
         return;
     m_visibleContentStatusDirty = false; 
     m_hasVisibleContent = b;
+    if (m_hasVisibleContent) {
+        m_repaintRect = renderer()->absoluteClippedOverflowRect();
+        m_outlineBox = renderer()->absoluteOutlineBox();
+    }
     if (parent())
         parent()->childVisibilityChanged(m_hasVisibleContent);
 }