Commit 8723db29 authored by enrica@apple.com's avatar enrica@apple.com

Merging some more iOS WebKit2 stuff.

https://bugs.webkit.org/show_bug.cgi?id=125119

Reviewed by Tim Horton.

* Shared/EditorState.h:
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/PageClient.h:
* UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.mm:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
* UIProcess/mac/SecItemShimProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e8db2668
2013-12-02 Enrica Casucci <enrica@apple.com>
Merging some more iOS WebKit2 stuff.
https://bugs.webkit.org/show_bug.cgi?id=125119
Reviewed by Tim Horton.
* Shared/EditorState.h:
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/PageClient.h:
* UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.mm:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
* UIProcess/mac/SecItemShimProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2013-12-02 Anders Carlsson <andersca@apple.com>
Add versioned structs for the remaining clients
......
......@@ -30,6 +30,10 @@
#include <WebCore/IntRect.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(IOS)
#include <WebCore/SelectionRect.h>
#endif
namespace WebKit {
struct EditorState {
......
......@@ -42,6 +42,10 @@ typedef union _GdkEvent GdkEvent;
#include <Evas.h>
#endif
#if PLATFORM(IOS)
OBJC_CLASS WebIOSEvent;
#endif
namespace WebKit {
class NativeWebKeyboardEvent : public WebKeyboardEvent {
......
......@@ -28,14 +28,6 @@
#include "WebEvent.h"
#if PLATFORM(IOS)
#include <wtf/RetainPtr.h>
#ifdef __OBJC__
@class UIWebTouchEventsGestureRecognizer;
#else
class UIWebTouchEventsGestureRecognizer;
#endif // __OBJC__
#endif // PLATFORM(IOS)
#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
OBJC_CLASS NSView;
......
......@@ -28,6 +28,11 @@
#include "WebEvent.h"
#if PLATFORM(IOS)
#include <wtf/RetainPtr.h>
OBJC_CLASS UIWebTouchEventsGestureRecognizer;
#endif // PLATFORM(IOS)
#if PLATFORM(EFL)
#include "EwkTouchEvent.h"
#include <WebCore/AffineTransform.h>
......
......@@ -32,6 +32,10 @@
#include <WebCore/FloatRect.h>
#include <WebCore/Region.h>
#if USE(IOSURFACE)
#include <IOSurface/IOSurface.h>
#endif
// FIXME: Make PlatformCALayerRemote.cpp Objective-C so we can include WebLayer.h here and share the typedef.
namespace WebCore {
typedef Vector<WebCore::FloatRect, 5> RepaintRectList;
......@@ -71,7 +75,8 @@ private:
bool hasFrontBuffer()
{
#if USE(IOSURFACE)
return m_acceleratesDrawing ? !!m_frontSurface : !!m_frontBuffer;
if (m_acceleratesDrawing)
return !!m_frontSurface;
#endif
return !!m_frontBuffer;
}
......
......@@ -27,6 +27,7 @@
#import "RemoteLayerTreePropertyApplier.h"
#import "PlatformCALayerRemote.h"
#import <QuartzCore/CALayer.h>
#import <WebCore/PlatformCAFilters.h>
using namespace WebCore;
......
......@@ -108,18 +108,18 @@ static void addDYLDEnvironmentAdditions(const ProcessLauncher::LaunchOptions& la
} else
#endif // ENABLE(NETSCAPE_PLUGIN_API)
#if ENABLE(NETWORK_PROCESS)
if (launchOptions.processType == ProcessLauncher::WebProcess) {
NSString *processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"];
if (launchOptions.processType == ProcessLauncher::NetworkProcess) {
NSString *processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"NetworkProcess.app"];
NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"WebProcessShim.dylib"];
processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"SecItemShim.dylib"];
} else
#endif // ENABLE(NETWORK_PROCESS)
if (launchOptions.processType == ProcessLauncher::NetworkProcess) {
NSString *processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"NetworkProcess.app"];
if (launchOptions.processType == ProcessLauncher::WebProcess) {
NSString *processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"];
NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"SecItemShim.dylib"];
processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"WebProcessShim.dylib"];
}
// Make sure that the shim library file exists and insert it.
......
......@@ -169,6 +169,7 @@ public:
virtual void resetSecureInputState() = 0;
virtual void notifyInputContextAboutDiscardedComposition() = 0;
virtual void makeFirstResponder() = 0;
virtual void setAcceleratedCompositingRootLayer(CALayer *) = 0;
#endif
#if USE(APPKIT)
......@@ -216,7 +217,6 @@ public:
virtual void recommendedScrollbarStyleDidChange(int32_t newStyle) = 0;
virtual ColorSpaceData colorSpace() = 0;
virtual void setAcceleratedCompositingRootLayer(CALayer *) = 0;
#if USE(APPKIT)
virtual WKView* wkView() const = 0;
......@@ -229,6 +229,19 @@ public:
#endif // USE(DICTATION_ALTERNATIVES)
#endif // USE(APPKIT)
#endif // PLATFORM(MAC)
#if PLATFORM(IOS)
virtual void mainDocumentDidReceiveMobileDocType() = 0;
virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) = 0;
virtual void didChangeViewportArguments(const WebCore::ViewportArguments&) = 0;
virtual void startAssistingNode(const WebCore::IntRect&, bool hasNextFocusable, bool hasPreviousFocusable) = 0;
virtual void stopAssistingNode() = 0;
virtual void selectionDidChange() = 0;
virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) = 0;
#endif
};
} // namespace WebKit
......
......@@ -45,12 +45,12 @@ TiledCoreAnimationDrawingAreaProxyIOS::~TiledCoreAnimationDrawingAreaProxyIOS()
void TiledCoreAnimationDrawingAreaProxyIOS::deviceScaleFactorDidChange()
{
m_webPageProxy->process()->send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
m_webPageProxy->process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
}
void TiledCoreAnimationDrawingAreaProxyIOS::sizeDidChange()
{
m_webPageProxy->process()->send(Messages::DrawingArea::UpdateGeometry(m_size, IntSize()), m_webPageProxy->pageID());
m_webPageProxy->process().send(Messages::DrawingArea::UpdateGeometry(m_size, IntSize()), m_webPageProxy->pageID());
}
void TiledCoreAnimationDrawingAreaProxyIOS::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
......
......@@ -56,6 +56,7 @@ void RemoteLayerTreeDrawingAreaProxy::sizeDidChange()
void RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange()
{
m_webPageProxy->process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
}
void RemoteLayerTreeDrawingAreaProxy::didUpdateGeometry()
......
......@@ -20,6 +20,7 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if !PLATFORM(IOS)
messages -> SecItemShimProxy {
#if USE(SECURITY_FRAMEWORK)
......@@ -27,3 +28,4 @@ messages -> SecItemShimProxy {
#endif
}
#endif
......@@ -166,6 +166,7 @@ void WKBundlePageClickMenuItem(WKBundlePageRef pageRef, WKContextMenuItemRef ite
#endif
}
#if ENABLE(CONTEXT_MENUS)
static PassRefPtr<API::Array> contextMenuItems(const WebContextMenu& contextMenu)
{
auto items = contextMenu.items();
......@@ -178,6 +179,7 @@ static PassRefPtr<API::Array> contextMenuItems(const WebContextMenu& contextMenu
return API::Array::create(std::move(menuItems));
}
#endif
WKArrayRef WKBundlePageCopyContextMenuItems(WKBundlePageRef pageRef)
{
......
......@@ -103,9 +103,9 @@ void InitWebCoreSystemInterface(void)
INIT(QTGetSitesInMediaDownloadCache);
INIT(QTClearMediaDownloadCacheForSite);
INIT(QTClearMediaDownloadCache);
INIT(SetBaseCTM);
INIT(SetCGFontRenderingMode);
#endif
INIT(SetBaseCTM);
INIT(SetCONNECTProxyAuthorizationForStream);
INIT(SetCONNECTProxyForStream);
#if !PLATFORM(IOS)
......@@ -191,11 +191,11 @@ void InitWebCoreSystemInterface(void)
INIT(DestroyRenderingResources);
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
INIT(ExecutableWasLinkedOnOrBeforeLion);
#endif
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
INIT(CreateMemoryStatusPressureCriticalDispatchOnMainQueue);
#endif
......
......@@ -3365,7 +3365,7 @@ void WebPage::drawRectToImage(uint64_t frameID, const PrintInfo& printInfo, cons
#if USE(CG)
if (coreFrame) {
#if PLATFORM(MAC)
#if PLATFORM(MAC) && !PLATFORM(IOS)
ASSERT(coreFrame->document()->printing() || pdfDocumentForPrintingFrame(coreFrame));
#else
ASSERT(coreFrame->document()->printing());
......@@ -3377,7 +3377,7 @@ void WebPage::drawRectToImage(uint64_t frameID, const PrintInfo& printInfo, cons
float printingScale = static_cast<float>(imageSize.width()) / rect.width();
graphicsContext->scale(FloatSize(printingScale, printingScale));
#if PLATFORM(MAC)
#if PLATFORM(MAC) && !PLATFORM(IOS)
if (RetainPtr<PDFDocument> pdfDocument = pdfDocumentForPrintingFrame(coreFrame)) {
ASSERT(!m_printContext);
graphicsContext->scale(FloatSize(1, -1));
......@@ -3411,7 +3411,7 @@ void WebPage::drawPagesToPDF(uint64_t frameID, const PrintInfo& printInfo, uint3
#if USE(CG)
if (coreFrame) {
#if PLATFORM(MAC)
#if PLATFORM(MAC) && !PLATFORM(IOS)
ASSERT(coreFrame->document()->printing() || pdfDocumentForPrintingFrame(coreFrame));
#else
ASSERT(coreFrame->document()->printing());
......@@ -3423,7 +3423,7 @@ void WebPage::drawPagesToPDF(uint64_t frameID, const PrintInfo& printInfo, uint3
CGRect mediaBox = (m_printContext && m_printContext->pageCount()) ? m_printContext->pageRect(0) : CGRectMake(0, 0, printInfo.availablePaperWidth, printInfo.availablePaperHeight);
RetainPtr<CGContextRef> context = adoptCF(CGPDFContextCreate(pdfDataConsumer.get(), &mediaBox, 0));
#if PLATFORM(MAC)
#if PLATFORM(MAC) && !PLATFORM(IOS)
if (RetainPtr<PDFDocument> pdfDocument = pdfDocumentForPrintingFrame(coreFrame)) {
ASSERT(!m_printContext);
drawPagesToPDFFromPDFDocument(context.get(), pdfDocument.get(), printInfo, first, count);
......
......@@ -72,6 +72,11 @@ private:
virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect) OVERRIDE;
virtual float deviceScaleFactor() const OVERRIDE;
virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const OVERRIDE { }
#if PLATFORM(IOS)
virtual void setDeviceScaleFactor(float) OVERRIDE;
virtual float minimumDocumentScale() const OVERRIDE;
virtual bool allowCompositingLayerVisualDegradation() const OVERRIDE { return false; }
#endif
std::unique_ptr<RemoteLayerTreeContext> m_remoteLayerTreeContext;
RefPtr<WebCore::PlatformCALayer> m_rootLayer;
......
......@@ -187,6 +187,18 @@ float RemoteLayerTreeDrawingArea::deviceScaleFactor() const
return m_webPage->corePage()->deviceScaleFactor();
}
#if PLATFORM(IOS)
void RemoteLayerTreeDrawingArea::setDeviceScaleFactor(float deviceScaleFactor)
{
m_webPage->setDeviceScaleFactor(deviceScaleFactor);
}
float RemoteLayerTreeDrawingArea::minimumDocumentScale() const
{
return m_webPage->corePage()->mainFrame().minimumDocumentScale();
}
#endif
void RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen(bool isFrozen)
{
m_remoteLayerTreeContext->setIsFlushingSuspended(isFrozen);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment