[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
simon.fraser at apple.com
simon.fraser at apple.com
Tue Jan 5 23:42:46 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 88eb02bf779ce86d05d9dd4392439bc3d08d5b13
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 4 23:18:53 2009 +0000
2009-12-04 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/7441571> Hardware-backed layers are skipped when printing
When printing, set the PaintBehaviorFlattenCompositingLayers flag so that compositing layers
paint. This also causes 3D transforms to be flattened to 2D.
Test: printing/compositing-layer-printing.html
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5d68266..6f2c99f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-04 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7441571> Hardware-backed layers are skipped when printing
+
+ Testcase for printing with a compositing layer.
+
+ * printing/compositing-layer-printing-expected.pdf: Added.
+ * printing/compositing-layer-printing.html: Added.
+
2009-12-04 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Skip test that is failing because of new behaviour enforced by
diff --git a/LayoutTests/printing/compositing-layer-printing-expected.pdf b/LayoutTests/printing/compositing-layer-printing-expected.pdf
new file mode 100644
index 0000000..ad30f28
Binary files /dev/null and b/LayoutTests/printing/compositing-layer-printing-expected.pdf differ
diff --git a/LayoutTests/printing/compositing-layer-printing.html b/LayoutTests/printing/compositing-layer-printing.html
new file mode 100644
index 0000000..ca7efa2
--- /dev/null
+++ b/LayoutTests/printing/compositing-layer-printing.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Printing compositing layers</title>
+ <style type="text/css">
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: 10px;
+ background-color: green;
+ }
+ </style>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.printToPDF();
+ </script>
+</head>
+<body>
+ <p>You should see two green squares below on screen, and when printed.</p>
+ <div class="box"></div>
+ <div class="box" style="-webkit-transform: translateZ(0)"></div>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c17ffbd..3ad456f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-04 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7441571> Hardware-backed layers are skipped when printing
+
+ When printing, set the PaintBehaviorFlattenCompositingLayers flag so that compositing layers
+ paint. This also causes 3D transforms to be flattened to 2D.
+
+ Test: printing/compositing-layer-printing.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::paintContents):
+
2009-12-04 Oliver Hunt <oliver at apple.com>
Reviewed by Beth Dakin.
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 49f741e..0b264f7 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -1699,9 +1699,15 @@ void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
// m_nodeToDraw is used to draw only one element (and its descendants)
RenderObject* eltRenderer = m_nodeToDraw ? m_nodeToDraw->renderer() : 0;
- if (m_paintBehavior == PaintBehaviorNormal)
+
+ PaintBehavior paintBehavior = m_paintBehavior;
+ if (paintBehavior == PaintBehaviorNormal)
document->invalidateRenderedRectsForMarkersInRect(rect);
- contentRenderer->layer()->paint(p, rect, m_paintBehavior, eltRenderer);
+
+ if (document->printing())
+ paintBehavior |= PaintBehaviorFlattenCompositingLayers;
+
+ contentRenderer->layer()->paint(p, rect, paintBehavior, eltRenderer);
m_isPainting = false;
m_lastPaintTime = currentTime();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list