Source/WebCore: Don't flush compositing layers within FrameView::willPaintContents()
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Mar 2014 17:52:14 +0000 (17:52 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Mar 2014 17:52:14 +0000 (17:52 +0000)
commit73147fef111e119d2001be74fb0314f356635692
treecd7538a54cd70e48e50c0afb43b36dbd1b2b6baf
parent5f16e9536ed0c171118d26d7ad76ede3599d1a61
Source/WebCore: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627
<rdar://problem/16368869>

Reviewed by Sam Weinig.

Remove the call to flushCompositingStateForThisFrame() here. We should
have always flushed before painting via other mechanisms in WebKit2 and WebKit2.
Flushing during painting is actually harmful, since we could be inside
a CA commit already, and creating or destroying layers via flushing is bad.

* page/FrameView.cpp:
(WebCore::FrameView::willPaintContents):

Source/WebKit/mac: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627

Reviewed by Sam Weinig.

Make _flushCompositingChanges private so DRT can call it;
moved it into the Private category.

* WebView/WebView.mm:
(-[WebView _flushCompositingChanges]):
* WebView/WebViewPrivate.h:

Tools: Don't flush compositing layers within FrameView::willPaintContents()
https://bugs.webkit.org/show_bug.cgi?id=130627
<rdar://problem/16368869>

Reviewed by Sam Weinig.

Fix DRT to correctly render tests with layers now that FrameView::paintContents
does not flush.

Move the -[WebView displayIfNeeded] from -[FrameLoadDelegate webView:didFinishLoadForFrame:]
into an explicit function called before dumping.

Then explicitly call _flushCompositingChanges to ensure that GraphicsLayer changes
are flushed to CA. They will be pushed to the window by snapshotting.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Fix weird path to IOKit.framework.
* DumpRenderTree/mac/DumpRenderTree.mm:
(updateDisplay):
(dump):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]): Fix parameter name.
(-[FrameLoadDelegate webView:didFinishLoadForFrame:]): Remove display call.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewPrivate.h
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/FrameLoadDelegate.mm