LayoutTests:
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Feb 2007 23:50:40 +0000 (23:50 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Feb 2007 23:50:40 +0000 (23:50 +0000)
        Reviewed by Maciej.

        Test for REGRESSION: No day/week scrollbar in Google Calendar
        http://bugs.webkit.org/show_bug.cgi?id=11985

        * fast/layers/overflow-scroll-auto-switch-expected.checksum: Added.
        * fast/layers/overflow-scroll-auto-switch-expected.png: Added.
        * fast/layers/overflow-scroll-auto-switch-expected.txt: Added.
        * fast/layers/overflow-scroll-auto-switch.html: Added.

WebCore:

        Reviewed by Maciej.

        - fixed REGRESSION: No day/week scrollbar in Google Calendar
        http://bugs.webkit.org/show_bug.cgi?id=11985

        Make sure overflow:auto scrollbars are always enabled. If they were overflow:scroll
        and dynamically changed to auto they might still be disabled.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):

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

LayoutTests/ChangeLog
LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.checksum [new file with mode: 0644]
LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.png [new file with mode: 0644]
LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.txt [new file with mode: 0644]
LayoutTests/fast/layers/overflow-scroll-auto-switch.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderLayer.cpp

index 5ab6a1a245ba6e7ab8436a016322c2bc860210f4..05ad4f5fb8aa3f3db59ecc52ccccb4bac975543c 100644 (file)
@@ -1,3 +1,15 @@
+2007-02-11  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Maciej.
+        
+        Test for REGRESSION: No day/week scrollbar in Google Calendar
+        http://bugs.webkit.org/show_bug.cgi?id=11985
+
+        * fast/layers/overflow-scroll-auto-switch-expected.checksum: Added.
+        * fast/layers/overflow-scroll-auto-switch-expected.png: Added.
+        * fast/layers/overflow-scroll-auto-switch-expected.txt: Added.
+        * fast/layers/overflow-scroll-auto-switch.html: Added.
+
 2007-02-11  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Hyatt.
diff --git a/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.checksum b/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.checksum
new file mode 100644 (file)
index 0000000..0edd7a5
--- /dev/null
@@ -0,0 +1 @@
+4d74ecc3c3578db036827f5191d85d91
\ No newline at end of file
diff --git a/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.png b/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.png
new file mode 100644 (file)
index 0000000..82acb21
Binary files /dev/null and b/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.png differ
diff --git a/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.txt b/LayoutTests/fast/layers/overflow-scroll-auto-switch-expected.txt
new file mode 100644 (file)
index 0000000..a54aac9
--- /dev/null
@@ -0,0 +1,40 @@
+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
+      RenderBlock (anonymous) at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 146x18
+          text run at (0,0) width 146: "Scrollbars should work"
+layer at (8,26) size 100x100 clip at (8,26) size 85x85 scrollWidth 238 scrollHeight 180
+  RenderBlock (relative positioned) {DIV} at (0,18) size 100x100
+    RenderText {#text} at (0,0) size 238x18
+      text run at (0,0) width 238: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+    RenderBR {BR} at (0,0) size 0x0
+    RenderText {#text} at (0,18) size 7x18
+      text run at (0,18) width 7: "a"
+    RenderBR {BR} at (7,32) size 0x0
+    RenderText {#text} at (0,36) size 7x18
+      text run at (0,36) width 7: "a"
+    RenderBR {BR} at (7,50) size 0x0
+    RenderText {#text} at (0,54) size 7x18
+      text run at (0,54) width 7: "a"
+    RenderBR {BR} at (7,68) size 0x0
+    RenderText {#text} at (0,72) size 7x18
+      text run at (0,72) width 7: "a"
+    RenderBR {BR} at (7,86) size 0x0
+    RenderText {#text} at (0,90) size 7x18
+      text run at (0,90) width 7: "a"
+    RenderBR {BR} at (7,104) size 0x0
+    RenderText {#text} at (0,108) size 7x18
+      text run at (0,108) width 7: "a"
+    RenderBR {BR} at (7,122) size 0x0
+    RenderText {#text} at (0,126) size 7x18
+      text run at (0,126) width 7: "a"
+    RenderBR {BR} at (7,140) size 0x0
+    RenderText {#text} at (0,144) size 7x18
+      text run at (0,144) width 7: "a"
+    RenderBR {BR} at (7,158) size 0x0
+    RenderText {#text} at (0,162) size 7x18
+      text run at (0,162) width 7: "a"
+    RenderBR {BR} at (7,176) size 0x0
diff --git a/LayoutTests/fast/layers/overflow-scroll-auto-switch.html b/LayoutTests/fast/layers/overflow-scroll-auto-switch.html
new file mode 100644 (file)
index 0000000..158840c
--- /dev/null
@@ -0,0 +1,14 @@
+<html>
+<body>
+Scrollbars should work
+<div id=x style='position:relative; width:100px; height:100px; overflow: scroll'>
+</div>
+<script>
+var e = document.getElementById('x');
+// force relayout to create scrollbars
+e.offsetTop;
+// switch to auto
+e.style.overflow = 'auto';
+// add some content
+e.innerHTML = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>';
+</script>
\ No newline at end of file
index 798106af1d861397e25633a543658ef2c2ba5bd1..b56c630ab7f7cf46d18e57b6af7524d8548cb58b 100644 (file)
@@ -1,3 +1,16 @@
+2007-02-10  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed REGRESSION: No day/week scrollbar in Google Calendar
+        http://bugs.webkit.org/show_bug.cgi?id=11985
+
+        Make sure overflow:auto scrollbars are always enabled. If they were overflow:scroll
+        and dynamically changed to auto they might still be disabled.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+
 2007-02-11  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Hyatt.
index 7284e0e842746657a075e0bba8c8f9c84e5fffda..b1837e4362fac26956b56d29a6bc1aa9abb2421e 100644 (file)
@@ -1230,6 +1230,12 @@ RenderLayer::updateScrollInfoAfterLayout()
             }
         }
     }
+    
+    // If overflow:scroll is turned into overflow:auto a bar might still be disabled (Bug 11985).
+    if (m_hBar && m_object->hasAutoHorizontalScrollbar())
+        m_hBar->setEnabled(true);
+    if (m_vBar && m_object->hasAutoVerticalScrollbar())
+        m_vBar->setEnabled(true);
 
     // Set up the range (and page step/line step).
     if (m_hBar) {