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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106083
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-26 Tim Horton <hortont424@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 <pablof@motorola.com>
Fix bad code generated by the JSC idl code generator for [CachedAttribute] attributes
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();
FontCachePurgePreventer fontCachePurgePreventer;
#if USE(ACCELERATED_COMPOSITING)
- if (!p->paintingDisabled())
+ if (!p->paintingDisabled() && !document->printing())
syncCompositingStateForThisFrame(m_frame.get());
#endif
void suspend();
void resume();
+ bool isSuspended() const { return m_isSuspended; }
+
private:
bool m_isSuspended;
LayerFlushSchedulerClient* m_client;
+2012-01-26 Tim Horton <hortont424@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.becsi@nokia.com>
[Qt][WK2] Add the componentComplete method to WebView
if (!m_printContext)
m_printContext = adoptPtr(new PrintContext(coreFrame));
+ drawingArea()->setLayerTreeStateIsFrozen(true);
m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
float fullPageHeight;
void WebPage::endPrinting()
{
+ drawingArea()->setLayerTreeStateIsFrozen(false);
m_printContext = nullptr;
}
// LayerTreeHostCA
virtual void didPerformScheduledLayerFlush();
+ virtual bool flushPendingLayerChanges();
bool m_layerFlushSchedulingEnabled;
// LayerTreeHostCA
virtual void platformInitialize(LayerTreeContext&) = 0;
- bool flushPendingLayerChanges();
-
void createPageOverlayLayer();
void destroyPageOverlayLayer();
// LayerTreeHostCA
virtual void platformInitialize(LayerTreeContext&);
virtual void didPerformScheduledLayerFlush();
-
+
+ virtual bool flushPendingLayerChanges();
+
// LayerFlushSchedulerClient
virtual bool flushLayers();
LayerTreeHostCA::didPerformScheduledLayerFlush();
}
+bool LayerTreeHostCAMac::flushPendingLayerChanges()
+{
+ if (m_layerFlushScheduler.isSuspended())
+ return false;
+
+ return LayerTreeHostCA::flushPendingLayerChanges();
+}
+
} // namespace WebKit