[WinCairo] Repaint issues with accelerated compositing.
https://bugs.webkit.org/show_bug.cgi?id=137850

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-18
Reviewed by Brent Fulgham.

There is sometimes missing content in accelerated compositing mode.
This is caused by not invalidating the non composited layer,
and not rendering when a flush did not complete.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::flushAndRenderLayers): Also render when flush did not complete.
(AcceleratedCompositingContext::setNeedsDisplayInRect): Deleted.
* WebCoreSupport/AcceleratedCompositingContext.h: Ditto.
* WebView.cpp:
(WebView::addToDirtyRegion): Invalidate non composited layer.
(WebView::flushPendingGraphicsLayerChanges): Flush layers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
https://bugs.webkit.org/show_bug.cgi?id=137855

Reviewed by Dan Bernstein.

Source/WebCore:

We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
backchannel data that the synthesized response doesn't have.

Test: http/tests/mime/mime-type-sniff.html

* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):

    When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.

Tools:

Test and warn if the dumped response mime type differs from the platform response mime type.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didReceiveResponseForResource):
(WTR::InjectedBundlePage::platformResponseMimeType):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
(WTR::InjectedBundlePage::platformResponseMimeType):

LayoutTests:

* http/tests/mime/mime-type-sniff-expected.txt: Added.
* http/tests/mime/mime-type-sniff.html: Added.
* http/tests/mime/resources/png-with-text-content-type.cgi: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174866 268f45cc-cd09-0410-ab3c-d52691b4dbfc