diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
| commit | 8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch) | |
| tree | 17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebKit2/WebProcess/WebPage/mac | |
| parent | b9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff) | |
| download | qtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz | |
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well
as the previously cherry-picked changes
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/mac')
3 files changed, 31 insertions, 12 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h index 22599edad..f5048a985 100644 --- a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h +++ b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h @@ -59,7 +59,7 @@ private: virtual void setLayerTreeStateIsFrozen(bool) OVERRIDE; virtual bool layerTreeStateIsFrozen() const OVERRIDE; virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) OVERRIDE; - virtual void scheduleCompositingLayerSync() OVERRIDE; + virtual void scheduleCompositingLayerFlush() OVERRIDE; virtual void didInstallPageOverlay() OVERRIDE; virtual void didUninstallPageOverlay() OVERRIDE; @@ -70,7 +70,7 @@ private: // WebCore::GraphicsLayerClient virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE; - virtual void notifySyncRequired(const WebCore::GraphicsLayer*) OVERRIDE; + virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE; virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect) OVERRIDE; virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const OVERRIDE; virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const OVERRIDE; diff --git a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm index 43f6440a8..fcd72cac9 100644 --- a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm +++ b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm @@ -43,7 +43,6 @@ #import <WebCore/GraphicsContext.h> #import <WebCore/GraphicsLayerCA.h> #import <WebCore/Page.h> -#import <WebCore/RenderLayerCompositor.h> #import <WebCore/RenderView.h> #import <WebCore/ScrollingCoordinator.h> #import <WebCore/ScrollingThread.h> @@ -174,7 +173,7 @@ bool TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen() const return m_layerTreeStateIsFrozen; } -void TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync() +void TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlush() { m_layerFlushScheduler.schedule(); } @@ -184,7 +183,7 @@ void TiledCoreAnimationDrawingArea::didInstallPageOverlay() m_webPage->corePage()->scrollingCoordinator()->setForceMainThreadScrollLayerPositionUpdates(true); createPageOverlayLayer(); - scheduleCompositingLayerSync(); + scheduleCompositingLayerFlush(); } void TiledCoreAnimationDrawingArea::didUninstallPageOverlay() @@ -193,14 +192,14 @@ void TiledCoreAnimationDrawingArea::didUninstallPageOverlay() page->scrollingCoordinator()->setForceMainThreadScrollLayerPositionUpdates(false); destroyPageOverlayLayer(); - scheduleCompositingLayerSync(); + scheduleCompositingLayerFlush(); } void TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay(const IntRect& rect) { ASSERT(m_pageOverlayLayer); m_pageOverlayLayer->setNeedsDisplayInRect(rect); - scheduleCompositingLayerSync(); + scheduleCompositingLayerFlush(); } void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore&) @@ -263,7 +262,7 @@ void TiledCoreAnimationDrawingArea::notifyAnimationStarted(const GraphicsLayer*, { } -void TiledCoreAnimationDrawingArea::notifySyncRequired(const GraphicsLayer*) +void TiledCoreAnimationDrawingArea::notifyFlushRequired(const GraphicsLayer*) { } @@ -305,10 +304,10 @@ bool TiledCoreAnimationDrawingArea::flushLayers() if (m_pageOverlayLayer) { m_pageOverlayLayer->setNeedsDisplay(); - m_pageOverlayLayer->syncCompositingStateForThisLayerOnly(); + m_pageOverlayLayer->flushCompositingStateForThisLayerOnly(); } - bool returnValue = m_webPage->corePage()->mainFrame()->view()->syncCompositingStateIncludingSubframes(); + bool returnValue = m_webPage->corePage()->mainFrame()->view()->flushCompositingStateIncludingSubframes(); [pool drain]; return returnValue; @@ -442,7 +441,7 @@ void TiledCoreAnimationDrawingArea::createPageOverlayLayer() { ASSERT(!m_pageOverlayLayer); - m_pageOverlayLayer = GraphicsLayer::create(this); + m_pageOverlayLayer = GraphicsLayer::create(graphicsLayerFactory(), this); #ifndef NDEBUG m_pageOverlayLayer->setName("page overlay content"); #endif diff --git a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm index c2f016537..2acf85b0e 100644 --- a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm +++ b/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm @@ -94,6 +94,14 @@ void WebPage::platformPreferencesDidChange(const WebPreferencesStore& store) { if (WebInspector* inspector = this->inspector()) inspector->setInspectorUsesWebKitUserInterface(store.getBoolValueForKey(WebPreferencesKey::inspectorUsesWebKitUserInterfaceKey())); + + BOOL omitPDFSupport = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"]; + if (!pdfPluginEnabled() && !omitPDFSupport) { + // We want to use a PDF view in the UI process for PDF MIME types. + HashSet<String, CaseFoldingHash> mimeTypes = pdfAndPostScriptMIMETypes(); + for (HashSet<String, CaseFoldingHash>::iterator it = mimeTypes.begin(); it != mimeTypes.end(); ++it) + m_mimeTypesWithCustomRepresentations.add(*it); + } } typedef HashMap<String, String> SelectorNameMap; @@ -121,7 +129,7 @@ static String commandNameForSelectorName(const String& selectorName) static const SelectorNameMap* exceptionMap = createSelectorExceptionMap(); SelectorNameMap::const_iterator it = exceptionMap->find(selectorName); if (it != exceptionMap->end()) - return it->second; + return it->value; // Remove the trailing colon. // No need to capitalize the command name since Editor command names are not case sensitive. @@ -866,4 +874,16 @@ void WebPage::drawPagesToPDFFromPDFDocument(CGContextRef context, PDFDocument *p } } +// FIXME: This is not the ideal place for this function (and now it's duplicated here and in WebContextMac). +HashSet<String, CaseFoldingHash> WebPage::pdfAndPostScriptMIMETypes() +{ + HashSet<String, CaseFoldingHash> mimeTypes; + + mimeTypes.add("application/pdf"); + mimeTypes.add("application/postscript"); + mimeTypes.add("text/pdf"); + + return mimeTypes; +} + } // namespace WebKit |
