2010-12-21 Vangelis Kokkevis <vangelis@chromium.org>
authorvangelis@chromium.org <vangelis@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Dec 2010 18:36:04 +0000 (18:36 +0000)
committervangelis@chromium.org <vangelis@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Dec 2010 18:36:04 +0000 (18:36 +0000)
        Reviewed by Kenneth Russell.

        [chromium] Fixing crash with empty render surfaces.
        https://bugs.webkit.org/show_bug.cgi?id=51432

        Test: platform/chromium/compositing/empty-render-surface-crasher.html

        * platform/graphics/chromium/RenderSurfaceChromium.cpp:
        (WebCore::RenderSurfaceChromium::draw):
2010-12-21  Vangelis Kokkevis  <vangelis@chromium.org>

        Reviewed by Kenneth Russell.

        [chromium] Enabling layout tests in platform/chromium/compositing
        and adding new layout test to check for crash on empty render surfaces.
        https://bugs.webkit.org/show_bug.cgi?id=51432

        * platform/chromium-gpu/test_expectations.txt:
        * platform/chromium/compositing/empty-render-surface-crasher-expected.txt: Added.
        * platform/chromium/compositing/empty-render-surface-crasher.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/platform/chromium-gpu/test_expectations.txt
LayoutTests/platform/chromium/compositing/empty-render-surface-crasher-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/empty-render-surface-crasher.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp

index 677990e16bc43441d961d4d754a6ac73aa4404be..49479d856070c13a294c6c21a8ff17cd1645709d 100644 (file)
@@ -1,3 +1,15 @@
+2010-12-21  Vangelis Kokkevis  <vangelis@chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Enabling layout tests in platform/chromium/compositing
+        and adding new layout test to check for crash on empty render surfaces.
+        https://bugs.webkit.org/show_bug.cgi?id=51432
+
+        * platform/chromium-gpu/test_expectations.txt:
+        * platform/chromium/compositing/empty-render-surface-crasher-expected.txt: Added.
+        * platform/chromium/compositing/empty-render-surface-crasher.html: Added.
+
 2010-12-22  Krithigassree Sambamurthy  <krithigassree.sambamurthy@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 4dea32412d95a411ac2eb365ffe536191a568843..05f57047e999d0849700ccb9ba9afc312afe59e7 100644 (file)
@@ -50,6 +50,8 @@ WONTFIX SKIP : wml = PASS FAIL
 // FIXME: remove the FAIL from the following line.
 BUGNONE : compositing = PASS FAIL
 
+platform/chromium/compositing = PASS
+
 // Unskip the canvas tests on Win and Linux only (since Mac does not support
 // accelerated 2D canvas yet).
 BUGNONE WIN LINUX : fast/canvas = PASS
diff --git a/LayoutTests/platform/chromium/compositing/empty-render-surface-crasher-expected.txt b/LayoutTests/platform/chromium/compositing/empty-render-surface-crasher-expected.txt
new file mode 100644 (file)
index 0000000..f8a2392
--- /dev/null
@@ -0,0 +1,3 @@
+This page tests that an empty render surface does not crash as reported in this bug. Pass if this does not crash.
+
+
diff --git a/LayoutTests/platform/chromium/compositing/empty-render-surface-crasher.html b/LayoutTests/platform/chromium/compositing/empty-render-surface-crasher.html
new file mode 100644 (file)
index 0000000..d83a75f
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE>
+<html>
+<head>
+<title>Empty Render Surface</title>
+  <style type="text/css" media="screen">
+    .container {
+      position: relative;
+      height: 0x;
+      width: 0px;
+      opacity:0.5;
+    }
+    
+    .child {
+      -webkit-transform: translateZ(0);
+      height: 0px;
+      width: 0px;
+      background-color: red;
+    }    
+  </style>
+  <script type="text/javascript" charset="utf-8">
+    if (window.layoutTestController)
+      layoutTestController.dumpAsText();
+  </script>
+
+</head>
+<body>
+<p>This page tests that an empty render surface does not crash as reported in <a href='https://bugs.webkit.org/show_bug.cgi?id=51432'>this bug</a>. Pass if this does not crash.</p>
+
+<div class="container">
+  <div class="child"> </div>
+</div>
+
+</body>
+</html>
index dba54410ff8fda274148a8f7ffa5075f6c929f44..79ecb4b31f6a455d72ff76e7f205a4b04c0cf319 100644 (file)
@@ -1,3 +1,15 @@
+2010-12-21  Vangelis Kokkevis  <vangelis@chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Fixing crash with empty render surfaces.
+        https://bugs.webkit.org/show_bug.cgi?id=51432
+
+        Test: platform/chromium/compositing/empty-render-surface-crasher.html
+
+        * platform/graphics/chromium/RenderSurfaceChromium.cpp:
+        (WebCore::RenderSurfaceChromium::draw):
+
 2010-12-21  Pavel Podivilov  <podivilov@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index e9fdf01b785be1b0e123c19c8847e06c18846411..e8b9a12b02cdde00eeaae7734d7a09b73011bbc2 100644 (file)
@@ -135,7 +135,7 @@ bool RenderSurfaceChromium::prepareContentsTexture()
 
 void RenderSurfaceChromium::draw()
 {
-    if (m_skipsDraw)
+    if (m_skipsDraw || !m_contentsTexture)
         return;
 
     m_contentsTexture->bindTexture();