[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

yuzo at google.com yuzo at google.com
Wed Dec 22 15:37:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fa1ba5c8dbd4bf71e33584abca5cf633bde4f3d4
Author: yuzo at google.com <yuzo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 9 12:21:21 2010 +0000

    2010-11-09  Yuzo Fujishima  <yuzo at google.com>
    
            Reviewed by Shinichiro Hamaji.
    
            Fix for Bug 48984 - [Chromium] @media print crash due to paged media support
            https://bugs.webkit.org/show_bug.cgi?id=48984
    
            * printing/page-format-data-display-none-expected.txt: Added.
            * printing/page-format-data-display-none.html: Added.
    2010-11-09  Yuzo Fujishima  <yuzo at google.com>
    
            Reviewed by Shinichiro Hamaji.
    
            Fix for Bug 48984 - [Chromium] @media print crash due to paged media support
            Page context has been inheriting from document element style that becomes null if display property is none.
            It should inherit from document style instead to properly handle direction property (and to avoid the null reference).
            https://bugs.webkit.org/show_bug.cgi?id=48984
    
            Test: printing/page-format-data-display-none.html
    
            * css/CSSStyleSelector.cpp:
            (WebCore::CSSStyleSelector::styleForPage): Page context inherits from
            document style.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71621 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 92bafd8..b846fb1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-09  Yuzo Fujishima  <yuzo at google.com>
+
+        Reviewed by Shinichiro Hamaji.
+
+        Fix for Bug 48984 - [Chromium] @media print crash due to paged media support
+        https://bugs.webkit.org/show_bug.cgi?id=48984
+
+        * printing/page-format-data-display-none-expected.txt: Added.
+        * printing/page-format-data-display-none.html: Added.
+
 2010-11-09  Csaba Osztrogonác  <ossy at webkit.org>
 
         Unreviewed.
diff --git a/LayoutTests/compositing/overflow/get-transform-from-non-box-container-expected.txt b/LayoutTests/printing/page-format-data-display-none-expected.txt
similarity index 100%
copy from LayoutTests/compositing/overflow/get-transform-from-non-box-container-expected.txt
copy to LayoutTests/printing/page-format-data-display-none-expected.txt
diff --git a/LayoutTests/printing/page-format-data-display-none.html b/LayoutTests/printing/page-format-data-display-none.html
new file mode 100644
index 0000000..2c99e0f
--- /dev/null
+++ b/LayoutTests/printing/page-format-data-display-none.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<title>Test for Bug 48984 - [Chromium] @media print crash due to paged media support</title>
+<style>
+* { display: none; }
+</style>
+</head>
+<body>
+<div id="output">
+Test has not run yet.
+Click the print button and see if Chromium crashes.
+<input type="button" value="print" onclick="testManually()"/>
+</div>
+<script>
+function testManually() {
+    document.documentElement.style.display = "none";
+    window.print();
+}
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+
+    // The test passes if the following line doesn't cause a crash.
+    layoutTestController.pageSizeAndMarginsInPixels(0, 100, 200, 1, 2, 3, 4);
+
+    document.getElementById("output").innerHTML = "PASS";
+}
+// Remove the display: none; rule. Otherwise, DumpRenderTree dumps weird stuff.
+document.styleSheets[0].removeRule(0);
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ab8287a..3667bbc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-09  Yuzo Fujishima  <yuzo at google.com>
+
+        Reviewed by Shinichiro Hamaji.
+
+        Fix for Bug 48984 - [Chromium] @media print crash due to paged media support
+        Page context has been inheriting from document element style that becomes null if display property is none.
+        It should inherit from document style instead to properly handle direction property (and to avoid the null reference).
+        https://bugs.webkit.org/show_bug.cgi?id=48984
+
+        Test: printing/page-format-data-display-none.html
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::styleForPage): Page context inherits from
+        document style.
+
 2010-11-09  Chris Rogers  <crogers at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 24f0ee1..fc8493e 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -1609,7 +1609,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForElement(PseudoId pseudo,
 
 PassRefPtr<RenderStyle> CSSStyleSelector::styleForPage(int pageIndex)
 {
-    initForStyleResolve(m_checker.m_document->body());
+    initForStyleResolve(m_checker.m_document->documentElement()); // m_rootElementStyle will be set to the document style.
 
     m_style = RenderStyle::create();
     m_style->inheritFrom(m_rootElementStyle);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list