ASSERTION FAILED: i < size(), UNKNOWN in WebCore::RenderTableSection::layout
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 23:59:52 +0000 (23:59 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 23:59:52 +0000 (23:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108838

Source/WebCore:

Reviewed by Levi Weintraub.

Ensure that RenderTable::recalcSections is called when moving a
TableSection by calling setNeedsSectionRecalc in addChild for
TableSections.

Test: fullscreen/full-screen-table-section.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):

LayoutTests:

Reviewed by Levi Weintraub.

Add test for calling requestFullscreen on an element with a
table-section display type.

* fullscreen/full-screen-table-section-expected.txt: Added.
* fullscreen/full-screen-table-section.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fullscreen/full-screen-table-section-expected.txt [new file with mode: 0644]
LayoutTests/fullscreen/full-screen-table-section.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTable.cpp

index 012da00..9314f81 100644 (file)
@@ -1,3 +1,16 @@
+2013-03-05  Emil A Eklund  <eae@chromium.org>
+
+        ASSERTION FAILED: i < size(), UNKNOWN in WebCore::RenderTableSection::layout
+        https://bugs.webkit.org/show_bug.cgi?id=108838
+
+        Reviewed by Levi Weintraub.
+        
+        Add test for calling requestFullscreen on an element with a
+        table-section display type.
+
+        * fullscreen/full-screen-table-section-expected.txt: Added.
+        * fullscreen/full-screen-table-section.html: Added.
+
 2013-03-05  Roger Fong  <roger_fong@apple.com>
 
                Unreviewed. Skip tests on Windows to make EWS bots happier.
diff --git a/LayoutTests/fullscreen/full-screen-table-section-expected.txt b/LayoutTests/fullscreen/full-screen-table-section-expected.txt
new file mode 100644 (file)
index 0000000..5d6a8b1
--- /dev/null
@@ -0,0 +1,5 @@
+PASS document.webkitFullscreenElement.id is 'test'
+Tests that a table-section element can be used in full screen mode.
+
+Test Element
+Hit Enter to run if not in test runner.
diff --git a/LayoutTests/fullscreen/full-screen-table-section.html b/LayoutTests/fullscreen/full-screen-table-section.html
new file mode 100644 (file)
index 0000000..4ae6557
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <script src="../fast/js/resources/js-test-pre.js"></script>
+    </head>
+    <body>
+        <p>
+            Tests that a table-section element can be used in full screen mode.
+        </p>
+        <div id="test" style="display: table-footer-group">Test Element</div>
+        <p>
+            Hit Enter to run if not in test runner.
+        </p>
+        <script>
+            if (window.testRunner) {
+                testRunner.dumpAsText(false /* runPixelTests */);
+                testRunner.waitUntilDone();
+            }
+
+            var testElement = document.getElementById('test');
+
+            document.addEventListener('webkitfullscreenchange', function(e) {
+                if (document.webkitFullscreenElement) {
+                    shouldBe("document.webkitFullscreenElement.id", "'test'");
+                    document.webkitCancelFullScreen();
+                    if (window.testRunner)
+                        testRunner.notifyDone();
+                }
+            }, false /* useCapture */);
+            
+            document.addEventListener("keydown", function(e) {
+                if (e.keyCode == 13 /* Enter */)
+                    testElement.webkitRequestFullscreen();
+            }, false /* useCapture */);
+            
+            if (window.eventSender)
+                eventSender.keyDown("\n");
+        </script>
+    </body>
+</html>
index 968766e..2817286 100644 (file)
@@ -1,3 +1,19 @@
+2013-03-05  Emil A Eklund  <eae@chromium.org>
+
+        ASSERTION FAILED: i < size(), UNKNOWN in WebCore::RenderTableSection::layout
+        https://bugs.webkit.org/show_bug.cgi?id=108838
+
+        Reviewed by Levi Weintraub.
+        
+        Ensure that RenderTable::recalcSections is called when moving a
+        TableSection by calling setNeedsSectionRecalc in addChild for
+        TableSections.
+
+        Test: fullscreen/full-screen-table-section.html
+
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::addChild):
+
 2013-03-05  Kenneth Russell  <kbr@google.com>
 
         Upgrade ANGLE to r1987
index 21ccd93..497bca1 100644 (file)
@@ -154,6 +154,9 @@ void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
     else
         wrapInAnonymousSection = true;
 
+    if (child->isTableSection())
+        setNeedsSectionRecalc();
+
     if (!wrapInAnonymousSection) {
         if (beforeChild && beforeChild->parent() != this)
             beforeChild = splitAnonymousBoxesAroundChild(beforeChild);