- Revision
- 106083
- Author
- timothy_hor...@apple.com
- Date
- 2012-01-26 20:43:58 -0800 (Thu, 26 Jan 2012)
Log Message
3D transformed elements hide when showing the print dialog
https://bugs.webkit.org/show_bug.cgi?id=45894
<rdar://problem/7441593>
Reviewed by Andy Estes.
Suspend updates of the compositing layer tree while printing is taking place,
preventing on-screen layers from moving to their print-mode positions.
No new tests, as WebKitTestRunner doesn't support putting the document
into printing mode.
* page/FrameView.cpp:
(WebCore::FrameView::syncCompositingStateForThisFrame):
(WebCore::FrameView::paintContents):
* platform/graphics/ca/LayerFlushScheduler.h:
(WebCore::LayerFlushScheduler::isSuspended): Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::endPrinting):
* WebProcess/WebPage/ca/LayerTreeHostCA.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::forceRepaint):
(WebKit::LayerTreeHostCAMac::flushPendingLayerChanges):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (106082 => 106083)
--- trunk/Source/WebCore/ChangeLog 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebCore/ChangeLog 2012-01-27 04:43:58 UTC (rev 106083)
@@ -1,3 +1,23 @@
+2012-01-26 Tim Horton <hortont...@gmail.com>
+
+ 3D transformed elements hide when showing the print dialog
+ https://bugs.webkit.org/show_bug.cgi?id=45894
+ <rdar://problem/7441593>
+
+ Reviewed by Andy Estes.
+
+ Suspend updates of the compositing layer tree while printing is taking place,
+ preventing on-screen layers from moving to their print-mode positions.
+
+ No new tests, as WebKitTestRunner doesn't support putting the document
+ into printing mode.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::syncCompositingStateForThisFrame):
+ (WebCore::FrameView::paintContents):
+ * platform/graphics/ca/LayerFlushScheduler.h:
+ (WebCore::LayerFlushScheduler::isSuspended): Added.
+
2012-01-26 Pablo Flouret <pab...@motorola.com>
Fix bad code generated by the JSC idl code generator for [CachedAttribute] attributes
Modified: trunk/Source/WebCore/page/FrameView.cpp (106082 => 106083)
--- trunk/Source/WebCore/page/FrameView.cpp 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebCore/page/FrameView.cpp 2012-01-27 04:43:58 UTC (rev 106083)
@@ -742,7 +742,7 @@
root->compositor()->flushPendingLayerChanges(rootFrameForSync == m_frame);
#if ENABLE(FULLSCREEN_API)
- // The fullScreenRenderer's graphicsLayer has been re-parented, and the above recursive syncCompositingState
+ // The fullScreenRenderer's graphicsLayer has been re-parented, and the above recursive syncCompositingState
// call will not cause the subtree under it to repaint. Explicitly call the syncCompositingState on
// the fullScreenRenderer's graphicsLayer here:
Document* document = m_frame->document();
@@ -2848,7 +2848,7 @@
FontCachePurgePreventer fontCachePurgePreventer;
#if USE(ACCELERATED_COMPOSITING)
- if (!p->paintingDisabled())
+ if (!p->paintingDisabled() && !document->printing())
syncCompositingStateForThisFrame(m_frame.get());
#endif
Modified: trunk/Source/WebCore/platform/graphics/ca/LayerFlushScheduler.h (106082 => 106083)
--- trunk/Source/WebCore/platform/graphics/ca/LayerFlushScheduler.h 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebCore/platform/graphics/ca/LayerFlushScheduler.h 2012-01-27 04:43:58 UTC (rev 106083)
@@ -46,6 +46,8 @@
void suspend();
void resume();
+ bool isSuspended() const { return m_isSuspended; }
+
private:
bool m_isSuspended;
LayerFlushSchedulerClient* m_client;
Modified: trunk/Source/WebKit2/ChangeLog (106082 => 106083)
--- trunk/Source/WebKit2/ChangeLog 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebKit2/ChangeLog 2012-01-27 04:43:58 UTC (rev 106083)
@@ -1,3 +1,23 @@
+2012-01-26 Tim Horton <hortont...@gmail.com>
+
+ 3D transformed elements hide when showing the print dialog
+ https://bugs.webkit.org/show_bug.cgi?id=45894
+ <rdar://problem/7441593>
+
+ Reviewed by Andy Estes.
+
+ Suspend updates of the compositing layer tree while printing is taking place,
+ preventing on-screen layers from moving to their print-mode positions.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::beginPrinting):
+ (WebKit::WebPage::endPrinting):
+ * WebProcess/WebPage/ca/LayerTreeHostCA.h:
+ * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
+ * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
+ (WebKit::LayerTreeHostCAMac::forceRepaint):
+ (WebKit::LayerTreeHostCAMac::flushPendingLayerChanges):
+
2012-01-26 Andras Becsi <andras.be...@nokia.com>
[Qt][WK2] Add the componentComplete method to WebView
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (106082 => 106083)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-01-27 04:43:58 UTC (rev 106083)
@@ -2679,6 +2679,7 @@
if (!m_printContext)
m_printContext = adoptPtr(new PrintContext(coreFrame));
+ drawingArea()->setLayerTreeStateIsFrozen(true);
m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
float fullPageHeight;
@@ -2687,6 +2688,7 @@
void WebPage::endPrinting()
{
+ drawingArea()->setLayerTreeStateIsFrozen(false);
m_printContext = nullptr;
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h (106082 => 106083)
--- trunk/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h 2012-01-27 04:43:58 UTC (rev 106083)
@@ -54,6 +54,7 @@
// LayerTreeHostCA
virtual void didPerformScheduledLayerFlush();
+ virtual bool flushPendingLayerChanges();
bool m_layerFlushSchedulingEnabled;
@@ -81,8 +82,6 @@
// LayerTreeHostCA
virtual void platformInitialize(LayerTreeContext&) = 0;
- bool flushPendingLayerChanges();
-
void createPageOverlayLayer();
void destroyPageOverlayLayer();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h (106082 => 106083)
--- trunk/Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h 2012-01-27 04:43:58 UTC (rev 106083)
@@ -55,7 +55,9 @@
// LayerTreeHostCA
virtual void platformInitialize(LayerTreeContext&);
virtual void didPerformScheduledLayerFlush();
-
+
+ virtual bool flushPendingLayerChanges();
+
// LayerFlushSchedulerClient
virtual bool flushLayers();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm (106082 => 106083)
--- trunk/Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm 2012-01-27 04:10:30 UTC (rev 106082)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm 2012-01-27 04:43:58 UTC (rev 106083)
@@ -133,4 +133,12 @@
LayerTreeHostCA::didPerformScheduledLayerFlush();
}
+bool LayerTreeHostCAMac::flushPendingLayerChanges()
+{
+ if (m_layerFlushScheduler.isSuspended())
+ return false;
+
+ return LayerTreeHostCA::flushPendingLayerChanges();
+}
+
} // namespace WebKit